# Finding Combinations of Numbers

• Apr 14th 2012, 07:47 AM
Raabi
Finding Combinations of Numbers
Hello everyone

It is my first posting in this forum; and hope receiving help and assistance from the Math Gurus. Here is my very initial problem:

I have 2 equal sets of numbers 1 to 6 as below:

A = {1, 2, 3, 4, 5, 6}
B = {1, 2, 3, 4, 5, 6}

How many unique pairs of numbers can be made out of these 2 sets, like;
(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6),
(2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6),
(3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6),
-----------------------------------------------
-----------------------------------------------
(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)

While manually doing, I get total number of 36 pairs and after deducting the repetitions, I get 32 pairs. But, by using the Combination Formula 12C2 (12 numbers taken 2 at a time), I get 66 pairs. Where am I wrong!
Actually, I want to solve this problem for a larger number of sets, like 10. I will appreciate clearing my confusions and suggesting the better algorithm, if any.

Thanks in anticipation.

Raabi
• Apr 14th 2012, 08:01 AM
Plato
Re: Finding Combinations of Numbers
Quote:

Originally Posted by Raabi
Hello everyone

It is my first posting in this forum; and hope receiving help and assistance from the Math Gurus. Here is my very initial problem:

I have 2 equal sets of numbers 1 to 6 as below:

A = {1, 2, 3, 4, 5, 6}
B = {1, 2, 3, 4, 5, 6}

How many unique pairs of numbers can be made out of these 2 sets, like;
(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6),
(2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6),
(3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6),
-----------------------------------------------
-----------------------------------------------
(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)

While manually doing, I get total number of 36 pairs and after deducting the repetitions, I get 32 pairs. But, by using the Combination Formula 12C2 (12 numbers taken 2 at a time), I get 66 pairs. Where am I wrong!
Actually, I want to solve this problem for a larger number of sets, like 10. I will appreciate clearing my confusions and suggesting the better algorithm, if any.

Which do you want the number of ordered pair or the number of two element sets? There is a difference,
There are 36 ordered pairs. There are 15 two element sets.
Note that \$\displaystyle \{2,2\}=\{2\}\$ which is not a two element set.
Also \$\displaystyle \{1,2\}=\{2,1\}\$ which is a two element set.

But for pairs \$\displaystyle (2,2)\$ is a perfectly good ordered pair.
Moreover, \$\displaystyle (1,2)\ne (2,1)\$, they are two different pairs.

So which do you mean?
• Apr 14th 2012, 08:12 AM
Raabi
Re: Finding Combinations of Numbers
Thanks for the response. I am interested in finding the number of possible PAIRS ONLY, irrespective of the definition of the set. I need the solution for just general purpose.

Regards,
• Apr 14th 2012, 08:16 AM
Plato
Re: Finding Combinations of Numbers
Quote:

Originally Posted by Raabi
Thanks for the response. I am interested in finding the number of possible PAIRS ONLY, irrespective of the definition of the set. I need the solution for just general purpose.

Then do you consider both \$\displaystyle <1,2>~\&~<2,2>\$ as pairs?
Do you consider \$\displaystyle <1,2>~\&~<2,1>\$ as different pairs?
You see it is just not clear what you want to count.
• Apr 14th 2012, 08:21 AM
Raabi
Re: Finding Combinations of Numbers
I do consider (1, 2) and (2, 2) as pairs. But (1, 2) and (2, 1) are repetitions to be excluded from the number of pairs.
• Apr 14th 2012, 08:28 AM
Plato
Re: Finding Combinations of Numbers
Quote:

Originally Posted by Raabi
I do consider (1, 2) and (2, 2) as pairs. But (1, 2) and (2, 1) are repetitions to be excluded from the number of pairs.

So you want to count multi-sets, multi-selections.
You want to select two from \$\displaystyle \{1,2,3,4,5,6\}\$ allowing for repetitions.
\$\displaystyle \binom{2+6-1}{2}=21\$
• Apr 14th 2012, 08:48 AM
Raabi
Re: Finding Combinations of Numbers
I appreciate your attention and trying to help me. May be I could not explain my point. Let me try it again.

How many unique pairs of numbers can be made out of the 2 sets of numbers (1 to 6). Here, I did NOT use the word SET in technical sense; but just in general.
(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6),
(2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6),
(3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6),
(4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6),
(5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6),
(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)

You can count them 6*6 = 36 pairs, in total (including repetitions). My confusion is why is it different from the result from the Combination formula (Not Permutation).
Secondly, I want to expand the number of sets to 10. Then, what will be the result.

Thanks and regards.
• Apr 14th 2012, 08:54 AM
Plato
Re: Finding Combinations of Numbers
Quote:

Originally Posted by Raabi
I appreciate your attention and trying to help me. May be I could not explain my point. Let me try it again.

How many unique pairs of numbers can be made out of the 2 sets of numbers (1 to 6). Here, I did NOT use the word SET in technical sense; but just in general.
(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6),
(2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6),
(3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6),
(4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6),
(5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6),
(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)

You can count them 6*6 = 36 pairs, in total (including repetitions). My confusion is why is it different from the result from the Combination formula (Not Permutation).
Secondly, I want to expand the number of sets to 10. Then, what will be the result

Look. This is a well settled area of counting theory.
The answer is 21. Take a look at this webpage.
• Apr 14th 2012, 09:01 AM
Raabi
Re: Finding Combinations of Numbers
Thanks for the link. I will try to grasp the idea.

Regards,
• Apr 14th 2012, 09:27 AM
biffboy
Re: Finding Combinations of Numbers
In your table there are 6 repetition pairs so there are 30 pairs in which the numbers are different. Also you were taking one number from each set.

12C2 is the number of pairs you can take from 12 different items, which isn't your question.
• Apr 14th 2012, 08:28 PM
Raabi
Re: Finding Combinations of Numbers
Thank you very much biffby for pointing my confusion. It ticks my mind; but could not understand it well.
Dummies, like me, need a bit more assistance :-). A bit more hint may help clarify it.

Regards

Let me ask the same question in a different way in order to make it clearer.
Just leave the repetition for the sake of simplicity. Let's say, there are 2 dices. When I roll these 2 dices, I get the following pairs:

(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6),
(2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6),
(3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6),
(4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6),
(5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6),
(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)

The above pairs of numbers equal 36. But, when I use the the Combination Formula 12C2 (12 numbers taken 2 at a time), I get 66 pairs.
Naturally, the discrepancy is the result of my confusion, which I want to understand.

Regards
• Apr 14th 2012, 09:30 PM
biffboy
Re: Finding Combinations of Numbers
The number of pairs of different numbers (counting 1,2 and 2,1 etc as the same) is 6C2=15

If you also want to include (1,1) (2,2) etc the number of pairs will be 15+6=21

So if you were dealing with the numbers 1-10 the number of pairs would be 10C2 +10= 55
• Apr 14th 2012, 11:50 PM
Raabi
Re: Finding Combinations of Numbers
Now, it is more and much clear.
But, how can I calculate the same analogy by using Combination formula!
I hope, I am not bothering too much. Just one more attempt may resolve the issue for good.

Regards
• Apr 15th 2012, 01:12 AM
biffboy
Re: Finding Combinations of Numbers
See the earlier post (no 6) from Plato.
• Apr 15th 2012, 02:23 AM
Raabi
Re: Finding Combinations of Numbers
Yes, I got it. Thanks a lot.

Regards