What are the equivalence classes of this relation

Assignment Help Data Structure & Algorithms
Reference no: EM13332119

1- Let G = ( V , E ) be an undirected graph and let R be a relation on V defined by vRw if and only if there exists a path from v to w . (Recall there is a path of length zero from any vertex to itself.)
1. Show that R is an equivalence relation.
2. What are the equivalence classes of this relation?
3. Show that the reachability matrix R for an undirected graph with n vertices can be constructed in 0 ( n 2 )time.

2- compute the transitive closure of the relation A given in Example 9.1. Show the matrix after each pass of the outermost for loop.

Transitive closure of one relation
For the following A,the transitive closure is R.


Warshall's Algorithm
input: A and n, where A is an n X n adjacency matrix
output: R, the n X n transitive closure matrix of A
voidtranstivieClosure(boolean[][] A, int n, boolean [][] R)
inti, j, k;
Copy A into R;
Set all main diagonal entries, r[i][i] to true;
for (k=1; k<=n; k++)
for (i=1; i<=n; i++)
for (j=1; j<=n; j++)
r[i][j] = r[i][j] | (r[i][k] & r[k][j]);

Reference no: EM13332119

Questions Cloud

What is the frequency of the radiation : The electromagnetic wave used in a microwave oven have a wavelength of about 12.228 cm. What is the frequency of the radiation
The environment and its preservation or restoration : The environment and its preservation or restoration?
Find how much work is done by the force of the wave : A surfer is riding a wave. Suppose she starts at the top of the wave with a speed of 1.87 m/s, how much work is done by the (non-conservative) force of the wave
Explain the heat capacity of the bomb calorimeter : The heat capacity of the bomb calorimeter is 34.65 kJ/K and the combustion of 1.742g of methanol raises the temperature of the calorimeter from 294.12K to 295.26K
What are the equivalence classes of this relation : Show that the reachability matrix R for an undirected graph with n vertices can be constructed in 0 ( n 2 )time.
Charlotte just raised its incentive package : Gayla Delong owns the Oklahoma Warriors, a minor league baseball team in Oklahoma. She wishes to move the Warriors east, to either Atlanta or Charlotte. The table below gives factors that Gayla thinks are important, their eightsm and the scores for A..
Tax results by selling the assets in different tax years : Could Wanda achieve better tax results by selling the assets in different tax years?
Central city construction : Central City Construction (CCC) needs $1 million of assets to get started, and it expects to have a basic earning power ratio of 20%. CCC will own no securities, so all of its income will be operating income. If it so chooses, CCC can finance up to 5..
Calculate the centripetal acceleration of the moon : During a lunar eclipse, the moon, earth, and sun all lie on the same line, with the earth between the moon and the sun. calculate the centripetal acceleration of the moon

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Data warehouse and operational databases

Every big organization has large documents or databases containing data used in operating the business. Does a data warehouse differ from these operational files or databases?

  How to use depth-first search to find out in time

Illustrate how to use depth-first search to find out in time O(|E|+|V |) whether undirected graph is 2-colorable. Describe and explain your strategy.

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Explain feasibility analysis for jobs of lrt algorithm

Study feasibility analysis for jobs of LRT algorithm when preemption is allowed. Which scheduling algorithm is best suited for high speed networks and why? Distinguish between static and dynamic systems.

  Astronaut.data must be read into a 1-d array

Data from the Astronaut.data must be read into a 1-D array of structures(or classes) named ASTRONAUT and thereafter all processing must be performed on the array of structures.

  Find terminal nodes in tree nil if pointer is represented

The node's right child. If the nil pointer is represented by 00 and the tree's root pointer contains 53, how many terminal nodes are in tree?

  Creating an exception class and applet file

Create an applet document that prompts the user for an ID number and an age. Construct an Exception class and throw an Exception of that class if the ID is not in the range of valid ID numbers.

  Organizing the data in ms excel

Many of your family members have discovered that you are using Excel to organize the information for the high school reunion. Your Uncle Larry wants to make an inventory of the over 800 video games that he collects.

  Develop the pseudo code need

Develop the pseudo code needed to find the average of ten 8-bit numbers. Use a loop.

  Computing hash value for message

For a message, he computes the hash value H = (VChar 1 x VChar 2 x VChar 3 ...x VChar N) mod(26).

  Question about key encryption

Assume Alice wishes to send an e-mail to Bob. Bob has a public private key pair, Alice has Bob's certificate. But Alice does not have a public, private key pair.

  How the two versions of the algorithm compare

A brief introduction of the sorting algorithm that you have selected and how the two versions of the algorithm compare.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd