This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ECS 120: Theory of Computation Handout ps1soln UC Davis — Phil Rogaway April 6, 2010 Problem Set 1 Solutions Instructions: Write up your solutions as clearly and succinctly as you can. Typeset solutions, partic ularly in L A T E X, are always appreciated. Don’t forget to acknowledge anyone with whom you discussed problems. Recall that homeworks are due at 4:40 pm sharp on Tuesdays, in the turnin box in Kemper Hall, room #2131. Problem 1. Show that at a party of 10 people, there are at least two people who have the same number of friends present at the party. Assume (however unrealistically) that friendship is symmetric and antireﬂexive. Hint: Carefully use the pigeonhole principle. Suppose first that there is someone at the party who is friendless. Then nobody at the party can be friends with everyone—because friendship is assumed to be symmetric. Therefore the number of possible friends that one might have attending the party is one of { , 1 , . . . , 8 } —there are 9 possibilities in all. But there are 10 people at the party, each who has a number of friends drawn from this set of size 9. So some two people have the same number of friends. Suppose next that there is someone at the party who is friends with everyone. Then the number of possible friends one might have attending the party is a number in { 1 , 2 , . . . , 9 } —there are 9 possibilities in all. But there are 10 people at the party, each who has a number of friends drawn from this set of size 9. So some two people have the same number of friends. Problem 2. Let G = ( V, E ) be a graph (the “usual” sort, being nonempty, finite, undirected, having no self loops and no multiple edges). Prove (by giving a convincing argument) or disprove (by giving a smallest counterexample) that the following are equivalence relations for any graph G . Part A. Let x, y ∈ V . Say that x ∼ y if there is a path in G from x to y (that is, a sequence of vertices x 1 , . . . , x n ∈ V ( n ≥ 1 ) where each { x i , x i +1 } ∈ E and x = x 1 and y = x n ). True. x ∼ x by definition; x ∼ y iff y ∼ x because the graph is undirected; and transitivity by concatenating the two paths. of this relation are the “components” of G .) (Note: the equivalence classes of this equivalence relation are called the “components” of G .) Part B. Let x, y ∈ V . Say that x ∼ y if x is adjacent to y (that is, { x, y } ∈ E ). False. The reﬂexive property fails to hold not just for some graphs, but for all graphs G : ( x, x ) 6∈∼ for any G , because the definition of “adjacent” stated above does not have a vertex being adjacent to itself (“no selfloops”). So any graph G provides a counterexample, and the smallest counter...
View
Full Document
 Spring '10
 Roagaway
 Equivalence relation, Quantification, Universal quantification

Click to edit the document details