• subscribe
January 18, 2005 12:00 AM

Logical Puzzle

SQL Server Pro
InstantDoc ID #44926

CHOCOLATE BARS
I got this puzzle from Lubor Kollar, a group program manager with the Microsoft SQL Server development team. Imagine you have a chocolate bar made up of 40 squares arranged in 5 rows and 8 columns. Your task is to break it into the 40 individual chocolate squares using the minimum number of cuts. You're allowed to make only one cut at a time (not allowed to pile multiple layers or lay them next to each other) and only in straight lines (horizontal or vertical). How many cuts do you need at minimum? Prove your logic; don't just guess.

SOLUTION TO JANUARY'S TABLETS PUZZLE:
Cut each of the remaining four tablets in half. Consume one half of each tablet today and take the rest tomorrow.



ARTICLE TOOLS

Comments
  • manjaly
    1 year ago
    Feb 09, 2011

    4+ 5*7 =39 cuts

  • MIKE
    7 years ago
    Feb 15, 2005

    15 cuts
    Cut the 5 rows through all but the last column, 4 cuts. This leaves the bar intact; no rules are broken because the bar doesn't have to be re-arranged to make the remaining cuts.

    Cut all 8 columns, 7 cuts. This leaves 45 pieces and one column of 5 pieces.

    Cut the remaining column into 5 pieces, 4 cuts.

    4+7+4 = 15

  • Anonymous User
    7 years ago
    Feb 14, 2005

    lol

    SELECT REPLACE( REPLACE( 'How about this: You are all stupid lame geeks who never get laid.', 'stupid lame geeks', 'professionals'), 'never get laid', 'are well paid')

    SELECT REPLACE( 'Anonymous User -February 07, 2005', 'Anonymous User', 'Jack@ss')

  • Anonymous User
    7 years ago
    Feb 14, 2005

    SELECT REPLACE(
    REPLACE( 'How about this: You are all stupid lame geeks who never get laid.', 'stupid lame geeks', 'professionals'), 'never get laid', 'are well paid')

    SELECT REPLACE( 'Anonymous User -February 07, 2005', 'Anonymous User', 'Jack@ss')

  • Anonymous User
    7 years ago
    Feb 11, 2005

    28

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 ...