Peter created a cool problem to post on Brilliant, but he don't have a cool name for that.
So he decided wrote a simple program which outputs a string of 7 letters.
(The letters are from A-Z , and the same letter may be repeated.)
Call a name pronounceable if vowels and consonants appear alternatively in that name. The probability that the name of Peter's problem is pronounceable is q p where p and q are coprime positive integers. What is the last 3 digits of p + q ?
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.
There are two cases the word is pronounceable:
1> It has 4 vowels (V) and 3 consonants (C), so we have 5 4 ∗ 2 1 3 ways to arrange them in this order: V-C-V-C-V-C-V
2> It has 4 C and 3 V, and there are 5 3 ∗ 2 1 4 ways to arrange it in this order: C-V-C-V-C-V-C
The probability of this word is 2 6 7 5 4 ∗ 2 1 3 + 5 3 ∗ 2 1 4 = 2 6 7 5 ∗ 5 3 ∗ 2 1 3 + 2 1 ∗ 5 3 ∗ 2 1 3 = 2 6 7 2 6 ∗ 5 3 ∗ 2 1 3 = 2 6 6 5 3 ∗ 2 1 3 = 3 0 8 9 1 5 7 7 6 1 1 5 7 6 2 5
the numerator and denominator at the most right hand equation are coprime and their sum is 310073401. The last 3 digits is 401.
Problem Loading...
Note Loading...
Set Loading...
We can either have 4 vowels and 3 consonants (case 1), or 3 vowels and 4 consonants (case 2).
Case 1: the probability is ( 2 6 5 ) 4 ( 2 6 2 1 ) 3 = 8 0 3 1 8 1 0 1 7 6 5 7 8 8 1 2 5
Case 2: the probability is ( 2 6 5 ) 3 ( 2 6 2 1 ) 4 = 8 0 3 1 8 1 0 1 7 6 2 4 3 1 0 1 2 5
Adding these two probabilities together, we get that final probability is 3 0 8 9 1 5 7 7 6 1 1 5 7 6 2 5 , so our final answer is 4 0 1 .