5 -digit trainer ID ranging from 0 0 0 0 0 to 6 5 5 3 5 which is randomly generated the moment they start the game. As they progress through the game, players can participate in the pokemon lottery, in which a lottery ticket with a random 5 -digit number ranging from 0 0 0 0 0 to 6 5 5 3 5 is drawn. Players are then awarded prizes based on the number of digits on the lottery ticket which matches their trainer ID. The prizes awarded are as follows:
In the pokemon game owned by Nintendo, players are assigned a2 digits matched- PP Up
3 digits matched- PP Max
4 digits matched- Rare Candy
5 digits matched- Master Ball
What is the probability of winning a Master Ball or Rare Candy in a single draw?
Details and assumptions:
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Some corrections for sloppy mistakes I made in the solution above:
Subcase 2 ( b ) : ................ For replacement of the second digit, we have 5 possible replacements.
Subcase 2 ( c ) : ............... For replacement of the second digit, we have 4 possible replacements.
Ignore the words "while e ranges from 0 to 9 " in subcase 5 ( a ) .
Ignore the words "while e ranges from 0 to 5 " in subcase 5 ( b ) .
For completeness, I figure that I might as well include the messy calculations:
Note that
6 5 5 3 6 1 + 6 5 5 3 6 2 3 8 7 5 2 × 6 + 2 6 7 8 4 × 5 + 6 5 5 3 6 2 6 0 0 0 0 × 9 + 3 2 1 6 × 5 + 2 3 2 0 × 4 + 6 5 5 3 6 2 6 5 0 0 0 × 9 + 2 1 6 × 5 + 3 2 0 × 4 + 6 5 5 3 6 2 6 5 5 0 0 × 9 + 2 4 × 3 + 1 2 × 2 + 6 5 5 3 6 2 6 5 5 3 0 × 9 + 6 × 5 = 1 0 7 3 7 4 1 8 2 4 6 9 1 0 2 1 , which is approximately 0 . 0 6 4 3 5 6 % .
Looking at the solution from a different and perhaps, simpler and more intuitive perspective:
We are asked to figure out the probability of getting all five matching digits or exactly four matching digits. The main difficulty lies in finding the probability of four matching digits because the probability for each trainer ID is different. Consider this: If you get the trainer ID 6 5 4 3 0 , you are not allowed to substitute the second digit 5 with 6 or else you overshoot the limit of 6 5 5 3 5 , while in the trainer ID 1 2 3 4 5 , you are allowed to do so. The first partition into five different cases, depending on which digit differs from the trainer ID is natural. But how does the second partition into subcases arises? For easier calculation, we should aim to partition the whole set of all possible trainer ID into disjoint sets where all members of the same set can generate the same number of four-digit matching lotto ticket number. We then calculate the expected number of four-digit matching lotto ticket number by taking the average number of four-digit matching lotto ticket number generated by each member of the 6 5 5 3 6 trainer IDs. To calculate the probability for a particular case, we simply divide the expected number of four-digit matching lotto ticket number by 65536. Rinse and repeat for other four cases. In the end, add up all the probabilities from five cases plus the probability of getting a perfect five digit match (trivial, it is obviously 6 5 5 3 6 1 ) and we arrive at the desired answer.
A very simple and less time-consuming variant of the problem would be to assume that the trainer ID ranges from 0 0 0 0 0 to 9 9 9 9 9 , but this does not reflect the real probability since in the pokemon games, the maximum cap for trainer ID is 6 5 5 3 5 , and there is a good reason for that. Notice that 2 1 6 = 6 5 5 3 6 ? That is not a coincidence, but further discussion of this topic is not relevant to this problem.
I didn't know that match means the digits have to be at the right place. I really thought that 12345 would also win a Master Ball for an announced winning number of 54321.
Problem Loading...
Note Loading...
Set Loading...
Obviously, the odds of winning a Master Ball is 6 5 5 3 6 1 . From now on, we will focus on the odds of winning a Rare Candy.
We partition the cases of winning a Rare Candy into five:
In all of the following case, let x denotes the number which we want to replace so that it does not match the trainer ID.
Case 1 : x b c d e
We partition case 1 into subcases 1 ( a ) and 1 ( b ) .
Subcase 1 ( a ) : x b c d e where b c d e ranges from 0 0 0 0 to 5 5 3 5 .
Obviously, x can only range from 0 to 6 . Therefore, there are 7 × 5 5 3 6 = 3 8 7 5 2 IDs of this type. If we are to replace x by another number ( so as to create IDs which differ in the first digit), we only have 6 choices as replacement.
Subcase 1 ( b ) : x b c d e where b c d e ranges from 5 5 3 6 to 9 9 9 9 .
Notice that x can only range from 0 to 5 . If x > 5 , then x a b c d would be out of range. Therefore, there are 6 × 4 4 6 4 = 2 6 7 8 4 IDs of this type. If we are to replace x by another number ( so as to create IDs which differ in the first digit), we only have 5 choices as replacement.
It is obvious that the two subcases above partition the set of 6 5 5 3 6 possible trainer ID. Now, we attempt to calculate average number of loto IDs which match every single digit of the trainer ID except the first by considering the number of such loto IDs generated by each element in the set of 6 5 5 3 6 trainer IDs and then taking the average. Note that for the 3 8 7 5 2 trainer IDs in subcase 1 , if we replace the first digit of the trainer ID, there are 6 possible replacements. In subcase 2 , if we replace the first digit of the trainer ID, there are 5 possible replacements. Therefore, the average number of loto IDs generated by each of the 6 5 5 3 6 trainer IDs for case 1 is 6 5 5 3 6 3 8 7 5 2 × 6 + 2 6 7 8 4 × 5 . To calculate the probability of case 1 appearing for any of the 6 5 5 3 6 trainer IDs, we simply take 6 5 5 3 6 2 3 8 7 5 2 × 6 + 2 6 7 8 4 × 5 .
From case 2 onwards, I will only list the subcases and probabilities since the reasoning is similar to that of case 1 .
Case 2 : a x c d e
Subcase 2 ( a ) : a x c d e where a ranges from 0 to 5 while c d e ranges from 0 0 0 to 9 9 9 .
Notice that x can take values from 0 to 9 .Therefore, there are 6 × 1 0 × 1 0 0 0 = 6 0 0 0 0 IDs of this type. For replacement of the second digit, we have 9 possible replacements.
Subcase 2 ( b ) : a x c d e where a = 6 while c d e ranges from 0 0 0 to 5 3 5 .
Notice that x can take values from 0 to 5 .Therefore, there are 1 × 6 × 5 3 6 = 3 2 1 6 IDs of this type. For replacement of the second digit, we have 9 possible replacements.
Subcase 2 ( c ) : a x c d e where a = 6 while c d e ranges from 5 3 6 to 9 9 9 .
Notice that x can take values from 0 to 4 .Therefore , there are 1 × 5 × 4 6 4 = 2 3 2 0 IDs of this type. For replacement of the second digit, we have 9 possible replacements.
Combining all the subcases, the probability of case 2 appearing is 6 5 5 3 6 2 6 0 0 0 0 × 9 + 3 2 1 6 × 5 + 2 3 2 0 × 4 .
Case 3 : a b x d e
Subcase 3 ( a ) : a b x d e where a b ranges from 0 0 to 6 4 while d e ranges from 0 0 to 9 9 .
Notice that x can take values from 0 to 9 .Therefore, there are 6 5 × 1 0 × 1 0 0 = 6 5 0 0 0 IDs of this type. For replacement of the third digit, we have 9 possible replacements.
Subcase 3 ( b ) : a b x d e where a b = 6 5 while d e ranges from 0 0 to 3 5 .
Notice that x can take values from 0 to 5 .Therefore, there are 1 × 6 × 3 6 = 2 1 6 IDs of this type. For replacement of the third digit, we have 5 possible replacements.
Subcase 3 ( c ) : a b x d e where a b = 6 5 while d e ranges from 3 6 to 9 9 .
Notice that x can take values from 0 to 4 .Therefore, there are 1 × 5 × 6 4 = 3 2 0 IDs of this type. For replacement of the third digit, we have 4 possible replacements.
Combining all the subcases, the probability of case 3 appearing is 6 5 5 3 6 2 6 5 0 0 0 × 9 + 2 1 6 × 5 + 3 2 0 × 4 .
Case 4 : a b c x e
Subcase 4 ( a ) : a b c x e where a b c ranges from 0 0 0 to 6 5 4 while e ranges from 0 to 9 .
Notice that x can take values from 0 to 9 .Therefore, there are 6 5 5 × 1 0 × 1 0 = 6 5 5 0 0 IDs of this type. For replacement of the fourth digit, we have 9 possible replacements.
Subcase 4 ( b ) : a b c x e where a b c = 6 5 5 while e ranges from 0 to 5 .
Notice that x can take values from 0 to 3 .Therefore, there are 1 × 6 × 4 = 2 4 IDs of this type. For replacement of the fourth digit, we have 3 possible replacements.
Subcase 4 ( c ) : a b c x e where a b c = 6 5 5 while e ranges from 6 to 9 .
Notice that x can take values from 0 to 2 .Therefore, there are 1 × 3 × 4 = 1 2 IDs of this type. For replacement of the fourth digit, we have 2 possible replacements.
Combining all the subcases, the probability of case 4 appearing is 6 5 5 3 6 2 6 5 5 0 0 × 9 + 2 4 × 3 + 1 2 × 2 .
Case 5 : a b c d x
Subcase 5 ( a ) : a b c d x where a b c d ranges from 0 0 0 0 to 6 5 5 2 while e ranges from 0 to 9 .
Notice that x can take values from 0 to 9 .Therefore, there are 6 5 5 3 × 1 0 = 6 5 5 3 0 IDs of this type. For replacement of the fifth digit, we have 9 possible replacements.
Subcase 5 ( b ) : a b c d x where a b c d = 6 5 5 3 while e ranges from 0 to 5 .
Notice that x can take values from 0 to 5 .Therefore, there are 1 × 6 = 6 IDs of this type. For replacement of the fifth digit, we have 5 possible replacements.
Combining all the subcases, the probability of case 5 appearing is 6 5 5 3 6 2 6 5 5 3 0 × 9 + 6 × 5 .
We are finally getting there! To calculate the probability of winning a Master Ball or Rare Candy in the first go, we simply add up the probability of winning the Master Ball and the probability of five cases above. This yields the desired answer.