Geometric Steiner Trees

Similar documents
NP-completeness. Chapter 34. Sergey Bereg

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1

NP-Complete problems

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions

P, NP, NP-Complete, and NPhard

Essential facts about NP-completeness:

SAT, NP, NP-Completeness

Algorithms: COMP3121/3821/9101/9801

Chapter 34: NP-Completeness

1.1 P, NP, and NP-complete

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

Lecture 18: P & NP. Revised, May 1, CLRS, pp

NP-Complete Problems. More reductions

NP-Completeness Review

Lecture #14: NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition.

Intro to Theory of Computation

A An Overview of Complexity Theory for the Algorithm Designer

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch]

UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 22 Lecturer: David Wagner April 24, Notes 22 for CS 170

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office?

Lecture 15 - NP Completeness 1

1. Introduction Recap

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA.

Instructor N.Sadagopan Scribe: P.Renjith

Lecture 14 - P v.s. NP 1

Combinatorial Optimization

Algorithm Design and Analysis

1 Primals and Duals: Zero Sum Games

On the Computational Hardness of Graph Coloring

NP-Complete Reductions 1

NP and Computational Intractability

Computability and Complexity Theory: An Introduction

Instructor N.Sadagopan Scribe: P.Renjith. Lecture- Complexity Class- P and NP

NP and NP-Completeness

Design and Analysis of Algorithms

BBM402-Lecture 11: The Class NP

COP 4531 Complexity & Analysis of Data Structures & Algorithms

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT

Computational Complexity. IE 496 Lecture 6. Dr. Ted Ralphs

NP Completeness and Approximation Algorithms

More on NP and Reductions

Theory of Computation Time Complexity

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY. E. Amaldi Foundations of Operations Research Politecnico di Milano 1

Polynomial-time Reductions

More NP-Complete Problems

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

NP and Computational Intractability

5. Complexity Theory

CS21 Decidability and Tractability

Introduction. Pvs.NPExample

Limitations of Algorithm Power

NP and NP Completeness

CS311 Computational Structures. NP-completeness. Lecture 18. Andrew P. Black Andrew Tolmach. Thursday, 2 December 2010

CS21 Decidability and Tractability

In complexity theory, algorithms and problems are classified by the growth order of computation time as a function of instance size.

8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 2/6/18 2:16 AM

CS 583: Algorithms. NP Completeness Ch 34. Intractability

Complexity and NP-completeness

NP-Complete Reductions 2

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1

The Complexity of Maximum. Matroid-Greedoid Intersection and. Weighted Greedoid Maximization

CS151 Complexity Theory. Lecture 1 April 3, 2017

Show that the following problems are NP-complete

CMPT307: Complexity Classes: P and N P Week 13-1

NP-Completeness. Until now we have been designing algorithms for specific problems

NP-Hardness reductions

Lecture 25: Cook s Theorem (1997) Steven Skiena. skiena

Recap from Last Time

Lecture 19: NP-Completeness 1

Part V. Intractable Problems

NP-Complete Problems. Complexity Class P. .. Cal Poly CSC 349: Design and Analyis of Algorithms Alexander Dekhtyar..

Lecture 18: More NP-Complete Problems

Algorithms Design & Analysis. Approximation Algorithm

Classes of Problems. CS 461, Lecture 23. NP-Hard. Today s Outline. We can characterize many problems into three classes:

NP-problems continued

Umans Complexity Theory Lectures

Lecture 4: NP and computational intractability

CS154, Lecture 13: P vs NP

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9

1 More finite deterministic automata

Correctness of Dijkstra s algorithm

Formal definition of P

The Cook-Levin Theorem

34.1 Polynomial time. Abstract problems

CS154, Lecture 13: P vs NP

Notes for Lecture 21

CS 5114: Theory of Algorithms. Tractable Problems. Tractable Problems (cont) Decision Problems. Clifford A. Shaffer. Spring 2014

Lecture 21: Algebraic Computation Models

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

Week Cuts, Branch & Bound, and Lagrangean Relaxation

Algorithm Design and Analysis

NP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

Complexity, P and NP

