pract-mid - CMSC 451:Spring 2011 Clyde Kruskal Practice...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CMSC 451:Spring 2011 Clyde Kruskal Practice Questions for Midterm Exam Warning and Disclaimer: These are practice problems for the upcoming midterm exam. It does not necessarily reFect the length or coverage of the actual exam. Problem 1. Consider the following directed graph: IMAGINE A GRAPH HERE (a) Label each vertex v with the values d [ v ] and f [ v ] which would be computed by a D±S starting at vertex A . Assume that the D±S starts at vertex a and, given a choice, chooses to visit vertices in alphabetical order. (b) Label each edge as a tree edge, back edge, forward edge, or cross edge. (c) Circle each strongly connected component. Problem 2. Consider an undirected graph whose n vertices are “colored” with at most n (not necessarily distinct) integers from 1 ,...,n . Give a polynomial time algorithm to determine if there are two distinct vertices within a distance of two of each other that have the same color. Make your algorithm as e²cient as possible: O ( n + e ) is better
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/13/2012 for the course CMSC 451 taught by Professor Staff during the Fall '08 term at Maryland.

Page1 / 2

pract-mid - CMSC 451:Spring 2011 Clyde Kruskal Practice...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online