Gurmeet.Net
Gurmeet.Net
Puzzles
Puzzles

Breaking a Chocolate

Puzzle

How many steps are required to break an m x n bar of chocolate into 1 x 1 pieces? We may break an existing piece of chocolate horizontally or vertically. Stacking of two or more pieces is not allowed.

Source

A classic puzzle.

Solution

We need mn - 1 steps. By breaking an existing piece horizontally or vertically, we merely increase the total number of pieces by one. Starting from 1 piece, we need mn - 1 steps to get to mn pieces.

Another way to reach the same conclusion is to focus on "bottom left corners of squares": Keep the chocolate rectangle in front of you and start drawing lines corresponding to cuts. Each cut "exposes" one new bottom left corner of some square. Initially, only one square's bottom left corner is exposed. In the end, all mn squares have their bottom left corners exposed.

Previous Puzzle: Blind Man and Cards

A blind man is handed a deck of 52 cards and told that exactly 10 of these cards are facing up. How can he divide the cards into two piles, not necessarily of equal size, with each pile having the same number of cards facing up?

Alice has two standard dice with labels 1 thru 6. When she rolls them and adds their labels, she gets a distribution over integers in [2, 12]. Bob has nine cards, each labeled with some real number. When Bob chooses two cards (without replacement) and adds their labels, he gets exactly the same distribution over integers in [2, 12] as Alice gets by rolling her dice. What are the labels on Bob's nine cards?

12 Sep 2008
© Copyright 2008—2017, Gurmeet Manku.