Computational Intractability 2010/4/15. Lecture 2

Transcription:

Geometric Steiner Trees From the book: Optimal Interconnection Trees in the Plane By Marcus Brazil and Martin Zachariasen Part 3: Computational Complexity and the Steiner Tree Problem Marcus Brazil 2015 Marcus Brazil Geometric Steiner Trees 2015 1 / 53

Part 3: Computational Complexity and the Steiner Tree Problem 1 Computational Complexity 2 Formal Languages 3 Polynomial Reductions 4 NP -completeness 5 Computational complexity of Steiner tree problems Marcus Brazil Geometric Steiner Trees 2015 2 / 53

Computational Complexity Polynomial Time Problems In Week 1 we discussed combinatorial optimisation problems that can be solved by polynomial time algorithms. Polynomial time algorithms are: generally practical robust under different computational models closed under composition. Examples of combinatorial optimisation problems which have polynomial time algorithms include: Minimum Spanning Tree Problem (MST) Shortest Path problems Maximum Network Flow Problems Linear Programming (LP) Marcus Brazil Geometric Steiner Trees 2015 3 / 53

Computational Complexity What is an Optimisation Problem? Our aim is to understand and properly classify those problem that appear to be impossible to solve in polynomial time. There are 3 basic ways of viewing an optimisation problem: 1 Constructive Version: for a given instance of a problem find the optimal feasible solution. 2 Evaluative Version: for a given instance find the optimal cost of a feasible solution. 3 Decision Version: for a given instance and a given integer k, is the cost of the optimal feasible solution at most k? Marcus Brazil Geometric Steiner Trees 2015 4 / 53

Computational Complexity What is an Optimisation Problem? For example for the MST problem, we have: 1. Constructive Version Input: Connected graph G, weights: c : E(G) Z Output: MST T 2. Evaluative Version Input: Connected graph G, weights: c : E(G) Z Output: c(t ) where T is an MST. 3. Decision Version Input: Connected graph G, weights: c : E(G) Z, integer k. Output: Yes (1) if c(t ) k where T is an MST, otherwise No (0) Marcus Brazil Geometric Steiner Trees 2015 5 / 53

Computational Complexity Formal Definitions of Problems An abstract problem Q is a binary relation on a set I of problem instances and a set S of problem solutions. A decision problem is an abstract problem with S = {yes, no}. Hence, a decision problem can be viewed as a function from I to {0, 1}. To a non-decision problem P, such as a combinatorial optimisation problem, one can associate a decision problem P such that: if P can be solved quickly, then so can P. Consequently, if P is hard to solve, then so is P. if P can be solved easily, then so can P. Consequently, if P is hard to solve, then so is P. Marcus Brazil Geometric Steiner Trees 2015 6 / 53

Computational Complexity The class P Definition: The class P P is the class of decision problems which can be solved by a polynomial time algorithm. Our aim over the next few lectures is to study properties of combinatorial optimisation problems that do not appear to belong to P, and to look at how we can formally prove that such problems are difficult to solve. Examples of these hard problems include Integer Programming (IP) The Travelling Salesman Problem The Network Steiner Tree Problem The Euclidean Steiner Tree Problem In Order to study the complexity of algorithms, we first develop the Computer Science concept of formal languages. Marcus Brazil Geometric Steiner Trees 2015 7 / 53

Formal Languages Formal Languages From now on we focus on Decision problems, as they allow us to use formal methods from computation theory. For each instance I an abstract decision problem Q can be viewed as a mapping: Q : I {0, 1}. Definitions: Alphabets, languages Alphabet Σ set of symbols (here {0, 1}). Σ set of all strings in Σ. Language L a subset of Σ. A basic principle of computation theory is that problem instances can be encoded as binary strings: e : I {0, 1}. Marcus Brazil Geometric Steiner Trees 2015 8 / 53

Formal Languages Formal Languages As long as the encoding is reasonable, the complexity of the problem Q will not be dependent on the encoding. We can now view Q as a language over Σ = {0, 1}: L = {x {0, 1} : x e(i ), Q(x) = 1}. For example: L MST = {e(g, k) : G is a weighted graph, k is an integer, c(t ) k for an MST T } Marcus Brazil Geometric Steiner Trees 2015 9 / 53

