Question: Suppose we are given a directed graph G with n vertices, and let M be the nÃn adjacency matrix corresponding to G. a. Let the

Suppose we are given a directed graph G with n vertices, and let M be the n×n adjacency matrix corresponding to G.

a. Let the product of M with itself (M2) be defined, for 1‰¤i, j ‰¤n, as follows:

|M

where €œŠ•€ is the boolean or operator and €œŠ™€ is boolean and. Given this definition, what does M2(i, j) = 1 imply about the vertices i and j? What if M2(i, j) = 0?

b. Suppose M4 is the product of M2 with itself. What do the entries of M4 signify? How about the entries of M5 = (M4)(M)? In general, what information is contained in the matrix Mp?

c. Now suppose that G is weighted and assume the following:

1: for 1 ‰¤ i ‰¤ n, M(i, i) = 0.

2: for 1 ‰¤ i, j ‰¤ n, M(i, j) = weight(i, j) if (i, j) is in E.

3: for 1 ‰¤ i, j ‰¤ n, M(i, j) = ˆž if (i, j) is not in E.

Also, let M2 be defined, for 1 ‰¤ i, j ‰¤ n, as follows:

M2(i, j) = min{M(i,1)+M(1, j), . . . ,M(i,n)+M(n, j)}.

If M2(i, j) = k, what may we conclude about the relationship between vertices i and j?

|M" (i, ) M(i,1)M(1,) @...(, n) M(, j),

Step by Step Solution

3.28 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a If M 2 ... View full answer

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 Introduction to Algorithms Questions!