You are given a jigsaw puzzle that contains n pieces. A “section” of the puzzle is a set of one or more pieces that have been connected to each other. A “move” consists of connecting two sections. Given that initially, all the pieces are separate, then what is the minimum number of moves in which the puzzle can be completed?
Let’s consider the above problem case-wise:
Case n = 2: In this case, we only have to combine two pieces, which can be done in a single move. Hence, the total number of moves required is 1.
Case n = 3: Here, we can first join any two pieces as required and then, we can add the final piece to the section. This results in the total number of 2 moves.
- Case n = 4: Just continuing from the last case, we can first combine two pieces, then combine the third one and finally, the fourth piece. The total number of moves required in this case is 3.
For any value of n: Notice, the pattern building up in the previous 3 cases. We first solve the puzzle for (n-1) pieces and then finally add the last piece with 1 move.
Let’s represent this mathematically:
- Check whether jigsaw puzzle solveable or not
- Puzzle | Solve Quick
- Puzzle 31 | (Minimum cut Puzzle)
- Puzzle | Minimum time required to make N Pancakes
- Puzzle | Minimum colors required to color a chessboard with no two given pair threatening each other
- Puzzle 24 | (10 Coins Puzzle)
- Puzzle 27 | (Hourglasses Puzzle)
- Puzzle 28 | (Newspaper Puzzle)
- Puzzle 29 | (Car Wheel Puzzle)
- Puzzle 33 | ( Rs 500 Note Puzzle )
- Puzzle 34 | (Prisoner and Policeman Puzzle)
- Puzzle 36 | (Matchstick Puzzle)
- Puzzle 38 | (Tic Tac Toe Puzzle)
- Puzzle 39 | (100 coins puzzle)
- Puzzle 51| Cheryl’s Birthday Puzzle and Solution
- Puzzle 81 | 100 people in a circle with gun puzzle
- Puzzle 85 | Chain Link Puzzle
- Puzzle | Elevator Puzzle
- Puzzle | 3 Priests and 3 devils Puzzle
- Puzzle | Man fell in well Puzzle
The minimum number of moves required to solve n-piece jigsaw puzzle is (n-1)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.