0

What could be the possible approach for the following problem using Python?

Stuart has some difficulty memorizing the small prime numbers. So, his computer science teacher has asked him to play with the following puzzle game frequently. The puzzle is a 3x3 board consisting of numbers from 1 to 9. The objective of the puzzle is to swap the tiles until the following final state is reached: 1 2 3 4 5 6 7 8 9 At each step, Stuart may swap two adjacent tiles if their sum is a prime number. Two tiles are considered adjacent if they have a common edge. Help Stuart to find the shortest number of steps needed to reach the goal state.

17th May 2020, 7:52 PM
Bhanu Tripathi
Bhanu Tripathi - avatar
2 Antworten
+ 1
That I can't do...If you have any answers then reply.
18th May 2020, 5:44 PM
Bhanu Tripathi
Bhanu Tripathi - avatar
0
Hi Bhanu Tripathi , this is the Q&A section. For challenges you can post them to your activity feed
18th May 2020, 5:36 PM
Mind To Machine 💻🕆
Mind To Machine 💻🕆 - avatar