Results 1 to 12 of 12
Like Tree7Thanks
  • 1 Post By muddywaters
  • 1 Post By romsek
  • 1 Post By muddywaters
  • 1 Post By romsek
  • 1 Post By muddywaters
  • 1 Post By muddywaters
  • 1 Post By romsek

Math Help - Keycode selection.

  1. #1
    Member
    Joined
    Nov 2013
    From
    Australia
    Posts
    187
    Thanks
    38

    Keycode selection.

    A keycode must contain 4 letters and 3 numbers. The letters may be any letter of the alphabet. The numbers should be any number from 0 to 5. How many different keycode combinations are there?

    I have the above problem and the more I look at it the more confused i get!
    If no repetitions are allowed then I am pretty sure the the answer is
    26C4 * 6C3 * 7!

    But let's assume repetition is allowed.
    I'll choose the letters first there are $26^4$ ways.

    If the numbers are all the same then there are 6 ways of choosing them.
    So the number of selections might be $26^4*6*7!/3!$

    If the first 2 numbers chosen are the same there are 6*1*5=30 ways to choose them
    If the last 2 numbers are the same there are 6*5*1=30 ways to choose them
    If the 1st and 3rd are the same then there are 6*5*1=30 ways to choose them
    SO there are 90 ways that 2 numbers can be chosen the same and the 3rd one different.
    So the number of selections might be $ 26^4*90*7!/2!$

    If the numbers are all different then the number of possibilities is 6*5*4=120
    So the number of selections might be $26^4*120*7!$

    Actually I think I might need to go through the same rigmarole for the letters. Yes I think that i do.

    Letters all different = 26*25*24*23=358800
    letters 2 the same= 26*1*25*24*6= 93600
    letters 3 the same=26*1*1*25*4=2600
    Letters all the same=26
    Add all these and I get 455026
    Now I know it should add up to $26^4=456976$ so I am short a few possibilities here. WHY AM I SHORT???

    See i do not have a clue what I am doing!

    Can anyone help set me straight - there are a number of different aspects to this question.

    Actually 3 of us have been struggling with this question. At one stage all of us had the same answer but I am almost positive it was wrong. You call us the 3 stooges I suppose.

    Any ideas will be greatly appreciated.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Mar 2012
    From
    malaysia
    Posts
    87
    Thanks
    14

    Re: Keycode selection.

    I learned this a number of months ago and i'm not sure if i remember accurately, but here's my take on tge question.

    Firstly as for repetitions, i think it is understood and should be accepted that repetitions are allowed. As is standard in any codes, there is no reason to disallow repetition, unless the restriction js explicitly stated.

    Then the answer should be  26^4 \cdot 6^3 \cdot \frac{7!}{4!3!}

    Can you see why?
    Thanks from Melody2
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    2,349
    Thanks
    901

    Re: Keycode selection.

    Quote Originally Posted by muddywaters View Post
    I learned this a number of months ago and i'm not sure if i remember accurately, but here's my take on tge question.

    Firstly as for repetitions, i think it is understood and should be accepted that repetitions are allowed. As is standard in any codes, there is no reason to disallow repetition, unless the restriction js explicitly stated.

    Then the answer should be  26^4 \cdot 6^3 \cdot \frac{7!}{4!3!}

    Can you see why?
    Doesn't this fail to take into account indistinguishable codes caused by repeated chars?

    I believe this expressions comes from 7C4 ways to pick 4 slots for letters, then $26^4$ ways of picking the letters, and $6^3$ ways of picking the numbers.

    But this allows us to pick any code with k repeated symbols k! ways. Worse It allows codes that have pairs or triplets of repeated symbols which cause indistinguishable codes in a more complicated way.
    Thanks from Melody2
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Mar 2012
    From
    malaysia
    Posts
    87
    Thanks
    14

    Re: Keycode selection.

    Quote Originally Posted by romsek View Post
    Doesn't this fail to take into account indistinguishable codes caused by repeated chars?

    I believe this expressions comes from 7C4 ways to pick 4 slots for letters, then $26^4$ ways of picking the letters, and $6^3$ ways of picking the numbers.

    But this allows us to pick any code with k repeated symbols k! ways. Worse It allows codes that have pairs or triplets of repeated symbols which cause indistinguishable codes in a more complicated way.
     \frac{7!}{4!3!} not to pick four slots for letters, but to count the number ways to arrange AAAANNN (A is alphabet and N is number)
    Thanks from Melody2
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    Nov 2013
    From
    Australia
    Posts
    187
    Thanks
    38

    Re: Keycode selection.

    Thank you muddywaters and Romsek,

    I'd like to put this bit aside just for a while. What about the other question that I have.

    Letters all different = $26*25*24*23=358800$
    letters 2 the same= $26*1*25*24*6= 93600$
    letters 3 the same=$26*1*1*25*4=2600$
    Letters all the same=26
    Add all these and I get 455026
    Now I know it should add up to $26^4=456976$ so I am short a few possibilities here. WHY AM I SHORT???

    I really do not know about the 6 and the 4 - I guess one of them is wrong - I am not sure how i should get these numbers anyway.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Member
    Joined
    Nov 2013
    From
    Australia
    Posts
    187
    Thanks
    38

    Re: Keycode selection.

    You know Muddywaters, that is the same answer the 3 of us came up with. And i have just re-thought it through and I think that you are correct. Thank you. I will discuss this problem more here tomorrow for it is 2:30 am in Sydney right now.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    2,349
    Thanks
    901

    Re: Keycode selection.

    Quote Originally Posted by muddywaters View Post
     \frac{7!}{4!3!} not to pick four slots for letters, but to count the number ways to arrange AAAANNN (A is alphabet and N is number)
    that is picking 4 slots for letters...
    Thanks from Melody2
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Member
    Joined
    Mar 2012
    From
    malaysia
    Posts
    87
    Thanks
    14

    Re: Keycode selection.

    Quote Originally Posted by romsek View Post
    that is picking 4 slots for letters...
    Oh well yes haha.. But then i don't see how there are repeats when we use this.
    Thanks from Melody2
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member
    Joined
    Mar 2012
    From
    malaysia
    Posts
    87
    Thanks
    14

    Re: Keycode selection.

    Quote Originally Posted by romsek View Post
    that is picking 4 slots for letters...
    Oh well yes haha.. But then i don't see how there are repeats when we use this.
    Thanks from Melody2
    Follow Math Help Forum on Facebook and Google+

  10. #10
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    2,349
    Thanks
    901

    Re: Keycode selection.

    Quote Originally Posted by muddywaters View Post
    Oh well yes haha.. But then i don't see how there are repeats when we use this.
    consider the code

    aabb112

    There are 6 ways this same code can be arrived at and your number counts all 6 of them.
    Thanks from Melody2
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Member
    Joined
    Nov 2013
    From
    Australia
    Posts
    187
    Thanks
    38

    Re: Keycode selection.

    Now I am really confused. I don't know what you are trying to tell me.

    I've actually gone full circle.
    My initial thought was the same as muddywaters'. I moved away from this solution but now I have come back again.

    There are $26^4$ ways to choose 4 letters. Repetition is allowed and order counts.
    there are $6^3$ ways to choose the 3 numbers. Repetition is allowed and order counts.

    Now there are 7C3 ways of choosing 3 characters from 7. Order does not count, repetition not allowed. But this is good order has already been taken into account and we don't want repetition. So

    The number of possible codes is $26^4\times 6^3 \times 7C3$

    Is there anything wrong with this logic?
    What were you trying to say Romsek? Actually I think your query is why I went off this idea in the first place but now I really do not know.

    I also want to sort out my problem with the other trail that I was going down.
    I think that I will post it as a new post of its own.
    Last edited by Melody2; July 7th 2014 at 01:18 AM.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Member
    Joined
    Nov 2013
    From
    Australia
    Posts
    187
    Thanks
    38

    Re: Keycode selection.

    Thank you muddywaters and Romsek. I have really appreciated your input.

    Did you both end up agreeing that muddywaters way is correct?
    OR you you really not sure.?
    It seems right to me but I am far from certain.
    The spin off part of the questions has been totally covered. I was very happy with Romsek's answer.
    It is here if anyone is interested.
    Selections. Why am I short?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. how big should the selection size be?
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: April 13th 2013, 12:02 PM
  2. probability of a selection
    Posted in the Discrete Math Forum
    Replies: 6
    Last Post: November 29th 2010, 04:30 AM
  3. Combination and Selection Questions
    Posted in the Discrete Math Forum
    Replies: 5
    Last Post: September 13th 2010, 06:35 AM
  4. Ways of Selection Problem
    Posted in the Discrete Math Forum
    Replies: 6
    Last Post: August 9th 2010, 06:56 AM
  5. probability of selection
    Posted in the Statistics Forum
    Replies: 4
    Last Post: February 1st 2010, 10:49 AM

Search Tags


/mathhelpforum @mathhelpforum