We are to convert this into a string of letters.
We will use the assignment A=0, B=1, C=2, ..., Z=25
and these rules for making strings:
Let d(i) be the ith digit of pi (we ignore the
decimal point). We start with an empty string and
an index, n, initialized to 1.
1. if d(n) is in the set {0,3,4,5,6,7,8,9}, we
concatenate the letter corresponding to d(n)
to the string, then we increment n by 1.
2. if d(n) is 1 then we have the choice:
2a. concatinate B to our string, then
increment n by 1.
2b. concatenate the letter corresponding to
10+d(n+1), then increment n by 2.
3. if d(n) is 2 and d(n+1) is greater than 5, we
concatinate C to the string, then increment n
by 1.
4. if d(n) is 2 and d(n+1) is less than 6, we
have the choice:
4a. concatinate C to the string, then increment
n by 1.
4b. concatinate the letter corresponding to
20+d(n+1) to the string, then increment
n by 2.
The challenge is to determine how many different
strings we can make in this way from the first 1001
digits of pi.
[/code]
[b]
Note well:
It may seem that this problem is a good one for
a programmer. Not so! The number of strings
are so numerous that you cannot enumerate them
with a program. The real solution to this problem
rests with insight. Owing to the size of the data
set (1001 digits), it may be helpful to massage the
Question
superprismatic
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.