Thursday, March 14, 2019
COP 3530, Discrete Data Structures and Algorithms, Summer 1999, Homework 5 :: UFL Florida Computer Programming Homework
Class follows Data Structures and AlgorithmsSummer-C Semester 1999 - M WRF 2nd Period CSE/E119, Section 7344Homework 5 -- Due get hitched with 30 June 1999 09.30am Revised DateIn class, we discussed the breadth-first and depth-first search (BFS and DFS) algorithmic programs for graph traversal. apply your class notes and the text (Chapter 12) as a guide, answer the following questions.Note Answers are in blue typeface. * Question 1. Write pseudocode (not Java code) for the BFS algorithm we discussed in class. Beside each step, write the number of external I/O, memory I/O, incrementation, comparison, and other types of operations employed. Then, construct a work calculate for each type of operation, together with a Big-Oh estimate of complexity. Answer Psudeocode for BFS is granted for a graph having n vertices and m edges, as follows procedure Breadth-first-search(w) determine list L0 to contin vertex w 2 mem I/O i = 0 1 mem I/O while not(isEmpty(Li)) do n-1 comps bring in Li+1 = empty list 1 mem I/O for each vertex v in Li do n iterations max. for each edge e incident on v do m iters max.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment