Reference no: EM132479627
Description of task
You need to find a cheapest solution to the 8-puzzle. Given the initial state and the goal state of 8-puzzle, you need to use BFS, DFS, and Dijkstra algorithms.
For the BFS and DFS algorithms, the cost of moving tile is 1 and ordering of a move is: left, up, right, and down. For example
1 3 4
8 0 2
7 6 5
1 3 4 1 0 4 1 3 4 1 3 4
0 8 2 8 3 4 8 2 0 8 6 2
7 6 5 7 6 5 7 6 5 7 6 5
For the Dijkstra algorithm, suppose that the cost of a move in the 8-puzzle is equal to the number of the moved tile plus the number of displaced tiles. That is, the cost of moving tile 1 is $1+the number of displaced tiles of 1, the cost of moving tile 2 is $2+the number of displaced tiles of 2, and so on. Calculate the number of displaced tiles, for each states and implement theDijkstra algorithm that finds a cheapest solution; it should read a start state from a file, and print outthe shortest path cost and a cheapest sequence of moves that leads to the goal state given in Figure below:
1 2 3
8 4
7 6 5
Use the programing language of your choice.
You may assume that the puzzle always has a solution; that is, the program does not have to deal with unsolvable states.
The format for encoding start states is as follows:
<tile><tile ><tile >
<tile><tile ><tile >
<tile><tile ><tile >
Each <tile>is a digit from 0 to 8, where 0 marks the blank space, and the other digits are real tiles. For example, the following file encodes the start state:
7 2 4
5 0 6
8 3 1
Sample file 1:
1 34
8 02
7 65
Solutions:The shortest path cost =11
Sample file 2:
1 3 4
8 0 6
7 5 2
Solution: The shortest path cost = 30
Final report, slides, and codes: A report that represents the performance evaluation of your solution should include the description of your task, summary of results, main conclusions, comparison of solutions, using different algorithms, and discussion of any surprising discoveries (including the title page, abstract, 3-5 pages, font 12, double space).
Demonstration and presentation: The project concludes with a 10-15 min presentation held during the classes.
Attachment:- Dijkstra algorithm.rar
What is the percentage increase in sales
: Assume the following sales data for a company: Current year $862,747. What is the percentage increase in sales from the preceding year to the current year
|
Characterize the probability density function
: If random variables X and Y are normally distributed, X ~ N(µ = 1,s^2 = 2), and Y ~ N(µ = 2, s^2 = 3), fully characterize the probability density function of Z
|
Record all relevant journal entries
: White Mountain Company-accounting for long-term notes: White Mountain requests that you record journal entries for a note it received in 20X5
|
Which deliverables would you expect to socialize
: As part of the operationalizing a Big Data Analytics project, which deliverables would you expect to socialize with a business intelligence analyst versus.
|
Find a cheapest solution to the 8-puzzle
: Find a cheapest solution to the 8-puzzle. Given the initial state and the goal state of 8-puzzle, you need to use BFS, DFS, and Dijkstra algorithms
|
Construct a production cost worksheet
: Required - Construct a production cost worksheet assuming that spoilage is recognized and the weighted- average method is used
|
Write about rootkit using your own words
: Cybercriminals use many different types of malware to attack systems. Write about Rootkit using your own words, explain how to defend yourself against.
|
Standard deviation of the sample means
: Drawing repeated samples of 25 recruits each, we expect the standard deviation of the sample means to be about?
|
What is the project NPV
: Revenues and other operating costs would be constant over the project's 3-year life. What is the project's NPV? (Hint: Cash flows are constant in Years 1-3.)
|