Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

A very simple puzzle

  • 26-07-2010 10:37PM
    #1
    Registered Users, Registered Users 2 Posts: 5,184 ✭✭✭


    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, Registered Users 2 Posts: 477 ✭✭Flyin Irishman


    312211

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

    Anyone wanna post the next line in the sequence?


  • Registered Users, Registered Users 2 Posts: 3,484 ✭✭✭randombar


    13112221


  • Registered Users, Registered Users 2 Posts: 70 ✭✭Sack


    1113213211


  • Registered Users, Registered Users 2 Posts: 477 ✭✭Flyin Irishman


    31131211131221


  • Registered Users, Registered Users 2 Posts: 492 ✭✭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, Registered Users 2, Paid Member Posts: 7,526 ✭✭✭Blisterman


    Explanation?


  • Registered Users, Registered Users 2 Posts: 477 ✭✭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