Test your knowledge of passwords

Discussion in 'Computing and Networks' started by studiot, Nov 9, 2014.

  1. studiot

    Thread Starter AAC Fanatic!

    Nov 9, 2007
    5,005
    513
    Here's a nice problem someone is working on elsewhere for his maths exam tomorrow.

    answer tomorrow.
     
  2. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,678
    2,737
    794,880
     
  3. studiot

    Thread Starter AAC Fanatic!

    Nov 9, 2007
    5,005
    513
    Sorry, joeyd, but No.
     
  4. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,678
    2,737
    There are 5 ways to pick the 1st vowel.
    There are 4 ways to pick the 4th vowel.
    There are 24 ways to pick the 2nd letter.
    There are 23 ways to pick the 3rd letter.
    There are 9 ways to pick the 5th digit.
    There are 8 ways to pick the 6th digit.

    5*4*24*23*9*8 = 794,880

    My answer is correct, or you mis-described the problem.
     
  5. paulktreg

    Distinguished Member

    Jun 2, 2008
    611
    120
    There's nothing that says the 2nd or 3rd character can't be a vowel?

    There are then:
    5 ways to pick the 1st
    25 ways to pick the 2nd
    24 ways to pick the 3rd
    2-4 ways to pick the 4th (depends on what you use for character 2 and 3) Gets complicated here!
    9 ways to pick the 5th
    8 ways to pick the 6th

    Maximum possible number is then 5 x 25 x 24 x 4 x 9 x 8=864,000????
     
  6. full

    Member

    May 3, 2014
    225
    2
    345600;)
     
  7. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,678
    2,737
    If you process the forth character before the 2nd and 3rd, you don't have to worry about whether or not the 2nd and/or 3rd characters were vowels.
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    Assumption #1: "Letter" means one of the 26 characters of the case-insensitive English alphabet.
    Assumption #2: "Vowel" means one of the 5 characters from the set {a,e,i,o,u}.
    Assumption #3: "no repetition of characters is allows" means that any given character can be used at most once within the entire password (as opposed to just meaning that the same character can't be used twice in succession).

    I get the same answer as joeyd999 and for the same reasons.

    If this is not the correct answer, then which of my assumptions is/are incorrect?
     
    joeyd999 likes this.
  9. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    And if you do process them in order, then you need to use a tree to track the choices, but the answer still comes out to 794880:

    Branch #1: VCCVNN - 5*21*20*4*9*8 = 604800
    Branch #2: VCVVNN - 5*21*4*3*9*8 = 90720
    Branch #3: VVCVNN - 5*4*21*3*9*8 = 90720
    Branch #4: VVVVNN - 5*4*3*2*9*8 = 8640
     
  10. paulktreg

    Distinguished Member

    Jun 2, 2008
    611
    120
    What about the possibility of the 2nd or 3rd character being a vowel?
     
  11. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    See above (Post #9).
     
  12. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,678
    2,737
    What about it?
     
  13. studiot

    Thread Starter AAC Fanatic!

    Nov 9, 2007
    5,005
    513
    Joey and WBahn, you have an error in the fourth place.
     
  14. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,678
    2,737
    Reading literally, the text says "the first and forth character must be a vowel." This may mean they are the same vowel, but that would contradict the non-repetition clause.
     
    Last edited: Nov 9, 2014
  15. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,804
    833
    Here's my shot...

    Ok, I have assumptions beyond the explicitly stated requirements, which are that the second and third positions can also be a vowel as long as there is no repetition of characters. This is important, as it affects the options/combinations for the second and third characters. Someone not operating on this assumption may think there are only 21 or less choices for the second and third characters.

    Secondly, the characters are picked in order of their position within the password. I.e., the fourth character will not be picked before the second and third characters are picked.

    Now on to the problem.

    It's easy to agree that we have 5 options for the first password character. (Assuming that we are not considering 'y' to be a vowel).

    For the second, we have 25 options (26 less the first character chosen). Some people reduce this further, since we need another vowel for the fourth position, but there are 4 vowels left and we can pick any vowel for the second (and third) position and still satisfy the requirements.

    The same logic applies to the third character, except we have one less option, given that we picked a character for the second position. Hence, we have 24 options.

    The fourth character is a little tricky. Depending on the second and third charaxters, we have anywhere from 2 to 4 options. So lets calculate the combinations based on what we know so far and the various scenarios for the fourth character.

    If 2&3 are not vowels, the combinations are:
    5 x 25 x 24 x 4 = 12,500

    If 2&3 has one vowel amongst them, the combinations are:
    5 x 25 x 24 x 3 = 9,375

    If 2&3 are both vowels, the combinations are:
    5 x 25 x 24 x 2 = 6,250

    Summing the combinations in each of the three scenarios, we get 28,125 combinations.

    The combinations of the last two digits is 72 (9x8). Multiplying 28,125 x 72, we get a total number of combinations equal to 2,025,000
     
  16. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,678
    2,737
    My solution, and both of WBahn's, make the same assumption.

    Why should order matter? These types of problems are generally (@WBahn: Always?) commutative. Besides, WBahn solved the same problem, both in order and out of order, each computation resulting in the same answer.

    Are you suggesting that there are 25 non-vowels in a 26 character alphabet?
     
  17. studiot

    Thread Starter AAC Fanatic!

    Nov 9, 2007
    5,005
    513
    djsfantasi, you started so well, I had high hopes, but you faded before the line. Sorry.

    Joey

    The password must be

    1 Any vowel
    2 Any remaining letter after 1 is picked (vowel or consonant)
    3 Any remaining letter after 2 is picked (vowel or consonant)
    4 Any remaining vowel after 3 is picked
    5 Any digit from 1 to 9 inclusive
    6 Any remaining digit after 5 is picked

    So (1) and (4) cannot be the same vowel.

    And yes order does matter

    VLLVNN is not the same as VVLLNN since the options are different depending upon which order is used.
     
  18. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,678
    2,737
    I am, BTW, of the suspicion that this is a trick question. I refuse to slap my forehead when Studiot reveals the real answer.
     
  19. studiot

    Thread Starter AAC Fanatic!

    Nov 9, 2007
    5,005
    513
    A trick question, joey?
    Would I do that?

    F!.jpg
     
    joeyd999 likes this.
  20. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,678
    2,737
    I emphatically disagree. And I stand by my answer, wrong as it may be.
     
Loading...