• Keine Ergebnisse gefunden

Definition. Let G = (V, E) be a graph with n = |V | the number of vertices.

N/A
N/A
Protected

Academic year: 2021

Aktie "Definition. Let G = (V, E) be a graph with n = |V | the number of vertices."

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Homework 2

Algorithms on Directed Graphs, Winter 2018/9 Due: 9.11.2018 by 16:00

Note. All graphs are directed graphs unless stated otherwise.

Definition. Let G = (V, E) be a graph with n = |V | the number of vertices.

A Hamiltonian cycle in G is a simple (directed) cycle of length n. A Hamiltonian path is a simple (directed) path on n vertices.

Exercise 1. A classical result in complexity theory asserts that the problem of deciding if a (directed) graph G = (V, E) contains a Hamiltonian cycle is NP-complete. Use this fact to show that deciding if a (directed) graph contains a Hamiltonian path is also NP-complete.

Hint: Given a digraph G, describe an efficient method of constructing a graph G

0

such that G

0

contains a Hamiltonian path if and only if G contains a Hamiltonian cycle.

Exercise 2. Let G = (V, E) be a graph and χ : V → [k] a coloring of V . We say that path P = (v

1

, v

2

, . . . , v

`

) is colorful if the colors χ(v

i

) are pairwise distinct for i = 1, 2, . . . , `. Describe an algorithm that finds a colorful path of length k in G (if such a path exists) that runs in time 2

k

n

O(1)

.

Hint: Use dynamic programming.

Exercise 3. Let T be a directed tree on k vertices. Use color coding to give a 2

O(k)

n

O(1)

-time (randomized) algorithm that determines whether a given graph G contains a subgraph isomorphic to T .

Exercise 4. Suppose G = (V, E) contains a simple cycle C = v

1

, v

2

, . . . , v

`

on ` ≥ 2k + 1 vertices, but does not contain any simple cycles on k, k + 1, . . . , 2k vertices. Suppose further, that V = L ∪ R is a partition of G’s ver- tices such that v

1

, v

2

, . . . , v

k

∈ L, v

k+1

, v

k+2

, . . . , v

2k

∈ R, and (v

1

, v

2

, . . . , v

k

) is a shortest path from v

1

to v

k

in G[L] (the induced sugraph of G with ver- tex set L). Let P be any (simple) path from v

1

to v

k

of length k in G[L].

Show that G[V \ (P \ {v

1

, v

k

})] contains a path from v

k

to v

1

.

Hint: Note that this is straightforward if P does not intersect C except at v

1

and v

k

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

1

Referenzen

ÄHNLICHE DOKUMENTE

Then recall the simple (greedy) algorithm to compute a κ-core: while there is a vertex of degree less than κ in the current graph, delete it from the graph; if all vertices in

This exercise sheet aims to assess your progress and to explicitly work out more details of some of the results proposed in the previous lectures. Please, hand in your solutions

This article shows how to find all vector partitions of any positive integral values of n , but only all vector partitions of 4, 5, and 6 are shown by algebraically.. These must

We study the number of minimal codewords in binary linear codes that arise by appending a unit matrix to the adjacency matrix of a graph..

Karlsruher Institut f¨ ur Technologie Institut f”ur Theoretische Festk¨ orperphysik Ubungen zur Modernen Theoretischen Physik I ¨ SS14.. -

Numerical Solution of Partial Differential Equations, SS 2014 Exercise Sheet

it is with no litde pleasure that I now take the word; for though once again I have to make nothing but announcements just as in the Opening Plenary Session, this time I can look

This argument is essentially correct, but with the reservation that from the statement (1) "There are judgements formed as a result of self-evidence but false" it only