Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For Algorithms using C programming Due August 10, 2018 Goals: I. Understanding of Warshall's algorithm. 2. Understanding of strongly connected components. Requirements: 1. Write a

For Algorithms using C programming image text in transcribed
Due August 10, 2018 Goals: I. Understanding of Warshall's algorithm. 2. Understanding of strongly connected components. Requirements: 1. Write a program, based on Warshall's algorithm with successors, to find a leader for each strongly connected component of a directed graph. The leader of a strongly connected component is the smallest numbered vertex appearing in that SCC. The input will be formatted as follows a. The first line will contain an integer V giving the number of vertices. V will not exceed 50. b. Tail and head for each edge, one edge per line. The tail and head will be in the range 0... v 1. c. A line with -1 -1. 2. Your program's output for each vertex i will be either 1) the fact that vertex i is a leader or 2) a path from vertex i to its leader and a path from the leader to vertex i. intermediate matrices from your Warshall-based technique. Your program must also output the 3. Submit your program source file on Blackboard by 5:00 pm on Friday, August 10. One of the comment lines should include the compilation command used on OMEGA Getting Started: 1. Review Warshall's algorithm with successors. Also, consider the usual transitivity diagram and how 2. Test files are available on the course web page. Other cases may be used when your submissions ane 3. Since SCCs treat the graph as being reflexive (e.g. self-loops), each diagonal entry A[ ] [ i ] is it relates to this problem. checked. initialized to i. If there is an edge from i to j (il-), then Afi]13] is initialized to min(i,j). If there is no edge from i to j , then A [ i ] [ j ] s initialized to-1 (or some other value depending on your code). Based on this initialization, Warshall's algorithm may be modified to terminate with the leader for the SCC of vertex i stored at A[i]Ii]. 4. 5. Your code must execute in 6. Static allocation (i.e. no mallocs) is allowed 7. time. You may modify http://ranger.uta.edu/-veens/NOTES2320/warshall.e to do this assignment

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

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions

Question

6. Reward and recognise:

Answered: 1 week ago