• Keine Ergebnisse gefunden

Exercises for Randomized and Approximation Algorithms

N/A
N/A
Protected

Academic year: 2021

Aktie "Exercises for Randomized and Approximation Algorithms"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Antonios Antoniadis and Marvin Künnemann Winter 2018/19

Exercises for Randomized and Approximation Algorithms

www.mpi-inf.mpg.de/departments/algorithms-complexity/teaching/winter18/rand-apx-algo/

Exercise Sheet 2: Basics of Randomized Algorithms

To be handed in by October 30rd, 2018, 2pm, via e-mail to André Nusser (CC to Antonios Antoniadis and Marvin Künnemann)

Exercise 1 (5 Points) Consider the (unweighted) Max-k-SAT problem: Given a Boolean for- mulaφ in conjunctive normal form such that each clause inφ containsexactly k literals, find an assignment that maximizes the number of satisfied clauses.

Adapt the randomized Max-SAT algorithm from the lecture to this problem. What (expected) approximation ratio do you obtain in terms ofk?

Exercise 2(5 Points)Consider a coin that will turn up heads with probabilitypwhen flipped.

We repeatedly flip the coin until it turns up heads. Prove that the expected number of coin flips is 1p.

Exercise 3(5 Points) Assume you are given 50 red and 50 blue balls. You are free to distribute them freely into two urns. Afterwards, the Joker will choose an urn uniformly at random. You then select a ball uniformly at random from the chosen urn. The Joker wins if this balls is red, while you will win if it is blue. What is the maximum probability with which you can win the game?

Exercise 4 (7 points) Consider the weighted Max-Cut problem: Given an undirected graph G= (V, E) with edge weights w:E →N, the task is to determine a cut C ⊆V such that the weight P

e={i,j}∈E i∈C,j /∈C

w(e) of the cut edges is maximized. Give a sampling-based algorithm that achieves an expected approximation ratio of 1/2.

Exercise 5 (18 Points) Recall the unweighted version of VertexCover: given a graph G = (V, E), determine a set C ⊆ V of minimum cardinality such that each edge {i, j} ∈ E is covered by C, i.e., we have i∈C or j ∈C.

We define two different greedy algorithms, randomized greedy and bad-decision greedy: Both algorithms receive as input the graphGrepresented by a list of its edgese1 ={i1, j1}, . . . , em = {im, jm} – note that the order of endpoints of an edge (i.e., whether we represent an edge as

(2)

{i, j} or {j, i}) is given by the input (i.e., chosen by an adversary). The pseudocode of both algorithms is given below.

Algorithm: randomized greedy

C :=∅

for k = 1, . . . , m do

consider the k-th edge ek ={i, j} if ek is not covered by C then

choose r u. a. r.a from{i, j}

C ←C∪ {r}

return C

auniformly at random

Algorithm: bad-decision greedy

C :=∅

for k= 1, . . . , mdo

consider thek-th edge ek={i, j}

if ek is not covered by C then C ←C∪ {i}

return C

a) (6 Points) Analyze how randomized greedy performs on the n-star graph. (The n-star- graph is the graph consisting of a center vertexcand n−1 leaf vertices, where each leaf vertex has a single adjacent edge toc.) What is the expected size of C?

Hint: You may make use of Exercise 2.

b) (7 Points) Prove that randomized greedy has an expected approximation ratio of at most 2on general graphs.

Hint: Use a). In particular, consider an optimal vertex cover of sizeOP T and view Gas a union of OP T-many star graphs.

c) (5 Points) Determine the approximation ratio of bad-decision greedy.

Note: Don’t forget to prove both upper and lower bound on the approximation ratio!

Referenzen

ÄHNLICHE DOKUMENTE

The right panel in Figure 3 illustrates the evolution of labor efficiency as a function of size – it decreases for small- and middle-size firms and increases for the

Das heißt, dass sich die Folgenglieder praktisch verdoppeln, wenn wir die Folge umge- kehrt laufen lassen.. Als praktisch

To be handed in by November 20th, 2018 via e-mail to André Nusser (CC to Antonios Antoniadis and Marvin Künnemann). Exercise 1 (5 Points) Consider a fair die showing the

To prove the general case, assume (without loss of generality) that C is the shortest cycle satisfying the hypotheses of the statement.. Try arguing

We now construct an initial orthogonal embedding Γ for the auxiliary graph G e with one of the methods for the compaction phase of the topology- shape-metrics method (see Section

graph is stored as list of vertices (pointers to objects of class LGVertex). graph structur exists also only indirect; every LGVertex contains pointers to its predecessors

After having presented the simulation algorithm for DEPFET pixel modules and the data reconstruction for charged particles in the EUDET beam telescope, the final part of this

The compar routine is expected to have two arguments which point to the key object and to an array member, in that order, and should return an integer less than, equal to, or