Solution

advertisement
CS5314 Randomized Algorithms
Homework 4 (Suggested Solution)
1. Ans. First, a unique leader is determined if and only if for some bit i, it is mapped exactly
by one user, while all other users are mapped to the bits larger than i. This implies that:
p =
b −2
2X
Pr(“bit i is mapped exactly by one user” ∩ “all other users are larger than i”)
i=0
µ
1
· 1−
=
b
2
i=0
b −2
µ
2X
1
≤
· 1−
2b
i=0
µ
¶n−1
1
≤
1− b
2
b −2
2X
¶n−1
i+1
2b
¶n−1
1
2b
By re-arranging terms, we have:
Ã
b ≥ log2
!
1
1
1 − p n−1
2. Ans.
¡ ¢
(a) There are n5 potential 5-cliques in G. The probability that a set of 5 vertices a
5-clique is 1/210 , so by the linearity of expectation the expected number of 5-clique is
µ ¶
n
1
E[number of 5-clique in G] =
· 10
5
2
¡ ¢
(b) Each cycle can be represented by an ordered list of 5 vertices. There are n5 distinct
sets of 5 vertices. Each set can compose 5! cycles. Somehow there will be duplications
between each set. (Each cycle can be represented in 10 different ways.) So the total
number of 5-cycle is
µ ¶
µ ¶
n
n
5!
= 12
·
5
5
10
The probability that a set of 5 vertices a 5-cycle is 1/25 , so the expected number of
5-cycle is
µ ¶
µ ¶
n
1
3
n
E[number of 5-cycle in G] = 12
·
= ·
5
5
32
8
3. Ans.
(a) Given that
kV k2 = V · V,
1
we have
E[kV k2 ] = E[V · V ] = E
"
X
#
ρi ρj vi · vj .
i,j
When i 6= j, ρi and ρj are independent random variables, so that
E[ρi ρj ] = E[ρi ]E[ρj ] = 0.
On the other hand, when i = j, we have
E[ρi ρi ] = 0.5(1)2 + 0.5(−1)2 = 1.
Also, vi · vi = vi2 = 1 since vi is a unit vector. Combining the above, we obtain
"
#
X
E[kV k2 ] = E
ρi ρj vi · vj
i,j
= E
=
"
X
X
#
ρi ρi vi · vi + E
i
E [ρi ρi ] +
i
X
"
X
#
ρi ρj vi · vj
i6=j
E [ρi ρj vi · vj ]
i6=j
= n + 0 = n.
2
(b) Since E[kV k2 ] = n, there must be a choice
√ of reflection ρ’s such that kV k is at most
n. With that particular choice, kV k ≤ n.
√
(c) Set v1 = (1, 0) and v2 = (0, 1). No matter what ρ1 and ρ2 is, ρ1 ρ2 v1 · v2 = 2. In
general in Rm , we can set
vk = ( 0, . . . , 0 , 1, 0, . . . , 0)
| {z }
k−1
zeroes
for k = 1 to m. Then
√ under any choice of the reflections, the resulting vector V will
have length exactly m.
4. Ans. Let Nc denote the number of clause that is satisfied, under a random assignment
of truth values to the variables. To obtain a de-randomized algorithm for the maximizing
the satisfiable clauses, we assign values to variables deterministically, one at a time, in
an arbitrary order x1 , x2 , . . . , xn . Suppose that we have assigned the first k variable. Let
y1 , y2 , . . . , yk be the corresponding assigned values. We compute the two quantities,
(i)
E[Nc | x1 = y1 , x2 = y2 , . . . , xk = yk , xk+1 = T ]
(ii)
E[Nc | x1 = y1 , x2 = y2 , . . . , xk = yk , xk+1 = F ],
and then choose the setting with larger expectation.
As there are n rounds and in each round we need to scan the clauses for only constant
number of times, the running time of this algorithm is O(nmk).
2
5. Ans. Consider a random 2-coloring of the graph. Let Ei be the event that the ith k-set
is a monochromatic clique. Then we have
µ ¶(k2)
k
1
Pr(Ei ) = 2 ·
= 21−(2) ,
2
since there are
¡k ¢
2
edges in each clique of size k.
Two k-cliques are independent if and only if they do not have any common edges. This
happens if and
¡k¢¡only
¢ if the two cliques share at most one vertex. For any k clique, there
n
are exactly 2 k−2 other cliques sharing at least two vertices with it.
Thus, if we construct the dependency graph D for all Ei ’s, the degree of any node in D
can be bounded by
¶
µ ¶µ
n
k
.
d=
2 k−2
Thus, whenever
¶
µ ¶µ
k
k
n
4
21−(2) ≤ 1,
2 k−2
we can apply the general Lovasz local lemma and show that there exists a coloring where all
Ei ’s do not occur. That is, in that coloring, there is no monochromatic k-clique subgraph.
6. Ans. Choose xi = 1/(d + 1). Since ep(d + 1) ≤ 1, we have
Y
xi
(1 − xj ) ≥ (1/(d + 1)) (1 − 1/(d + 1))d
(i,j)∈E
≥ ep(1 − 1/(d + 1))d
= ep(d/(d + 1))d
ep
=
(1 + 1/d)d
≥ ep(1/e)
= p.
Since Pr(Ei ) ≤ p for any Ei , we have
Pr(Ei ) ≤ xi
Y
(1 − xj ).
(i,j)∈E
Now we can apply the general Lovasz local lemma, and obtain the desired conclusion that:
Pr(no bad events occur) > 0.
3
Download