Example 1 – The Chocolate Bar
You have a chocolate bar with 24 squares.
You can break the chocolate only one piece at a time.
What is the minimum number of breaks needed to separate all squares?
Answer: 23 breaks
Example 2 – Number Pyramid
Look at the pyramid:
?
6 8
2 4 4
Each number above is the sum of the two numbers below it.
What number should replace ?
A) 12
B) 13
C) 14
D) 15
Example 3 - Glasses
There are five drinking glasses on the table. One of them is turned upside down.

In this game, you have to get all glasses upright again. But: you have to turn exactly three glasses every turn. How many turns do you need at least to get all the glasses standing upright?
Answer:
A) 2 turns
B) 5 turns
C) 3 turns
D) it is impossible!
For example:

Notice that there must be an odd number of turns, since after the first turn, there will be either 2 or 4 glasses which are upside-down. On the next turn, there will be an odd number (1,3,5) of glasses which are upside down. Thus, we require more than 2 moves and in general we require an odd number of moves. We have shown a solution which uses 3 turns, which must be the minimum. It's Informatics: Following an algorithm, we can keep track of the state of the system or its variables. Reasoning about parity and arguing correctness for an algorithm are important aspects of informatics. One possible way to analyze the solution is to consider either deterministic finite automata (self-operating machines) or to consider a breadth-first search.
Want to solve more exciting problems?
Join the New Corner Computational Thinking Competition!




