Question: Consider the following pseudo code, a) Read in the graph and store the necessary information b) Find a topological order of the vertices, vi.v2, .,
Consider the following pseudo code, a) Read in the graph and store the necessary information b) Find a topological order of the vertices, vi.v2, ., vn c) for (in 0; i--) d). f if vi does not have any children, fooli]0: e) else f) { foo[i] max(foo[J] + 1: for each edge ij } 9) geeli]-k where foo[k] is the largest among fooLjJs all edges i 2. ) Find the largest fooli], for i-1, 2, .., n j) Print out i, geeli], geelgeelill, gee[geelgeeli]]. (1) Apply this pseudo code to the graph in problem 1, what will be the output? (2) What is the meaning of foo ? (3) What is the meaning of geeli]? (4) Give a high level description of this pseudo code Gang Qu (gangqu@umd.edu)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
