Edu59
Computer
- Aug 24, 2011
- 1
Hi:
I am a computer engineer and I am trying to count the following type of combinations with an unknown built-in function in Matlab:
Let K={1,2,...,20} be the set of the first 20 integers.Consider all combinations of 9 elements selected from the set K.How many of these combinations contain elements that differ by 3?
For example (7,10,11,12,14,17,18,19,20)has elements 7 and 10 whose
difference is 3 while the combination (1,2,6,7,8,12,13,14,19) has no elements with difference 3.
Using Matlab,how many combinations are there that contain elements that differ by 3?
Thank you in advance.
I am a computer engineer and I am trying to count the following type of combinations with an unknown built-in function in Matlab:
Let K={1,2,...,20} be the set of the first 20 integers.Consider all combinations of 9 elements selected from the set K.How many of these combinations contain elements that differ by 3?
For example (7,10,11,12,14,17,18,19,20)has elements 7 and 10 whose
difference is 3 while the combination (1,2,6,7,8,12,13,14,19) has no elements with difference 3.
Using Matlab,how many combinations are there that contain elements that differ by 3?
Thank you in advance.