Do you have to guess the digit and its position, or just the digit? If the same digit cannot be selected twice in the combination:
6 digits are used and 4 digits aren't used. So the ways of you selecting 2 digits from the set of 4, and therefore getting none of them right is calculated as: No of ways of selecting 2 digits from a set of 4 is 4!/2!(4-2)! = 6
No of ways of picking 1 from the set of 6, and 1 from the set of 4 is 6 * 4 = 24
No of ways of picking 2 from the set of 6 is 6!/2!(6-2)! = 15
Total number of cases = 6 + 15 + 24 = 45. Odds of getting 2 digits right = 15/45 = 1 in 3
I think that's right, but I did it in a bit of a hurry.
Re-reading your question the order is apparantly important, as certain ordered lists are exluded. As a result the question isn't well formed. Do you mean "what is the chance of a string of two digits chosen by you being a sub-string of the six digit number"? Or is it getting the first two right? Or if it is simply a matter of choosing two digits that occur in the six digit number then my calculation above is correct, because in that case the order doesn't matter.
Ah. Let me clarify. The two numbers I pick can be any two from the sequence of six. I was merely saying that the there are rules about how the "random" 6 numbers are chosen in the first place. I was going to say that for example person A chooses 6 numbers within the bounds of the stated restrictions, what are the chances of person B guessing 2 of those? (person B could choose the same number twice but would only be right if that number appeared twice or more in person A's list). However that would have introduced the problem of humans creating random lists, hence I used the word "random" which causes confusion as well. Oh yeah, for the sake of this exercise person B knows about the restrictions on the list of numbers. I think my brain hurts more now trying to explain it than working it out ;)
Comments 5
Not being all the same or in sequence only excludes a small number of cases.
I take it this has to do with cracking PINs? Or is it to do with playing Mastermind?
Reply
Reply
6 digits are used and 4 digits aren't used. So the ways of you selecting 2 digits from the set of 4, and therefore getting none of them right is calculated as:
No of ways of selecting 2 digits from a set of 4 is 4!/2!(4-2)! = 6
No of ways of picking 1 from the set of 6, and 1 from the set of 4 is 6 * 4 = 24
No of ways of picking 2 from the set of 6 is 6!/2!(6-2)! = 15
Total number of cases = 6 + 15 + 24 = 45. Odds of getting 2 digits right = 15/45 = 1 in 3
I think that's right, but I did it in a bit of a hurry.
Reply
Reply
Reply
Leave a comment