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

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

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

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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