Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For the pseudocode shown in the image below: 1. What is the meaning of foo[i] 2.

ID: 3725680 • Letter: F

Question

For the pseudocode shown in the image below:

1. What is the meaning of foo[i]

2. What is the meaning of gee[i]

3. Give a high level description of the pseudocode.

a). Read in the graph and store the necessary information b) Find a topological order of the vertices, vl.v2, ,vn c) for (in i0: i--) d) f if vi does not have any children, fooli] 0 e) else f) { foo : max(foo[j] + 1: for each edge ij } geeli] : k; where foo[k] is the largest among foo[J]'s all edges i J i) Find the largest foo ], for i:1, 2, .., n ) Print out i. geelil geelgelil geelgeelgeetim.

Explanation / Answer

Hi ,

As per the problem statement , please find the solution with explanation with step by step

foo[i] => for every ith vertex , it'll collect largest edge iterating over the n to 1

gee[i] => Index of the largest edge among the foo[i] (specific vertex max edge value) over the n to 1

Thanks