cs0601002/paper.tex
1: \mag1095
2: \voffset-7mm
3: \hoffset-7mm
4: \documentclass[acmjacm,hyperref]{acmtrans2m}
5: \usepackage{amsmath}
6: %\usepackage{amsthm}
7: \usepackage{graphicx}
8: \usepackage{verbatim}
9: \newtheorem{theorem}{Theorem}[section]
10: \newtheorem{conjecture}[theorem]{Conjecture}
11: \newtheorem{corollary}[theorem]{Corollary}
12: \newtheorem{proposition}[theorem]{Proposition}
13: \newtheorem{lemma}[theorem]{Lemma}
14: \newdef{definition}[theorem]{Definition}
15: \newdef{remark}[theorem]{Remark}
16: 
17: \newcommand{\eps}{\varepsilon}
18: \newcommand{\dsmall}{\delta_{\mathrm{small}}}
19: \newcommand{\dlarge}{\delta_{\mathrm{large}}}
20: \newcommand{\Wleft}{W_{\mathrm{left}}}
21: \newcommand{\Wright}{W_{\mathrm{right}}}
22: \newcommand{\eqdef}{:=}
23: 
24: \newif\iffull
25: \fulltrue
26: \newif\ifjournal
27: %\journaltrue
28: 
29: %\acmVolume{V}
30: %\acmNumber{N}
31: %\acmYear{YY}
32: %\acmMonth{M}
33: \markboth{W. Mulzer and G. Rote}{Minimum-Weight Triangulation is NP-hard}
34: 
35: \title{Minimum-Weight Triangulation is NP-hard}
36: 
37: \author{WOLFGANG MULZER \\ Princeton University
38:         \and G{\"U}NTER ROTE \\ Freie Universit{\"a}t Berlin}
39: 
40: \begin{abstract}
41: A triangulation of a planar point set $S$ is a maximal plane 
42: straight-line graph with vertex set $S$.
43: In the \emph{minimum-weight triangulation} (MWT) problem, we are looking 
44: for a triangulation of a given point set that minimizes  the sum of the 
45: edge lengths. We prove that the decision version of this problem is 
46: NP-hard, using a reduction from PLANAR 1-IN-3-SAT. The correct 
47: working of the gadgets is established with computer assistance, using
48: dynamic programming on polygonal faces, as well as
49: the $\beta$-skeleton heuristic to certify that certain edges belong to
50: the minimum-weight triangulation.
51: \end{abstract}
52: 
53: \terms{Algorithms, Theory}
54: \keywords{Optimal triangulations, PLANAR 1-IN-3-SAT}
55: 
56: \category{F.2.2}{Nonnumerical Algorithms and Problems}
57: {Geometrical problems and computations}
58: \category{G.2.2}{Graph Theory}{Graph algorithms}
59: %
60: 
61: \begin{document}
62: 
63: 
64: %\begin{bottomstuff}
65: 
66: %\end{bottomstuff}
67: 
68: \maketitle
69: \iffull
70: {\makeatletter
71: \gdef\@runningfoot{Technical Report B05-23 (revised), arXiv:cs/0601002v3,
72: %\today --- ...
73: February\ 2008}
74: \gdef\@firstfoot{Technical Report B05-23 (revised), arXiv:cs/0601002v3,
75: February\ 2008, \pageref{@lastpg} pages.}
76: }
77: \fi
78: 
79: 
80: \section{Introduction}
81: 
82: Given a set $S$ of points in the
83: Euclidean plane, a \emph{triangulation} $T$ of $S$ is a maximal plane 
84: straight-line graph with vertex set $S$. The \emph{weight} of $T$
85: is defined as the total Euclidean length of all edges in $T$. 
86: A triangulation that achieves the minimum
87: weight is called a \emph{minimum-weight triangulation} (MWT) of $S$. 
88: 
89: The problem of computing a triangulation for a given planar point set %$S$ 
90: arises naturally in many applications such as stock cutting,
91: finite element analysis, terrain modeling, and numerical approximation.
92: The \emph{minimum-weight} triangulation
93: has attracted the attention of many researchers, mainly due to its natural
94: definition of optimality, and not so much because it would be important for
95: the mentioned applications.
96: We show that computing a {minimum-weight} triangulation is NP-hard. Note that
97: it is not known whether the MWT problem is in NP, because it is an open
98: problem whether sums of radicals (namely, Euclidean distances) can be compared 
99: in polynomial 
100: time \cite{Blomer91}. This problem is common to many geometric optimization
101: problems, like, perhaps most famously,  the Euclidean Traveling Salesperson 
102: Problem. To get a variant
103: of the problem that is in NP, one can take the weight of an edge $e$ as the
104: rounded value $\lceil \| e \|_2 \rceil$. Our proof also shows that this variant
105: is NP-complete.
106: 
107: Our proof uses a polynomial time reduction from POSITIVE PLANAR 1-IN-3-SAT,
108: a variant of the well-known PLANAR 3-SAT problem, which is a standard tool
109: for showing NP-hardness of geometric problems.
110: 
111: \subsection{Optimal Triangulations}
112: 
113: Usually, a planar point set has (exponentially) many different 
114: triangulations, and many applications call for triangulations with
115:  certain good properties (see Figure~\ref{fig:triangulations}). 
116: Optimal triangulations under various optimality criteria
117:  %are called \emph{optimal triangulations} and
118: were extensively surveyed by~\citeN{BernEp92}. 
119: 
120: \begin{figure}
121: \begin{center}
122: \includegraphics{figs/triangulations}
123: \caption{A planar point set and different ways to triangulate it. The greedy 
124: triangulation (a) is constructed incrementally, always adding the shortest possible edge. In this example,
125: it is shorter than the Delaunay triangulation (b), which avoids skinny 
126: triangles. A minimum weight triangulation for the point set is shown in (c).
127: The length $L$ of the MWT can decrease when additional Steiner points are
128: allowed (d).}
129: \label{fig:triangulations}
130: \end{center}
131: \end{figure}
132: 
133: The \emph{Delaunay triangulation} is perhaps the best known
134: triangulation. It arises as the dual of the
135: Voronoi diagram and can be computed optimally in $O(n\log n)$ time, using
136: classical techniques \cite{deBergKrOvSc2000}. Since it simultaneously 
137: optimizes many
138: objective functions (it maximizes the smallest angle, it minimizes the
139: maximum circumcircle,
140: as well as the maximum
141: smallest enclosing circle of all triangles), it is often the triangulation of choice.
142: 
143: %Sometimes it becomes necessary to optimize more complicated
144: %properties,
145: Certain other criteria,
146: such as the minimum maximum angle,
147: the maximum minimum height, or the minimum maximum distance of a triangle
148: from its circumcenter,
149: can be optimized %. This can be done
150:  in polynomial time using the
151: \emph{edge insertion} technique \cite{BernEdEpMiTa93,EdelsbrunnerTaWa92},
152: a sophisticated application of dynamic programming.
153: 
154: It makes a difference whether it is allowed to add new points, so-called 
155: \emph{Steiner points}, to the planar point set. As 
156: Figure~\ref{fig:triangulations} shows, this can sometimes help to improve
157: the objective function. \citeN{BernEp92} give many similar examples. Here we
158: only mention one result by \citeN{Eppstein94}, who showed that the
159: minimum weight \emph{Steiner} triangulation can be approximated up to a 
160: constant factor in $O(n \log n)$ time, using quadtrees.
161: 
162: \subsection{History of the MWT problem}
163: 
164: The minimum-weight triangulation problem dates back to the
165: 1970s and has been called
166: ``perhaps the most longstanding open problem in computational geometry''
167: \cite{BernEp92},
168: At the end of
169: the classical book of  \citeN{GareyJo79} 
170: on NP-completeness, there is a list of 12 major
171: problems whose complexity status was open at the time of writing. 
172: With the present paper, ten 
173: problems from this list have been resolved by proving NP-hardness or
174: by exhibiting a polynomial-time algorithm 
175: (see~\cite{Johnson05} for a recent status update on the list).
176: As of now, only two problems from the original list remain open, namely
177: Precedence-Constrained 3-Processor Scheduling and the notorious Graph
178: Isomorphism problem.
179: 
180: \subsubsection*{Early attempts}
181: It seems that the MWT problem was first considered by 
182: \citeN{DuppeGo70} who proposed a greedy algorithm % for solving the MWT problem
183: which always adds the shortest possible edge to the triangulation.
184: Later, \citeN{ShamosHo75} suggested using the Delaunay triangulation
185: as a minimum-weight triangulation. \citeN{Lloyd77} provided 
186: examples which show that both proposed algorithms usually do not compute 
187: the MWT (Figure~\ref{fig:triangulations}). He also shows that it is 
188: NP-complete to decide whether the edge set of a given planar straight-line
189: graph (with crossing edges) contains a triangulation. After this, countless
190: researchers attacked the MWT problem from many different angles. In one line
191: of attack, researchers used classical optimization techniques such
192: as dynamic programming or branch and bound, but this soon became infeasible.
193: In other lines of research, people looked at relaxed variants of the problem:
194: Maybe there exist reasonable restrictions of the problem for
195: which efficient algorithms can be found, and if the problem cannot be solved
196: exactly, maybe good approximations can be computed efficiently. Finally, there
197: was an attempt to gain a better understanding of the geometric properties of
198: the MWT in order to find footholds for effective heuristics. We now describe
199: these approaches in more detail.
200: 
201: \subsubsection*{Dynamic Programming}
202: \citeN{Gilbert79} and \citeN{Klincsek80} independently showed how 
203: to compute a minimum-weight triangulation of a simple polygon in 
204: $O(n^3)$ time by dynamic programming. 
205: In fact, this problem has become one of the standard textbook examples 
206: (or exercises) for illustrating the dynamic programming paradigm.
207: There have also 
208: been attempts to attack the general problem with dynamic programming 
209: techniques. For example, \citeN{ChengGoTs95} 
210: used dynamic programming in order to compute a minimum-weight triangulation of 
211: a given point set $S$ in $O(n^{k+2})$ time if a subgraph of a MWT 
212: of $S$ with $k$ connected components is known. Using branch and cut, 
213: \citeN{KyodaImTaTa97} managed to compute MWTs of $100$ points, but for large
214: point sets mere dynamic programming becomes absolutely infeasible.
215: 
216: \subsubsection*{Restricted Instances}
217: For restricted classes of point sets, it is possible to compute the MWT in 
218: polynomial time. For example, \citeN{AnagnostouCo93} 
219: gave an algorithm to compute the MWT of the vertex set of $k$ nested convex 
220: polygons in $O(n^{3k+1})$ time. More recently, 
221: \citeN{HoffmannOk06} showed how to obtain the MWT of a point set with $k$ inner 
222: points in $O(6^k n^5 \log n)$ time. 
223: 
224: \subsubsection*{Approximations}
225: In another line of attack, researchers were looking for triangulations that
226: approximate the MWT. The Delaunay triangulation is not a good candidate,
227: since it may be longer by a factor of $\Omega(n)$ 
228: \cite{Kirkpatrick80,ManacherZo79}.  The greedy triangulation approximates the 
229: MWT by a factor of $\Theta(\sqrt{n})$ 
230: \cite{ManacherZo79,Levcopoulos87,LevcopoulosKr96}. \citeN{PlaistedHo87} showed
231: how to approximate the MWT up to a factor of 
232: $O(\log n)$ in $O(n^2 \log n)$ time. 
233: \citeN{LevcopoulosKr96} introduced quasi-greedy triangulations, which 
234: approximate the MWT within a constant factor. \citeN{RemySt06}
235: discovered an approximation scheme for MWT  that runs in
236: quasi-polynomial time:
237: for every fixed $\eps$,
238: it finds a $(1+ \eps)$-approximation in $n^{O(\log^8 n)}$ time.
239: 
240: \subsubsection*{Subgraphs and supergraphs} A different line of research tried to 
241: identify criteria to include or exclude certain edges of the MWT.
242: \citeN{Gilbert79} showed that the MWT always contains the shortest edge. 
243: \citeN{YangXuYo94} extended this result by proving that edges which
244: join mutual nearest neighbors are in the MWT. A larger subgraph of the MWT,
245: the \emph{$\beta$-skeleton}, was discovered by \citeN{Keil94}. We describe it 
246: in Section~\ref{sec:beta-skeleton}.
247: In practice, the $\beta$-skeleton has many connected components, and thus 
248: does not help much in computing a MWT. Often, the \textit{LMT-skeleton 
249: heuristic} described by \citeN{DickersonKeMo97} yields much
250: better results. It uses the simple fact that a MWT is locally optimal in the
251: sense that it cannot be improved by flipping the diagonals of a convex empty
252: quadrilateral in the point set. The LMT-skeleton made it feasible to compute
253: the MWT for larger, well-behaved point sets, and it has been the subject
254: of numerous further investigations
255: \cite{BeiroutiSn98,ChengKaSu96,AichholzerAuHa99,BellevilleKeMcSn96,BoseDeEv02}.
256: 
257: Approaching the problem from the other direction, 
258: \citeN{DasJo89} defined the diamond test, which yields a supergraph of the
259: MWT: An edge $e$ can only be contained in the MWT if at least one of the
260: two isosceles triangles with base $e$ and base angles $\pi/8$ is empty. This
261: constant was improved to $\pi/4.6$ \cite{DrysdaleMcSn01}
262: (see Figure~\ref{fig:beta-skeleton} below).
263: The diamond test gives an easy criterion to exclude impossible
264: edges from the MWT.
265: Usually, this eliminates all edges except a set of $O(n)$ remaining
266: candidate edges. (This statement is true for random point
267: sets, with high probability. With bucketing techniques, such a set of
268: $O(n)$ edges can be found in linear expected time~\cite{DrysdaleRoAi95}.)
269: 
270: \subsection{Our Methods and Results}
271: 
272: \subsubsection{Historical Perspective}\label{sec:perspective}
273: 
274: The crucial necessary condition for a geometric optimization problem
275: to be NP-hard is that the solution depends non-locally on the data.
276: 
277: With the LMT-skeleton heuristic, it became feasible to compute
278: minimum-weight triangulations fast enough that one could carry out
279: experiments and play with various point sets.  An instance of a
280: non-local effect was hence discovered by Jack Snoeyink
281: \cite{BeiroutiSn98}: the so-called \emph{wire} is a symmetric polygon
282:  that does not have a symmetric minimum-weight triangulation, and
283: hence it has (at least) two different minimum-weight triangulations,
284: see Figure~\ref{figure-wire}.
285: 
286: \begin{figure}[htb]
287:   \centering
288:   \includegraphics{figs/wire-piece}
289:   \caption{A wire-piece and its two optimal triangulations.  The two
290:     optimal triangulations are labeled as L and R, depending on
291:     whether the left (L) or right (R) arms of the isosceles terminal
292:     triangles, as shown dotted in the right
293:     part, belong to the triangulation. This convention is used
294:     throughout the paper.}
295:   \label{figure-wire}
296: \end{figure}
297: 
298: 
299: \begin{figure}[htb]
300:   \centering
301:   \includegraphics{figs/longwire}
302:   \caption{A longer wire with several optimal triangulations.  Besides
303:     the two triangulations of type L and R, there are mixed forms
304:     where the transition between L and R can occur in intermediate
305:     positions, as marked by an arrow in the lower example. If the wire
306:     is regarded as a point set, the shaded pockets outside the wire
307:     also have to be triangulated. For each pocket, there are four
308:     optimal triangulations. However, the pockets are independent of
309:     each other, and do not affect the properties of the wire.}
310:   \label{figure-long-wire}
311: \end{figure}
312: 
313: Wires can be extended to any length,
314: see Figure~\ref{figure-long-wire}.
315: \emph{A small change in the point set
316: at one end of the wire will cause the optimum triangulation to topple
317: globally throughout the whole wire.}
318: Wires can thus be used to
319: ``transmit information'' from one area of the plane to a remote area
320: (hence the name ``wire'').  We use various forms of wires as
321: building blocks for constructing gadgets in our NP-hardness reduction.
322: 
323: Such a non-local effect is usually a strong indication that the
324: problem is NP-hard.
325: Still,
326: %Although it became obvious, 
327: %with the discovery of the wire and its non-local effects,
328: %that the MWT problem should be NP-hard.
329: %
330: it took almost a decade until another crucial building block was
331: designed: a gadget that allows several wires to meet and that carries
332: out ``logic'' with the information that is transmitted by them (the
333: so-called $C$-connection, see Figure~\ref{C-connection}).  The design
334: of this gadget heavily depended on computer assistance.
335: We used an implementation of the LMT-skeleton heuristic
336: using Otfried Cheong's program \textsc{Ipe} \cite{Schwarzkopf95} as a 
337: graphical user-interface.
338: 
339: \subsubsection{Computer Assistance}
340: 
341: It seems inevitable that a NP-hardness proof for the
342: MWT problem requires \emph{some} amount of computer calculation, since
343: computing the weight of a triangulation involves
344: Euclidean distances, and thus square roots. Therefore, when comparing two
345: triangulations that differ in more than a pair of edges, it is
346: hard to compare their weight by just looking at them. 
347: 
348: However, since the conference version of this paper \cite{MulzerRo06},
349: we have made an effort to reduce the part of the proof that depends on
350: computer assistance for verification.
351: We have also made other simplifications of the proof and made it more accessible.
352: %
353: (a) We have tried to simplify and specialize the problem as much as
354: possible already at the logical (discrete) level.  In particular, the
355: PLANAR 1-IN-3-SAT problem is more specialized than in
356: % the conference version of this paper
357:  \cite{MulzerRo06} 
358: and does not need negations.
359: %
360: (b) We designed the gadgets in such a way that the $\beta$-skeleton
361: edges already form large connected components. This part of the construction
362: is trivial to check by computer, and is open even to visual inspection.
363: %
364: (c) In the proof, the gadgets split into modules (``pieces'') that can
365: be analyzed separately.
366: %
367: (d) The analysis of each module boils down to checking a small number
368: of possibilities, each amounting to computing the minimum-weight
369: triangulation of a simple polygon.
370: This can be programmed from scratch in less than an hour's work by an experienced programmer.
371: %
372: (e) To make the computer-assisted part even safer, we have rerun the final
373: calculations with interval arithmetic, using the open-source high-level
374: programming language \textsc{Python}, which automatically supports
375: integer arithmetic of unbounded length.
376: % using the \texttt{Decimal} package). 
377: 
378: %The final computer runs took about 10 hours on a relatively slow computer.
379: The final computer runs to verify our gadgets took about 10 hours on a 
380: relatively slow computer.
381: \iffull
382: The code is given in Appendix~\ref{app:programs} and amounts to approximately 1000 lines.
383: \else
384: The code amounts to approximately 
385: 1000 lines. The more essential parts of the code are given in the technical report~\cite[Appendix~B]{tech-report}.
386: \fi
387: 
388: \section{Overview of the Reduction}
389: \label{sec:overview}
390: 
391: We begin with a high-level overview of the geometric construction.  We build our
392: point set from a small number of tube-like \emph{pieces} that fit
393: together at the openings, where they share \emph{terminal triangles}, see
394: Figure~\ref{fig:schematic}.  The boundary edges of the pieces must
395: belong to every optimal triangulation, regardless of how we put the
396: pieces together (Proposition~\ref{boundary} below). If we draw these edges we 
397: get a system of tubes, separated by polygonal holes.
398: %Figure~\ref{fig:schematic}.  
399: The holes can be triangulated in polynomial time 
400: by dynamic programming; The tubes will form the essential part of the gadgets 
401: that model the logical structure of a POSITIVE PLANAR 1-IN-3-SAT formula,
402: whose satisfiability is NP-complete to decide, see Section~\ref{subsec:P1I3SAT}.
403: \begin{figure}
404: \begin{center}
405: \includegraphics[scale=1]{figs/schematic}
406: \end{center}
407: \caption{A schematic view of the construction: From the five types of
408:   building blocks shown at the top, one can build a network of tubes
409:   like in the lower part. The area within this network is the
410:   interesting part where the simulation of the logic takes place. The
411:   \emph{holes} inside the structure and the \emph{pockets} between the
412:   structure and the convex hull (drawn shaded) form simple polygons
413:   that can be optimally triangulated in polynomial time.}
414: \label{fig:schematic}
415: \end{figure}
416: 
417: 
418: For the analysis, we will show that at each terminal triangle, we have
419: a choice of two edges to insert (Lemma~\ref{lemma-two-edges}).  When
420: one of the edges is inserted for every terminal triangle, the edges
421: enclose a simple polygon, whose optimum solution can be computed by
422: dynamic programming. Every piece can therefore be analyzed in
423: isolation, by considering a small number of possibilities.
424: %($2^k$ possibilities when there are $k$ terminal triangles).
425: 
426: 
427: \section{POSITIVE PLANAR 1-IN-3-SAT}
428: \label{subsec:P1I3SAT}
429: 
430: In this section, we describe the POSITIVE PLANAR 1-IN-3-SAT problem, which we 
431: will use for our reduction.
432: 
433: \begin{definition}
434: Let $\Phi$ be a Boolean formula in 3-CNF. The \emph{associated graph} of 
435: $\Phi$, $G(\Phi)$, has one vertex $v_x$ for each variable $x$ in 
436: $\Phi$ and one vertex $v_C$ for each clause $C$ in $\Phi$. There is an edge 
437: between a variable-vertex $v_x$ and a clause-vertex $v_C$ 
438: if and only if $x$ or $\neg x$ appears in $C$. 
439: 
440: The Boolean formula $\Phi$ is called \emph{planar} if its associated
441: graph $G(\Phi)$  is planar.
442: \end{definition}
443: 
444: \begin{figure}
445: \begin{center}
446: \includegraphics[scale=1]{figs/figembed}
447: \end{center}
448: \caption{A rectilinear embedding of graph that is associated with the
449: Boolean formula 
450: $\left(x_1 \vee \neg x_3 \vee x_5 \right) 
451: \wedge \left(\neg x_1 \vee x_2 \vee x_3 \right) \wedge 
452: \left(x_2 \vee x_4 \vee \neg x_5 \right)$.}
453: \label{fig:embed}
454: \end{figure}
455: 
456: \citeN{Lichtenstein82} showed that 3-SAT remains NP-complete
457: if the input is restricted to a planar formula
458: (the {PLANAR 3-SAT} problem).
459: As \citeN{KnuthRa92} observed, 
460: Lichtenstein's proof implies that it suffices to consider formulae 
461: whose associated graph can be embedded such that the variables are arranged on 
462: a straight line, with three-legged clauses above and below them. The edges 
463: between the variables and the clauses are embedded in a rectilinear fashion 
464: (see Figure~\ref{fig:embed}).
465: 
466: In our reduction we will use a variant of PLANAR 3-SAT
467: in which there are only positive variables and we ask for an assignment to the
468: variables such that in each clause exactly one variable is set to true.
469: 
470: \begin{definition}
471:   In the \emph{POSITIVE PLANAR 1-IN-3-SAT} problem, we are given a collection $\Phi$ of
472:   clauses containing exactly three variables together with a 
473:   planar embedding of the associated graph $G(\Phi)$ as described above.
474:   
475:   The problem is to decide whether there exists an assignment of truth values
476:   to the variables of $\Phi$ such that exactly one variable in each clause is
477:   true.
478: \end{definition}
479: 
480: The POSITIVE 1-IN-3-SAT problem without the planarity restriction was
481: shown to be NP-complete by \citeN{Schaefer78}.  This problem can also
482: be interpreted as a SET PARTITIONING problem, where every element of
483: the ground set has precisely three sets by which it can be covered.
484: For completeness, we include a proof that the planar version of the
485: problem is NP-complete.
486: 
487: \begin{proposition}
488:  POSITIVE PLANAR 1-IN-3-SAT is NP-complete.
489: \end{proposition}
490: 
491: \begin{proof}
492: It is easy to verify in polynomial time that a given embedding of a formula
493: is rectilinear (the validity of an instance) and that a given assignment has 
494: the 1-IN-3 property (the validity of a certificate). Hence,
495: the problem is in NP. To show completeness, we
496: describe a reduction from PLANAR 3-SAT. Let $I$ be an instance of 
497: PLANAR 3-SAT, i.e. a 3-CNF formula $\Phi$ and a planar, rectilinear 
498: embedding of the associated graph. We describe how to transform $I$ into
499: an instance of POSITIVE PLANAR 1-IN-3-SAT while maintaining the rectilinear
500: embedding. We consider the clauses of $\Phi$ one by one. 
501: 
502: If clause $C$ contains only one literal, it can easily be eliminated.
503: %
504: If clause $C$ contains two literals, say $x$ and $y$, we can
505: replace it by two three-variable clauses $(x \vee y \vee z)$ and
506: $(x \vee y \vee \neg z)$, where $z$ is a new variable.
507: 
508: Before we consider clauses with three variables, we first discuss two
509: useful gadgets which enforce equality and inequality between variables
510: in terms of 1-IN-3 clauses.
511: 
512: \begin{figure}[ht]
513: \begin{center}
514: 
515: \includegraphics[scale=1]{figs/negequ}
516: 
517: \end{center}
518: \caption{The gadgets to enforce inequality (a) and equality (b) between two 
519: variables.}
520: \label{fig:negequ}
521: \end{figure}
522: 
523: \subsubsection*{The inequality gadget} The inequality gadget serves to enforce the 
524: constraint $x \Leftrightarrow \neg y$ for two variables $x$ and $y$. We abbreviate it
525: as $(x \neq y)$. It is implemented as 
526: \begin{align}
527: \label{ali:neg}
528: x \neq y \equiv (x, a, y) \wedge (a, b, c) \wedge (a, c, d)
529: \wedge (b, c, d), 
530: \end{align}
531: where $a$, $b$, $c$, $d$ are new variables used only inside the gadget (see
532: Figure~\ref{fig:negequ}a).
533: Here, as always, we denote a 1-IN-3 clause by a triple $(v_1, v_2, v_3)$.
534: The clause $(v_1, v_2, v_3)$ is \emph{satisfied} if exactly one of the variables
535: $v_1$, $v_2$, $v_3$ is true. 
536: \begin{lemma}
537: Given $x$ and $y$, the expression \thetag{\ref{ali:neg}} is satisfiable iff 
538: exactly one of $x$ and $y$ is true.
539: \end{lemma}
540: \begin{proof}
541: The last three clauses enforce that $a = 0$, because otherwise we get 
542: $b=c=d=0$, and the last clause is not satisfied. The first clause now ensures
543: that exactly one of $x$ and $y$ is true.
544: \end{proof}
545: 
546: \subsubsection*{The equality gadget} Using two copies of the inequality gadget and an
547: extra variable $a$, we can build a gadget to enforce the constraint $x \Leftrightarrow y$
548: (see Figure~\ref{fig:negequ}b). We abbreviate it as $(x = y)$.
549: 
550: \begin{figure}[ht]
551: \begin{center}
552: 
553: \includegraphics[scale=1]{figs/figrepl3}
554: 
555: \end{center}
556: \caption{Eliminating negations: The variable $x$ in this example
557:   has eight connections, some of which are negated, as indicated by
558:   crosses. We replace $x$ by a chain of variables $x_1,x_2, \ldots$ with
559:   alternating truth values and place the connections to the clauses
560:   containing $x$ correspondingly.}
561: \label{fig:repl3}
562: \end{figure}
563: \subsubsection*{Elimination of negated variables}
564:  To eliminate the negated variables in the original 3-SAT clauses, we
565: replace a variable $x$ by a chain of variables $x_1, x_2, \ldots$ and
566: use the negation gadget to enforce the appropriate relations between them
567: (see Figure~\ref{fig:repl3}).
568: 
569: \subsubsection*{Transformation of disjunctions}
570: It remains
571:  to handle a disjunctive clause $C=(x \vee y \vee z)$ with three 
572: literals $x$, $y$, and $z$. $C$ can be replaced by
573: \begin{align}
574: \label{1-in-3}
575: \left(x, u, a \right) \wedge \left( y, u, b\right) &\wedge
576: \left( a, b,  q \right) \wedge %\\ 
577: \left(u = c \right) \wedge
578: \left(d \neq z \right) %&
579: \wedge
580: \left( c, d, r\right). %\\
581: \end{align}
582: See Figure~\ref{fig:repl2}. Note that there is space to accommodate 
583: the middle legs of the equality and inequality gadgets.
584: 
585: \begin{lemma}
586: Given $x$, $y$, and $z$,
587: the expression \thetag{\ref{1-in-3}} is satisfiable iff
588: $x \vee y \vee z$ holds.
589: \end{lemma}
590: \begin{proof}
591: The clause $( c, d, r)$ is equivalent to
592: $\neg c \lor \neg d$, since the variable $r$ appears nowhere else. Hence
593: $c\rightarrow \neg d \iff u\rightarrow z$ by the third and fourth 
594: constraint.
595: Thus, satisfiability of the last three constraints is equivalent to
596: $u\rightarrow z$.
597: 
598: Now, if $u=1$, the first three clauses can be satisfied only by
599: $x=y=0$, and we must have $z=1$.
600: The third clause is satisfied by setting $a=b=0$ and $q=1$.
601: For $u=0$, the first two clauses reduce to $x\ne a$ and $y\ne b$. 
602: Since $q$ appears nowhere else,
603: the clause $( a, b,  q)$ is equivalent to
604: $\neg a \lor \neg b \iff x\lor y$.
605: The value of $z$ can be arbitrary in this case.
606: \end{proof}
607: 
608: To make sure that $x$ and $z$ remain reachable from other clauses, we also 
609: add two additional variables $x'$ and $z'$ and equality 
610: constraints.
611: %Other clauses that lie above the variables and were nested between $x$ and
612: %$y$ (resp. $y$ and $z$)
613: %can now connect to $x'$ (resp.\ $z'$) instead of $x$ (resp.\ $z$).
614: Clauses that were above the variables and nested between $x$ and $y$ can now 
615: connect to $x'$ instead of $x$, and those
616: nested between $y$ and $z$ can connect to $z'$ instead of $z$.
617: 
618: \begin{figure}[ht]
619: \begin{center}
620: \includegraphics[scale=1]{figs/figrepl2}
621: 
622: \end{center}
623: \caption{The modification for a clause $x \vee y \vee z$ with three
624:   literals.}
625: \label{fig:repl2}
626: \end{figure}
627: 
628: 
629: This transformation can be carried out in polynomial time, and
630: by construction, the transformed positive formula has a rectilinear
631: embedding, and it has a 1-IN-3 assignment if and only if the original formula is 
632: satisfiable.
633: \end{proof}
634: 
635: %
636: 
637: 
638: \section{Geometric Validation Tools}
639: 
640: We summarize the geometric and computational tools we need for
641: establishing properties of the gadgets and their
642: minimum-weight triangulations. 
643: 
644: \subsection{The $\beta$-Skeleton}
645: \label{sec:beta-skeleton}
646: 
647: The \emph{$\beta$-skeleton} of a point set $S$ is defined as the set of
648: all edges $pq$ between two points of $S$
649: such that the two circles of diameter
650: $\beta\cdot|pq|$ passing through $p$ and $q$ %contain no ot#### $e$ 
651: are empty, see Figure~\ref{fig:beta-skeleton}. It provides
652: a sufficient condition for including edges in the minimum-weight triangulation:
653: 
654: \begin{theorem}
655: \label{prop:beta}
656: The $\beta$-skeleton is a subgraph of the MWT for
657: \begin{displaymath}
658: \beta = \sqrt{1+\sqrt{4/27}} %1.1768178191460862263895685743892
659: \leq 1.17682.
660: \end{displaymath}
661: \qed
662: \end{theorem}
663: 
664: Theorem~\ref{prop:beta} was first proven by
665: \citeN{Keil94} for $\beta \leq \sqrt{2}$ and was later improved by
666:  \citeN{ChengXu96}. The value for $\beta$ is nearly optimal,
667: since there is a lower bound of % about $1.154701$ \cite{Keil94}. 
668: %1.1602693846107194547181179483082
669: $\sqrt{5/4+\sqrt{1/108}} % =\sqrt{45+\sqrt{12}}/6
670:  \approx 1.16027$
671: \cite{WangYa01}.
672: In Proposition~\ref{boundary}, we will use the $\beta$-skeleton to identify the 
673: \emph{boundary}
674: edges of our gadgets, which must belong to every optimal triangulation.
675: Since the $\beta$-skeleton is defined by a local condition, it is very easy
676: to verify that a certain edge is a boundary edge. Our gadgets have many
677: points, hence we used a computer to check the $\beta$-skeleton property of
678: our boundary edges.
679: \iffull
680: The source-code of the straightforward program can be found in 
681: Appendix~\ref{app:beta-skeleton}.
682: \fi
683: \ifjournal
684: %The source-code of the straightforward program can be found in 
685: %the full technical report \cite[Appendix B.3]{tech-report}.
686: %  DOPPELT: auch weiter unten bei {proposition}\label{boundary}
687: \fi
688: 
689: \begin{figure}[htb]
690:   \centering
691:   \includegraphics{figs/beta-skeleton}
692:   \caption{An edge $pq$ of the $\beta$-skeleton. The edge $ab$ does
693:     not
694: belong the MWT since the diamond test is violated.}
695:   \label{fig:beta-skeleton}
696: \end{figure}
697: 
698: \subsection{Triangulating a Polygon by Dynamic Programming}
699: \label{sec:dynamic-programming}
700: 
701: As we explained above, the analysis of our reduction essentially boils down
702: to computing the minimum-weight triangulation of a small number of simple
703: polygons. \citeN{Gilbert79} and \citeN{Klincsek80} independently showed how
704: to do this:
705: \begin{proposition}\label{prop:dyn}
706: The minimum-weight triangulation of a simple polygon can be computed in
707: $O(n^3)$ time.\qed
708: \end{proposition}
709: 
710: Proposition~\ref{prop:dyn} is proved by a straight-forward application of
711: dynamic programming, and we implemented a variant of the algorithm in 
712: \textsc{Python}.
713: \iffull
714: (The source code of our implementation is given in Appendix~\ref{app:dynprog}.)
715: \fi
716: \ifjournal
717: (The source code of our implementation is given in 
718: the technical report \cite[Appendix B.2]{tech-report}.)
719: \fi
720: The dynamic programming algorithm assumes an idealized model
721: in which arithmetic with edge lengths can be done exactly.
722: This means that
723: sums of radicals (i.~e.\ Euclidean distances) 
724: need to be compared in constant 
725: time. 
726: However, it is not known how to do this even in polynomial time~\cite{Blomer91}.  Therefore, our program uses interval arithmetic
727: to compare sums of distances, and for all our gadgets it computes an 
728: unambiguous answer.
729: 
730: Our program identifies the edges in a 
731: minimum-weight triangulation $T$ inside a given simple polygon $P$. We call the 
732: total weight of these edges the \emph{internal cost} of $P$ and denote it by 
733: $c(T)$. The internal costs computed by our program will be discussed 
734: extensively in Section~\ref{piece-analysis}.
735: It is easy to modify the program so that it computes the optimum
736: under the restriction that certain edges are forbidden. This is needed
737: for the proof of Lemma~\ref{lemma-two-edges}.
738: 
739: \section{Terminal Triangles}
740: 
741: The point set is constructed from small \emph{elementary pieces} that fit
742: together at \emph{terminal triangles}. These terminal triangles are
743: isosceles triangles $xyz$ with base $yz$, that lie symmetrically with
744: respect to a coordinate axis, and they come in two %main 
745: sizes (small
746: and large). The coordinates of % example %????
747: vertical terminal triangles are given
748: in Table~\ref{tab:terminal}. See Figure~\ref{set-W}
749: or~\ref{definition-wire}\iffull--\ref{definition-wire-extended}\fi\
750:   for an illustration.
751: \begin{table}[htb]
752:   \centering
753: \noindent\vbox{
754: \offinterlineskip
755: \halign{\vrule\strut\ #\ \hfil\vrule
756:  &\ (\hfil $#$.&$#$\hfil, &\hfil $#$.&$#$\hfil) \vrule
757:  &\ (\hfil $#$.&$#$\hfil, &\hfil $#$.&$#$\hfil) \vrule
758:  &\ (\hfil $#$.&$#$\hfil, &\hfil $#$.&$#$\hfil) \vrule
759:  &\ \hfil $#$ \vrule
760: \cr
761: \noalign{\hrule}
762: & \multispan4\hfil $x$\hfil \vrule
763: & \multispan4\hfil $y$\hfil \vrule
764: & \multispan4\hfil $z$\hfil \vrule
765: &\delta\hfil
766: \cr %-2.7, 11.2
767: \hline
768: small & 0&00 & 0&00 &  -2&7 & 11&2 &   2&7 & 11&2 & \dsmall=\hphantom{9}5.655172\cr
769: large & 0&00 & 0&00 & -11&61 & 48&16 &  11&61 & 48&16 & \dlarge=
770: 24.06\hphantom{9900}\cr
771: \hline
772: }}
773:   \caption{Terminal triangles. The ``difference terms'' $\delta$ will
774:     described below in
775: Section~\ref{sec:red-weight}.}
776:   \label{tab:terminal}
777: \end{table}
778: These triangles can be rotated by multiples of $90^\circ$, and
779: translated by multiples of 0.01 in each coordinate.  The large
780: triangle is a scaled copy of the small triangle, by a factor of~$4.3$.
781: 
782: The basic pieces that we construct are point sets with two or three
783: terminal triangles.  The $\beta$-skeleton edges will form a simple
784: polygon through these points, with a missing edge at each terminal
785: triangle.  We will show that in each terminal triangle, the edge $xy$
786: or the edge $xz$ must be present in every minimum-weight triangulation
787: (Lemma~\ref{lemma-two-edges}).  Thus, in order to determine how a piece with 
788: $k$ terminals can be triangulated in a minimum-weight triangulation, it suffices 
789: to consider $2^k$ possibilities for the positions of each
790: terminal edge. For each possibility, we find the optimum solution by
791: dynamic programming.
792: 
793: %\paragraph{subdivision into pieces}
794: 
795: Let $W$ be the point set given in Figure~\ref{set-W}, which forms
796: part of the wire mentioned in the introduction 
797: (see Section~\ref{sec:perspective}).
798:   It is symmetric about the $y$-axis. The points $v_0$, $x$,
799: and $v'_0$ lie on the $x$-axis, and the points $u$ and $u'$ lie $0.1$
800: units below this line. The left and right halves of the lower boundary
801: are equal, and they are equal to the upper boundary (turned by
802: $180^\circ$).
803: We denote by $\Wleft$
804: and  $\Wright$ the left half and the right half of the set $W$,
805: up to and including the points $x$, $y$, and~$z$.
806: 
807: \begin{figure}
808:   \centering
809:   \includegraphics[scale=0.8]%[width=\textwidth]
810:   {figs/set-W}
811:     \caption{The point set $W$ in Lemma~\ref{lemma-two-edges}}
812:   \label{set-W}
813: \end{figure}
814: 
815: \begin{lemma}\label{lemma-two-edges}
816:   Let $P$ be a point set that contains a \textup(translated, scaled, rotated\textup)
817:   copy of the point set $W$, but no other points in the shaded polygon
818:   of Figure~\ref{set-W}.  Any minimum-weight triangulation $T$ of $P$
819:   that contains all edges shown in Figure~\ref{set-W} must contain at
820:   least one of the edges $xy$ or $xz$.
821: \end{lemma}
822: \begin{proof}
823:   The proof distinguishes 21 cases and deals with each case by a
824:   small calculation.
825: 
826:   Since in any triangulation, the point $u$ must be incident to some
827:   edge that emanates into the lower half-plane, $T$ must contain at
828:   least one of the edges $uv_1$, $uv_2$, \dots, $uv_6$.  Similarly,
829:   $T$ must contain at least one of the edges $u'v'_1$, $u'v'_2$,
830:   \dots, $u'v'_6$.
831: %
832:   Now, for each $i,j=1,\ldots,6$, the edges $uv_i$ and $u'v'_j$
833:   enclose a simple polygon. For each polygon, we calculated, by
834:   dynamic programming, the optimum triangulation as well as the
835:   optimum triangulation that uses none of the edges $xy$ and $xz$.
836:   By symmetry, we have to consider only $1\le i\le j\le 6$.
837: \iffull
838:   The results are shown in Table~\ref{W-lemma}.
839: \fi
840: %
841: \ifjournal
842:   A few representative cases are shown in Table~\ref{W-lemma}.
843:   (The full table with all cases is given
844:  in the technical report~\cite{tech-report}.)
845: \fi
846: \end{proof}
847: 
848: \begin{table}
849: \centering
850: \iffull
851:  \includegraphics[width=\textwidth] {figs/wire-cases}
852: \fi
853: \ifjournal
854:  \includegraphics%[width=\textwidth]
855:  {figs/wire-cases-selected}
856: \fi
857:   \caption
858:   {The optimum triangulations with and without the edges $xy$ and
859:     $xz$,
860: \iffull
861:  for each polygon bounded by 
862: \else
863:  for a selection of polygons bounded by 
864: \fi
865: edges $uv_i$ and $u'v_j'$, as
866:     indicated in the left column.  The second column shows an optimal
867:     triangulation without the edges $xy$ and $xz$, together with the
868:     interval for its internal cost, calculated to 5 digits after the
869:     decimal point.  (There are always at least two
870:     optimal triangulations, since the upper diagonal in the middle can
871:     be flipped. The program has picked one solution whose lower interval
872:     bound is smallest.)  The remaining columns list all
873:     candidates for optimal solutions.  One can check that all these
874:     solutions contain the edges $xy$ and $xz$.  (In fact, one can
875:     see that, if there are two optimal solutions in a row, they must
876:     have exactly the same weight since they contain parts which can be
877:     replaced by symmetric parts.)
878: %
879:     The lower bound on the difference between the optimum in the third
880:     column and the optimum in the second column is given in the first
881:     column.  The smallest difference ($3.83677$) occurs for the case
882: $v_5,v_5'$.
883: % In the fourth column, this difference is divided by the
884: %    number of internal edges.
885: %\\
886: \iffull
887: The numbers in this table were computed with the \textsc{Python} program
888: in Appendix~\ref{app:two-edges}.
889: \fi
890: \ifjournal
891: The numbers in this table were computed with a \textsc{Python} program
892: written the authors.
893: (The code is given in the technical report
894: \protect \cite[Appendix~B.4]{tech-report}.)
895: \fi
896: }
897:   \label{W-lemma}
898: \end{table}
899: 
900: % WIRD WEITER UNTEN DEFINIERT
901: %If a terminal triangle contains the edge $xy$, we say that it is in
902: %state L (for left). Otherwise, we say that it is in state R (for
903: %right).  Sometimes we have large and small terminal triangles
904: %together, and then we use also the letters l and r for the small
905: %triangles.
906: 
907: We remark that the lemma is somewhat robust against perturbations and remains true even if all points of $W$ are moved by
908: a small distance.
909: Figure~\ref{set-W-lines} shows that small perturbations do not make
910: triangulations feasible or infeasible.
911: %
912: %, as long as $a$ remains below the line $u_0x$
913: %and  $b$ remains below the line $v_0x$.
914: %
915: %  The triangulation for the polygon with $au_i$ and $bv_j$ contains
916: %  $20-i-j$ internal edges.
917:   The triangulations in Table~\ref{W-lemma} contain at most 18 internal edges.
918: % The number of internal edges is indicated
919: % in the left column.
920:   If each point is moved by at most $\sigma := 0.04$,
921:   the length of each edge changes by at most $2\sigma$, and the weight
922:   of any triangulation changes by at most $36\sigma=1.44$.
923: 
924:   Since the difference between the optimal triangulation and the best
925:   triangulation without the edges $xy$ and $xz$ is bigger than
926:   $3.83677>2\cdot 1.44$, the claim of the lemma is not invalidated if
927:   each point is moved by at most~$0.04$ in any direction. We will use this
928:   observation in Section~\ref{sec:elem-piece}, where we describe a version of 
929:   the wire-piece in which the offset between the terminal triangles is 
930:   slightly larger than in the standard wire-piece. This makes it possible
931:   to build wires of arbitrary length (see Lemma~\ref{long-distance}).
932: 
933: \begin{figure}
934:   \centering
935:   \includegraphics[scale=0.8] {figs/set-W-lines}
936:   \caption{The point set $W$ in Lemma~\ref{lemma-two-edges} is in
937:     sufficiently general position.}
938:   \label{set-W-lines}
939: \end{figure}
940: 
941: 
942: \subsection{Putting pieces together}
943: \label{sec:red-weight}
944: 
945: When putting pieces together, we make sure that
946: Lemma~\ref{lemma-two-edges} can be applied at the junction:
947: at every terminal triangle, the piece contains a copy of half of the
948: point set $W$ (possibly rotated, and possibly scaled by~$4.3$).
949:   This
950: allows us to split the input set into components at the terminal
951: triangles. For each terminal triangle $xyz$, we need to consider just
952: the two choices $xy$ and $yz$ for the \emph{terminal edges}.
953: We denote these choices by L and R, depending on whether we use
954: the left or right arms, as viewed from the tip of the terminal triangle.
955: 
956: %if we use
957: % the left or right arms of the terminal
958: %    triangle, respectively, if we look it them standing on its tip.
959:  When determining the behavior of a piece with $k$ terminals in a 
960: minimum-weight triangulation, we have to compare the optimal
961: triangulations for the $2^k$ choices for the positions of the $k$
962: terminal edges.
963: % [ define \emph{terminal edges} ].  
964: However, these triangulations cover different areas and cannot be
965: compared directly.  Depending on whether the terminal edge $xy$ or the
966: terminal edge $xz$ is chosen at some given boundary, the triangulated
967: area excludes or includes the area of the terminal triangle itself,
968: and the optimal triangulation can thus be expected to be cheaper or
969: more expensive. To offset this effect, we define the \emph{reduced
970: weight} of a triangulation $T$, $\bar c(T)$, by adding a penalty or 
971: subtracting a bonus term from the actual weight.  This will allow us 
972: to see directly which configurations of terminal edges are better 
973: than others, and which configurations cannot possibly be part of an 
974: optimal triangulation.
975: 
976: \begin{figure}[t]
977:   \centering
978:   \includegraphics[scale=0.9]{figs/allpieces-large}
979:   \caption{All elementary pieces}
980:   \label{all-pieces}
981: \end{figure}
982: %
983: 
984: More precisely, %for each type of terminal triangle, 
985: we define a difference term $\delta$ that depends on the size of the triangle
986: (large or small), see Table~\ref{tab:terminal}.
987: When comparing the costs of different triangulations of a piece or of 
988: different pieces, we only look at the
989: \emph{internal cost}, the cost of the internal edges, since the boundary
990: edges are fixed. When the triangulated area of a piece includes the
991: terminal triangle, we subtract $\delta$ from the actual weight;
992: otherwise we add $\delta$. The precise values of $\dsmall$ and $\dlarge$
993: are not important and have been chosen to make the proofs convenient. The 
994: following lemma holds irrespective of the values of $\dsmall$ and $\dlarge$.
995: 
996: \begin{lemma}\label{reduced-cost}
997:   Consider a layout of pieces $S$ where every terminal triangle is shared
998:   by two pieces.
999: %
1000: % to contain % all boundaries, as well as
1001:   For each terminal triangle, fix one of its two long sides.  Consider
1002:   the minimum-weight triangulation $T$ of $S$ that is restricted to
1003:   contain those fixed edges as well as all piece boundaries.  For each
1004:   piece, calculate the reduced internal weight of the minimum-weight
1005:   triangulation of the piece bounded by the given fixed edges.
1006: 
1007:   Then the overall reduced internal weight of all pieces differs from
1008:   the total weight of the triangulation $T$ by a constant that is
1009:   independent of the choice of the fixed edges.
1010: \end{lemma}
1011: \begin{proof}
1012: %  We know that the boundaries must belong to every MWT; so they c
1013: %  the holes and pockets between the pieces are triangulated optimally,
1014:   In total, the effect of adding and subtracting $\delta$ cancels on
1015:   the two sides of each terminal triangle. The cost of the terminal
1016:   edge ($xy$ or $xz$) itself is not accounted for in the sum of
1017:   internal costs, but since $xy$ and $xz$ have the same length, this
1018:   amounts to a constant difference.  The boundaries are also fixed,
1019:   and so is the cost of triangulating the pockets and the holes.
1020: \end{proof}
1021: We will see below (Proposition~\ref{boundary}) that all boundary edges
1022: are part of the MWT, since they belong to the $\beta$-skeleton.
1023: We know from Lemma~\ref{lemma-two-edges} that, by choosing a terminal
1024: edge from each terminal triangle in all possible ways, we are
1025: guaranteed to find the optimal triangulation.
1026: The consequence of Lemma~\ref{reduced-cost} is that we need only look at the
1027: reduced (internal) cost when comparing these choices.
1028: 
1029: \section{Elementary Pieces}
1030: \label{sec:elem-piece}
1031: 
1032: \begin{figure}
1033:   \centering
1034:   \includegraphics[scale=0.7]{figs/pieces-small}
1035:   \caption{Enlarged view of the small elementary pieces}
1036:   \label{small-pieces}
1037: \end{figure}
1038: 
1039: \begin{figure}
1040:   \centering
1041:   \includegraphics[scale=0.9]{figs/C-big-gadget}
1042:   \caption{Enlarged view of the central part of the $C$ and $C_0$ connections.}
1043:   \label{C-connection}
1044: \end{figure}
1045: 
1046: We have 10 elementary pieces, shown in
1047: Figures~\ref{all-pieces}--\ref{C-connection}: % {small-pieces}
1048: The (i) \emph{wire-piece}
1049: (Figure~\ref{definition-wire})
1050:  is the main tool achieving a non-locality for conveying information
1051: over long distance.
1052: As mentioned in the introduction, such wire-pieces
1053: were originally conceived by Jack Snoeyink \cite{BeiroutiSn98}.
1054: % They can be chained together to bridge
1055: In order to construct wires of arbitrary length, we also have
1056:  (ii) an \emph{extended wire-piece}.
1057: (Figure~\ref{definition-wire}).
1058: The horizontal offset between the two terminal triangles of a {wire-piece} is $27.4$, i.\,e., with these 
1059: wire-pieces alone, one can bridge distances which are multiples of
1060:  $27.4$.
1061: The offset for the {extended wire-piece} is
1062: $82.21=3\cdot 27.4 + 0.01$. Thus, with the right combination of
1063: wire-pieces and extended wire-pieces, one can form a straight connection of
1064: arbitrary length,
1065: % between any two small terminal triangles whose distance is a multiple of $0.01$,
1066: provided it is long enough:
1067: \begin{lemma}\label{long-distance}
1068:   Consider two small vertical terminal triangles at the same height
1069:   with a horizontal distance $d>230\,000$ that is a multiple of
1070:   $0.01$.  Then the two triangles can be connected by a sequence of
1071:   wire-pieces and extended wire-pieces.
1072: 
1073:   An analogous statement holds for vertical connections.
1074: \end{lemma}
1075: \begin{proof}
1076:   If the distance between two terminal triangles is $d=0.01 \cdot z$
1077:   for some integer $z \geq 3 \cdot 2740 \cdot 2739 = 22\,514\,580$, they can be
1078:   connected by concatenating $y \eqdef z \bmod 2740$ extended
1079:   wire-pieces with $\lfloor z/2740 \rfloor - 3y$ wire-pieces.
1080: \end{proof}
1081: 
1082: 
1083: The work-horse of our gadgets is
1084: (iii) the 
1085: \emph{$C$-connection} and its mirror image,
1086: (iv) the 
1087: \emph{$C'$-connection}.
1088: These are the only pieces with three terminal triangles,
1089: two large ones and a small one. They serve two
1090: purposes: they allow us to
1091: introduce branches into the network of wires, and they effect
1092: ``negation'' of the information that is transmitted through the wires.
1093: %
1094: We also have
1095: a (v)
1096: \emph{$C_0$-connection} with only two terminals. It serves as a
1097: placeholder for the $C$ or $C'$ connection when the third terminal is
1098: not needed.
1099: 
1100: \begin{figure}
1101:   \centering
1102: \includegraphics{figs/corridor}
1103: \caption{Tracing a wire through a rectangular corridor,
1104: forming a so-called $C$-$C'$-link (see Section~\ref{link}.)
1105: % The terminal triangles are enlarged for better visibility.
1106:   The dotted parts are long enough to allow connections of any length
1107:   (Lemma~\ref{long-distance}).}
1108:   \label{corridor-figure}
1109: \end{figure}
1110: 
1111: The remaining pieces are variations of the wire-piece for building
1112: more flexible wire shapes:
1113: The
1114:  (vi) \emph{left bend} and the
1115:  (vii) \emph{right bend}
1116: allow us to introduce arbitrary turns into wires. The vertical
1117: part of the left bend corresponds to a wire-piece that is rotated $90^\circ$ 
1118: counter-clockwise, whereas the vertical part of a right bend corresponds to 
1119: a wire-piece that is rotated $90^\circ$ clockwise. We need both a left
1120: and a right bend, because each piece fits to a given terminal triangle
1121: of another piece only at one end.
1122: 
1123: With these pieces, we can arrange wires to follow any rectangular
1124: layout, provided we blow the layout up sufficiently, see Figure~\ref{corridor-figure}:
1125: \begin{lemma} \label{lemma-connects} Given a $C$-connection piece and
1126:   a $C'$-connection piece and a rectangular path between them, the
1127:   small triangles of the two pieces can be connected by a sequence of
1128:   wire-pieces, extended wire pieces, left and right bends, within the
1129:   corridor of width $2000$ around the path, provided that the path
1130:   contains a straight portion of length at least $250\,000$, both in
1131:   the horizontal and in the vertical direction, and the corridor does
1132:   not interfere with other pieces or intersect itself.
1133: \end{lemma}
1134: 
1135: \begin{proof}
1136:   The left and right bend both fit into a box of size $700 \times
1137:   700$, and by Lemma~\ref{long-distance}, we can bridge any distance
1138:   larger than $230\,000$ in the horizontal and vertical direction. The
1139:   wires can be positioned sufficiently far away from the boundary of
1140:   the rectangular strip to make sure that the boundaries of different
1141:   connections do not interfere with each other.
1142: \end{proof}
1143: 
1144: We also have (viii) a \emph{thick left bend}, which is just a scaled
1145: copy of the left bend.
1146: 
1147: Finally, we have two \emph{resizing wire-pieces}: the (ix)
1148: \emph{thickening adapter} and its mirror image, the (x) \emph{thinning
1149:   adapter}. They are used to interpolate between small and large
1150: terminal triangles in the clause gadgets.
1151: 
1152: \begin{figure}
1153:   \centering
1154: \includegraphics{figs/DEFINITION-wire}
1155:   \caption{The coordinates of a wire-piece.}
1156:   \label{definition-wire}
1157: \end{figure}
1158: 
1159: \iffull
1160: \begin{figure}
1161:   \centering
1162: \vspace {-2,1cm} % bounding box is not correct due to rotation.
1163: \includegraphics[angle=78,width=\textwidth]{figs/DEFINITION-wire-extended}
1164: \vspace {-2,1cm}
1165:   \caption{The coordinates of the extended wire-piece.}
1166:   \label{definition-wire-extended}
1167: \end{figure}
1168: \fi
1169: 
1170: \iffull
1171: Figures~\ref{definition-wire} and~\ref{definition-wire-extended} show
1172: the coordinates of the wire-piece and the extended wire-piece.
1173: \else
1174: Figure~\ref{definition-wire} shows
1175: the coordinates of the wire-piece.
1176: \fi
1177: The complete data for the pieces are available
1178: on the Internet.\footnote{%
1179:   \url{http://www.inf.fu-berlin.de/inst/ag-ti/people/rote/Software/MWT/}%
1180: all-coordinates.txt
1181:   \ifjournal
1182:   \\
1183:   The directory
1184: \url{http://www.inf.fu-berlin.de/inst/ag-ti/people/rote/Software/MWT/}
1185:  also contains the full version of the technical report,
1186:   with more illustrations, and the computer programs.
1187: \fi}
1188: 
1189: 
1190: \begin{proposition}\label{basic-properties}
1191: The elementary pieces have the following properties:
1192: 
1193: All coordinates are multiples of $0.0001$.  Each piece contains two or
1194: three copies of a terminal triangle, together with a copy of $\Wleft$
1195: or $\Wright$ \textup(Figure~\ref{set-W}\textup),
1196: possibly rotated by $90^\circ$, and possibly scaled
1197: by~$4.3$\textup.  The coordinates of the terminal triangles are multiples of
1198: $0.01$.
1199: \qed
1200: \end{proposition}
1201: Each piece has two terminal triangles, with the exception of the
1202: connection pieces, which have three terminal triangles, as shown in
1203: the figures.
1204: The edges shown in the figure, with the exception of
1205:  the two equal sides of each terminal triangle,
1206: form the \emph{boundary} of the pieces.
1207: \begin{proposition}\label{boundary}
1208:   The boundary edges of all elementary pieces are contained in the
1209:   $\beta$-skeleton, for $\beta=1.1806$. This remains true when the pieces
1210:   are connected using their terminal triangles, as long as the
1211:   boundary part of different pieces are sufficiently far apart.
1212:   Hence, all boundary edges belong to the MWT.
1213: \end{proposition}
1214: 
1215: \begin{proof}
1216: The lemma can be verified manually by inspecting the relevant 
1217: regions for the boundary edges. Since the number of boundary edges is very 
1218: large, we have implemented a computer program which computes the 
1219: $\beta$-skeleton. 
1220: \iffull
1221: The source code can be found in 
1222: Appendix~\ref{app:beta-skeleton}.
1223: \fi
1224: \ifjournal
1225: The source code can be found in
1226: the technical report \cite[Appendix B.3]{tech-report}.
1227: \fi
1228: \end{proof}
1229: 
1230: The boundary decomposes %consists 
1231: into two or three connected
1232: \emph{boundary} pieces.  As can be seen in Figure~\ref{C-connection},
1233: some boundary pieces are not just paths, but they form trees.
1234: 
1235: %By Lemma~\ref{lemma-two-edges}, all the terminal triangles of a gadget are 
1236: %in one of two possible states (L or R, resp. l or r). In the following,
1237: %we will often consider the state of a whole gadget. For example, if we say
1238: %that a $C$-connection is in state LRl, we mean that its left and right
1239: %large terminal triangle are in state L and R, respectively, while its small
1240: %terminal triangle is in state l.
1241: 
1242: \subsection{Analysis of the Pieces}
1243: \label{piece-analysis}
1244: 
1245: In this section we discuss the exact properties of our gadgets as they were
1246: computed by our computer program. We present tables which show the internal
1247: cost, the reduced internal cost $\bar c$ (see Section~\ref{sec:red-weight}) and the
1248: \emph{relative reduced internal cost $\tilde c$} (i.e., the difference between the reduced cost
1249: of a certain configuration and the minimum reduced cost incurred by any 
1250: configuration of a gadget).
1251: 
1252: \begin{figure}[htb]
1253:   \centering
1254: \hbox to \textwidth{\hfill
1255: \includegraphics[scale=0.77] {figs/TABLE-wire}\hfill\hfill
1256: \includegraphics[scale=0.77] {figs/TABLE-wire-extended}\hfill}
1257:   \caption{Optimal solutions for all cases for the wire-piece %}
1258: and the extended wire-piece}
1259:   \label{fig:TABLE-wire}
1260: %\end{figure}
1261: %
1262: %\begin{figure}[htb]
1263: %  \centering
1264: %\includegraphics{figs/TABLE-wire-extended}
1265: %  \caption{Optimal solutions for all cases for
1266:   \label{fig:TABLE-wire-extended}
1267: \end{figure}
1268: 
1269: For example, let us look at the extended wire-piece.  It has two
1270: terminal triangles.  For each of the four combinations of states, LL,
1271: LR, RL, and RR, the right part of Figure~\ref{fig:TABLE-wire-extended} shows 
1272: an optimal solution, together with the internal cost.
1273: Table~\ref{tab:extended-piece} summarizes this information. The second column 
1274: lists the number of optimal solutions (or potential optimal solutions, i.\,e.,
1275: all solutions which the program could not exclude from being an optimal 
1276: solution, with the given precision of the calculation). Indeed, looking
1277: back at Figure~\ref{fig:TABLE-wire-extended}, one can see 
1278: that the solution for case LR has a symmetric copy with the same cost. 
1279: The astute reader may wonder why the multiplicities for cases LR and RL are
1280: not larger. For example, it looks as if the isosceles ``$xyz$'' triangle for 
1281: case LR could be placed also at the very left end or at the very right end.
1282: However, this is not the case, since the three repetitions of the wire-piece 
1283: that constitute the extended wire-piece are not exact repetitions:
1284: the ends have been moved apart, stretching the middle piece
1285: and thus causing a deviation from the regular periodical pattern.
1286: The third column of Table~\ref{tab:extended-piece} lists the internal cost, 
1287: repeating the information from Figure~\ref{fig:TABLE-wire-extended}.
1288: 
1289: \begin{table}[htb]
1290:   \centering
1291: \noindent\vbox{  
1292:     \offinterlineskip
1293:     \halign{\vrule \strut\hfil\ #\hfil \vrule &\ \hfil $#$ \hfil\vrule
1294:     &&\ \hfil $#$ \hfil\vrule \cr
1295:      \noalign{\hrule}
1296:      \raise2pt\hbox{\strut}%
1297:      pattern & $multiplicity$ &$internal cost $ c& $reduced internal
1298:      cost $ \bar c
1299:      &$relative reduced cost $ \tilde c\cr \noalign{\hrule}
1300:     \noalign{\hrule}LL &1& 455.471\,523\,435 & 455.471\,523\,435 & 0.000\,000\,000 \cr
1301: LR &2& 466.990\,265\,006 & 455.679\,921\,006 & 0.208\,397\,570 \cr
1302: RL &1& 444.283\,180\,745 & 455.593\,524\,745 & 0.122\,001\,310 \cr
1303: RR &1& 455.471\,523\,435 & 455.471\,523\,435 & 0.000\,000\,000 \cr
1304: \noalign{\hrule}
1305: }}
1306:   \caption{Analysis of the extended wire-piece}
1307:   \label{tab:extended-piece}
1308: \end{table}
1309: 
1310: The fourth column is the reduced internal cost $\hat c$, obtained by adding or
1311: subtracting $\dsmall$, as appropriate. For example, for case LR, we
1312: have to subtract $2\dsmall = 11.310\,344$, since this triangulation
1313: covers the larger area on both the left and the right end.
1314: For cases LL and RR, addition and subtraction of $\dsmall$
1315: cancel, and the reduced cost remains unchanged.
1316: 
1317: The rightmost column reduces all numbers by subtracting the column
1318: minimum, to make the differences more visible.  It is now plain to see
1319: that LL and RR have the same cost, which is also obvious by symmetry.
1320: We denote these \emph{relative reduced costs} by $\tilde c$, and we
1321: think of them as \emph{penalties} for deviating from the ``ground
1322: state'' where the smallest reduced cost is achieved.  They are
1323: non-negative by definition.
1324: 
1325: \iffull
1326: The corresponding table for all pieces, together with pictures of the optimal 
1327: triangulations, is given in Table~\ref{tab:pieces} of 
1328: Appendix~\ref{appendix-pieces}.
1329: \fi
1330: \ifjournal 
1331: The corresponding table for all pieces, together with pictures of the optimal
1332: triangulations, are given in the full technical report \cite[Appendix~A]{tech-report}.
1333: \fi
1334: Table~\ref{tab:pieces-summary} condenses the information for all
1335: pieces with two terminals.
1336: 
1337: Since the pieces are symmetric, LL and RR always have the same cost.
1338: The only exceptions are the resizing pieces.
1339: %
1340: %is the thickening and the thinning adapter.
1341: Let $\eps_1 \approx 0.000\,051$ be the relative reduced cost of  the
1342: thickening adapter in state LL.
1343: 
1344: 
1345: \begin{table}[htb]
1346:   \centering
1347: \noindent \vbox{\hbox
1348:    {\valign{\hrule\hbox {\vrule\ \raise1pt\hbox{\strut}\strut # }\hrule
1349:        &\hbox {\vrule\ \raise2pt\hbox{\strut}\strut\ # }%
1350:        &&\hbox {\vrule\ \strut\ # }\cr
1351:        & LL& LR& RL& RR\cr
1352: % 9-DIGITS:
1353: wire-piece& 0.000\,000\,000& 0.210\,506\,663& 0.125\,593\,246& 0.000\,000\,000\cr
1354: extended wire-piece& 0.000\,000\,000& 0.208\,397\,570& 0.122\,001\,310& 0.000\,000\,000\cr
1355: thickening adapter& $0.000\,051\,402\ldots=\eps_1$& 0.018\,887\,246& 0.014\,627\,250& 0.000\,000\,000\cr
1356: thinning adapter& 0.000\,000\,000&0.018\,887\,246& 0.014\,627\,250& $0.000\,051\,402\ldots=\eps_1$\cr
1357: % % 10-DIGITS:
1358: % wire-piece& 0.0000000000& 0.2105066630& 0.1255932458& 0.0000000000\cr
1359: % extended wire-piece& 0.0000000000& 0.2083975703& 0.1220013095& 0.0000000000\cr
1360: % thickening adapter& $0.0000514019 = \eps_1$& 0.0188872460& 0.0146272497& 0.0000000000\cr
1361: % thinning adapter& 0.0000000000
1362: % & 0.0188872460& 0.0146272497& $0.0000514019 = \eps_1$\cr
1363: % %$C$ connection& 0.0038610757& 0.0000015749& 0.0299947159& 0.0261352150& 0.0205717570& 0.0205733319& 0.0000000000& 0.0046308775\cr
1364: % 8-DIGITS:
1365: %wire-piece& 0.00000000& 0.21050666& 0.12559325& 0.00000000\cr
1366: %extended wire-piece& 0.00000000& 0.20839757& 0.12200131& 0.00000000\cr
1367: %thickening adapter& $0.00005140 =: \eps_1$& 0.01888725& 0.01462725& 0.00000000\cr
1368: %%$C$ connection& 0.00386108& 0.00000157& 0.02999472& 0.02613522& 0.02057176& 0.02057333& 0.00000000& 0.00463088\cr
1369: }\vrule}\hrule}
1370: 
1371: \medskip
1372: 
1373: \noindent \vbox{\hbox
1374:    {\valign{\hrule\hbox {\vrule\ \raise1pt\hbox{\strut}\strut # }\hrule
1375:        &\hbox {\vrule\ \raise2pt\hbox{\strut}\strut\ # }%
1376:        &&\hbox {\vrule\ \strut\ # }\cr
1377:        & LL& LR& RL& RR\cr
1378: % 9-DIGITS:
1379: %$C$ connection& 0.003\,861\,076& 0.000\,001\,575& 0.029\,994\,716& 0.026\,135\,215& 0.020\,571\,757& 0.020\,573\,332& 0.000\,000\,000& 0.004\,630\,878\cr
1380: $C_0$ connection& 0.000\,000\,000& 0.044\,001\,701& 0.020\,571\,757& 0.000\,000\,000\cr
1381:  left bend& 0.000\,000\,000& 0.086\,460\,895& 0.125\,593\,246& 0.000\,000\,000\cr
1382:  right bend& 0.000\,000\,000& 0.210\,506\,663& 0.125\,593\,246& 0.000\,000\,000\cr
1383: thick left bend& 0.000\,000\,000& 0.891\,261\,046& 0.020\,571\,757& 0.000\,000\,000\cr
1384: % % 10-DIGITS:
1385: % $C_0$ connection& 0.0000000000& 0.0440017011& 0.0205717570& 0.0000000000\cr
1386: % left bend& 0.0000000000& 0.0864608945& 0.1255932458& 0.0000000000\cr
1387: % right bend& 0.0000000000& 0.2105066630& 0.1255932458& 0.0000000000\cr
1388: % thick left bend& 0.0000000000& 0.8912610464& 0.0205717570& 0.0000000000\cr
1389: % 8-DIGITS:
1390: %$C_0$ connection& 0.00000000& 0.04400170& 0.02057176& 0.00000000\cr
1391: %left bend& 0.00000000& 0.08646089& 0.12559325& 0.00000000\cr
1392: %right bend& 0.00000000& 0.21050666& 0.12559325& 0.00000000\cr
1393: %thick left bend& 0.00000000& 0.89126105& 0.02057176& 0.00000000\cr
1394: }\vrule}\hrule}
1395: 
1396:   \caption{The relative reduced costs $\tilde c$ for the pieces with two terminals}
1397:   \label{tab:pieces-summary}
1398: \end{table}
1399: 
1400: 
1401: 
1402: The $C$-connection (and its mirror image, $C'$) is the only piece with
1403: three terminals. The results for this piece is shown in
1404: \iffull
1405: Table~\ref{tab:pieces-C}, and in more visual form in
1406: Figure~\ref{fig:pieces-C}.
1407: \fi
1408: \ifjournal
1409: Table~\ref{tab:pieces-C}.
1410: \fi
1411:  We encode the states by three letters $ABc$,
1412: where the capital letters $A$ and $B$ refer to the left and right large
1413:  terminal triangles (L or R), as usual, and $c$ refers to the
1414: small terminal triangle (l or r).
1415: 
1416: \iffull
1417: \begin{table}[htb]
1418:   \centering
1419: \noindent\vbox
1420: {
1421:     \offinterlineskip
1422:     \halign{\vrule \strut\hfil\ #\hfil \vrule &\ \hfil $#$ \hfil\vrule
1423:     &\ \hfil $#$ \hfil\vrule
1424:     &\  $#$ \hfil\vrule
1425:     &\ \hfil $#$ \hfil\vrule
1426:  \cr
1427:      \noalign{\hrule}
1428:      \raise2pt\hbox{\strut}%
1429:      $C$ &$internal cost $c & $reduced internal cost $\hat c
1430:      &\hfil$relative reduced cost $\tilde c&C'\cr \noalign{\hrule}
1431:      \noalign{\hrule}
1432: LLl &14\,027.752\,986\,494 & 14\,033.408\,158\,494 &0.003\,861\,076\ldots
1433: =\delta_1 &$RRr$\cr
1434: LLr &14\,039.059\,470\,993 & 14\,033.404\,298\,993 &0.000\,001\,575\ldots
1435: =\eps_2 &$RRl$\cr
1436: LRl &14\,075.894\,120\,134 & 14\,033.434\,292\,134 &0.029\,994\,716 &$LRr$\cr
1437: LRr &14\,087.200\,604\,634 & 14\,033.430\,432\,634 & 0.026\,135\,215&$LRl$\cr
1438: RLl &13\,979.654\,697\,176 & 14\,033.424\,869\,176 & 0.020\,571\,757&$RLr$\cr
1439: RLr &13\,990.965\,042\,750 & 14\,033.424\,870\,750 & 0.020\,573\,332&$RLl$\cr
1440: RRl &14\,027.749\,125\,419 & 14\,033.404\,297\,419 & 0.000\,000\,000=0 &$LLr$\cr
1441: RRr &14\,039.064\,100\,296 & 14\,033.408\,928\,296 & 0.004\,630\,878\ldots
1442: =\delta_2 &$LLl$\cr
1443: \noalign{\hrule}
1444: }
1445: }
1446:   \caption{Analysis of the pieces $C$ and $C'$. Since $C'$ is the
1447:     mirror image of $C$, it is represented in the same table}
1448:   \label{tab:pieces-C}
1449: \end{table}
1450: \fi
1451: 
1452: {\let\orignormalsize\normalsize
1453: \iffull
1454: \begin{figure}
1455: \else
1456: \begin{table}
1457: \fi
1458:  \centering
1459: \noindent
1460: \hbox to 0pt
1461: {\hss\includegraphics[scale=0.9]{figs/C-schematic}\hss}%
1462: \hbox to 0pt
1463: {\hss \vbox{
1464: \baselineskip=0,9156cm
1465: \halign{\orignormalsize#\hskip 25,5mm\hfil&$#$\hfil\hskip 26mm&\orignormalsize#\hfil\cr
1466: LLl  &0.003\,861\,076\ldots=\delta_1 &RRr\cr
1467: LLr  &0.000\,001\,575\ldots=\eps_2 &RRl\cr
1468: LRl  &0.029\,994\,716 &LRr\cr
1469: LRr  & 0.026\,135\,215&LRl\cr
1470: RLl  & 0.020\,571\,757&RLr\cr
1471: RLr  & 0.020\,573\,332&RLl\cr
1472: RRl  & 0.000\,000\,000=0 &LLr\cr
1473: RRr  & 0.004\,630\,878\ldots=\delta_2 &LLl\cr
1474: }\vskip 3,5mm}\hss}
1475:   \caption{All cases for the
1476: analysis of the pieces $C$ and $C'$.
1477: \ifjournal
1478: Since $C'$ is the
1479:     mirror image of $C$, it is represented in the same table.
1480: \fi}
1481: \iffull
1482:   \label{fig:pieces-C}
1483: \end{figure}
1484: \else
1485:   \label{tab:pieces-C}
1486: \end{table}
1487: \fi
1488: }
1489: 
1490: All tables were computed using fixed-precision interval arithmetic
1491: with 15 decimal digits after the decimal point (i.\,e., multiples of
1492: $10^{-15}$).
1493: The resulting intervals were rounded to 9 digits for displaying. It turned out that the intervals
1494: were small enough so that they could be rounded to unique 9-digit
1495: numbers.
1496: Thus, for example,
1497: $0.000\,051\,402$
1498:  denotes a number that is guaranteed to lie strictly
1499: between
1500: $0.000\,051\,401\,5$ and
1501: $0.000\,051\,402\,5$.
1502: 
1503: By inspecting Tables~\ref{tab:pieces-summary} and~\ref{tab:pieces-C},
1504: one can see that there is a penalty for having two triangles of
1505: different states.  If both terminal triangles of a piece with two
1506: terminal triangles, or the two large terminal triangles of $C$ or $C'$,
1507: are in a different state, we call this a \emph{breach}.
1508: A breach is so expensive that it will never occur in an optimal
1509: solution.
1510: We summarize this information for later use.
1511: \begin{proposition}\label{prop:equal-large}
1512:   In every piece, a breach has relative reduced cost at least
1513: $\delta_3 \eqdef 0.01$.
1514: If there is no breach, the
1515:  relative reduced cost is zero, except
1516: for $C$, and $C'$, and the resizing wire-pieces.
1517: For the resizing wire-pieces, the relative reduced cost is
1518: at most $\eps_1 < 0.000{\,}051$.
1519: %
1520: %  other than the resizing wire-pieces, $C$, and $C'$, having two 
1521: %   terminal
1522: %   triangles of different state \textup(L and R\textup) incurs an increase of the
1523: %   reduced cost of a least $\delta_3 \eqdef 0.02$, relative to any
1524: %   situation where they have the same state.
1525: %
1526: %   Similarly, if a resizing wire-piece has two terminals of different state
1527: %   (L or R), the relative reduced cost is at least $\delta_4 \eqdef
1528: %   0.014$.
1529: % If the two terminals have the same state, the relative reduced cost is at most $\eps_1 \approx 0.000{\,}051$.
1530: %
1531: %   Finally, consider the pieces $C$ and $C'$, where the small
1532: %   terminal triangle is kept in a fixed state \textup(l or r\textup).  Having the two
1533: %   large terminal triangles in different states \textup(L and R\textup) incurs a
1534: %   relative reduced cost of a least $\delta_3 = 0.02$.
1535: % % , relative to any situation where they have the same state.
1536: \qed
1537: \end{proposition}
1538: 
1539: It follows that long wires have a preference to be triangulated 
1540: uniformly:
1541: 
1542: \begin{lemma}[(The Wire Lemma)]\label{lemma:uniform-wire}
1543:   Let $T_1$, $T_2$ be two small terminal triangles connected by an
1544:   arbitrary sequence of wire-pieces, extended wire-pieces, 
1545:   and left and right bends. If $T_1$ and $T_2$ are in the 
1546:   same state, all the connecting pieces are in that state and the 
1547:   relative reduced cost is 0. If $T_1$ and $T_2$ are in different
1548:   states,
1549: % then there is exactly one state transition in the connecting
1550: % pieces and
1551:   the relative reduced cost is at least $\delta_3=0.01$.
1552:   \qed
1553: \end{lemma}
1554: 
1555: The states of $C$ and $C'$ without a breach are LLl, LLr, RRl, and
1556: RRr.  {From} Table~\ref{tab:pieces-C}, one sees that the preferred states are LLr,
1557: and RRl, where the small triangle has the opposite state from the
1558: large triangles.  We call these two states the \emph{consistent}
1559: states, and the states LLl and RRr \emph{inconsistent}.
1560: We define
1561: \begin{align*}
1562:  \eps_2 &\eqdef 
1563: \tilde c(C,\mathrm{LLr}) =
1564: \bar c(C,\mathrm{LLr}) - \bar c(C,\mathrm{RRl})
1565: =
1566:  c(C,\mathrm{LLr}) -  c(C,\mathrm{RRl}) - 2\dsmall
1567: \\\delta_1 &\eqdef 
1568: \tilde c(C,\mathrm{LLl}) =
1569: \bar c(C,\mathrm{LLl}) - \bar c(C,\mathrm{RRl})
1570: =
1571:  c(C,\mathrm{LLl}) -  c(C,\mathrm{RRl})
1572: \\\delta_2 &\eqdef 
1573: \tilde c(C,\mathrm{RRr}) =
1574: \bar c(C,\mathrm{RRr}) - \bar c(C,\mathrm{RRl})
1575: =
1576:  c(C,\mathrm{RRr}) -  c(C,\mathrm{RRl}) - 2\dsmall,
1577: \end{align*}
1578: where $c(C, \mathrm{LLr})$, $\bar c(C, \mathrm{LLr})$, etc.\ denote
1579: the % internal and reduced internal 
1580: cost of the $C$-connection in the
1581: respective configuration, see Table~\ref{tab:pieces-C}.
1582: % These have the values
1583: % \begin{equation}
1584: %   \label{eq:deltas}
1585: % \eps_2 < \text{0.000,002},\quad
1586: % \delta_1  \approx 0.003{\,}861,\quad
1587: % \text{and }\delta_2  \approx 0.004{\,}631.
1588: % \end{equation}
1589: \begin{proposition}\label{prop:C-consistent}
1590: In $C$ or $C'$,
1591: every consistent state has
1592:  relative reduced cost at most
1593: $\eps_2 < {0.000\,002}$.
1594: The two inconsistent states have cost
1595: $\delta_1  \approx 0.003{\,}861$ and
1596: $\delta_2  \approx 0.004{\,}631$.
1597: Thus, if there is no breach in $C$ or $C'$, the
1598:  relative reduced cost is at most
1599: $\delta_2$.
1600: \qed
1601: \end{proposition}
1602: 
1603: In general, we denote by $\eps_1$, $\eps_2$, ``small'' quantities that
1604: we would like to neglect, and which can be made arbitrarily small by
1605: refining the coordinates of the pieces or the digits of $\dsmall$ and
1606: $\dlarge$.  On the other hand, $\delta_1$, $\delta_2$, \ldots,
1607: denote ``large'' quantities whose difference will be made productive
1608: for the proof.
1609: 
1610: \section{Larger Gadgets}
1611: 
1612: We now describe how to assemble the elementary pieces from the last section
1613: to obtain larger gadgets which model the logical structure of a 
1614: PLANAR 1-IN-3-SAT formula. We need \emph{variables}, \emph{clauses}, and the
1615: connections between them. The main building block for the variables and
1616: clauses is the \emph{bit loop} (Section~\ref{sec:vloop}). Each bit
1617: loop stores a logical state (L or R). To ensure consistency between different 
1618: bit loops, we use \emph{$C$-$C'$-links} (Section~\ref{link}). By 
1619: connecting several bit loops, we build clauses 
1620: (Section~\ref{sec:clause-gadget}) and variables (Section~\ref{sec:var}).
1621: The optimal triangulation of a clause is obtained if and only if exactly one
1622: of its inputs is in state L (the 1-IN-3 property). A variable is
1623: modeled as a 
1624: chain of bit loops connected by $C$-$C'$-links so that all loops are in
1625: the same state. Variables can be connected to clauses using the
1626: wire-pieces from the last section.
1627: 
1628: \subsection{The Bit Loop}
1629: \label{sec:vloop}
1630: The \emph{bit loop} is used to represent a logical state (L or R).
1631: It if formed by connecting any selection of four connection 
1632: pieces ($C$, $C'$
1633: or $C_0$) into a loop, using four thick bends, as shown schematically
1634: in Figure~\ref{variable-loop}.
1635: 
1636: \begin{figure}
1637:   \centering
1638:   \includegraphics[scale=0.7]{figs/wireloop-gadget}
1639:   \caption{An instance of a bit loop with two $C$-connections and
1640:     one $C'$-connection. At the left $C$-connection, a right bend is
1641:     attached, as the beginning of a wire joining it to another
1642:     $C'$-connection. The drawing is to scale, but the shapes are
1643:     simplified,}
1644:   \label{variable-loop}
1645: \end{figure}
1646: 
1647: \begin{lemma} \label{variable-equal}
1648: In an optimal triangulation, the 8 large terminal triangles of a
1649: bit loop are in the same state \textup(L or R\textup).
1650: \end{lemma}
1651: \begin{proof}
1652:   The only interaction with other pieces is through the at most four
1653:   small ``exit'' triangles.
1654:   Let us keep the states of these triangles
1655:   fixed.  
1656:   If we set all 8 large terminal triangles to L or to R, the
1657:   maximum relative reduced cost is at most $4\cdot\delta_2 <
1658:   0.02=2\delta_3$, see
1659: Proposition~\ref{prop:C-consistent}. % Table~\ref{tab:pieces-C}.
1660: 
1661:   On the other hand, if the 8 large terminal
1662:   triangles are not all equal, there are at least two breaches.
1663: Hence, by Proposition~\ref{prop:equal-large},
1664:   the relative reduced cost is at least $2\delta_3$, and such a
1665:   triangulation cannot be optimal.
1666: \end{proof}
1667: 
1668: We can therefore simply refer to the \emph{state of the bit loop}
1669: as the common state of its large terminal triangles.  Generally, when
1670: it is clear that there is no breach, the state of a $C$, $C'$ or
1671: $C_0$-connection refers to the state of its large terminal triangles.
1672: 
1673: \subsection{The $C$-$C'$-Link}
1674: \label{link}
1675: 
1676: A $C$-connection can be joined to a $C'$-connection by an arbitrary
1677: sequence of wire-pieces,
1678: extended wire-pieces, and left and right bends
1679: (Lemma~\ref{lemma-connects}),
1680: see Figure~\ref{corridor-figure}.
1681: We call the two connections at the end together with their joining wire
1682: a \emph{$C$-$C'$-link}.
1683: 
1684: $C$-$C'$-links are used in two contexts:
1685: The most common case is when the $C$-connection of the $C$-$C'$-link
1686: belongs to a bit loop $V_1$ and the $C'$-connection belongs to
1687: another bit loop $V_2$. In the clause gadget 
1688: (Section~\ref{sec:clause-gadget}), we also have $C$-$C'$-links where
1689: the $C$-connection is connected to a thickening adapter and a thinning adapter,
1690: while the $C'$ connection is part of a bit loop.
1691: By Lemma~\ref{variable-equal} we know that in each of $V_1$ and $V_2$,
1692: the large triangles are in a uniform state (L or R), and in 
1693: Section~\ref{sec:clause-gadget} we will see that an analogous statement
1694: holds for the large terminal triangles of the thickening and the thinning
1695: adapter. We thus have to
1696: consider four cases for these states, as shown in
1697: Table~\ref{tab:C-connection}.  For each combination, we can work out
1698: the optimum state of the small terminal triangles by considering
1699: Table~\ref{tab:pieces-C}. (The first two and last two rows of
1700: Table~\ref{tab:pieces-C} are sufficient.)
1701: The optimal choice for the thin wire is shown in the third column.
1702: 
1703: \begin{table}[htb]
1704:   \centering
1705:   \begin{tabular}{|c|c|c|c|c|l|}
1706: \hline
1707:     $V_1$ & $V_2$ & wire
1708:  & state of $C$
1709:  & state of $C'$
1710: &optimum relative reduced cost\\
1711: \hline
1712: L & L & r & LLr & LLr & $\tilde c(C,\mathrm{LLr})+\tilde c(C',\mathrm{LLr})=\eps_2$
1713: \\
1714: L & R & l (or r) & LLl & RRl &
1715: $\tilde c(C,\mathrm{LLr})+\tilde c(C',\mathrm{RRr})=\eps_2+\delta_1$
1716: \\
1717: R & L & l (or r)& RRl & LLl &
1718: $\tilde c(C,\mathrm{RRr})+\tilde c(C',\mathrm{LLl})=\delta_2$
1719: \\
1720: R & R & l & RRl & RRl &
1721: $\tilde c(C,\mathrm{RRl})+\tilde c(C',\mathrm{RRl})=\eps_2$
1722: \\
1723: \hline
1724:   \end{tabular}
1725:   \caption{The best state of the wire for a $C$-$C'$-link.
1726: For each given combination of states (first two columns), the last
1727: column gives the resulting cost.}
1728:   \label{tab:C-connection}
1729: \end{table}
1730: 
1731: \begin{lemma}\label{lem:C-connection}
1732:   Each $C$-$C'$-link incurs a relative reduced cost of
1733: at least $\eps_2$.
1734: The cost reaches this minimum if and only if the large terminal
1735: triangles in the two pieces have the same state. Otherwise,
1736: the cost increases to $\delta_1+\eps_2$ or $\delta_2$, respectively,
1737: see Table~\ref{tab:C-connection}.
1738: \end{lemma}
1739: 
1740: \begin{proof}
1741:   We need only exclude the possibility that the two small terminal
1742:   triangles are in different states. By the Wire Lemma (Lemma~\ref{lemma:uniform-wire}),
1743:   this would cause a relative reduced cost of at least 
1744:   $\delta_3 = 0.01$, which is larger than any of the costs in 
1745:   Table~\ref{tab:C-connection}.
1746: \end{proof}
1747: We call the $C$-$C'$-link \emph{inconsistent} if the large triangles
1748: in the two connection pieces have different states.  An
1749: inconsistent $C$-$C'$-link incurs a relative reduced cost bigger than
1750: $\delta_1$.
1751: 
1752: 
1753: \subsection{The Clause Gadget}
1754: \label{sec:clause-gadget}
1755: 
1756: The \emph{clause} gadget is formed by 3 pairs of bit loops,
1757: $\alpha$ and $\hat \alpha$, $\beta$ and $\hat \beta$, $\gamma$ and~$\hat \gamma$, see Figure~\ref{fig:clause}.  The two loops of each
1758: pair are connected by a $C$-$C'$-link in which a thickening
1759: adapter, a $C$-connection piece labeled DOWN, and a thinning adapter is
1760: interspersed, and another similar $C$-$C'$-link with a
1761: $C_0$-connection piece in the middle.
1762: The $\alpha$-$\hat \alpha$ group has three \emph{external}
1763: connections:
1764: DOWN, UP, and ENTRY.
1765: 
1766: The DOWN $C$-connection piece of the pair $\alpha$-$\hat \alpha$ is
1767: connected to the UP $C'$ connection of $\hat\beta$, and so on in a
1768: circular way. Finally, each of $\alpha$, $\beta$, and $\gamma$, has a
1769: $C$-connection piece, labeled ENTRY, which will be connected to one of
1770: the ``input'' variables of the clause by a $C$-$C'$-link.
1771: 
1772: \begin{figure}[htb]
1773:   \centering
1774:   \includegraphics[scale=0.8]{figs/clause}
1775:   \caption{Schematic view of the clause gadget. The dashed parts of
1776:     the wires are long enough for sufficiently many copies of
1777: the wire-piece and the extended wire-piece to ensure that
1778: the wire can reach from the lowest $C$ connection to the left $C'$
1779: connection
1780: of $\hat\alpha$ (Lemma~\ref{long-distance}).}
1781:   \label{fig:clause}
1782: \end{figure}
1783: 
1784: \begin{lemma}
1785: \label{lem:clause-triangulation}
1786:   In an optimal triangulation,
1787: $\alpha$ and $\hat \alpha$ are in the same state \textup(L or R\textup),
1788: and the two large terminal triangles in the DOWN $C$-connection % at the bottom
1789: are in the opposite state. 
1790: %The total relative reduced cost of the pair $\alpha$-$\hat\alpha$, apart from the three
1791: %``external'' $C$ and $C'$ connections, is $2\eps_2+2\eps_1 < 0.0002$.
1792: 
1793: Analogous statements hold for $\beta,\hat \beta$ and $\gamma,\hat \gamma$.
1794: \end{lemma}
1795: \begin{proof}
1796:   By symmetry, it suffices to consider $\alpha$ and $\hat \alpha$.
1797:   The $\alpha$-$\hat \alpha$ group has three external triangles UP,
1798:   DOWN, and ENTRY which connect it to the outside world.
1799: 
1800:   There are two ``ground states'' with no internal breaches or
1801:   inconsistencies. In these states, $\alpha$ and $\hat\alpha$ (including UP
1802:   and ENTRY) have the same state and DOWN and the upper
1803:   $C_0$-connection piece in the middle are in the opposite state.
1804: 
1805: If we ignore the three external connections, the relative reduced cost
1806: of these two states is $2\eps_1 + 2\eps_2$: The contribution from the
1807: two $C$-$C'$-links is $2\eps_2$.  The contribution from the four
1808: resizing wire-pieces is $2\eps_1$ since we have two thickening and two
1809: thinning adapters: the ``penalty state'' for the thickening adapter
1810: (LL) is the optimal state for the thinning adapter, and vice versa.
1811: 
1812: Now, fix a setting for the three small external triangles.
1813: If we select the ground state which is consistent with the majority of
1814: the three exit triangles, we have at most one inconsistent exit
1815: connection, causing an additional penalty of at most $\delta_2+2\eps_2$
1816: (two consistent connections with at most $\eps_2$, and one
1817: inconsistent connection with at most $\delta_2$).
1818: 
1819: Thus, there is always a ground state solution with cost at most
1820: $\delta_2+2\eps_1 + 4\eps_2<0.005$.
1821: If $\alpha$ and $\hat \alpha$ are not in the same state,
1822: or if DOWN is in the same state as $\alpha$ and $\hat \alpha$,
1823:  there must be
1824: at least two inconsistencies (or even breaches) in the connections
1825: between 
1826:  $\alpha$, $\hat \alpha$, and DOWN,
1827: causing a cost 
1828:  of at least $2\delta_1  > 0.007$, which is bigger than for the ground
1829:  state solution.
1830: \end{proof}
1831: 
1832: Since DOWN is always in a different state from UP, ideally,
1833: to successive loops in the cyclic sequence $\alpha\beta\gamma$ should
1834: be in a different state. However, since there are three loops, there has
1835: to be at least one inconsistency, which provides us the asymmetry
1836: necessary for a 1-IN-3-clause.
1837: 
1838: Thus, we obtain:
1839: \begin{lemma}\label{lem:clause-cost}
1840:   The reduced cost of the clause gadget \textup(excluding the three
1841:   ENTRY $C$-connections\textup) achieves its minimum if and only if
1842:   exactly one of $\alpha$, $\beta$, and $\gamma$
1843: %  its three ENTRY $C$-connections
1844:   is in state $\mathrm{L}$. Any other triangulation incurs a cost that
1845:   is at least $\delta_4 \eqdef 0.0007$ larger.
1846: \end{lemma}
1847: 
1848: \begin{proof}
1849: By Lemma~\ref{lem:clause-triangulation},
1850: % in order to analyze the clause gadget,
1851: it suffices to analyze the 8 possible configurations
1852: of the pairs $\alpha$-$\hat \alpha$, $\beta$-$\hat \beta$, and
1853: $\gamma$-$\hat \gamma$ (ignoring the contribution of the ENTRY
1854: connections to the clause).
1855: 
1856: The ``internal'' contribution or each pair of $2\eps_2+2\eps_1$ from
1857: its resizing pieces and its two internal $C$-$C'$-links is constant,
1858: and thus we can ignore this amount when comparing the various
1859: possibilities.
1860: 
1861: Let us look at the $C$-$C'$-link between two successive pairs, say
1862:  $\alpha$-$\hat \alpha$ and $\beta$-$\hat \beta$.
1863: If they are equal, they cause an inconsistency, and the
1864: relative reduced cost is
1865: $\delta_2$ if $\alpha=\beta=\textrm{L}$
1866: and $\delta_1+\eps_2$ if $\alpha=\beta=\textrm{R}$,
1867: according to
1868:  Table~\ref{tab:C-connection}. %  Lemma~\ref{lem:C-connection}.
1869: If $\alpha$ and $\beta$ are in different states, the link is
1870: consistent, and the cost is $\eps_2$.
1871: 
1872: Since the situation is unchanged under cyclic shifts of
1873: the sequence $\alpha \beta \gamma$, it is enough to consider four
1874: cases:
1875: \begin{itemize}
1876:   \item $\alpha \beta \gamma = \text{LLL}$ %:
1877: % In this case all the
1878: %    $C$-$C'$-links between the pairs are inconsistent,
1879: %    and we incur a relative reduced cost of 
1880: %    $3 (\delta_2 + \eps_2) > 0.01$,
1881: %    according %to Lemma~\ref{lem:C-connection}.
1882: %
1883: %  to the third row of Table~\ref{tab:C-connection}.
1884: %  \item
1885: or
1886:  $\alpha \beta \gamma = \text{RRR}$:
1887: In these cases, we have three inconsistencies, and %This case is 
1888: %   similar to the previous case, but we incur a
1889: the relative reduced cost is bigger than
1890:     $3 \delta_1 > 0.01$.
1891: %    $3 (\delta_1 + \eps_2) > 0.01$, according to the second 
1892: %    row
1893: %    of Table~\ref{tab:C-connection}
1894:   \item % $\mathbf{\alpha = \beta = \text{L}, \gamma = \text{R}}$: 
1895:  $\alpha \beta \gamma = \text{LLR}$:
1896: %Only the
1897: %   $C$-$C'$-link between the pairs $\alpha$-$\hat \alpha$ and 
1898: %   $\beta$-$\hat \beta$ is violated, so 
1899: the relative reduced cost is $\delta_2 + 2\eps_2 > 0.0046$.
1900: %, according to the third row of Table~\ref{tab:C-connection}.
1901:  \item % $\mathbf{\alpha = \beta = \text{R}, \gamma = \text{L}}$: 
1902:  $\alpha \beta \gamma = \text{RRL}$:
1903: %This case is 
1904: %   similar to the previous case, but we incur a relative reduced cost of 
1905: %    $\delta_1 + 3 \cdot \eps_2  < 0.004$, according to the second 
1906: %    row of
1907: %    Table~\ref{tab:C-connection}.
1908: the relative reduced cost is $\delta_1 + 3  \eps_2  < 0.0039$.
1909: %\qedhere
1910: \end{itemize}
1911: %
1912: %If not exactly one of the three bit-loop pairs is in state $L$, the Lemma
1913: %holds by the above case analysis.
1914: % Otherwise, if at least one of the input
1915: % triangles to the clause gadget is inconsistent, we incur a relative reduced
1916: % cost of at least $\delta_1 > \delta_4$.
1917: \end{proof}
1918: 
1919: In the previous lemma, we have ignored the relative reduced cost of the ENTRY
1920: $C$-connections. They will be accounted for as part of the
1921: $C$-$C'$-links that they form with the variables, to be described next.
1922: 
1923: \begin{figure}[htb]
1924:   \centering
1925:   \includegraphics[scale=0.8]{figs/variable-gadget}
1926:   \caption{Schematic view of a variable gadget with three upper and three lower exits. The pattern can be repeated arbitrarily.}
1927:   \label{fig:variable}
1928: \end{figure}
1929: 
1930: \subsection{The Variable Gadget}
1931: \label{sec:var}
1932: 
1933: The gadget that represents a variable of the 1-IN-3 instance is formed by 
1934: chaining together sufficiently many
1935: bit loops and connecting them in a row using
1936: $C$-$C'$-links, as shown in Figure~\ref{fig:variable}.  The
1937: dotted arrows denote potential exit wires that establish
1938: $C$-$C'$-links with the corresponding clause gadgets
1939: of the previous section. %, see Section~\ref{sec:clause-gadget}.
1940: Unused exits can be replaced by
1941: $C_0$ connections.
1942: 
1943: \begin{lemma}\label{lem:variable-triangulation}
1944: Consider a variable chain $V$ together with the
1945:  $C$-$C'$-links that connect it to the clauses,
1946: including the ENTRY $C$-connections in the clauses.
1947: The reduced cost of this point set 
1948: achieves its minimum if and only if all the bit loops and the 
1949: $C$-connections in the clauses are in the same state. Any other 
1950: triangulation incurs a cost that is at least $\delta_1$ larger.
1951: \end{lemma}
1952: 
1953: \begin{proof}
1954: This follows directly from Lemmas~\ref{variable-equal}
1955: and~\ref{lem:C-connection}.
1956: % , and the fact that $\delta_1 < \delta_2$.
1957: \end{proof}
1958: 
1959: \section{The Reduction}
1960: \label{sec:reduction}
1961: 
1962: \begin{theorem}\label{reduction}
1963: Minimum-weight triangulation is strongly NP-hard.
1964: \end{theorem}
1965: 
1966: \begin{proof}
1967: A rectilinear embedding of the given PLANAR 1-IN-3-SAT formula can be
1968: constructed on a grid of size $O(n)\times O(n)$.
1969: The reduction procedure then simply replaces the edges, variables and clauses 
1970: of the PLANAR 1-IN-3-SAT formula by the appropriate gadgets, taking care to 
1971: leave enough space between the individual wires.
1972: 
1973: This procedure yields a point set $S$.
1974: % Next, the reduction procedure computes
1975: By construction, the boundaries of all the gadgets are part of
1976: the $\beta$-skeleton of $S$
1977: (Proposition~\ref{boundary}), and therefore they belong to the
1978: minimum-weight triangulation.
1979: The faces outside the wires are simple polygons and can be optimally triangulated using
1980: dynamic programming. For each gadget, we know the desired
1981: ``ideal triangulation''
1982: (Lemmas~\ref{lemma:uniform-wire} and \ref{variable-equal}--%
1983: %\ref{lem:C-connection}, \ref{lem:clause-cost}, and 
1984: \ref{lem:variable-triangulation}) and can calculate its weight. Adding
1985: up these weights and the weights of the faces outside the wires yields
1986: a target weight $w$.  By construction, the input instance is 1-IN-3
1987: satisfiable if and only if the minimum weight of a triangulation of
1988: $S$ is $w$.  Otherwise, the weight of the shortest triangulation is at
1989: least $w + 0.0007$ (Lemmas~\ref{lem:clause-cost}
1990: and~\ref{lem:variable-triangulation}).
1991: 
1992: The set $S$ %
1993: is a subset of an $O(n)\times O(n)$ grid, but it does not fill the
1994: whole area: it follows the linear structure of the edges of the
1995: rectilinear embedding.  Therefore, $S$ has $O(n)$ points.  Hence the
1996: triangulation has $O(n)$ edges of length $O(n)$. By calculating all
1997: edge lengths with an absolute error of $O(1/n^2)$, the reduction
1998: algorithm can thus calculate, in polynomial time, a threshold $\hat w$
1999: such that the input formula is satisfiable iff there is a
2000: triangulation of length at most $\hat w$.
2001: \end{proof}
2002: 
2003: \section{Conclusion}
2004: \label{sec:conclusion}
2005: 
2006: \subsection{Running Times for Computer Verification of the Proof}
2007: \label{sec:programs}
2008: In designing our gadgets and our proof, we have tried to achieve a
2009: balance between the number of different pieces, which affects the
2010: complexity of the human-readable part of the proof and the number of
2011: case distinctions, and the size of the pieces, which affects the
2012: complexity (running time) for the mechanical part of the proof that
2013: has to be checked by computer (or accepted by faith).
2014: 
2015: The running time is dominated by the $O(n^3)$ dynamic programming
2016: algorithm for triangulating simple polygons.  The largest point sets
2017: that we handle have 493 points (the left bends).
2018: %
2019: To total time to run all verifications (with exact integer
2020: interval arithmetic) was about 10 hours on a four-year-old moderate
2021: PC.
2022: 
2023: \subsection{Dimensions.}
2024: 
2025: % The gadgets we designed are fairly large and often consist of several
2026: % hundred points. However, all the gadgets are of constant size and the
2027: % coordinates are specified as multiples of $10^{-4}$. Hence, no
2028: % irrational numbers or numbers whose magnitude depends on the size of
2029: % the input to the reduction are needed.
2030: 
2031: Our gadgets have constant size, but they consist of several
2032: thousands of points and are quite enormous. For example, the clause
2033: gadget (see Figure~\ref{fig:clause}) has dimensions on the order of
2034: $250{\,}000\times 250{\,}000$, with coordinates that are specified as
2035: multiples of $10^{-4}$.  On the other hand, the difference between a
2036: satisfiable and an unsatisfiable SAT instance is reflected in a minute
2037: difference of $0.0007$ in the MWT cost.
2038: 
2039: With some work, it would be possible to reduce this to some more ``reasonable''
2040: figures or to amplify the difference between satisfiable and
2041: unsatisfiable instances, but we did not find it worth the effort to do
2042: so. First of all, the current gadgets are already a result of tedious
2043: experiments, pushing points into various directions and trying to
2044: understand what happens. Some parts of the design, in particular the
2045: $C$-connections, are very delicate.  Secondly, the dimensions would
2046: still be very large.  One can certainly reduce the constant $230\,000$
2047: of Lemma~\ref{long-distance} by providing a greater variety of
2048: extended wire-pieces, but the bit loop, for example,
2049: (Figure~\ref{variable-loop}) already has size approximately
2050: $7000\times 7000$, and it does not seem easy to push the size very
2051: much below these limits, unless one comes up with a completely
2052: different design.
2053: 
2054: \subsection{Open Problems}
2055: \label{sec:open}
2056: 
2057: Several interesting problems remain open.
2058: First of all, it is not known whether the MWT problem is in NP,
2059: since it is not known how to compare sums of Euclidean lengths in polynomial
2060: time %
2061:  \cite{Blomer91},
2062: but this difficulty is more of an algebraic nature.
2063: To define a variant of MWT which is in NP, one can
2064: take the weight of an edge $e$ as the rounded value
2065: $\lceil \Vert e \Vert_2 \rceil$.  % \cite{Johnson05}. 
2066: With appropriate scaling, our proof also establishes NP-completeness for
2067: this variant.
2068: 
2069: Our reduction shows that it is NP-hard to approximate the MWT with a
2070: relative approximation error which is better than $O(1/n^2)$: The
2071: difference between a satisfiable instance of PLANAR 1-IN-3-SAT and an
2072: unsatisfiable instance is reflected in a constant increase of the MWT
2073: cost, and, as mentioned in the proof of~Theorem~\ref{reduction}, the
2074: total cost of the MWT is $O(n^2)$.
2075: 
2076: One can probably reduce this bound to $O(n\log n)$, and thus establish
2077: that it is NP-hard to achieve a relative approximation error better than
2078: $O(1/(n\log n))$, by using the fact that the interior of a {convex}
2079: $k$-gon of perimeter $p$ can be triangulated with weight $O(p\log k)$.
2080: First, the wires and all gadgets form linear structures of total
2081: length $O(n)$; thus, the length of the gadget boundaries, and the MWT
2082: inside the gadgets is only $O(n)$.  This leaves the holes to be
2083: triangulated.  It should be quite straightforward to extend our
2084: construction in such a way that, apart from $O(n)$ constant-size
2085: holes, only $O(n)$ convex holes with a total of $O(n)$ vertices
2086: remain: one would insert paths of additional points whose
2087: $\beta$-skeleton separates the big holes from the jagged wire
2088: boundaries and cuts the holes into convex pieces, apart from
2089: ``linear'' structures that cover only $O(n)$ area.
2090: 
2091: These non-approximability results do not rule out the existence of a %PTAS.
2092: polynomial-time approximation scheme.
2093:  For a long time,
2094: attempts to extend techniques from geometric approximation algorithms to the
2095: MWT problem have only led to constant factor approximations
2096: (see \cite{BernEp96} for a survey).
2097: \citeN{RemySt06} showed that it is possible to compute a 
2098: $(1+\varepsilon)$-approximation of the MWT in time $n^{O(\log^8 n)}$,
2099: providing strong evidence that a PTAS might exist. 
2100: 
2101: In practice, the LMT-skeleton heuristic is extremely fast in computing
2102: LMTs. Combined with with bucketing techniques and fast preprocessing
2103: techniques~\cite{DrysdaleRoAi95}, one empirically achieves almost
2104: linear running times. Thus, in this respect the MWT problem seems to
2105: be similar to the Knapsack Problem, which is also NP-hard but easy to
2106: solve in practice \cite{kpp-kp-07}.  It would be interesting to
2107: analyze the LMT-skeleton heuristic for random point sets.  The good
2108: practical performance indicates that the expected running time
2109: for random inputs might be polynomial, or even close to linear. On the
2110: other hand, as point sets get huge, they will contain, with
2111: non-negligible probability, some larger and larger point
2112: configurations that are hard to triangulate.
2113: 
2114: \begin{acks}
2115: The authors would like to thank Eric Demaine for pointing out that
2116: the negations in our original paper are not necessary.
2117: 
2118: The gadgets in this paper were designed using Otfried Cheong's
2119: extensible drawing editor \textsc{ipe} \cite{Schwarzkopf95} as a graphical
2120: user interface. We also used the xml-format of \textsc{ipe} to
2121: generate many of the illustrations of this paper directly
2122: from computer output.
2123: 
2124: We also thank an anonymous reviewer for extensive remarks that helped to
2125: improve the presentation of the paper.
2126: 
2127: \end{acks}
2128: 
2129: \bibliographystyle{acmtrans}
2130: \bibliography{mwt}
2131: 
2132: \ifjournal
2133: \begin{received}
2134: Received Month Year; revised Month Year; accepted Month Year
2135: \end{received}
2136: \fi
2137: 
2138: \iffull
2139: \appendix
2140: 
2141: \section{The Data for all Pieces}
2142: \label{appendix-pieces}
2143: 
2144: \begin{table}[htb]
2145:   \centering
2146: {  %\input %python/results/MWT-tables
2147: \input MWT-tables
2148: }
2149:   \caption{Analysis of the pieces}
2150:   \label{tab:pieces}
2151: \end{table}
2152: 
2153: Table~\ref{tab:pieces} shows, for all pieces, the internal cost,
2154: the reduced cost, % $\bar c$,
2155:  and the relative reduced cost, % $\tilde c$,
2156: for all configurations of boundary triangles.
2157: Figures~\ref{fig:TABLE-C0}--\ref{fig:TABLE-thick-left-bend},
2158: as well as Figure~\ref{fig:TABLE-wire}, %--\ref{fig:TABLE-wire-extended},
2159: show for each configuration an optimal triangulation.
2160: The two resizing wire-pieces are symmetric, and thus only one of them,
2161: the thickening adapter, is given. When applying the results to the
2162: thinning adapter, the labels must be flipped: LL becomes RR and RR
2163: becomes LL.
2164: The raw costs for the thick left bend are the same as for the 
2165: left bend, scaled by~4.3. But since the large terminal triangles use a
2166: different value of $\delta$, the reduced costs bear no direct relation
2167: to those of the left bend.
2168: The last column is what is summarized in Table~\ref{tab:pieces-summary}.
2169: 
2170: We extended our \textsc{Python} programs to output their results in the form of
2171: tables (in \TeX\ format) and figures.  As the output format for the
2172: figures, we used the xml-format of the \textsc{Ipe} program\footnote
2173: {\url{http://tclab.kaist.ac.kr/ipe/}} \cite{Schwarzkopf95}, which can be
2174: directly converted to eps or pdf format or further edited.  Many
2175: illustrations of this paper were obtained in this way.  In particular,
2176: the table and all figures of this section, as well as
2177: Figures~\ref{fig:TABLE-wire} %--\ref{fig:TABLE-wire-extended}
2178: and Table~\ref{W-lemma}, were generated directly from our %\textsc{Python}
2179: programs without manual intervention.
2180: 
2181: \begin{figure}[htbp]
2182:   \centering
2183: \includegraphics[width=\textwidth]{figs/TABLE-C0}
2184:   \caption{Optimal solutions for all cases for the $C_0$ connection}
2185:   \label{fig:TABLE-C0}
2186: \end{figure}
2187: 
2188: \begin{figure}[htbp]
2189:   \centering
2190: \includegraphics[width=\textwidth]{figs/TABLE-C}
2191:   \caption{Optimal solutions for all cases for the $C$ connection}
2192:   \label{fig:TABLE-C}
2193: \end{figure}
2194: 
2195: \begin{figure}[htbp]
2196:   \centering
2197: \includegraphics[width=\textwidth]{figs/TABLE-resize}
2198:   \caption{Optimal solutions for all cases for the thickening adapter}
2199:   \label{fig:TABLE-resize}
2200: \end{figure}
2201: 
2202: \begin{figure}[htbp]
2203:   \centering
2204: \includegraphics[width=\textwidth]{figs/TABLE-left-bend}
2205:   \caption{Optimal solutions for all cases for the left bend}
2206:   \label{fig:TABLE-left-bend}
2207: \end{figure}
2208: 
2209: \begin{figure}[htbp]
2210:   \centering
2211: \includegraphics[width=\textwidth]{figs/TABLE-right-bend}
2212:   \caption{Optimal solutions for all cases for the right bend}
2213:   \label{fig:TABLE-right-bend}
2214: \end{figure}
2215: 
2216: \begin{figure}[htbp]
2217:   \centering
2218: \includegraphics[width=\textwidth]{figs/TABLE-thick-left-bend}
2219:   \caption{Optimal solutions for all cases for the thick left bend}
2220:   \label{fig:TABLE-thick-left-bend}
2221: \end{figure}
2222: 
2223: 
2224: \section{Computer Programs}
2225: \label{app:programs}
2226: 
2227: We have written programs that check all of the claimed properties.
2228: (Propositions~\ref{basic-properties}--\ref{boundary}).
2229: % Tables XXX and Figures YYY were generated by these programs.
2230: If any condition fails, the programs raise an exception.
2231: To give an idea of what was automatically checked, we
2232: show an excerpt of the log-file, concerning the
2233: extended wire-piece (Figures~\ref{definition-wire-extended}
2234: and~\ref{fig:TABLE-wire}).
2235: {\small
2236: \begin{verbatim}
2237: ======================== extended wire-piece ====================
2238: All coordinates are multiples of 0.0001
2239: terminal triangle basepoint: (-41.100,0)
2240:      edge vector in state L: (-2.700,11.2)
2241:      edge vector in state R: (2.700,11.2)
2242: terminal triangle basepoint: (41.110,0)
2243:      edge vector in state L: (-2.700,11.2)
2244:      edge vector in state R: (2.700,11.2)
2245: All terminal coordinates are multiples of 0.01
2246: 0 duplicate point(s).
2247: The point set is symmetric with respect to the vertical axis x=0.005.
2248: cos(alpha)^2 = 3120343/10000000 = 0.312034; beta = 1.205637.
2249: case LL: 44 points. 455.471523435 455.471523435
2250: case LR: 45 points. 466.990265006 455.679921006
2251: case RL: 43 points. 444.283180745 455.593524745
2252: case RR: 44 points. 455.471523435 455.471523435
2253: \end{verbatim}
2254: }
2255: The complete \textsc{Python} source code, as well as the data for the pieces, are available
2256: on the Internet.%
2257: \footnote{%
2258:   \url{http://www.inf.fu-berlin.de/inst/ag-ti/people/rote/Software/MWT/python/}}
2259: In total, there are about 1000 lines of code.
2260: %
2261: The programs are mostly rather straightforward, so we only show
2262: four modules:
2263: %
2264: The module \verb|mwt_polygon.py| contains the dynamic programming
2265: algorithm for computing the MWT of a simple polygon
2266:  (Section~\ref{app:dynprog}).
2267: %
2268: It relies on
2269: the module \verb|arithmetic.py| for the representation of
2270: fixed-precision decimal quantities as (long) integers, for
2271: (rudimentary) interval arithmetic with integers, and for calculating
2272: the Euclidean length as an interval (Section~\ref{app:arithmetic}).
2273: %
2274: The module \verb|check_beta.py| determines the smallest value $\beta$ for which the given boundary edges belong to the $\beta$-skeleton (Section~\ref{app:beta-skeleton}).
2275: %
2276: The module \verb|check_W.py| 
2277: checks all cases for the point set $W$ for proving
2278: Lemma~\ref{lemma-two-edges} (Section~\ref{app:two-edges}).
2279: 
2280: 
2281: \subsection{Arithmetic}
2282: \label{app:arithmetic}
2283: 
2284: Since the dynamic programming algorithm involves only additions and
2285: comparisons, interval arithmetic is not a big deal.  We use
2286: fixed-point arithmetic, which is simulated by integer
2287: arithmetic. Hence all calculations are exact, and we need not care
2288: about directed rounding when doing arithmetic with intervals.
2289: 
2290: The only non-trivial part is the calculation of Euclidean distances
2291: by the \texttt{length} function,
2292: which involves a square root.  We use the \texttt{decimal} package of
2293: \textsc{Python}, which provides an arbitrary-precision square root
2294: operation, to obtain a starting approximation of the square root.  The
2295: approximation is then checked and refined directly, in a
2296: straightforward way.
2297: 
2298: {\small
2299: \verbatiminput{python/arithmetic.py}
2300: }
2301: \subsection{Dynamic Programming for Triangulating a Polygon}
2302: \label{app:dynprog}
2303: 
2304: The procedure \texttt{mwt} of the module \verb|mwt_polygon.py|
2305: implements the classical $O(n^3)$ dynamic programming algorithm for
2306: optimally triangulating a simple polygon $p$ \cite{Gilbert79,Klincsek80}. It
2307: has an optional argument \texttt{excluded} for specifying edges that
2308: cannot be used in the triangulation.  The input polygon $p$ is assumed
2309: to have integer coordinates.  Euclidean edge lengths are calculated as
2310: integer intervals using \texttt{arithmetic.length()}.
2311: 
2312: In contrast to \citeN{Klincsek80}, our
2313:  procedure does not explicitly test the edges for crossings; it
2314: only tests whether all triangles that are used in the triangulation are
2315: oriented counterclockwise. If the input is a simple polygon, this is
2316: sufficient to ensure that the resulting triangulation is non-crossing,
2317: see Lemma~\ref{triangulate-simple-polygon} below.
2318: (Hence, the program will also triangulate certain non-simple
2319: polygons, but it will not triangulate polygons which are oriented
2320: clockwise!)
2321: 
2322: To show that the our constructions do not depend on assumptions about
2323: handling point sets which are not in general position, triangles with
2324: three points on a line are (temporarily) considered as valid triangles
2325: of a triangulation, but these triangles, as well as any (partial)
2326: triangulations that contain such triangles, are flagged as degenerate.
2327: If such a triangulation would ``survive'' as a candidate for an optimal solution, the checking routines would report an error
2328: (see for example the procedure \verb|check_W_cases()| in
2329: Section~\ref{app:two-edges}).
2330: Triangles with coinciding vertices are not considered.
2331: 
2332: \begin{lemma}\label{triangulate-simple-polygon}
2333:   Let $T$ be a set of triplets $(i,j,k)$ with $1\le i<j<k\le n$ such
2334:   that for a convex polygon $P=p_1\ldots p_n$, the triangles
2335:   $p_ip_jp_k$ for $(i,j,k)\in T$
2336:   form a triangulation of $P$.
2337: 
2338:   Let $P$ be an arbitrary simple polygon.  If all triangles
2339:   $p_ip_jp_k$ for $(i,j,k)\in T$ are oriented counter-clockwise, they
2340:   form a triangulation of~$P$.
2341: \end{lemma}
2342: \begin{proof}
2343:   This can be seen by counting the number of triangles in which a
2344:   given point $x$ of the plane is contained. This number can only
2345:   change when $x$ crosses an edge of a triangle. However, all triangle
2346:   edges have another triangle on the opposite side, with the exception
2347:   of the triangle edges that are edges of $P$.  Thus, the number of
2348:   triangles in which a point of the plane is contained is constant
2349:   except at the boundary of~$P$, where it changes by $\pm1$. Since
2350:   this number is 0 when the point $x$ is far away, every point $x$ in
2351:   the interior of $P$ is covered by exactly one triangle, and no
2352:   triangle sticks out of~$P$.
2353: \end{proof}
2354: {\small
2355: \verbatiminput{python/mwt_polygon.py}
2356: }
2357: % \subsection{Computing Optimal Triangulations for all Cases}
2358: % \label{app:all-cases}
2359: % {\small
2360: % \verbatiminput{python/solve_all_patterns.py}
2361: % }
2362: % \texttt{piece["partlist"]}: sequence of (names of) boundary parts.
2363: %    the default is ("lower","upper"); 
2364: % only $C$ has three parts.
2365: %  (``lower'', ``upper'', and ``right''); 
2366: %    When the parts are chained together in this order
2367: %    they form the counterclockwise boundary of the piece.
2368: 
2369: % "lower","upper" (and possibly "right"): the actual boundary parts,
2370: %    as lists of points. Each point is a pair of "Decimal" numbers.
2371: 
2372: % "delta": sequence of delta values associated to the (two or three)
2373: %    terminal triangles of the piece ($\dsmall$ or $\dlarge$),
2374: 
2375: \subsection{Checking the $\beta$-skeleton}
2376: \label{app:beta-skeleton}
2377: This procedure is straightforward: for every edge $pq$ of the
2378: boundary, it runs through all remaining points $r$ and checks whether
2379: they violate the $\beta$-skeleton condition, by calculating the
2380: (squared) cosine of the angle $\alpha=prq$ with the cosine law.  The
2381: running time is $O(n)$ per edge of the boundary, thus at most $O(n^2)$
2382: in total. The relation between the angle $\alpha$ and the
2383: ratio $\beta$ between the diameter of the circumcircle of $pqr$ and the
2384: distance $|pq|$ is given by
2385: $$
2386: \sin\alpha = 1/\beta
2387: \text{, \ or \ }
2388: \cos^2\alpha = 1-1/\beta^2
2389: $$
2390: 
2391: To understand this program, one has to know how the pieces are
2392: given. Each \texttt{piece} is represented as a dictionary.
2393: The field
2394: \texttt{piece["partlist"]} is a sequence of (names of) boundary parts,
2395: usually just \texttt{("lower", "upper")};
2396:  only the $C$-connection has three parts.
2397: %(\texttt{"lower"}, \texttt{"upper"}, and \texttt{"right"}).
2398: %    When the parts are chained together in this order
2399: %    they form the counterclockwise boundary of the piece.
2400:  Then \texttt{piece["lower"]} and \texttt{piece["upper"]} (or whatever
2401:  the names in the \texttt{"partlist"} are) are the actual boundary
2402:  parts, as lists of points. Each point is a pair of precise
2403:  \texttt{Decimal} numbers as provided by the \texttt{decimal} package.
2404: 
2405: {\small
2406: \verbatiminput{python/check_beta.py}
2407: }
2408: \subsection{Proving Lemma~\ref{lemma-two-edges}}
2409: \label{app:two-edges}
2410: This program runs through all 21 subpolygons of the polygon $W$ in the proof
2411: of Lemma~\ref{lemma-two-edges}. For illustration, we give here
2412: the output produced for the first case:
2413: {\small
2414: \begin{verbatim}
2415: Case v1, v1': difference =
2416: 4.00304
2417:           Best solution value without terminal edges:
2418:               [202.72577,202.72594]
2419:           There is/are 2 best solution(s) without restriction:
2420:               [198.72255,198.72273]
2421:               [198.72255,198.72273]
2422: \end{verbatim}
2423: }
2424: There is an extended version (not shown here) which also generates a
2425: drawing of the triangulations, and which has been used to generate
2426: Table~\ref{W-lemma}.  The module \verb|solve_all_patterns.py|,
2427:  by which the data of
2428: Appendix~\ref{appendix-pieces} were generated, is similar.
2429: 
2430: {\small
2431: \verbatiminput{python/check_W.py}
2432: }
2433: 
2434: % \subsection{Basic Support Routines}
2435: % \label{app:support}
2436: % module \verb|basic_routines|
2437: % {\small
2438: % \verbatiminput{python/basic_routines.py}
2439: % }
2440: 
2441: % \ifjournal\else
2442: \vbox{\hbox to 0pt{\hss \vbox to 0pt{\vss
2443: \endreceived
2444: \hrule height 0pt
2445: }}}
2446: \newcommand\touch[1]{{\setbox0=\vbox{\verbatiminput{python/#1}}}}
2447: \def\touch#1 {{\setbox0=\vbox{\hsize=50cm\verbatiminput{python/#1}}}}
2448: \touch arithmetic.py
2449: \touch basic_routines.py
2450: \touch check_W.py
2451: \touch check_W_with_figures.py
2452: \touch check_beta.py
2453: \touch checking_routines.py
2454: \touch mwt_polygon.py
2455: \touch output_routines.py
2456: \touch pieces.py
2457: \touch pieces_data.py
2458: \touch run_all_pieces.py
2459: \touch solve_all_patterns.py
2460: \touch makeeps-files
2461: \touch makepdf-files
2462: \touch results/logfile
2463: \touch results/W-logfile
2464: \touch results/all_pieces_coordinates.txt
2465: \touch README.txt
2466: \fi
2467: \end{document}
2468: