Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java please make it as easy as possible, thank you and 5 star rating 2 Call your program NinePuzzle and upload it to Vocareum. Scoring:

image text in transcribed
image text in transcribed
java please make it as easy as possible, thank you and 5 star rating
image text in transcribed
2 Call your program NinePuzzle and upload it to Vocareum. Scoring: The grading will be based on five test problems, each counting two points. The tests will be run using java -Xmx1024m NinePuzzle The score will be 0 for a test problem if: (1) the output is incorrect; (2) the program runs for more than 10 seconds; (3) the program gives a java.lang.OutOfMemory Error; (4) the program obtains the solution with more than the minimal number of moves; (5) the program uses data structures that we have not covered in the course. Relevant topics array ataka, You are given a frame that fita gure blocks. The frame contains 8 blocks numbered through 8, leaving one location empty. You can shift a belghboring block into the empty space, and your goal is to find a sequence of moves that resulte in the locks numbered 1 through going to right, top row to bottom, with the lower right position empty For example, the following quence of configuration solve the pure: 1 2 3 123 123 1 2 3 12 478 465 486 4 + 6 7 Write a program to solve the problem with the fewest number of more. The input consists of a -digit string containing coach of the digita1-9. The first three digite reprown the first row, the next three digita represent the second row, and the last three digits represent the last row. The diet reprowns the space. For example, the initial state of the peale given above would be represented by 193489765. The output is either a wee of string giving the configurations of a solution, or 1 sobation exists For example, if the input 123489765 the correct output is 123489765 123485769 $23485796 123405786 123459786 123456789 Ir the input 812943765 then the correct - 1 since the problem to be solved. If the input 123456789 then the correct output 123456789 since the problem is already solved Notice that if there is a solution with more, then your program should print + I lines, starting with the input line You are given a row that it dock The Woche med 1 through leaving location You can set asiguing block into the compty space, and your goal is to find a waves that in the locks through time to right to bottom with the right position cupit For example, the following sequio confesses the 123 23 Witte a program to solve them with the retumber of moves. The input consist of citrici che the digital-Theft three digtersent the first, the next the best there w and the last three digits pretthew. The great the space For example, the initial stated the prozzle giver be sepsented by 123489765. The output is either a perse of string ring the configuration of a solution, or -1 if ne motions For example, if the proti 123489765 then a cut output 129489765 123485769 123485796 123405786 123459786 123456789 If the inputs 812943765 then the compte witice the problem cantat bebed. If the past 123456789 them the context output is 123456789 te the problem is almal Note that if there is a lot with www.ther your person peint ut + 1 lime, starting with the input 2 Call your program NinePuzle and upload it to Voca Scoring: The grading will be based on the test acting the point The tests will be using java - 1024 Nine Puzzle The wore will be for at problemit (1) the output is incorrect (2) the program for the than 10 (3) the page a juo (4) the program altits the section with the the minimales of MOV (the program venduta structures that we have created in the contre 2 Call your program NinePuzzle and upload it to Vocareum. Scoring: The grading will be based on five test problems, each counting two points. The tests will be run using java -Xmx1024m NinePuzzle The score will be 0 for a test problem if: (1) the output is incorrect; (2) the program runs for more than 10 seconds; (3) the program gives a java.lang.OutOfMemory Error; (4) the program obtains the solution with more than the minimal number of moves; (5) the program uses data structures that we have not covered in the course. Relevant topics array ataka, You are given a frame that fita gure blocks. The frame contains 8 blocks numbered through 8, leaving one location empty. You can shift a belghboring block into the empty space, and your goal is to find a sequence of moves that resulte in the locks numbered 1 through going to right, top row to bottom, with the lower right position empty For example, the following quence of configuration solve the pure: 1 2 3 123 123 1 2 3 12 478 465 486 4 + 6 7 Write a program to solve the problem with the fewest number of more. The input consists of a -digit string containing coach of the digita1-9. The first three digite reprown the first row, the next three digita represent the second row, and the last three digits represent the last row. The diet reprowns the space. For example, the initial state of the peale given above would be represented by 193489765. The output is either a wee of string giving the configurations of a solution, or 1 sobation exists For example, if the input 123489765 the correct output is 123489765 123485769 $23485796 123405786 123459786 123456789 Ir the input 812943765 then the correct - 1 since the problem to be solved. If the input 123456789 then the correct output 123456789 since the problem is already solved Notice that if there is a solution with more, then your program should print + I lines, starting with the input line You are given a row that it dock The Woche med 1 through leaving location You can set asiguing block into the compty space, and your goal is to find a waves that in the locks through time to right to bottom with the right position cupit For example, the following sequio confesses the 123 23 Witte a program to solve them with the retumber of moves. The input consist of citrici che the digital-Theft three digtersent the first, the next the best there w and the last three digits pretthew. The great the space For example, the initial stated the prozzle giver be sepsented by 123489765. The output is either a perse of string ring the configuration of a solution, or -1 if ne motions For example, if the proti 123489765 then a cut output 129489765 123485769 123485796 123405786 123459786 123456789 If the inputs 812943765 then the compte witice the problem cantat bebed. If the past 123456789 them the context output is 123456789 te the problem is almal Note that if there is a lot with www.ther your person peint ut + 1 lime, starting with the input 2 Call your program NinePuzle and upload it to Voca Scoring: The grading will be based on the test acting the point The tests will be using java - 1024 Nine Puzzle The wore will be for at problemit (1) the output is incorrect (2) the program for the than 10 (3) the page a juo (4) the program altits the section with the the minimales of MOV (the program venduta structures that we have created in the contre

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

Students also viewed these Databases questions