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

Please help with this C programming question! Im lost! 2. Consider the following

ID: 3777058 • Letter: P

Question

Please help with this C programming question! Im lost!

2. Consider the following pseudo code, a) Read in the graph and store the necessary information b) Find a topological order of the vertices, v1,v2, vn c) for (i n i 0: i--) d) if vi does not have any children, foolil O e) else f) foolil maxtfooLj 1: for each edge i- j) gee k; where foo[k] is the largest among foo[jl's all edges i j h) i) Find the largest foolil, for i-1, 2, n j) Print out i, geelil, geelgeelill, geelgeelgeelill], (1) Apply this pseudo code to the graph in problem 1, what will be the output? (2) What is the meaning of foolil? (3) What is the meaning of geeli]? (4) Give a high level description of this pseudo code.

Explanation / Answer

4) The overall goal of this pseudo code is to find the topological order of graph and topological order means a linear ordering of graph vertices in a way that for every directed edge uv from vertex u to vertex v, u comes before v

2 & 3) Here foo and gee are array that hold the intermediate values to get the topological order, we use foo to find the location the vertex at which is largest among all the values that we check for one vertex to another.

Here to answer first part we dont have the problem as mentione in question