Question: create the dependency graph and adjacency list create the reverse dependency graph and adjacency list identify the postorder running depth - first search forest on

create the dependency graph and adjacency list
create the reverse dependency graph and adjacency list
identify the postorder runningdepth-first search forest onthe reverse dependency graph. The order of vertices for the search is numerical (R0, R1, R2,...)
identify the strongly connected components. This is done by running depth-first search forest onthe (forward) dependency graph. The order of vertices for the search is the reverse of the postorder found in step 3
Note: any time you have a choice of which adjacent vertex to visit, go in numerical order.
What to submit: the dependency graph and its adjacency list, the reverse dependency graph and its adjacency list, the postorder obtained from the reverse dependency graph traversal, and pictures of the strongly connected components.
#Some Queries are commented out, feel free to uncomment them for you own testing. Schemes: s0(v,w,x,y,z) s1(a,b,c,d,e) s2(a,b,c,d,e) s3(a,b,c,d,e,f,g,i) s4(a,b,c,d,e) s5(a,b,c,d,e) Facts: s0('a','b','c','d','e'). s2('f','g','h','i','j'). Rules: s1(a,b,c,d,e) :- s0(a,b,c,d,e). s1(a,b,c,d,e) :- s2(b,c,d,e,a). s2(a,b,c,d,e) :- s1(b,c,d,e,a). s1(a,b,c,d,e) :- s1(b,a,c,d,e). s3(a,f,b,g,c,h,d,i) :- s1(a,b,c,d,e),s2(f,g,h,i,j). s5(a,b,c,d,e) :- s0(a,b,c,d,e). s4(a,b,c,d,e) :- s3(a,b,z,y,c,d,e,i),s5(m,n,x,y,z). s5(a,b,c,d,e) :- s4(a,b,c,d,e),s5(a,w,x,y,z). s5(a,b,c,d,e) :- s5(e,a,b,c,d). Queries: #scc1o1(a,b,c,d,e)? #scc2o1(a,b,c,d,e)? #scc1o2(a,b,c,d,e,f,g,h,i,j)? #scc1o3(a,b,c,d,e,f)? #s3(a,b,c,d,e,,g)? s5(a,b,c,d,e)?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!