Solved

Posted on 2011-05-08

there are 1000 people.

starting from 1 to 1000.

1 can pair with (2 to 1000) so there are 999 combinations.

2 can pair with (1,3 to 1000) so there are 999 combinations.

.. up to 1000.

effectively there are 1000 multiplied by 1000 combinations.

==

If you see that case 1 is paired to 2.

so there is no need for 2 to again paired and counted to 1.

using this logic how many possible combinations are possible?

what is the formula that can be derived?

starting from 1 to 1000.

1 can pair with (2 to 1000) so there are 999 combinations.

2 can pair with (1,3 to 1000) so there are 999 combinations.

.. up to 1000.

effectively there are 1000 multiplied by 1000 combinations.

==

If you see that case 1 is paired to 2.

so there is no need for 2 to again paired and counted to 1.

using this logic how many possible combinations are possible?

what is the formula that can be derived?

12 Comments

but the order does not matter, so divide by the number of ways the pair can be ordered.

1000! for first combination.

1*2 as the ways paired. you also have *(1000-2)? why is that

Surely the answer is 250,000

The first person can be paired with n-1 people, here thats 1000-1 or 999

The second person can be paired with n-3 or 997

The third person can be paired with n-5 or 995

For all people upto the value of n/2

So its (n-1)+(n-3)+(n-5)...+(n-n/

=250,000 for a start value of 1000.

rather than the number of ways to choose a single pair, that would be the double factorial

1*3*5*7*...*999

If there were 8 people, would the answer you were looking for be 105, 28, or 16?

Here is a link for a more general explanation of this: http://mathforum.org/libra

if we want to represent in a algorithm how can we do that?

basically i want know the formula not only to have the total count but also the possible combination.

In algorithmic form you could think of something like:

for p1=1 to 1000 do #this loops through all people

for p2=p1+1 to 1000 do # this loops through all people with numbers higher than p1

print p1,p2

done

done

In this algorithm you get all pairs where p1<p2 which guarantees that you get every combination (p1,p2) or (p2,p1) only once.

Title | # Comments | Views | Activity |
---|---|---|---|

How many squares are in this diagram? | 19 | 9,739 | |

Efficiency Calculation | 11 | 462 | |

Software Engineering Problem | 9 | 1,046 | |

How many 15 digit binary sequences are there with no exactly two adjacent 0's ? | 10 | 274 |

how to add IIS SMTP to handle application/Scanner relays into office 365.

This video discusses moving either the default database or any database to a new volume.

Join the community of 500,000 technology professionals and ask your questions.

Connect with top rated Experts

**22** Experts available now in Live!