Count specific semi-consequtive subsets of a set - general formula?
up vote
0
down vote
favorite
Given a set of consequtive integer numbers {1,2,3,...36} and considering all 376992 5-number combinations out of this set, how can we count following:
number of 5-number combinations having 3 numbers like this
- +1, +2 pattern: (1,2,4) or (2,3,5) or ... or (33,34,36)
- +2, +2 pattern
- +2, +3 pattern
+n, +k pattern
Is it possible to generalize?
combinatorics combinations
add a comment |
up vote
0
down vote
favorite
Given a set of consequtive integer numbers {1,2,3,...36} and considering all 376992 5-number combinations out of this set, how can we count following:
number of 5-number combinations having 3 numbers like this
- +1, +2 pattern: (1,2,4) or (2,3,5) or ... or (33,34,36)
- +2, +2 pattern
- +2, +3 pattern
+n, +k pattern
Is it possible to generalize?
combinatorics combinations
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Given a set of consequtive integer numbers {1,2,3,...36} and considering all 376992 5-number combinations out of this set, how can we count following:
number of 5-number combinations having 3 numbers like this
- +1, +2 pattern: (1,2,4) or (2,3,5) or ... or (33,34,36)
- +2, +2 pattern
- +2, +3 pattern
+n, +k pattern
Is it possible to generalize?
combinatorics combinations
Given a set of consequtive integer numbers {1,2,3,...36} and considering all 376992 5-number combinations out of this set, how can we count following:
number of 5-number combinations having 3 numbers like this
- +1, +2 pattern: (1,2,4) or (2,3,5) or ... or (33,34,36)
- +2, +2 pattern
- +2, +3 pattern
+n, +k pattern
Is it possible to generalize?
combinatorics combinations
combinatorics combinations
edited Nov 13 at 22:37
Asaf Karagila♦
299k32420750
299k32420750
asked Nov 13 at 22:33
caasdads
947
947
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
If I understand correctly, you want to get all the subsets of 5 elements where you have 3 numbers following the pattern.
The number of ways to get 3 numbers that follow the pattern is equal to: $$36 - n - k$$ This means that you need to figure out what is the highest value that you can pick in such a way that the second and third numbers are still in the initial set.
From the remaining numbers, you need to pick 2, in order to form a set of 5 elements, and this can be done in: $$binom{33}{2}$$
So the total number of sets that follow the rule is:
$$(36 - n - k) binom{33}{2}$$
This assumes that when you have a pattern like: +2, +4, having {1,2,3,4,5} is still a valid set because {1,3,5} follow the pattern.
This is a great idea! Unfortunately I need +n +k pattern like this: +2, +4 pattern is {1,3,7} that is +2 is applied to smallest element, and +4 applies to the result of first +2, not to smallest element itself (1). So {1,3,5} is +2 +2 pattern, not +2 +4. Otherwise, there are no restrictions on the other (two) numbers which are not part of such 3-number-set-following-pattern.
– Code Complete
Nov 13 at 23:04
1
I think36 - n - k
is still valid.x + n = p; p + k <= 36
. In this casex + n + p <= 36
. There are36 - n - p
ways to choose x.
– Erik Cristian Seulean
Nov 13 at 23:14
The formula holds only for n=1, k=1.
– Code Complete
Nov 13 at 23:37
1
I don't think I follow correctly what you actually want. Forn=1;k=20
you have 36 - 21 = 15 options for the first number. (Everything from{1,2, ..., 15}
). Last set is going to be{15,16,36}
plus all the remaining combinations of 2 numbers out of 33. This gives 9450 possible combinations. What am I missing here ?
– Erik Cristian Seulean
Nov 13 at 23:55
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
If I understand correctly, you want to get all the subsets of 5 elements where you have 3 numbers following the pattern.
The number of ways to get 3 numbers that follow the pattern is equal to: $$36 - n - k$$ This means that you need to figure out what is the highest value that you can pick in such a way that the second and third numbers are still in the initial set.
From the remaining numbers, you need to pick 2, in order to form a set of 5 elements, and this can be done in: $$binom{33}{2}$$
So the total number of sets that follow the rule is:
$$(36 - n - k) binom{33}{2}$$
This assumes that when you have a pattern like: +2, +4, having {1,2,3,4,5} is still a valid set because {1,3,5} follow the pattern.
This is a great idea! Unfortunately I need +n +k pattern like this: +2, +4 pattern is {1,3,7} that is +2 is applied to smallest element, and +4 applies to the result of first +2, not to smallest element itself (1). So {1,3,5} is +2 +2 pattern, not +2 +4. Otherwise, there are no restrictions on the other (two) numbers which are not part of such 3-number-set-following-pattern.
– Code Complete
Nov 13 at 23:04
1
I think36 - n - k
is still valid.x + n = p; p + k <= 36
. In this casex + n + p <= 36
. There are36 - n - p
ways to choose x.
– Erik Cristian Seulean
Nov 13 at 23:14
The formula holds only for n=1, k=1.
– Code Complete
Nov 13 at 23:37
1
I don't think I follow correctly what you actually want. Forn=1;k=20
you have 36 - 21 = 15 options for the first number. (Everything from{1,2, ..., 15}
). Last set is going to be{15,16,36}
plus all the remaining combinations of 2 numbers out of 33. This gives 9450 possible combinations. What am I missing here ?
– Erik Cristian Seulean
Nov 13 at 23:55
add a comment |
up vote
1
down vote
If I understand correctly, you want to get all the subsets of 5 elements where you have 3 numbers following the pattern.
The number of ways to get 3 numbers that follow the pattern is equal to: $$36 - n - k$$ This means that you need to figure out what is the highest value that you can pick in such a way that the second and third numbers are still in the initial set.
From the remaining numbers, you need to pick 2, in order to form a set of 5 elements, and this can be done in: $$binom{33}{2}$$
So the total number of sets that follow the rule is:
$$(36 - n - k) binom{33}{2}$$
This assumes that when you have a pattern like: +2, +4, having {1,2,3,4,5} is still a valid set because {1,3,5} follow the pattern.
This is a great idea! Unfortunately I need +n +k pattern like this: +2, +4 pattern is {1,3,7} that is +2 is applied to smallest element, and +4 applies to the result of first +2, not to smallest element itself (1). So {1,3,5} is +2 +2 pattern, not +2 +4. Otherwise, there are no restrictions on the other (two) numbers which are not part of such 3-number-set-following-pattern.
– Code Complete
Nov 13 at 23:04
1
I think36 - n - k
is still valid.x + n = p; p + k <= 36
. In this casex + n + p <= 36
. There are36 - n - p
ways to choose x.
– Erik Cristian Seulean
Nov 13 at 23:14
The formula holds only for n=1, k=1.
– Code Complete
Nov 13 at 23:37
1
I don't think I follow correctly what you actually want. Forn=1;k=20
you have 36 - 21 = 15 options for the first number. (Everything from{1,2, ..., 15}
). Last set is going to be{15,16,36}
plus all the remaining combinations of 2 numbers out of 33. This gives 9450 possible combinations. What am I missing here ?
– Erik Cristian Seulean
Nov 13 at 23:55
add a comment |
up vote
1
down vote
up vote
1
down vote
If I understand correctly, you want to get all the subsets of 5 elements where you have 3 numbers following the pattern.
The number of ways to get 3 numbers that follow the pattern is equal to: $$36 - n - k$$ This means that you need to figure out what is the highest value that you can pick in such a way that the second and third numbers are still in the initial set.
From the remaining numbers, you need to pick 2, in order to form a set of 5 elements, and this can be done in: $$binom{33}{2}$$
So the total number of sets that follow the rule is:
$$(36 - n - k) binom{33}{2}$$
This assumes that when you have a pattern like: +2, +4, having {1,2,3,4,5} is still a valid set because {1,3,5} follow the pattern.
If I understand correctly, you want to get all the subsets of 5 elements where you have 3 numbers following the pattern.
The number of ways to get 3 numbers that follow the pattern is equal to: $$36 - n - k$$ This means that you need to figure out what is the highest value that you can pick in such a way that the second and third numbers are still in the initial set.
From the remaining numbers, you need to pick 2, in order to form a set of 5 elements, and this can be done in: $$binom{33}{2}$$
So the total number of sets that follow the rule is:
$$(36 - n - k) binom{33}{2}$$
This assumes that when you have a pattern like: +2, +4, having {1,2,3,4,5} is still a valid set because {1,3,5} follow the pattern.
edited Nov 13 at 23:57
answered Nov 13 at 22:40
Erik Cristian Seulean
385
385
This is a great idea! Unfortunately I need +n +k pattern like this: +2, +4 pattern is {1,3,7} that is +2 is applied to smallest element, and +4 applies to the result of first +2, not to smallest element itself (1). So {1,3,5} is +2 +2 pattern, not +2 +4. Otherwise, there are no restrictions on the other (two) numbers which are not part of such 3-number-set-following-pattern.
– Code Complete
Nov 13 at 23:04
1
I think36 - n - k
is still valid.x + n = p; p + k <= 36
. In this casex + n + p <= 36
. There are36 - n - p
ways to choose x.
– Erik Cristian Seulean
Nov 13 at 23:14
The formula holds only for n=1, k=1.
– Code Complete
Nov 13 at 23:37
1
I don't think I follow correctly what you actually want. Forn=1;k=20
you have 36 - 21 = 15 options for the first number. (Everything from{1,2, ..., 15}
). Last set is going to be{15,16,36}
plus all the remaining combinations of 2 numbers out of 33. This gives 9450 possible combinations. What am I missing here ?
– Erik Cristian Seulean
Nov 13 at 23:55
add a comment |
This is a great idea! Unfortunately I need +n +k pattern like this: +2, +4 pattern is {1,3,7} that is +2 is applied to smallest element, and +4 applies to the result of first +2, not to smallest element itself (1). So {1,3,5} is +2 +2 pattern, not +2 +4. Otherwise, there are no restrictions on the other (two) numbers which are not part of such 3-number-set-following-pattern.
– Code Complete
Nov 13 at 23:04
1
I think36 - n - k
is still valid.x + n = p; p + k <= 36
. In this casex + n + p <= 36
. There are36 - n - p
ways to choose x.
– Erik Cristian Seulean
Nov 13 at 23:14
The formula holds only for n=1, k=1.
– Code Complete
Nov 13 at 23:37
1
I don't think I follow correctly what you actually want. Forn=1;k=20
you have 36 - 21 = 15 options for the first number. (Everything from{1,2, ..., 15}
). Last set is going to be{15,16,36}
plus all the remaining combinations of 2 numbers out of 33. This gives 9450 possible combinations. What am I missing here ?
– Erik Cristian Seulean
Nov 13 at 23:55
This is a great idea! Unfortunately I need +n +k pattern like this: +2, +4 pattern is {1,3,7} that is +2 is applied to smallest element, and +4 applies to the result of first +2, not to smallest element itself (1). So {1,3,5} is +2 +2 pattern, not +2 +4. Otherwise, there are no restrictions on the other (two) numbers which are not part of such 3-number-set-following-pattern.
– Code Complete
Nov 13 at 23:04
This is a great idea! Unfortunately I need +n +k pattern like this: +2, +4 pattern is {1,3,7} that is +2 is applied to smallest element, and +4 applies to the result of first +2, not to smallest element itself (1). So {1,3,5} is +2 +2 pattern, not +2 +4. Otherwise, there are no restrictions on the other (two) numbers which are not part of such 3-number-set-following-pattern.
– Code Complete
Nov 13 at 23:04
1
1
I think
36 - n - k
is still valid. x + n = p; p + k <= 36
. In this case x + n + p <= 36
. There are 36 - n - p
ways to choose x.– Erik Cristian Seulean
Nov 13 at 23:14
I think
36 - n - k
is still valid. x + n = p; p + k <= 36
. In this case x + n + p <= 36
. There are 36 - n - p
ways to choose x.– Erik Cristian Seulean
Nov 13 at 23:14
The formula holds only for n=1, k=1.
– Code Complete
Nov 13 at 23:37
The formula holds only for n=1, k=1.
– Code Complete
Nov 13 at 23:37
1
1
I don't think I follow correctly what you actually want. For
n=1;k=20
you have 36 - 21 = 15 options for the first number. (Everything from {1,2, ..., 15}
). Last set is going to be {15,16,36}
plus all the remaining combinations of 2 numbers out of 33. This gives 9450 possible combinations. What am I missing here ?– Erik Cristian Seulean
Nov 13 at 23:55
I don't think I follow correctly what you actually want. For
n=1;k=20
you have 36 - 21 = 15 options for the first number. (Everything from {1,2, ..., 15}
). Last set is going to be {15,16,36}
plus all the remaining combinations of 2 numbers out of 33. This gives 9450 possible combinations. What am I missing here ?– Erik Cristian Seulean
Nov 13 at 23:55
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2997443%2fcount-specific-semi-consequtive-subsets-of-a-set-general-formula%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown