Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. You're going out to shovel the snow from Snowmageddon, but it's cold and windy so you want to be sure that you're ready for

image text in transcribed
image text in transcribed
image text in transcribed
4. You're going out to shovel the snow from Snowmageddon, but it's cold and windy so you want to be sure that you're ready for it. The picture below shows all the clothes you'll put on over your street clothes. You want to put things on in the right order (you don't want to put on your mittens before you put on your boots, you'll never get them tiedl Here are your clothes, with abbreviations: - Coat (C) - Hat (H) - Balaclava (F-facemask) - Mittens (M) - Glove liners (G) - Snow pants (S) - Boots (B) - Wool socks (W) Here are the rules governing what has to go on before what - Balaclava (F) before Hat (H) - Glove liners (G) before Coat (C) - Wool socks (W) before Snow Pants (S) before Boots (B) - Balaclava (F) before Coat (C) - Mittens (M) after everything else On the next page, a) [2 pts] draw a directed acyclic graph indicating what goes on before what. b) [2 pts] Do a depth first search of the graph starting at node F, breaking ties alphabetically by. abbreviation. List the discovery and finishing times for each item of clothing. c) [2 pts] Based on the DFS you did in part B, list an order to put on the clothes. Perform DFS on this graph or its inverse graph, always visited the first unvisited node in alphabetical order (regardless of edge length). Part A: [2 pts] Find the discovery and finish times of the nodes. Solution: Part B: [2 pts] Classify the edges as T (tree), F (forward), B (back), or C (cross) edges Solution: Part C: [2 pts] Draw the stack used in Kosaraju's algorithm in the following array: Part D: Here's the graph G' (G with the edge directions reversed). Show the discovery times and finish times of the nodes when you do DFS following the rules for Kosarail's algorithm (starting from top of stack). Solution: Part E [2 pts]: List the SCCs. (You may not need all the lines.) Solution: SCCs

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

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions

Question

List and discuss the primary parts of a tax research memo.

Answered: 1 week ago

Question

LO2 Explain the nature of the psychological contract.

Answered: 1 week ago

Question

LO1 Discuss four different views of motivation at work.

Answered: 1 week ago