• subscribe
February 22, 2006 12:00 AM

The Logical Puzzle

SQL Server Pro
InstantDoc ID #49039

Solution to February's Puzzle: Piece of Cake
In last month's puzzle, you had a rectangle-shaped frosted cake, with a rectangleshaped hole in it in an arbitrary position.Your challenge was to make one straight cut so that you end up with two equally sized portions of cake, each with the same amount of frosting.

Any straight line that goes through the center of a rectangle splits it into equal pieces, regardless of angle. So, you first mark the center of the cake. Then, you mark the center of the hole. You can now use your knife to cut a straight line that goes through both the center of the cake and the center of the hole, as Figure A shows. With this cut, you split the cake into two equal pieces that have the same amount of frosting.

March's Puzzle: Cards Facing Up
Thanks to SQL Server Most Valuable Professional (MVP) Steve Kass for this month's card-themed puzzle.You have a deck of 52 cards, all facing down. Blindfolded, you turn over seven of the cards in the deck so that they face up, then you shuffle the entire deck. Remaining blindfolded, you now need to separate the cards into two piles so that each pile contains the same number of face-up cards. Hint: The number of cards in each pile doesn't need to be the same—just the number of cards facing up.



ARTICLE TOOLS

Comments
  • NATHAN
    6 years ago
    Mar 10, 2006

    Errata: In the above solution, change as follows:
    Solution: Separate the cards into two piles, one with seven cards and one with 52 - 7 = 45 cards. Now, the pile with seven cards has n cards facing up, and the remaining pile has 7-n cards face up. Flip all cards in the pile of 7. Now, that pile has 7-n cards facing up, and the other pile also has 7-n cards facing up.

  • NATHAN
    6 years ago
    Mar 10, 2006

    Solution: Separate the cards into two piles, one with seven cards and one with 52 - 7 = 45 cards. Now, the pile with seven cards has n cards facing up, and the remaining pile has 7-n card face up. Flip all cards in the pile of 7. Now, that pile has 7-(7-n) = n cards facing up, and the other pile also has n cards facing up.

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