Results 1 to 3 of 3

Math Help - Number of combinations

  1. #1
    Newbie
    Joined
    Apr 2012
    From
    lebanon
    Posts
    18

    Number of combinations

    If I have numbers from 1 to N and I want to select K out of them.
    In how many ways I can select these K numbers such that they contain at least two consecutive numbers.
    For example if N=7 and K=3, I want to select combinations such as {1,2,3) , {2,3,7} , {3,5,6} but not {1,3,5} or {2,4,7} .....

    And another question,what about the number of combinations when specifying the minimum distance D between numbers,for example instead of selecting consecutive numbers (D=1), I want to specify the minimum distance allowed between numbers, i.e if D=2, only combinations such as {1,3,5} or {1,5,7} .... are allowed or if D=3 only {1,4,7} is allowed.
    I there a way to create a general formula that takes N,K and D and give me the number of combinations allowed?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,916
    Thanks
    1762
    Awards
    1

    Re: Number of combinations

    Quote Originally Posted by billobillo View Post
    If I have numbers from 1 to N and I want to select K out of them.
    In how many ways I can select these K numbers such that they contain at least two consecutive numbers.
    For example if N=7 and K=3, I want to select combinations such as {1,2,3) , {2,3,7} , {3,5,6} but not {1,3,5} or {2,4,7} ....
    First note that if K \leqslant \left\lceil {\frac{N}{2}} \right\rceil , that is the ceiling function, there are \binom{N-K+1}{K} of pick a subset of K numbers with no consecutive numbers. So subtract from the total.

    If K > \left\lceil {\frac{N}{2}} \right\rceil then any subset of K numbers with must contain consecutive numbers.

    I do not understand the second part at all.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Apr 2012
    From
    lebanon
    Posts
    18

    Re: Number of combinations

    Quote Originally Posted by Plato View Post
    First note that if K \leqslant \left\lceil {\frac{N}{2}} \right\rceil , that is the ceiling function, there are \binom{N-K+1}{K} of pick a subset of K numbers with no consecutive numbers. So subtract from the total.

    If K > \left\lceil {\frac{N}{2}} \right\rceil then any subset of K numbers with must contain consecutive numbers.

    I do not understand the second part at all.
    Thank you for the reply, I guess you are the genius of this forum , in first part the difference between any 2 of the K numbers should be >= "1"; you answer is correct.
    In the second part , I need to choose a number other than "1" i.e. if D="2" , then the difference between any 2 of the K numbers should be >= "2"
    For example : If D=2, I need set like {1,3,5} where 3-1>=2 and 5-3>=2 and 5-1>=2 OR set like {2,4,7} ......
    Or If D=3 I need number of sets like {1,4,7} where 4-1>=3 and 7-4>=3 and 7-1>=3.
    Is there a way to create a general formula that takes N,K and D and give me the number of combinations allowed?
    Regards.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Number of combinations
    Posted in the Discrete Math Forum
    Replies: 6
    Last Post: February 28th 2011, 03:11 PM
  2. number of combinations possible
    Posted in the Statistics Forum
    Replies: 1
    Last Post: March 25th 2009, 09:28 AM
  3. number of possible combinations...
    Posted in the Discrete Math Forum
    Replies: 3
    Last Post: February 6th 2009, 08:17 AM
  4. Number of combinations
    Posted in the Discrete Math Forum
    Replies: 4
    Last Post: October 22nd 2008, 11:40 AM
  5. Number combinations ...
    Posted in the Statistics Forum
    Replies: 4
    Last Post: March 27th 2008, 11:00 AM

Search Tags


/mathhelpforum @mathhelpforum