Formal Languages The class P An algorithm decides L in polynomial time if it accepts or rejects any given string x as belonging to L in polynomial time (in the length of x). Formal Definition: The class P P = {L {0, 1} : there exists an algorithm that decides L in polynomial time} Note: in fact, the word decides in the above can be replaced by accepts. Marcus Brazil Geometric Steiner Trees 2015 10 / 53

Formal Languages Polynomial Verification Circuit Satifiability (C-S) Problem Given: A boolean combinatorial circuit composed of AND, OR and NOT gates, with a number of inputs and a single output. Decide: Does there exist a set of boolean input values such that the output value is 1? Marcus Brazil Geometric Steiner Trees 2015 11 / 53

Formal Languages Polynomial Verification As a formal language we define the C-S Problem as: L CS = {e(c) : C is a satisfiable boolean circuit} No polynomial time algorithm is known for deciding L CS. However, if we were given an instance C and a set of input values satisfying C (known as a certificate), then we could verify that e(c) L CS in polynomial time. Definition: Verification A verification algorithm A is a two-argument algorithm, with arguments in {0, 1}. The algorithm A, verifies a language L if for each x L with certificate y we have A(x, y) = 1 (and otherwise = 0). That is, L = {x {0, 1} : y {0, 1} such that A(x, y) = 1}. Marcus Brazil Geometric Steiner Trees 2015 12 / 53

Formal Languages The Class NP Intuitively, we would expect the class of languages that can be verified in polynomial time to be larger than those that can be decided in polynomial time. We call this class NP: (where L {0, 1} ). Theorem 11 P NP. NP = {L : L can be verified in polynomial time} Does P = NP? This is literally a $1M question. The Clay Mathematics Institute in the USA chose this as one of 7 millennium problems for which they are offering $1M as prize money. See: http://www.claymath.org/millennium/ Marcus Brazil Geometric Steiner Trees 2015 13 / 53

Formal Languages The Class NP We would expect that P NP. The strongest evidence of this is the existence of thousands of well-studied NP-Complete problems. If any of these are in P then all problems in NP are in P. We think the world probably looks as follows: Marcus Brazil Geometric Steiner Trees 2015 14 / 53

Polynomial Reductions Polynomial Reductions Intuitively: Problem P reduces to problem Q if an algorithm for Q can be used to solve P easily. In this case, P is no harder to solve than Q. Definition: Polynomial reduction A language L 1 reduces to another language L 2 in polynomial time, written as L 1 P L 2, if there exists a polynomial-time computable function f : {0, 1} {0, 1} such that x L 1 if and only if f (x) L 2. A polynomial time algorithm F that computes f is called a reduction algorithm. Marcus Brazil Geometric Steiner Trees 2015 15 / 53

Polynomial Reductions Polynomial Reductions Essentially, L 1 P L 2 means that deciding L 1 is no harder than deciding L 2 : Theorem 12 (Polynomial Reductions in P) If L 1, L 2 {0, 1} are languages such that L 1 P L 2, then L 2 P implies L 1 P. Marcus Brazil Geometric Steiner Trees 2015 16 / 53

Polynomial Reductions Polynomial Reductions - Examples Example 1: The problem of deciding if a polynomial of degree 2 has integer roots reduces to the problem of deciding if a polynomial of degree 3 has integer roots. If and L 2 = {e(a, b, c) : ax 2 + bx + c has an integer root} L 3 = {e (a, b, c, d) : ax 3 + bx 2 + cx + d has an integer root} then L 2 P L 3, since we can construct a suitable polynomial time reduction algorithm F with f (e(a, b, c)) = e (0, a, b, c). Marcus Brazil Geometric Steiner Trees 2015 17 / 53

Polynomial Reductions Polynomial Reductions - Examples Example 2: Let L CS be the formal language of Circuit Satisfiability, and L IP the formal language for Integer Linear Programming (as a decision problem). We claim that L CS P L IP Consider, for example, the following circuit: This circuit can be expressed as a boolean formula: Marcus Brazil Geometric Steiner Trees 2015 18 / 53

Polynomial Reductions Polynomial Reductions - Example 2 contd.. y 8 = y 4 y 7 y 6 = (y 1 x 2 ) (y 5 y 3 ) x 5 = ((x 1 x 4 ) x 2 ) ( x 2 (x 3 x 4 )) x 5 = (x 1 x 2 ) (x 4 x 2 ) ( x 2 x 3 ) ( x 2 x 4 ) x 5 Note that the conversion from the circuit to the above conjunctive normal form can be done in polynomial time. For the formula to be satisfied, each clause must be satisfied; ie, for each clause C there must be at least one true literal: x + x C(1 x) 1 x C Thus, satisfying the conjunctive normal form is equivalent to showing that the following IP has a feasible solution: Marcus Brazil Geometric Steiner Trees 2015 19 / 53

Polynomial Reductions Polynomial Reductions - Example 2 contd.. x 1 + x 2 1 x 4 + x 2 1 (1 x 2 ) + x 3 1 (1 x 2 ) + (1 x 4 ) 1 (1 x 5 ) 1 0 x i 1 and x i Z for i = 1,..., 5 Clearly this is a polynomial time transformation Such a transformation can be applied to any circuit, showing that L CS P L IP. Marcus Brazil Geometric Steiner Trees 2015 20 / 53

NP -completeness NP-completeness Definitions: NP-complete, NP-hard A language L {0, 1} is said to be NP-complete if 1 L NP, and 2 L P L for every L NP. The language L is said to be NP-hard if it satisfies Condition (2) above, but not necessarily Condition (1). Intuitively, problems that are NP-complete are the hardest problems to solve in the class NP. If P NP then these problems will not have a polynomial-time solution. Which problems are NP-complete? Marcus Brazil Geometric Steiner Trees 2015 21 / 53

NP -completeness L CS is NP-complete Recall: Circuit Satifiability (C-S) Problem Given a boolean combinatorial circuit composed of AND, OR and NOT gates, with a number of inputs and a single output, is there a set of boolean input values such that the output value is 1? The following theorem is also known as Cook s Theorem. Theorem 13 The Circuit Satifiability Problem is NP-complete. Clearly L CS is in NP. The difficult part of the theorem is to show that any given language L in NP can be polynomially reduced to L CS. Marcus Brazil Geometric Steiner Trees 2015 22 / 53

NP -completeness L CS is NP-complete Proof Outline In essence the proof becomes a circuit building exercise. The idea is to build a hardware implementation (in the form of a boolean combinatorial circuit) that corresponds precisely to the running of the verification algorithm A, for the language L Consider a computer that is running a certificate-checking algorithm A. At any point in the execution of the program we can take a snapshot of the relevant areas of the memory, and call this a configuration. The mapping from one configuration to the next can be determined by a boolean circuit M, and the execution of the algorithm A can be viewed as a sequence of at most T (n) such mappings where T is a polynomial function and n is the size of the input strings for A. Marcus Brazil Geometric Steiner Trees 2015 23 / 53

NP -completeness L CS is NP-complete Proof Outline Marcus Brazil Geometric Steiner Trees 2015 24 / 53

NP -completeness L CS is NP-complete Proof Outline For each x we can build a boolean circuit f (x) composed of copies of M such that x L if and only if f (x) L CS. It is straightforward (but beyond the scope of these lectures) to show that this can be done in polynomial time. Hence L P L CS. QED Marcus Brazil Geometric Steiner Trees 2015 25 / 53

NP -completeness General NP-completeness Proofs In general, to show that a language L is NP-complete, we do not have to go through the process of showing every language in NP reduces to L. Instead, we can use the transitivity of P (see Problem Sheet). Theorem 14 (Polynomial reduction for NP-completeness) If L is a language such that L P L for some NP-complete language L, then L is NP-hard. Moreover, if L NP then L is NP-complete. In other words, by reducing a known NP-complete language L to L we implicitly reduce every language in NP to L. Marcus Brazil Geometric Steiner Trees 2015 26 / 53

