• Keine Ergebnisse gefunden

Theory of Computer Science

N/A
N/A
Protected

Academic year: 2022

Aktie "Theory of Computer Science"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Theory of Computer Science

G. R¨oger

Spring Term 2019

University of Basel Computer Science

Exercise Sheet 11

Due: Wednesday, May 15, 2019 Exercise 11.1(Polynomial Reductions, 2.5 + 0.5 marks)

Consider the decision problem3Coloring:

• Given: undirected graphG=hV, Ei

• Question: Is there a total functionf :V → {r, g, b}such thatf(v)6=f(w) for all{v, w} ∈E?

and the decision problem3SAT:

• Given: a propositional formula ϕ in conjunctive normal form with at most 3 literals per clause

• Question: isϕsatisfiable?

(a) Show that3Coloring≤p3SAT.

(b) What can we say about3Coloring, knowing that 3SATis NP-complete?

Exercise 11.2(NP-completeness, 2+2 marks) Consider the decision problemHittingSet:

• Given: A finite set T, a set of sets S ={S1, . . . , Sn} with Si ⊆T for all i∈ {1, . . . , n}, a natural numberK∈N0 withK≤ |T|.

• Question: Is there a setH with at mostK elements that contains at least one element from each set in S?

(a) Prove that HittingSet is in NP by specifying a non-deterministic algorithm for Hit- tingSet whose runtime is limited by a polynomial inn|T|.

(b) Prove that HittingSet is NP-complete. You may use without proof that the problem VertexCover (from chapter E5) is NP-complete.

Exercise 11.3(NP-hardness, 3 marks) Consider the following decision problems:

IndSet:

• Given: Undirected graphG=hV, Ei, numberk∈N0

• Question: DoesGcontain an independent set of sizekor larger, i.e., is there a set I⊆V with|I| ≥k and{u, v} 6∈E for allu, v∈I?

SetPacking:

• Given: Finite set M, set S = {S1, . . . , Sn} with Si ⊆ M for all i ∈ {1, . . . , n}, number k∈N0

• Question: Is there a setS0 ⊆ S with |S0| ≥k, such that all sets inS0 are pairwise disjoint, i.e., for allSi, Sj ∈ S0 withSi6=Sj it holds thatSi∩Sj=∅?

Prove thatSetPackingis NP-hard. You may use that the problemIndSetis NP-complete.

Referenzen

ÄHNLICHE DOKUMENTE

If you need a considerably larger amount of steps, rethink your solution and try to find an easier proof.. The solution of part (b) may help you identify the requirements

(a) Transform the following formula into CNF by applying the equivalence rules shown in

Which of the following expressions are syntactically correct formulas or terms for the following signature S. Analyse also all subformulas and

Theory of Computer

A formal grammar is a 4-tuple G = hΣ, V, P, Si, remember to define all components of this tuple.. Of what type(s) is your grammar in the

Theory of Computer ScienceG. It is not

(b) Specify a deterministic finite automaton that accepts the language of all words over Σ with an even number of bs.

University of Basel Computer Science. Exercise