sol6 - CS 170 Algorithms Fall 2014 David Wagner Soln 6 1(20 pts Fundamental concepts Decide whether each of the following claims is correct or not If it
sol6 - CS 170 Algorithms Fall 2014 David Wagner Soln 6 1(20...
93%(14)13 out of 14 people found this document helpful
This preview shows page 1 - 3 out of 12 pages.
CS 170AlgorithmsFall 2014David WagnerSoln 61. (20 pts.)Fundamental conceptsDecide whether each of the following claims is correct or not. If it is correct, write “True” and then providea short proof (one or two sentences should be enough).If it is incorrect, write “False” and provide acounterexample (please make your counterexample as small as possible, for the readers’ sake).(a) LetGbe a dag and suppose the verticesv1,...,vnare in topologically sorted order. If there is an edge(vi,vj)inG, then we are guaranteed thati<j.(b) LetGbe a dag and suppose the verticesv1,...,vnare in topologically sorted order. If there is a pathfromvitovjinG, then we are guaranteed thati<j.(c) LetG= (V,E)be a directed graph. If there is an edge(u,v)inG, thenuandvmust be in the samestrongly connected component.(d) LetG= (V,E)be a directed graph. Ifs∈Vis a source andt∈Vis a sink, then there is a path fromstot.CS 170, Fall 2014, Soln 61
(e) LetG= (V,E)be a directed graph where every vertex has at most three outgoing edges. Then everyvertex has at most three incoming edges.(f) LetG= (V,E)be a dag. Then there are at most|V|2possible ways to order the vertices so they are intopologically sorted order.