Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on [email protected] for help. Thanks :)

A very simple puzzle

  • 26-07-2010 10:37pm
    #1
    Registered Users Posts: 5,155 ✭✭✭ nyarlothothep


    What is the next line in this sequence

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


Comments

  • Registered Users Posts: 480 ✭✭ Flyin Irishman


    312211

    -did it in an algorithms class a while back :cool:

    Anyone wanna post the next line in the sequence?


  • Registered Users Posts: 3,163 ✭✭✭ randombar


    13112221


  • Registered Users Posts: 70 ✭✭ Sack


    1113213211


  • Registered Users Posts: 480 ✭✭ Flyin Irishman


    31131211131221


  • Registered Users Posts: 488 ✭✭ Major Lovechild


    1
    1 1
    2 1
    1 2 1 1
    1 1 1 2 2 1
    3 1 2 2 1 1

    Wo ist die Gemütlichkeit?



  • Advertisement
  • Registered Users Posts: 7,433 ✭✭✭ Blisterman


    Explanation?


  • Registered Users Posts: 480 ✭✭ Flyin Irishman


    Blisterman wrote: »
    Explanation?
    Each line describes what was in the line before it

    So if we start with the first line:
    1

    Then, the next:
    11 - There was one one in the previous line

    And so on:

    21 - There were two ones in the last line
    1211 - There was one two and one one
    111221 - There was one one, one two and two ones

    Its a silly puzzle but its often taught in computer courses as it is used as a simple compression algorithm for computer files.


Advertisement