p1-solns-10

p1-solns-10 - ECS 120: Theory of Computation Handout...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: ECS 120: Theory of Computation Handout ps1-soln 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. Dont forget to acknowledge anyone with whom you discussed problems. Recall that homeworks are due at 4:40 pm sharp on Tuesdays, in the turn-in 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 anti-reexive. 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 everyonebecause 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 counter-example) 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 reexive 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 self-loops). So any graph G provides a counterexample, and the smallest counter-...
View Full Document

Page1 / 5

p1-solns-10 - ECS 120: Theory of Computation Handout...

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