mathematical combination




Hi!
I'm new to C++ but I have a challenge to write a program to find the
different mathematical combinations of p and t objects respectively
from a total of n objects i.e. nCp and nCt.The program should display
the various combinations.
A further aspect is to find the intersection between nCp and nCt
i.e.each set of nCp that contains each of the possible combinations of
nCt without considering the order of appearance.
Let me try to be clearer,pls:
say n=7,p=5 and t=3
1. I want a program to find 7C5 and 7C3
2. I want a display of the possible combinations in each case i.e
for 7C5; (12345),(12346),(12347),(13456)etc and
for 7C3; (123),(124),(125),(126)etc
3. Finally, the intersection e.g.
(123) intersects (12345),(12346),...
(124) intersects (12345),(12346)...
(125) intersects (12345)
and so on.
Your help will be appreciated.Thanks.

.



Relevant Pages

  • Re: mathematical combination
    ... A further aspect is to find the intersection between nCp and nCt ... I want a display of the possible combinations in each case i.e ... intersects,,... ... Look up "Pascal's Triangle" for a table lookup approach to the nCr ...
    (comp.programming)
  • Re: mathematical combination
    ... A further aspect is to find the intersection between nCp and nCt ... intersects,,... ... int operator { ...
    (comp.programming)
  • dots instead of grid lines
    ... just display a dot where each vert/horiz line ...
    (microsoft.public.excel.worksheet.functions)