Graph Processing. Let G be a graph of N nodes represented by a NxN Boolean adjacency matrix, which (by abuse of notation

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Graph Processing. Let G be a graph of N nodes represented by a NxN Boolean adjacency matrix, which (by abuse of notation

Post by answerhappygod »

Graph Processing.
Let G be a graph of N nodes represented by a NxN Boolean
adjacency matrix, which (by abuse of notation) we will also call
G.
a. Graph G is said to be transitive if and only if
whenever there is an arc from node I to node J and an arc from node
J to node K in G, then there is necessarily an arc from node I to
node K in G. Write a Boolean function transitive(), which takes a
graph as a parameter and returns TRUE if and only if G is
transitive.
b. Graph G is said to be connected if and only if
for any node I and node J, there is a path from I to J in G. Write
a Boolean function connected(), which takes a graph G as a
parameter and returns TRUE if and only if G is transitive.
You may assume that you have two functions available to
you:
transitiveclosure(G,G+): This function takes G as input and returns
its transitive closure in G+.
path2(G,G2): This function takes G as input and returns in G2 the
graph that has an arc from node I to node J whenever G has a path
of length 2 from I to J.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply