Calvin and Susan play a Number-Game #2

Logic Level 5

Calvin writes a number with 2187 digits on the blackboard, each digit being either a 1 or 2. Susan creates a new number from Calvin's number by reading his number from left to right and wherever she sees a 1, replacing that by 112, and wherever she sees a 2, replacing that by 111.

For example : If Calvin's number begins 2112 2112 , Susan's number would begin 111112112111 111112112111 .

After Susan finishes writing her number, she notices that the left-most 2187 digits in her number is exactly same as that of Calvin's number. How many times do five 1 1 s occur consecutively in Calvin's number?


Also try it's sister problem, an easy version: Calvin and Susan play a Number-Game #1

Image Credit: Dreamstime


The answer is 182.

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.

2 solutions

Jiwesh Kushal
Oct 17, 2015

Set S: Numbers Susan writes; Set C: Numbers Calvin writes

Since 1 translates to 112 and 2 translates to 111, Set S has 3 times the number of elements in Set C. Set S is a translation/mapping of Set C. Thus, first 2187 numbers of Set S are a translation of first 729 numbers of Set C. But, the first 2187 numbers of both Sets are equal! Thus, the 2187 numbers of Set C is a translation of its first 729 numbers. Similarly, the first 729 numbers of Set C is a translation of its first 243 numbers. (Same logic: First 729 numbers of Set C= first 729 numbers of Set S. But, the first 729 numbers of Set S= translation of first 243 numbers of Set C. Therefore, the first 729 numbers of Set C = translation of first 243 numbers of Set C)

From now on, the set under consideration is always Set C unless specified otherwise. The first number is 1, since both sets have to have the same first number. The 3rd term is 2, since 1 would translate into 112. The 9th term is 1, since the 3rd term would translate into 111. The 27th term is 1. . . The 729th term is 1. The 2187th term is 2.

It is also to be noted that 2 or more consecutive 2s cannot appear. This is because every part of Set C is a translation of some part before it, and a translation of any of 11, 12, 21 and 22 would not give 2 consecutive 2s.

To find: No. of 5 consecutive 1s. Translation of 11 does not give 5 consecutive 1s. 22 is not present in Set C. Also, every 12 and 21 is actually a 121. (2 consecutive 2s not possible) Translation of a 121 gives 5 consecutive 1s.

To find: No. of 121s in first 729 terms. Since 1st term is a 1, To find: No. 21s in first 729 terms. Also the 729th number is a 1.

Thus the problem reduces to finding the number of 2s in the first 729 terms. Let N(2,729) denote the required number. N(2,729) = N(1,243) (only 1 can translate to give a 2) where N(1,243) is the number of 1s in first 243 terms. N(1,243) = 243 - N(2,243) = 243 - N(1,81) = 243 - 81 + N(2,81) = 162 + N(1,27) = 162 + 27 - N(2,27) = 189 - N(1,9) = 180 - 9 + N(2,9) = 180 + N(1,3) = 180 + 3 - N(1,1) = 182 Since the number of 1s in the first 1 term(s) is 1.

The answer is 182.

1.Here let's assume x=112 and y=111..and now lets find the pattern..The series goes like this..Here the the logic is to find the No. of 'y' as it is always followed by 'x' we would get 5 consecutive 1's.

2.Series goes on like this (xxy)(xxyxxx)(xxyxxyxxxxxyxxyxxy)..Here we can deduce that the odd segments ends with 'y' and the even segments ends with 'x'..Other thing we can deduce is the number of characters in each segment.Here the alpha-numeric characters(x,y) should be 729(as we have divided numeric characters in group of 3), as the numeral characters count is 2187..Pattern is Cn+1=3*Cn (n>1) 3+6+18+54+162+486=729(6 steps).So here we have to find 'y' for just 6 segments.

3.Before counting 'y' we have to know how next segment is establish..Sn+1=2*(write all segments before Sn+1)(alternatively changing the last character for odd segments to 'y' and for even to 'x')..for eg. as (xxy) is our first segment, write it 2 times (xxyxxy) then change last character 'y' to 'x', So (xxyxxx)=2nd segment..and so on..

4.Now No. of 'y' in each segment is Kn+1=2*Sum(Kn)+-1 (0<n<7)(+1 for even and -1 for odd) so we will get 1+1+5+13+41+121=182(6 steps)..Here Sum(Kn)=Sum of K from 0 to 'n'.. So number of times we would get 5 consecutive 1's is 182...

5.Here the rule of changing last character can be proved as "Here in 'x' and 'y' there is just one number different which comes alternatively in the group of 3."

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...