Thursday, November 04, 2004

GLAT Problem

Problem #3 in Google Lab Aptitude Test ...


1 1
2 1
1 2 1 1
1 1 1 2 2 1

What is the next line ?

Spoiler(select to display):
3 1 2 2 1 1
1 3 1 1 2 2 2 1
Nice Funda behind this ! By the way, if the answer makes sense to you, try proving/explaining-why series will never have 4 or a higher number at any level.

2 Comments:

At Thu Nov 04, 12:11:00 PM GMT+5:30, Blogger Ananth Narayan said...

1+1 = 2
2+1 = 3
1+2+1+1 = 5 = 2+3
1+1+1+2+2+1 = 8 = 5+3
Fibonacci isnt it?
only problem: how must 13 (8+5) be written as 1 and 2.

 
At Fri Nov 05, 03:39:00 PM GMT+5:30, Blogger Praveer said...

Nice observation Anthro.
Actually the funda is that as you read each line from left to right, each pair of numbers is (count number) i.e. it represents the count of each distinct number in the previous line.

11
21 - there are 2 1s in the previous line
1211 - There is 1 2 and 1 1 in the previous line.
111221 - There is 1 1, 1 2 and 2 1s in the previous line ... and so on.

But can we get 4 or a higher number anywhere ?

 

Post a Comment

<< Home