• subscribe
May 23, 2007 12:00 AM

The Logical Puzzle

SQL Server Pro
InstantDoc ID #95672

Solution to May's Puzzle: Missing Element in Series
I got this nice puzzle from Adi Dafni. Given the following series of elements, can you determine the next element?

1, 11, 21, 1211, 111221, 312211, ?

Each element describes the previous element by counting the number of consecutive occurrences of each digit in order. For example, to describe the element 1, you would say that there's one occurrence of the digit 1, resulting in 11. To describe 11, you would say that there are two occurrences of the digit 1, resulting in 21. The description of 21 is one occurrence of 2 and one occurrence of 1, resulting in 1211. The description of 1211 is one occurrence of 1, one occurrence of 2, and two occurrences of 1, resulting in 111221. Following this logic, the next few elements are 312211, 13112221, and 1112213211.

June's Puzzle: Same Birthday
What's the probability that, in a group of 23 randomly chosen people, at least two of them will have the same birthday?



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here
  • SP1?
    I know there is a SP1 for SQL 2008 R2 available....and there is a "feature pack" as well... ...
  • SQL database mirroring
    I have SQL Server 2008 R2 Enterprise 64bit on Windows 2008 R2 Enterprise 64bit.  Each SQL Server has...
  • Dell Compellent Disk Drive
    Does anybody has experience with Dell Compellent Disk Drive? Basically, this system manages all disk...
  • Sql server performance tuning
    I need to find a tool that help me to optimize sql server,queries,improve the performance and solve ...