Results 1 to 8 of 8

Math Help - Combinations problem

  1. #1
    Member
    Joined
    May 2008
    Posts
    101

    Combinations problem

    This may involve mods.

    4 digit security codes in a particular city have this property:
    the 4th digit is always the last digit of the sum of the first 3 digits. E.g. 3452, where 3 + 4 + 5 = 12, and 2 is the last digit of 12. Other examples include 5544.

    There cannot be a security code with more than two consecutive digits the same (i.e. 6668 is not allowed, but 5544 is). How many different codes can be used?

    Thanks in advance for any help.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member TheAbstractionist's Avatar
    Joined
    Apr 2009
    Posts
    328
    Thanks
    1
    Quote Originally Posted by BG5965 View Post
    This may involve mods.

    4 digit security codes in a particular city have this property:
    the 4th digit is always the last digit of the sum of the first 3 digits. E.g. 3452, where 3 + 4 + 5 = 12, and 2 is the last digit of 12. Other examples include 5544.

    There cannot be a security code with more than two consecutive digits the same (i.e. 6668 is not allowed, but 5544 is). How many different codes can be used?

    Thanks in advance for any help.
    Hi BG5965.

    First consider codes in which the first three digits are xyy with x\ne y. Then x+y+y\equiv y\pmod{10}\ \iff\ x+y\equiv0\pmod{10}. For each x except 0, there is exactly one y such that x+y is divisible by 10. Hence there are 9 such codes beginning with 0 allowed (y can be any digit except 0). There are also 9 such codes beginning with 5 allowed (y can be any digit except 5). For each code starting 1, 2, 3, 4, 6, 7, 8 and 9, there are 8 such codes allowed (y can be any digit except x and 10-x). So the total number of allowable security codes beginning xyy is 9+9+8\times8=82.

    The number of security codes beginning xxy with x\ne y is 10 9 = 90. Similarly for codes beginning xyx with x\ne y. And the number of security codes in which the first three digits are distinct is 10 9 8 = 720.

    Hence the total number of allowable security codes is 82 + 90 + 90 + 720 = 992.
    Last edited by TheAbstractionist; May 21st 2009 at 09:41 AM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    May 2008
    Posts
    101
    Hi, I also posted this question on

    Combinations question? - Yahoo!7 Answers

    and got different answers with different working.

    I am quite confused on which is the right method!
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member TheAbstractionist's Avatar
    Joined
    Apr 2009
    Posts
    328
    Thanks
    1
    Quote Originally Posted by BG5965 View Post
    Hi, I also posted this question on

    Combinations question? - Yahoo!7 Answers

    and got different answers with different working.

    I am quite confused on which is the right method!
    Hi again.

    The second poster who replied to your post over there assumed that your security code cannot start with 0 whereas the first one assumed that it can. Hope this explains why they are different.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    May 2008
    Posts
    101
    Ok, but can you still re-explain the answer briefly - I don't get his explanation fully.

    BG
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Member
    Joined
    May 2008
    Posts
    101
    Sorry, I'm even more confused now. So the answer is not 982, like on the other post on the other website?
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Senior Member TheAbstractionist's Avatar
    Joined
    Apr 2009
    Posts
    328
    Thanks
    1
    Hi yet again.

    The solution I originally posted was totally wrong. I have re-edited my post now, and I hope it’s better this time. The answer I have is 982. (Note that I am assuming that a security code can start with 0.)
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Member
    Joined
    May 2008
    Posts
    101
    Thanks a lot

    I finally understand it now and I think now the answer is correct.

    Thanks for your help again.

    BG
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Combinations problem
    Posted in the Discrete Math Forum
    Replies: 6
    Last Post: October 14th 2011, 05:52 PM
  2. combinations problem
    Posted in the Statistics Forum
    Replies: 3
    Last Post: February 3rd 2009, 03:10 PM
  3. Combinations Problem.
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: December 14th 2008, 11:07 PM
  4. Combinations problem
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: March 16th 2007, 08:54 AM
  5. combinations problem
    Posted in the Statistics Forum
    Replies: 2
    Last Post: December 16th 2006, 07:53 AM

Search Tags


/mathhelpforum @mathhelpforum