# Math Help - How many different sets of 3 numbers can you make from the numbers 1 thru 15 ??

1. ## How many different sets of 3 numbers can you make from the numbers 1 thru 15 ??

Hi all, i'm new to the forum so i hope this is the correct place to post this question. If i have 15 numbers 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, how do i figure out how many different sets of 3 numbers together i can make from the 15, like 1,2,3 or 1,6,8 for example. No duplicates so for example 1,2,3 would be the same as 3,2,1 or 1,3,2 etc. Just every number with every other number once in sets of 3 numbers. How many combinations are there without replicating any? If you could explain how you got the answer too that would be great. TIA for the help, i appreciate it. Take care.

2. ${{15}\choose{3}}=\frac{15!}{(12!)(3!)}=455$ different ways.

If you aren't sure what !(factorial) is you can check out Factorial - Wikipedia, the free encyclopedia

3. Thanks for the quick reply and explanantion. Just to double check the 455 different ways excludes the same numbers in different orders such as 1,2,3 and 2,1,3 correct? Thanks again.

4. Yes

5. ## Answer if 1, 2, 3 and 3, 1, 2 are different sets.

If you want 1, 2, 3 and 3, 1, 2 to be different sets the answer will be
$_3^1^5P= 15 * 14 * 13 = 2730 ways$

6. OK thanks for the help i get it now. I have 1 more question. Is there a way to figure out what all 455 sets would be or do i just have to go thru all the numbers and match them up until i get 455 different sets? Thanks to the mod for putting this in the right place, sorry about that. Thanks again for the help everyone.

7. Originally Posted by thedude
Is there a way to figure out what all 455 sets would be or do i just have to go thru all the numbers and match them up until i get 455 different sets?
Sorry there is just no easy way to do that.
A computer can be programmed to output the list.
Here is a way to start.
Take the string $111000000000000$ that represents the set $\{1,2,3\}$
The string $100100000000001$ that represents the set $\{1,4,15\}$.
So any arrangement of a queue three 1’s and twelve 0’s represents one subset you want.

8. Originally Posted by thedude
OK thanks for the help i get it now. I have 1 more question. Is there a way to figure out what all 455 sets would be or do i just have to go thru all the numbers and match them up until i get 455 different sets? Thanks to the mod for putting this in the right place, sorry about that. Thanks again for the help everyone.
A pretty easy algorithm is to use a loop within a loop within a loop. A recursive solution is also possible, but is more useful for when the number 3 is not fixed.

I consider it easy enough I'll just write it now.

C++

[php]
#include <cstdio>

int main() {
int c=0,i,j,k;
for(i=1;i<=13;i++)
for(j=i+1;j<=14;j++)
for(k=j+1;k<=15;k++) {
printf("%d %d %d\n",i,j,k);
c++;
}
printf("\n%d combinations found.\n",c);
return 0;
}
[/php]

Can be run online here:

Ideone.com | LHLGK

9. Cool! Thanks so much for your time and help everyone, i truly appreciate. Take care.