Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(c) Simulate breadth first search on the graph shown in Fig HW2Q1c. You can assume that the starting vertex is 1, and the neighbors of

(c) Simulate breadth first search on the graph shown in Fig HW2Q1c. You can assume that the starting vertex is 1, and the neighbors of a vertex are examined in increasing numerical order (i.e. if there is a choice between two or more neighbors, we pick the smaller one). You have to show: both the order in which the vertices are visited and the breadth first search tree. No explanations necessary.

(d) On the same graph, i.e. the graph in Fig HW2Q1c, simulate depth first search . You can assume that the starting vertex is 1, and the neighbors of a vertex are examined in increasing numerical order (i.e. if there is a choice between two or more neighbors, we pick the smaller one). You have to show: both the order in which the vertices are visited and the depth first search tree. No explanations necessary.

(e) What is the topological order (no explanations necessary) on the graph shown in Fig HW2Q1e, if we use the method discussed in class and in section 9.4.1 of Brassard and Bratley (i.e. the algorithm which adds a print statement at the end of the DFS procedure and then reverses a list at the end) assuming that the starting vertex is 1, and the neighbors of a vertex are examined in increasing numerical order. Please note that I am asking specifically what will be the topological order produced by this algorithm i.e. it is not enough just to show another topological order.

(f) Trace the execution of Kruskals algorithm on the graph shown in Fig HW2Q1f. Show the connected components each time a new edge is added.image text in transcribed

C 0 The Mechanistic Cor file:///C/Users/Christopher/Desktop/CLASSES/ALGORTH IM%20DESIGN/hw2figures.pdf : Apps Joe Rogan Experienc Macy's-Shop Fashic C60 Antiaging oil O Anthology film #2 tc Other bookmarks CSCI G632- Algorithus18 Spring HW 2 Figures Fig HW2le Fig HW2Q1f Fig HW2qQ3(i) and Fig HW2Q3(ii) 3014 5 Activate Windows Go to Settings to activate Windows. Fig HW2Q4 6:04 PM Desktop" ^ d) 2/20/2018 Type here to search

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions