![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 07.03.2020 04:30 igotdiss2178
Implement a C program to solve the 15-puzzle problem using the A* search algorithm.
In the assignment, solving a 15-puzzle problem needs to move the tiles to their goal locations, which are as shown below. The numbers 1~15 are indexes of the tiles, and 0 means blank tile. This state is the goal state.
Your program can solve the problem using a single thread or using 4 threads, depending on the first argument (argv[1]). The program uses a single thread if argv[1] is "-s", or 4 threads if argv[1] is "-m". The initial layout of the tiles is also provided in the command line as arguments by listing tile indexes in a row-major order.
For example, the command ./your_program -s 2 3 0 4 1 6 7 8 5 9 10 12 13 14 11 15 is to use one thread to solve the 15-puzzle problem, in which the tiles are initially placed as follows, and are to be moved to their goal locations
The command ./your_program -m 2 3 0 4 1 6 7 8 5 9 10 12 13 14 11 15 is to solve the above problem using 4 threads.
Program needs to print out a sequence of states showing the movement the tiles, or text "no solution" if a solution cannot be found.
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 16:00, bsrlee1115
Which type of cloud computing offers easily accessible software and applications on the machines
Answers: 1
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 25.06.2019 07:50, joshbee2014
Assignment: permutations use the permutation formula r ! ! n n p nr to solve each problem. be sure to show all work leading to your answer. part i: solve real-world permutation problems choose any four (4) of the following five problems to solve. for each problem a) show how the permutation formula can be used to find the answer and b) write a sentence to explain the meaning of the answer for the situation. 1. to register for online banking services at a local credit union, you need to select a four-digit personal identification number, or pin code. the digits cannot be repeated. how many ways are there to arrange four digits out of the numerals 0 through 9 to create a code?
Answers: 3
You know the right answer?
Implement a C program to solve the 15-puzzle problem using the A* search algorithm.
In...
In...
Questions in other subjects:
![Konu](/tpl/images/cats/mat.png)
Mathematics, 01.03.2021 18:50
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/es.png)
![Konu](/tpl/images/cats/biologiya.png)
Biology, 01.03.2021 18:50
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 01.03.2021 18:50
![Konu](/tpl/images/cats/himiya.png)
Chemistry, 01.03.2021 18:50
![Konu](/tpl/images/cats/himiya.png)
Chemistry, 01.03.2021 18:50
![Konu](/tpl/images/cats/mat.png)
Mathematics, 01.03.2021 18:50