{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hbs6(1) - lifespans of these people of one of the following...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 473 HBS 6 Spring 2009 CS 473: Undergraduate Algorithms, Spring 2009 HBS 6 1. Let G be a connected graph and let v be a vertex in G . Show that T is both a DFS tree and a BFS tree rooted at v , then G = T . 2. An Euler tour of a graph G is a walk that starts from a vertex v , visits every edge of G exactly once and gets back to v . Prove that G has an Euler tour if and only if all the vertices of G has even degrees. Can you give an efficient algorithm to find an Euler tour of such a graph. 3. You are helping a group of ethnographers analyze some oral history data they have collected by interviewing members of a village to learn about the lives of people lived there over the last two hundred years. From the interviews, you have learned about a set of people, all now deceased, whom we will denote P 1 , P 2 ,..., P n . The ethnographers have collected several facts about the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: lifespans of these people, of one of the following forms: (a) P i died before P j was born. (b) P i and P j were both alive at some moment. Naturally, the ethnographers are not sure that their facts are correct; memories are not so good, and all this information was passed down by word of mouth. So they’d like you to determine whether the data they have collected is at least internally consistent, in the sense that there could have existed a set of people for which all the facts they have learned simultaneously hold. Describe and analyze and algorithm to answer the ethnographers’ problem. Your algorithm should either output possible dates of birth and death that are consistent with all the stated facts, or it should report correctly that no such dates exist. 1...
View Full Document

{[ snackBarMessage ]}