Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Combinatorics Question: 8-Letter Passwords

  1. Oct 16, 2011 #1
    1. The problem statement, all variables and given/known data

    How many eight-letter passwords using the letters A-Z are there in which up to one letter is allowed to be used more than once?

    2. Relevant equations

    3. The attempt at a solution

    I broke the problem up based on repetition of one letter: (26)8 ways with no repetition, (8 choose 2)*26*(25)6 ways with letter repeated once, (8 choose 3)*26*(25)5 ways with letter repeated twice, and so on, until 26 ways with letter repeated 7 times filling all 8 spaces. Adding these 8, gives the total ways.
  2. jcsd
  3. Oct 16, 2011 #2


    User Avatar
    Science Advisor

    Do you mean _at most_ one repretition?

    Maybe inclusion/exclusion would help: Count the number of ways in which you can get exactly 1 repetition, then exactly two repetitions,..., exactly 8 repetitions, and then use inclusion/exclusion starting with 26^8 possible combinations.
  4. Oct 16, 2011 #3
    That's the exact question from the book. It means either no letters are repeated or one letter can be repeated as many times as you want.

    I didn't learn inclusion/exclusion yet so I don't think we are supposed to use it.

    So, I counted the ways in which there is no repetition, there is exactly one repetition, exactly 2 repetitions, and so on. Then, I added these up to give me the total ways in which one letter is allowed to be used more than once.
  5. Oct 16, 2011 #4


    User Avatar
    Science Advisor

    Well, if no letters are repeated, then you are just choosing 8 letters out of 8.

    And then you could consider separately cases in which exactly one letter is repeated. You seem to be on the right track on your first post; I can't tell where you're stuck.
  6. Oct 17, 2011 #5
    Sorry, I'm not really stuck. I just can't ever be sure that I'm even on the right track with these kind of problems. So, I just wanted to get some input to make sure I'm not way off. Thanks for your help.
  7. Oct 17, 2011 #6


    User Avatar
    Science Advisor

    No problem; if you post your answer in detail, maybe we can see better what (may be) wrong.
  8. Oct 17, 2011 #7
    I did (26)8 + (8 choose 2)*(26)7 + (8 choose 3)*(26)6 + (8 choose 4)*(26)5 + (8 choose 5)*(26)4 + (8 choose 6)*(26)3 + (8 choose 7)*(26)2 + 26

    This is based on no repetition + exactly 1 rep. + exactly 2 rep. + exactly 3 rep. + exactly 4 rep. + exactly 5 rep. + exactly 6 rep. + exactly 7 rep.

    For no rep., there are obviously (26)8 ways.
    For 1 rep., choose 2 places for repeating digits. Repeating digits can be chosen in 26 ways and the rest of the digits can be chosen in (25)6 ways. Similarly, for the rest up to exactly 7 rep. in which there are of course 26 ways to have the password contain all of the same character.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook