ClassW04ApproxAlgs/ProofsGroupsExercises1

ClassS04CS141 | ClassW04ApproxAlgs | recent changes | Preferences

Difference (from prior minor revision) (author diff)

Changed: 17,18c17,18
Any inhabitant that can prove to himself (or herself) that he (or she) has blue eyes, \
screams and jumps off the cliff to his (or her) death at noon,\
Any inhabitant that can prove to himself (or herself) before noon that he (or she) has blue eyes, \
screams and jumps off the cliff to his (or her) death at exactly noon,\


Find an interesting exercise of your own, and add it to this page.

Including possibly: choose any statement that we claimed in class without proof, and give a careful proof. (Extra bonus points: add your proof to the appropriate page.)


1. moved forward to /ProofsGroupsExercises2


2. [careful reasoning] On an island there are 200 people, half with brown eyes and half with blue eyes. The inhabitants follow the following customs without fail:
    1. They never discuss eye color with each other.
    2. Just before noon each day, all inhabitants meet silently at the top of a cliff. Any inhabitant that can prove to himself (or herself) before noon that he (or she) has blue eyes, screams and jumps off the cliff to his (or her) death at exactly noon, in the presence of all other inabitants.

There are no reflecting surfaces in which any inhabitant can see his or her own eye color, so the only way each inhabitant gets information about his or her own eye color is by the behavior of the other inhabitants. On the other hand, it is common knowledge that each inhabitant knows the eye colors of all inhabitants other than him- or herself.

Things are stable until one day when a visitor comes to the noon meeting and announces in front of all inhabitants "There are blue-eyed people on this island."

a) What happens, and when? (Hint: first consider what happens when there is only one blue-eyed person on the island, then two blue-eyed people...)

b) State precisely what is wrong with the following argument:
   What the visitor said was already known.  Since no new information was provided,
   no new deductions are possible, and therefore the announcement changes nothing.
   So nothing happens.


3. [probabilistic method] Say a subset S of the non-negative integers is a pairwise cover if every positive integer i can be expressed as the sum of two integers in S. Define the density of S to be the function f where f(n) = |S∩ {1,2,…,n}|. Prove the existence of a pairwise cover whose density is o(n).

Hint: Generate a random S as follows: for each i independently, put i in S with some probability p(i). Show that with positive probability S is a pairwise cover with density o(n).


4. [being thorough] From the dynamic programming algorithm for knapsack, recall that A(i,p) was defined to be the minimum total size of any subset of the first i items giving total profit exactly p. We claimed the recurrence A(i,p) = min(A(i-1,p), A(i-1,p-pi)+si for i > 0, and A(0,p) = ∞ for p > 0, and A(0,0)=0. Carefully prove that this recurrence is true.


5. Prove carefully that the following algorithm produces a minimum spanning tree of a weighted graph:
  1. Let e1,e2,…, em be the edges in order of increasing cost.
  2. Let T = {ej | every cycle containing ej contains some edge ek where k>j}.
  3. Return T.


6. [induction, careful reasoning] What is wrong with the following argument?

  Theorem:  For all integers n, in any sequence of n numbers, all the numbers are the same.
  Proof:  By induction.  
    Base case: Clearly, for n=0 or 1, in any sequence of n numbers, all the numbers are the same.
    Inductive step:  Let S be any sequence of n+1 numbers.  Let S' be the sequence containing
    the first n numbers of S, let S'' be the sequence containing the last n numbers of S.
    By induction, all numbers in S' are the same.  Let X be their common value.
    Likewise, by induction, all numbers in S'' are the same.  Let Y be their common value.
    Since S' and S'' overlap, it must be that X=Y.
    Thus, all numbers in S are the same.



ClassS04CS141 | ClassW04ApproxAlgs | recent changes | Preferences
This page is read-only | View other revisions
Last edited March 19, 2004 2:20 pm by Neal (diff)
Search: