Skip to main content
OlympiadHQ

Browse · MATH

Print

jmc

counting and probability intermediate

Problem

Jason is trying to remember the five digit combination to his safe. He knows that he only used digits 1 through 5 (possibly repeated), that every even digit was followed by an odd digit, and every odd digit was followed by an even digit. How many possible combinations does Jason need to try?
Solution
Of the digits 1 through 5, three are odd and two are even. If Jason's combination started with an odd digit, there would be 3 possibilities for the first digit. Since an even digit must follow, there would be 2 possibilities for the second digit. Similarly, there would be 3 possibilities for the third digit, and so on. This would be a total of: We can apply the same logic if Jason's combination started with an even digit. There would be 2 possibilities for the first digit, 3 for the second digit, and so on, for a total of : Overall, Jason must try combinations.
Final answer
180