ROSECODE 454
Automatic typewriter
An automatic typewriter can generate a random digit string by generating a sequence of random digits and concatenating them together. Each digit is chosen independently from 0 to 9 with probability 1/55, 2/55, 3/55, 4/55, 5/55, 6/55, 7/55, 8/55, 9/55 and 10/55, respectively. The generation is stopped as soon as a specific pattern occurs in the random string.
is a string consisting of first digits of . For example, , .
Let be the expected length of the generated random string for the string pattern . For example, , . Usually is a decimal number.
Let be rounded to the nearest integer. You are given , and .
Find S(10000).
As the answer is a very big number, use the following condensed representation:
(First 10 digits)[(number of remaining digits)](Last 10 digits)
For instance, the representation of 2127 is: 1701411834[19]5884105728.
Answer format: [condensed representation of S(10000)]
Example: 1812330404[32]2561045583 for .
Let
Let
Find S(10000).
As the answer is a very big number, use the following condensed representation:
(First 10 digits)[(number of remaining digits)](Last 10 digits)
For instance, the representation of 2127 is: 1701411834[19]5884105728.
Answer format: [condensed representation of S(10000)]
Example: 1812330404[32]2561045583 for