Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

ASSIGNMENT

This assignment involves extension to the single source - single destination shortest path problem.

The Program

Your program should:

1. Read the name of a text file from the console.

2. Read a graph from the file.

3. Find the shortest path between the start and goal vertices specified in the file.

4. Print out the vertices on the path, in order from start to goal.

5. Print out the length of this path.

6. Devise a strategy for determining the second shortest path between the vertices.

7. Find the second shortest path between the start and goal vertices specified in the file.

8. Print out the vertices on the path, in order from start to goal.

9. Print out the length of this path.

The data files are constructed as follows:

  • Two integers: nVertices and nEdges, the number of vertices and edges in the graph.
  • nVertices triples consisting of the label and the x- and y-coordinates of each vertex.
  • nEdges triples consisting of the labels of the start and end vertices of each edge, along with its weight. Note: the weight associated with an edge will be greater than or equal to the Euclidean distance between its start and end vertices as determined by their coordinates.
  • Two labels, the indicating the start and goal vertices for which the paths are required.

A proposed solution to the second shortest path problem is as follows:

For each edge ei on the shortest path: Find the shortest path on (V, E - {ei}). // shortest path without edge ei

The shortest of these is the second shortest path.

Questions -

Is this proposed solution correct?

1. If we require that the second shortest path be longer than the shortest path?

2. If the graph contains cycles?

3. If the graph is undirected?

In each case explain your answer and, if necessary explain how you might modify the proposed algorithm to address any issues you identify.

Attachment:- Assignment Files.rar

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92490467

Have any Question?


Related Questions in Computer Engineering

Explain that the biggest problems with adware is that it

Explain that the biggest problems with adware is that it slows down the computers its running on.

Analyze the time complexity of the following ternary search

Analyze the time complexity of the following ternary search algorithm: identify two points that subdivide a sorted array into three parts. If the given number is equal to one of these two points, we are done. Otherwise, ...

How does understanding various microsoft office

How does understanding various Microsoft Office applications enhance productivity in education, the workplace, and at home?

Question read the following topic then explain where a

Question: Read the following topic then explain Where a datagram can be fragmented? Where the fragmented datagram can be reassembled? Fragmentation of Datagram Packets used by the IP are called datagrams. For a networks ...

Write a program that takes as input an xy center value and

Write a program that takes as input an x,y center value and radii for two circles, draws them in a turtle (Python) window, and prints whether they intersect or not. You should show intersecting circles, and show non-inte ...

Rgb ledsthree light-emitting diodes leds one red one green

RGB LED's Three light-emitting diodes [LEDs] (one red, one green, one blue) turn on when a number 0-7 is passed through. Red turns on with even numbers, green turns on with odd numbers, blue turns on with multiples of 3. ...

Create login form to enter user name and a password textbox

Create login form to enter user name and a password textbox to enter password, and write procedure to simulate the process of triggering the login process after hitting the Enter Key.

Assignment from chapter 10 page 302 web-based case read and

Assignment: From Chapter 10, page 302, Web-Based Case. Read and answer the questions. KNOWLEDGE MANAGEMENT SYSTEMS AND CRM In answer to the challenges Nelnet faces in servicing a growing volume of student loans, the comp ...

1nbsphillary wants to go to disneyland in 425 years she

1) Hillary wants to go to Disneyland in 4.25 years. She wants to take her partner and 2 kids (4 people in Total). If it is going to cost $453.27 per person to go on the trip. -What will the cost be for the entire trip? - ...

Suppose you insert 125 integer keys into a hash table with

Suppose you insert 125 integer keys into a hash table with an initial capacity of 25 and load factor threshold of 2. THe hash code is the key itself,and the function key mod table_capacity is used to map a key into a tab ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As