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:
- 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 | Solve Quick
- Minimum number of cuts required to pay salary from N length Gold Bar
- Puzzle | Minimum number steps to weigh 1 kg rice with 1gm weight
- Puzzle 31 | (Minimum cut Puzzle)
- Puzzle | Minimum planes to go around the world
- Puzzle | Minimum distance for Lizard
- Puzzle | Number of Sheets to be turned so that Prime Number has a Vowel on the other side
- Puzzle 78 | The lost bus Number
- Puzzle 69 |The Number Game
- Puzzle | (Something for the marmalade , Number Game)
- Puzzle | Find Number of matches
- Puzzle | Can 2 persons be with same number of hairs on their heads?
- Puzzle 71 | Correct Number to save life
- Puzzle | Guess the total number of coins
- Puzzle | Maximum number of Kings on Chessboard without under check
- Puzzle 51| Cheryl’s Birthday Puzzle and Solution
- Minimize number of cuts required to break N length stick into N unit length sticks
- Puzzle 15 | (Camel and Banana 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 email@example.com. 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.