NP -completeness General NP-completeness Proofs This gives a general method for proving that a language is NP-complete. 1 Prove L NP. 2 Select a known NP-complete language L. 3 Design an algorithm F computing a function f : {0, 1} {0, 1} satisfying x L if and only if f (x) L. 4 Prove F runs in polynomial time. Note that as we develop a catalog of known NP-complete problems this methodology becomes easier. Marcus Brazil Geometric Steiner Trees 2015 27 / 53

NP -completeness The complexity of IP As a decision problem. we can state IP as follows: Integer Programming (IP) Problem Given: An m n integer matrix A and an integer m-vector b. Decide: Does there exist an integer n-vector x 0 such that Ax = b? The language L IP is the language of instances for which the answer to the above question is yes. Theorem 15 (Complexity of IP) The language L IP is NP-complete. Proof: We prove this by showing that: (1) L IP NP; and (2) L CS P L IP. Marcus Brazil Geometric Steiner Trees 2015 28 / 53

NP -completeness The complexity of IP Part (2) we already established in the previous lecture, hence it only remains to prove (1). To prove (1), we have to find bounds on the size of feasible solutions for the IP. It can be shown that if an IP has a feasible solution, then there exists a solution whose components are bounded in size by n (ma max ) 2m+3 (1 + b max ). Hence any such feasible solution to the IP can act as a certificate for verifying the instance, since its representation is polynomial in the size of the input. QED Marcus Brazil Geometric Steiner Trees 2015 29 / 53

NP -completeness NP-Complete Problems It follows from the previous part of the Notes that the following decision problems are NP-complete: Circuit Satisfiability (CS): Given a boolean combinatorial circuit composed of AND, OR and NOT gates, with a number of inputs and a single output, decide if there exists a set of boolean input values such that the output value is 1? Conjunctive Normal Form Satisfiability (CNF-SAT): Given a boolean formula in CNF, decide if there exists a truth assignment for the boolean variables such that the formula is satisfied (has a value of 1)? Integer Linear Programming (IP): Given an m n integer matrix A and an integer m-vector b, decide if there exists an integer n-vector x 0 such that Ax = b? Marcus Brazil Geometric Steiner Trees 2015 30 / 53

NP -completeness 3-Dimensional Matching is NP-Complete Our aim now is to get a feel for how to prove that other hard decision problems are NP-complete, by treating the construction of the proof as a design problem. 3-Dimensional Matching (3DM) Given: Three sets U, V, W such that U = V = W, and a subset T of U V W. Decide: Does there exist a subset M of T with M = U such that every element of U, V, W is contained in exactly one triple in M? Theorem 16 (Complexity of 3DM) 3DM is NP-complete. Proof: 3DM is clearly in NP. We will show that CNF-SAT P 3DM. Marcus Brazil Geometric Steiner Trees 2015 31 / 53

NP -completeness 3-Dimensional Matching is NP-Complete Let F be a CNF boolean formula with variables x 1, x 2,..., x n and clauses C 1, C 2,..., C m. We construct an instance (U, V, W, T ) of 3DM such that the required matching M exists if and only if F is satisfiable. Define: U = {x j i, x j i : i = 1,..., n; j = 1,..., m}. V = {a j i : i = 1,..., n; j = 1,..., m} {v j : j = 1,..., m} {c j i : i = 1,..., n 1; j = 1,..., m}. W = {b j i : i = 1,..., n; j = 1,..., m} {w j : j = 1,..., m} {d j i : i = 1,..., n 1; j = 1,..., m}. Marcus Brazil Geometric Steiner Trees 2015 32 / 53

NP -completeness 3-Dimensional Matching is NP-Complete We define T as the union of three types of triples: (1) The triples (x j i, aj i, bj i ) and ( x j i, aj+1 i, b j i ), where i = 1,..., n, j = 1,..., m, a m+1 i = ai 1. The a and b nodes are not in any other triples, which means that in each of these subgraphs (for each i) all the x j i or all the x j i will be involved in matchings. If x i = 0 in a particular truth assignment then we choose the red triples in our matching (and vice versa). 1 x i 2 x i 1 x i 2 x i 3 x i 3 x i Marcus Brazil Geometric Steiner Trees 2015 33 / 53

NP -completeness 3-Dimensional Matching is NP-Complete (2) The second type of triple is the set {(λ j, v j, w j ) : j = 1,..., m; λ a literal of C j }. The v and w nodes are not in any other triples, which means that in each of these subgraphs contains exactly one matching. For example, if C j = (x 1 x 2 x 4 ) then the triples in T are: j x1 j x2 j x4 By (1), only true literals are available, so there is a matching only if we can find a true literal for clause C j. Marcus Brazil Geometric Steiner Trees 2015 34 / 53

NP -completeness 3-Dimensional Matching is NP-Complete (3) The c and d node triples are garbage collectors, picking up the remaining copies of different literals. They form the set: {(λ k, c j i, d j i ) : i = 1,..., n; j = 1,..., m; k = i,..., m; λ a literal}. It is now easily checked that F is satisfiable if and only if (U, V, W, T ) contains a 3D matching. QED We illustrate this with a construction for the instance F = (x 1 x 2 ) ( x 1 x 2 ) (where the c and d nodes are not shown). Marcus Brazil Geometric Steiner Trees 2015 35 / 53

NP -completeness 3-Dimensional Matching is NP-Complete The matching shown corresponds to x 1 = 1, x 2 = 0. Marcus Brazil Geometric Steiner Trees 2015 36 / 53

NP -completeness NP-Complete Problems A related NP-complete decision problem is the following: Exact Cover by 3-Sets (X3S): Given a set X such that X = 3p and a collection C of 3-element subsets of X, is there a subcollection C C such that each element of X occurs in exactly one member of C The proof that this is NP-complete is an exercise (see the Problem Sheet). Marcus Brazil Geometric Steiner Trees 2015 37 / 53

Computational complexity of Steiner tree problems The Steiner Tree Problem in Graphs Recall the following definition of this problem. Steiner tree problem in graphs Given: An undirected, connected and edge-weighted graph G = (V, E), where c(e) > 0 denotes the weight of edge e E, and a set of terminals N G V. Find: A connected subgraph T = (V (T ), E(T )) in G, such that N G V (T ), and such that T := e E(T ) c(e) is minimised. Since the edge weights are positive, it is easy to see that the subgraph T must be a tree. A tree T = (V (T ), E(T )) that represents a solution to the Steiner tree problem in graphs is called a minimum Steiner tree. We now consider the decision version of this problem. Marcus Brazil Geometric Steiner Trees 2015 38 / 53

Computational complexity of Steiner tree problems The Steiner Tree Problem in Graphs Steiner Tree problem in Graphs (STG) Given: An undirected, connected and edge-weighted graph G = (V, E), where c(e) > 0 denotes the weight of edge e E; a set of terminals N G V ; a positive integer k. Decide: Does there exist a connected subgraph T = (V (T ), E(T )) in G, such that N G V (T ), and such that T k? A more specific decision problem is the following: Steiner Tree problem in Bipartite Graphs (STBG) Given: An undirected, connected bipartite graph G = (V, E); a set of terminals N G V such that there are no adjacent vertices in N or V N; a positive integer k. Decide: Does there exist a connected subgraph T = (V (T ), E(T )) in G, such that N G V (T ), and such that E(T ) k? Marcus Brazil Geometric Steiner Trees 2015 39 / 53

Computational complexity of Steiner tree problems The Steiner Tree Problem in Graphs Trivially, STBG P STG. Theorem 17 (Complexity of STBG) STBG is NP-complete (and hence STG is NP-complete). Proof: STBG is clearly in NP. We will show that X3C P STBG. For any given instance (X, C, p, q : X = 3p, C = q) of X3C we construct an instance of STBG with graph G = (V, E) as follows: V = v 0 X C N = v 0 X E = {(v 0, C i ) : i = 1,..., q} k = 4p {(x j, C i ) : x j C i, i = 1,..., q, j = 1,..., 3p} Marcus Brazil Geometric Steiner Trees 2015 40 / 53

Computational complexity of Steiner tree problems The Steiner Tree Problem in Graphs This construction can clearly be done in polynomial time. x 1 x 2 x 3 x 4 x 5 C 1 C 2 v 0 x 3p 2 x 3p 1 x 3p C q If the given instance of X3C is satisfied clearly STBG is also satisfied. If C does not contain an exact cover of X then the Steiner minimum tree for the above instance contains at least 4p + 2 vertices and hence at least 4p + 1 edges. QED Marcus Brazil Geometric Steiner Trees 2015 41 / 53

Computational complexity of Steiner tree problems The Euclidean Steiner Tree Problem Before proving that the Euclidean Steiner Tree Problem is NP-complete we first require two lemmas. This figure shows one of the two possible infinite regions R ab for two given points a and b. The other region is obtained by reflecting the diagram through the line through a and b. Lemma 18 Let a and b be terminals of a Euclidean minimum Steiner tree T. If there exists a region R ab, as above, containing no terminals of T, then that region also contains no Steiner points of T. R ab a t ab b Marcus Brazil Geometric Steiner Trees 2015 42 / 53

Computational complexity of Steiner tree problems The Euclidean Steiner Tree Problem We also make use of the computational complexity of the following problem. Subset sum problem Given: A set S = {d 1,..., d n } of integers and an integer d. Decide: Is there a set J {1,..., n} such that i J d i = d? Lemma 19 The subset sum problem is NP-complete. This can be proved via a polynomial reduction of 3BCNFS (as defined in Problem sheet 2). Marcus Brazil Geometric Steiner Trees 2015 43 / 53

Computational complexity of Steiner tree problems The Euclidean Steiner Tree Problem We now consider a restricted version of the Steiner Tree problem. Parallel lines Euclidean Steiner tree decision problem Given: A finite set of points N lying on two parallel lines in the Euclidean plane and a positive integer L. Decide: Does there exist a Euclidean Steiner tree T with terminal set N such that T L? In order to avoid issues related to the theoretical complexity of computing with exact real arithmetic, we consider a discretised version of the problem, where the coordinates of the terminals are constrained to be integers and the length of an edge is the Euclidean length rounded up to the nearest integer. In the proof outline we initially ignore this technical issue, and address it at the end. Marcus Brazil Geometric Steiner Trees 2015 44 / 53

Computational complexity of Steiner tree problems The Euclidean Steiner Tree Problem Theorem 20 The discretised parallel lines Euclidean Steiner tree decision problem is NP-complete. Proof: Let d(a, b) represent the Euclidean distance between the points or parallel lines a and b. Let S = {d 1,..., d n } and d < n i=1 d i := D be a given instance of the subset sum problem. We show how to use this instance to construct (in polynomial time) an equivalent instance of the parallel lines Euclidean Steiner tree problem. The theorem then follows. We describe the construction in four stages: Marcus Brazil Geometric Steiner Trees 2015 45 / 53

Computational complexity of Steiner tree problems Theorem 20 construction - Stage 1 Let V 1, V 1, V 2, V 2 be four vertical lines ordered from left to right such that V 1 V 1 V 2 V 2 v d(v 1, V 2 ) d(v 1, V 1) = d(v 2, V 2 ) D. Let u 0 be a fixed point on V 2, and construct a zigzag path P between u 0 and a point on V 1 (labelled v), such that: P is composed of line segments with alternating polar angles 2π/3 and π/3; P has 2n internal vertices (where n is the cardinality of S); and these internal vertices lie alternatively on V 1 and V 2. u 0 Marcus Brazil Geometric Steiner Trees 2015 46 / 53

Computational complexity of Steiner tree problems Theorem 20 construction - Stage 2 From each internal vertex of P on V 1 extend a horizontal line segment to a point on V 1. Label these n points x 1 to x n in ascending order. Similarly, from each internal vertex of P on V 2 extend a horizontal line segment to a point on V 2, and label these points u 1 to u n in ascending order. This results in a Euclidean Steiner tree interconnecting u 0, the u i s, x i s and v. In fact, this is a minimum Steiner tree on these vertices by Lemma 17 (see Problem sheet 2). We call this tree the base tree T x. V 1 V 1 V 2 V 2 v x 2 x 1 u n u 1 u 0 Marcus Brazil Geometric Steiner Trees 2015 47 / 53

Computational complexity of Steiner tree problems Theorem 20 construction - Stage 3 Replace each point x i by 3 points on V 1 labelled, from bottom to top, a i, b i and c i, satisfying: a i b i = b i c i = d i ; and x i is the midpoint of a i b i. We also alter T x, so that it connects to a i, b i and c i, instead of x i, as shown. Let N v be the set consisting of u 0, the u i s, a i s, b i s, c i s and v. We denote this Steiner tree on N v by T v. We refer to the topology of the base tree T x (from Stage 2) as the base topology of T v. Claim 1 T x and T v are each the unique minimum Steiner tree for their respective terminal sets. d i d i x i V 1 c i b i a i Marcus Brazil Geometric Steiner Trees 2015 48 / 53

Computational complexity of Steiner tree problems Theorem 20 construction - Stage 4 Let v 0 be the point on V 1 below v such that v 0 v = 2d. Let N 0 be the set N v where v has been replaced by v 0. Let T 0 be a minimum Steiner tree for N 0. Claim 2 The minimum Steiner tree T 0 has the same base topology as T v. Furthermore, for each triple, a i, b i and c i, the main full component of T 0 either connects directly to a i and b i only, as in the figure in the previous slide, or to b i and c i only, as in the figure on this slide. d i d i V 1 c i b i x i a i We can think of T 0 as being the new minimum Steiner tree obtained from T v by moving the terminal v vertically downwards by 2d. Marcus Brazil Geometric Steiner Trees 2015 49 / 53

Computational complexity of Steiner tree problems Theorem 20 proof - Claim 3 It is straightforward to compute T v in terms of d(v 1, V 2 ), d(v 1, V 1 ), n and the elements of S (see Problem Sheet). Let L v := T v. Also, observe that in the main full component of T v, containing all the Steiner points, one of the three orientations of edges is horizontal. We describe such a tree as a horizontal-edge Steiner tree. Claim 3 The following three statements are equivalent: (A) The answer to the given instance of the subset sum problem is yes. (B) There exists a horizontal-edge minimum Steiner tree on N 0 with the same base topology as T v. (C) There exists a Steiner tree on N 0 with length at most L v 3d. Marcus Brazil Geometric Steiner Trees 2015 50 / 53

Computational complexity of Steiner tree problems Theorem 20 Sketch proof of Claim 3 The claims (A) (B) and (B) (C) essentially follow from the geometry of the construction. In T x, if we treat v and one of the terminals x i as movable points along V 1, and we move x i vertically upwards by a distance δ, how does the position of v on V 1 change so that T x remains a horizontal-edge Steiner tree? As shown in the figure, the answer is 2δ downwards. V 1 V 1 V 2 V 2 v 2δ { x i+1 δ { x i 2δ 3 u n u i Marcus Brazil Geometric Steiner Trees 2015 51 / 53

Computational complexity of Steiner tree problems Theorem 20 Sketch proof of Claim 3 The final step is to show that (B) (C). The length of the main component of a horizontal-edge Steiner tree on N 0 (if it exists) can be realised by a horizontal Simpson line, as shown. If the minimum Steiner tree on N 0 is not horizontal-edge, then the corresponding Simpson line can be shown to be strictly longer, and the result follows. V i V 1 c i e i t i e i bi s i p 0 a i Marcus Brazil Geometric Steiner Trees 2015 52 / 53

Computational complexity of Steiner tree problems Theorem 20 descretisation The last step in proving the theorem is to show that the above arguments still apply when considering the descretised problem. We need to be able to distinguish between yes and no instances in the discretised problem. More precisely, as shown in the proof of Claim 3 above, we need to be able to distinguish between horizontal-edge minimum Steiner trees and non horizontal-edge minimum Steiner trees. A technical argument (not given here) shows this can be done given a suitable polynomial scaling of the construction. QED Theorem 21 The parallel lines Euclidean Steiner tree decision problem is NP-hard and hence the general Euclidean Steiner tree decision problem is NP-hard. Marcus Brazil Geometric Steiner Trees 2015 53 / 53