Greedy strategy for finding a shortest path

Assignment Help Data Structure & Algorithms
Reference no: EM1380122

Question: Think about the given greedy strategy for finding a shortest path from vertex start to vertex goal in a connected graph.

1: Initialize path to start.
2: Initialize Visited Vertices to {start}.
3: If start=goal, return path and exit. Otherwise, continue.
4: Find the edge (start,v) of the minimum weight such that v is adjacent to start and v is not in Visited Vertices.
5: Add v to path.
6: Add v to Visited Vertices.
7: Set start equal to v and go to step 3.

Does this greedy strategy find the shortest path from start to goal?
Either explain intuitively why it works, or give a counter-example showing why it does not.

 

Reference no: EM1380122

Questions Cloud

Determine average waiting time for constant length messages : Messages reach at random to be sent across a communications link with a information rate of 9600 bps. The link is 70 percent utilized, and the average message length is 1000 octets.
Find the number of physicians : Find the number of physicians to be located in each of the areas if the physicians are income maximizers - Population Index
Find the db strength of the signal : A signal starts at x point. As it travels to y point it loses eight db. At point y the signal is boosted by ten db. As the signal travels to point z it loses 7 db.
Terminal and the corresponding data center : 2-information centers used for retail credit authorization are located in 2-different major population centers, which are separated from each other through a large zone of very little population.
Greedy strategy for finding a shortest path : Think about the given greedy strategy for finding a shortest path from vertex start to vertex goal in a connected graph.
Prepare a monthly operating budget for the dmv : What other changes would you suggest that might help the DMV's situation and what are the advantages and disadvantages of the various suggested changes
Time sharing operating system : Assume a time sharing operating system allocated time slices of twenty milliseconds and the machine executed an average of 5000 instructions per microsecond.
Data speed effect on fundamental business decisions : Can the speed in which data is transmitted have an adverse effect on fundamental business decisions? Yes, speed that is traveling at big rates of speed can have an affect on fundamental business decisions.
Draw a time line to show the cash flows of the project : Draw a time line to show the cash flows of the project and compute the project's payback period, net present value, profitability index, and internal rate of return.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Determine expected number of collisions use hash function

Assume we use hash function h to hash n distinct keys into the array T of length m. Suppose simple uniform hashing, determine the expected number of collisions?

  Generalize 2-3 algorithms for insert and delete

Generalize the 2-3 algorithms for INSERT and DELETE to K-J trees, where non-leaf vertices have between K and J children for fixed integers K >=2, and J>= 2K-1.

  Users and it organizations arm against phishing attacks

How users and IT organizations must arm themselves against these attacks?

  Determining hash value of modified file

Determine hash value of modified file look like, as compared with original hash value?

  Design time randomized monte carlo algorithm

You have to design an O(n) time randomized Monte Carlo algorithm which computes an (1 + o)- approximate ham-sandwich cut with probability 1 - n-c for any given constant c > 0.

  Data structures and algorithm design

Data Structures and Algorithm Design

  Algorithm on dynamic programming-minimize amount of walking

Our goal is to plan this trip so that we minimize the maximum amount of walking done in a single day. Your algorithm should be based on dynamic programming and run efficiently.

  Factors-principles considering indecency regulation issues

What factors and principles should the federal government take into account when considering indecency regulation issues?

  Determine mean process turnaround time

Their priorities are 2, 3, 1, 5 and 4, respectively, with 1 being the highest priority. Specify the order in which processes execute and determine the mean process turnaround time for each of the scheduling algorithms.

  Conceptual model entity relationship diagram

Assume you are asked you to create a new entity-relationship diagram for a corporation for a customized shipment tracking system.

  Question about structured wiring

Describe how properly installed structured wiring save the need to recable when new applications are added. Provide some examples of a project that required to be recabled because it was not properly installed structured wiring?

  Calculate the cost of sorting relation in seconds

Assume a flash storage device is used instead of disk, and it has seek time of 1 microsecond and transfer rate of 40 MB per second. Recompute the cost of sorting the relation in seconds.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd