• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 20 pages
Exam (elaborations)

EL9343 Homework 5HW5 SolutionCS-UY MISC

Document preview thumbnail
Preview 3 out of 20 pages

EL9343 Homework 5 (Due May 3 rd, 2020) This Assignment is longer than before, start early. No late assignments accepted All problem/exercise numbers are for the third edition of CLRS text book 1. Show the ordering of vertices produced by TOPOLOGICAL-SORT when it is run on the DAG below. Assume that for loop of lines 5—7 of the DFS procedure (page 604 in CLRS) considers the vertices in alphabetical order, and assume the adjacency list is ordered alphabetically. Solution: This is the graph after we run DFS on the graph: The left number is the discover time and the right number is the finish time. According to the TOPOLOGICAL-SORT(G), we can get the ordering of the vertices should be: p, n, o, s, m, r, y, v, x, w, z, u, q, t. 2 2. Run the procedure STRONGLY-CONNECTED-COMPONENTS on the graph below. Show the: (a) The finishing times for each node after running DFS in line 1 (b) The DFS forest produced by line 3 (c) The nodes of each tree in the DFS forest produced in line 3 as a separate strongly connected component. Assume that for loop of lines 5—7 of the DFS procedure (page 604 in CLRS) considers the vertices in alphabetical order, and assume the adjacency list is ordered alphabetically. Solution: (a) As shown below, the discover time and finish time lie on two sides of each node, the left is the discover time, the right is the finish time. (b) The result of DFS on


Document information

Uploaded on
November 16, 2022
Number of pages
20
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers
$9.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Abbyy01
3.5
(13)
Sold
98
Followers
33
Items
1332
Last sold
3 months ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.