Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have an assaignment from Data Structures and Algorithm. ! ! ! IT NEEDS TO BE SOLVED WITH JAVA LANGUAGE!!! There is a graph and

I have an assaignment from Data Structures and Algorithm. !!! IT NEEDS TO BE SOLVED WITH JAVA LANGUAGE!!! There is a graph and sample output ,I will attach the necessary image of them. Please take a good look of the graph and required (sample) output when writing the code, thank you in advance. Here is the description: In this part, you must implement your own graph data structure by taking inspiration from your textbook (Algorithms (4th Edition)(Robert Sedgewick, Kevin Wayne))and use it to help to solve problem. You are NOT allowed to use any external library or.jar file. Any solutions without using graph data structure are not evaluated! Question 1(25 points): In the defined system there is one source (0), and 4 load point (1,2,3,4). In the graph the locations of the source and load is given find the smallest path of connection to loads and source. (Minimum Spanning Tree of the undirected graph) Sample Output: V=5
E=10
01120
02160
03300
04450
10120
12200
13410
14500
20160
21200
23420
24400
30300
31410
32420
34510
40450
41500
42400
43510
The Minimum Spanning Tree Path
.........
.........
.........
.........
.........
The Minimum Spanning Tree value=... The Minimum Spanning Tree Path part shows the path for example:
03300
04450
12200
14500(this is only example not the resul) The Minimum Spanning Tree Path part shows the path for example:
03300
04450
12200
14500(thisis only example not the result)
Important Note: If the path contain 0. The answer must be:
04450
Not 40450
If the connection is not contain zero the lowest number is written in the path.
32420 is not correct.
23420 correct.
The Minimum Spanning Tree value for above example
The Minimum Spanning Tree value =1450(this is only example not the result)
In the question you create 3 java document and one text file:
HW3_Q1_solution: Main body and the solution of Minimum Spanning Tree question
, FileRead: read the text file.
Valuefinder: take the value of txt file and convert the integer and create the
undirected graph
HW3_Q1: text file (I uploaded to the system)Important Note: If the path contain 0. The answer must be:
04450
Not 40450
If the connection is not contain zero the lowest number is written in the path.
32420 is not correct.
23420 correct.
The Minimum Spanning Tree value for above example
The Minimum Spanning Tree value=1450(this is only example not the result)
!!! In the question you create 3 java document and one text file:
- HW3_Q1_solution: Main body and the solution of Minimum Spanning Tree question
- FileRead: read the text file.
- Valuefinder: take the value of txt file and convert the integer and create the
undirected graph
- HW3_Q1: text file (I uploaded to the system)
image text in transcribed

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

2.3 Define human resource ethics.

Answered: 1 week ago

Question

9 How can training be evaluated?

Answered: 1 week ago