Problem Set 0: Solution

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Problem Set 0

Spring 2010 Due: Thursday Jan 28, 2:00pm, in class before

the lecture.

Please follow the homework format guidelines posted on the class web page:

http://www.cs.uiuc.edu/class/sp10/cs373/
1. [

Category:

Notation,

Points:

20]

Answer each of the following my marking each with 

tion.

true,  false, or  wrong nota-

Follow the notations in Sipser.

{. . . } is used to represent sets and not multisets

or anything else. D1) D2) D3) D4) D5) D6) D7) D8) D9) D10) D11) D12) D13) D14) D15) D16) D17) D18) D19) D20)

{a, b, c} {d, e} = {} {a, b, c} {d, e} = {} {a, b, c} {d, a, e} = {a, b, c, d, a, e} {a, b, c} {d, a, e} = {a, b, c, d, e} {a, b, c} \ {a, d} = {b, c} {, a, b, c} {, a, b, c} a {, a, b, c} {a, c} + {c, b} = {a, b, c} {a, b} {b} = {a} {a, a} = {a} {{a}, {a}} = {a, a} a {a, {a}, {{a}}} {a} {a, {a}, {{a}}} {{{a}}} {a, {a}, {{a}}} {} = {{}} {a, b} {c, d} = {(a, c), (b, d)} {a, b} {c, d} = {c, d} {a, b} |{a, b} {a, b}| = 3

Solution:
D1) D2)

{a, b, c} {d, e} = {} true {a, b, c} {d, e} = {} false


1

D3) D4) D5) D6) D7) D8) D9) D10) D11) D12) D13) D14) D15) D16) D17) D18) D19) D20)

{a, b, c} {d, a, e} = {a, b, c, d, a, e} true {a, b, c} {d, a, e} = {a, b, c, d, e} true {a, b, c} \ {a, d} = {b, c} true {, a, b, c} true {, a, b, c} true false a {, a, b, c} wrong notation {a, c} + {c, b} = {a, b, c} wrong notation {a, b} {b} = {a} wrong notation (but we will also accept "true") {a, a} = {a} true {{a}, {a}} = {a, a} false a {a, {a}, {{a}}} true {a} {a, {a}, {{a}}} true {{{a}}} {a, {a}, {{a}}} true {} = {{}} true {a, b} {c, d} = {(a, c), (b, d)} false {a, b} {c, d} = {c, d} {a, b} false |{a, b} {a, b}| = 3 false

2.

Category:

Proof,

Points:

16]

Professor Moriarty claims that he has a way of describing every real number between 0 and 1 using an English sentence (of nite length), i.e. for every real number is an English sentence

r,

there

that precisely describes

r. 0.a1 a2 a3 . . .,
where

Prove that Professor Moriarty is wrong.

Note: Assume that a real number between 0 and 1 is of the form each as

ai {0, 1, . . . 9}, i.e. is an innite set of decimal points. This is not quite true, 0.09999999 . . . is actually the same as 0.10000 . . ., but ignore this subtlely for this

question.

Solution:
The set of all nite English sentences, is after all a subset of strings over the English alphabet, and is hence countable. The set of all real numbers is the set of all innite sequences over

{0, 1}, which is uncountable.

If there was a description of all real numbers using nite English sentences, then we can build a one-to-one correspondence between a subset of English sentences to the set of all

reals (associate each real with the lexicographically smallest English sentence that describes it). If a set since

is innite and countable, and

is innite and uncountable, then there cannot be

a 1-1 correspondence between them (if there was a 1-1 correspondence, say

f : A B,

then

is countable, there is another 1-1 correspondence

g : N B,

and the composition

of these

f g :NB

would be a 1-1 correspondence, which contradicts the fact that

is

not countable). Hence there cannot be a 1-1 correspondence between between a subset of English strings (which is countable) to the set of all reals (which is uncountable),

3.

Category:

Proof,

Points:

16]

Prove that in a class with at least two students, there exist at least two students who have the same number of friends (assuming that friendship is a symmetric relation: if Jane is a friend of Venkatachalam, Venkatachalam is a friend of Jane too).

Solution:
Assume the class has If is

x friends where x {0, 1, , n1}. no two students have the same number of friends, then for each x {0, , n 1} there exactly one student in class with x friends. But if there is a student with n 1 friends in n students.
Each student can have

class, then no student can have 0 friends; a contradiction.

4.

Category:

Proof,

Points:

16]

A graph is said to be non-isolating, if every vertex has at least one edge incident on it. John guesses the following statement and proves it using induction.

Guess: Every non-isolating graph is connected. proof: We use induction on the number of vertices of the graph to prove our statement.
Base-case: There is no non-isolating graph with one vertex. Moreover every 2-vertex
non-isolating graph is trivially connected.

Induction step: Assume the claim is true for all graphs with

vertices. Let

be a

k -vertex G

non-isolating graph. By induction hypothesis

is connected. Now consider

adding a new vertex is non-isolating, connected to reach from both

u u

to

to give a non-isolating graph

must be connected to some other

k + 1 vertices. Since vertex of G , let's say it's


with

v . This implies that the k + 1 vertex graph G is connected (since we can u to any other vertex x by going to v rst and -since G is connected and v and x are in G- then getting from v to x) and we are done.

First show that John's guess is incorrect. Second identify clearly what is wrong with this inductive proof.

Solution:
The guess is incorrect since for example the following graph is non-isolating and is not connected.

The aw in the induction is because every possible non-isolating be obtained by adding an additional vertex to a non-isolating

k + 1-vertex

graph cannot

k -vertex

graph (For example

the graph shown above). Therefore the mentioned proof just proves that for the particular graphs that could be obtained in that way the claim is true (but not for all the non-isolating graphs). In general, this is a common mistake many people make. Let us assume that we are proving a property:

P (n):

Every graph of

vertices that satises the condition

must satisfy

for all

n N.

In (strong) induction, in the inductive step, we assume that to prove

i n.P (n) holds, and we need


we must show every graph with

P (n + 1)

holds. Then, in order to prove

P (n + 1),

n+1

graph

vertices that satises also satises . To do this we must consider an arbitrary G with n + 1 vertices, and using the assumption i n.P (n), prove that the property holds for the graph G. In many proofs, we can break down the graph G to a smaller graph, use the induction hypothesis on the smaller graph, and show that the graph G satises the property. But we should not take a graph of n vertices (that satises ) and add a vertex to it; that is wrong because we do not know if all graphs with n + 1 vertices that satisfy can be obtained from an n-vertex graph that satises , using such an operation.

5.

Category:

Proof,

Points:

16] Each pair of players played with each and

12 players took part in a tennis tournament. tennis). Prove that there exist three players defeated

other exactly one time. There's no player who lost all his games (and there's no tie in

A, B

C,

such that

defeated

B, B

and

defeated

A.

Solution:
We will prove the existence of three players satisfying the condition, for any number of total players

r,

where

r3

(instead of proving only for

12).

The rst proof is by induction on the number of players. Base: For

r = 3,

by checking all possible tournament results we can nd out that the only

possible option is

defeated

B, B

defeated

and

defeated

A.

Inductive hypothesis: If any set of

r > 3),

there exist three players

k players take part in the tournament (where 3 k < r, A, B and C , such that A defeated B , B defeated C and C

defeated

A.

Inductive step:

Consider a tournament with

players.

Consider some player

B.

Let

A1 , . . . , An

be the players who defeated

and

C1 , . . . , C m

be the players who lost to

B.
to

There are two possible cases: (a) There exists a player

Ci who lost to all other players Cj , j = i. Since he also lost there exists a player At who lost to Ci , otherwise Ci would have lost every game. the desired triple is At , B, Ci . Ci
exists.

B,

Then

(b) No such

By inductive hypothesis, there exists a desired triple among

C1 , . . . , C m .

Alternative proof:
Assume there are

n players, n 3. Now, let us draw a graph with vertices as players, and directed edges p q if p beats q in the tournament. Note that for every player p there is a player q such that p q (since no player loses all games).
I can pick an arbitrary player

p1 ,

take a successor of

p 1 , p1 p2 ,

take a successor

p3

of

p2 ,

p1 p2 p3 ,

and build a longer and longer path until a vertex repeats. Hence there is

always a directed cycle in this graph. Now consider a directed cycle of the smallest length. can't be of length 2 (since if I claim it has to be of length 3. It

p2 , then p2 didn't beat p1 ). Assume the smallest length cycle is of some length n, where n > 3. Let such a cycle be p1 p2 p3 . . . pn p1 , where n > 3. Then consider the game between p1 and p3 , which someone would have won, giving an edge from p1 to p3 , or from p3 to p1 . If p3 p1 , then p1 p2 p3 p1 is a cycle of length 3, a contradiction. So p1 p3 must hold. But then p1 p3 . . . pn p1 is a cycle of length n 1, again a contradiction. Hence the shortest cycle is of length 3, and
beats we are done. 6. [

p1

Category:

Proof,

Points:

6+10]

Here is a theorem and a formal proof of it.

Theorem: Let X and Y be Proof: Let X X Y . In


sY.
prove Let

two sets. Let

X X Y.

Then

X Y.
if

s X.

Since

order to show X Y , we will show that X X Y , s X Y . Therefore s Y .

s X,

then

In general, if you want to prove

X = Y,

it's good to break it up into two proofs: i.e.,

XY

and prove

Y X.

Now, prove the following theorems formally (using a similar style and level of detail as the proof above).

(a) Theorem: (b) Theorem:


then

Let
Let

and Y be two sets, and let

X Y =X Y. s=t
and

Then

X =Y.

f :NN

be a function such that for every

f (x) f (y).

Then there exists

s, t N

such that

x, y N, if x < y , f (s) = f (t).

Write formal proofs. Don't wave hands. Don't say things like it's obvious that, etc. If you are assuming a well known property, then state that property clearly.

Solution:

(a) Let X Y = X Y .
To prove Hence

We will prove

X=Y

by proving

XY
and

and proving

Y X.

X Y . Let s X . s Y . So X Y .

Then, since

X Y = X Y,

s X Y, s X Y,

Now let's prove Hence Hence

Y X . Let s Y . s X . So Y X . X =Y.

Then, since

X Y = X Y , and s X Y , s X Y ,

(b)
Let

be the range of

f.

I.e. let

numbers, there must be a least number, say Now, let We

S = {n | m N, f (m) = n}. n0 in S . f (m0 ) = n0 .


Consider

Since

is a set of natural

m0 N be claim x = n0 . n0

a number such that

f (m0 + 1), xS m0
(as

and let it be

x.

First, since and

is the least number in

m0 < m0 + 1, f (m0 ) f (m0 + 1), i.e. n0 x. S , n0 x. Hence n0 = x.

Since

x is in the range), m0 + 1,
such that

So we have proved that there exists two distinct numbers, namely

and

f (m0 ) = f (m0 + 1).

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy