Discrete Comput Geom (2008) 40: 595–621
DOI 10.1007/s00454-008-9114-6

Minimizing the Stabbing Number of Matchings, Trees,
and Triangulations
Sándor P. Fekete · Marco E. Lübbecke ·Henk Meijer

Received: 7 September 2005 / Revised: 20 August 2008 / Accepted: 5 September 2008 /Published online: 15 October 2008
© Springer Science+Business Media, LLC 2008

Abstract The (axis-parallel) stabbing number of a given set of line segments is the
maximum number of segments that can be intersected by any one (axis-parallel) line.
This paper deals with finding perfect matchings, spanning trees, or triangulations ofminimum stabbing number for a given set of vertices. The complexity of finding aspanning tree of minimum stabbing number is one of the original 30 questions on“The Open Problems Project” list of outstanding problems in computational geometry by Demaine, Mitchell, and O’Rourke.
We show N P-hardness of stabbing problems by means of a general proof technique. For matchings, this also implies a nontrivial lower bound on the approximability. On the positive side, we propose a cut-based integer programming formulation
for minimizing the stabbing number of matchings and spanning trees. From the corresponding linear programming relaxation we obtain polynomial-time lower bounds
and show that there always is an optimal fractional solution that contains an edge ofAn extended abstract appeared in the Proceedings of the 15th ACM-SIAM Symposium on Discrete
Algorithms [11].
M.E. Lübbecke visits to Kingston and Stony Brook were supported by a DFG travel grant.
H. Meijer partially supported by NSERC while visiting Braunschweig in 2002.
S.P. Fekete ()Algorithms Group, Department of Computer Science, Braunschweig University of Technology,
Mühlenpfordtstr. 23, 38106 Braunschweig, Germany
e-mail: s.fekete@tu-bs.de
M.E. Lübbecke
Institut für Mathematik, Sekr. MA 5-1, Technische Universität Berlin, Straße des 17. Juni 136,
10623 Berlin, Germany
e-mail: m.luebbecke@math.tu-berlin.de
H. Meijer
Department of Science, Roosevelt Academy, Middelburg (ZL), The Netherlands
e-mail: h.meijer@roac.nl

596

Discrete Comput Geom (2008) 40: 595–621

at least constant weight. We conjecture that the resulting iterated rounding scheme
constitutes a constant-factor approximation algorithm.
Keywords Stabbing number · Matching · Spanning tree · Triangulation ·Complexity · Linear programming relaxation · Iterated rounding
1 Introduction
1.1 Objective Functions
Many problems in combinatorial optimization, algorithmic graph theory, or computational geometry deal with minimizing the length of a desired structure: given a set ofvertices, find a set of line segments of small total length such that a certain structural
condition is maintained. Among the most popular structures, there are spanning trees,
perfect matchings, or (in a planar geometric setting) triangulations of minimum total
length. Other geometric problems give rise to other objective functions: for example,
one can ask for the total turn cost between adjacent line segments; e.g., see [3].
When dealing with structural or algorithmic properties, another possible objectivefunction is the stabbing number: for a given set of line segments, this is the maximum
number of segments that are encountered (in their interior or at an endpoint) by any
line. If we consider only axis-parallel lines, we get the axis-parallel stabbing number.
A closely related measure defined by Matoušek [20] is the crossing number, whichis the number of connected components of the intersection of a line with the union ofline segments.1 If there are no connected components of collinear segments (whichis the case for matchings), the crossing number coincides with the stabbing number.
When considering structures like triangulations, the crossing number is precisely one
more than the maximum number of triangles intersected by any one line.
Stabbing problems have been considered for several years. The complexity ofmany algorithms in computational geometry is directly dependent on the complexityof ray shooting; as described by Agarwal [1], the latter can be improved by making
use of spanning trees of low stabbing number. We will sketch some related results
further down. Most previous work on stabbing and crossing problems has focused on
extremal properties, and little has been known about the computational complexity ofactually finding structures of low stabbing number, or possible approximation algorithms. In fact, settling the complexity of Minimum Stabbing Number for spanning
trees has been one of the original 30 outstanding open problems of computational
geometry on the list by Mitchell and O’Rourke [21]. (An up-to-date list is maintained
online by Demaine, Mitchell, and O’Rourke [8].)1.2 Our Contributions
We describe a general proof technique that shows N P-hardness of minimizing thestabbing number of perfect matchings, triangulations, and spanning trees. For the
1 This should not be confused with the crossing number in graph drawing, which is the total number ofcrossing line segments.

Discrete Comput Geom (2008) 40: 595–621

597

case of matchings, we show that it is also hard to approximate the minimum stabbing
number within a factor below 6/5.
On the other hand, we present a mathematical programming framework for actually finding structures with small stabbing number. Our approach characterizes solutions to stabbing problems as integer programs (IPs) with an exponential numberof cut constraints. We describe how the corresponding linear programming (LP) relaxations can be solved in polynomial time, providing empirically excellent lower
bounds. Furthermore, we show that there always is an optimal fractional matching(or spanning tree) that contains an edge of weight above a lower bound of 1/3 (or 1/5
for spanning trees), allowing an iterated rounding scheme similar to the one developed by Jain for the generalized Steiner network problem [17]: compute a heuristic
solution by solving a polynomial number of LPs. We conjecture that the objectivefunction value of this heuristic solution is within a constant factor of the optimum.
Our mathematical programming approach is also practically useful: as described indetail in our experimental study [12], we can optimally solve stabbing problems for
instances (taken from well-known benchmark sets of other geometric optimization
problems) of vertex sets up to several hundred vertices.
Our results in detail:• We prove that deciding whether a vertex set has a perfect matching of axis-parallel
stabbing number 5 is an N P-complete problem; we also extend this result to general stabbing number.
• We prove that finding a triangulation of minimum axis-parallel stabbing number isan N P-hard problem; we also extend this result to general stabbing number.
• We prove that finding a spanning tree of minimum axis-parallel stabbing number isan N P-hard problem; we extend this result to general stabbing number and sketch
N P-hardness proofs for minimum axis-parallel or general crossing number.
• We give an IP-based formulation for stabbing problems; the corresponding fractional LP solutions can be computed in polynomial time, providing a family of
lower bounds.
• We give results on the structure of fractional vertices of the resulting LP relaxation:
for matching, we show that there always is an edge with weight at least 1/5, while
for spanning trees, there always is an edge with weight greater than 1/3. This
gives way to a heuristic algorithm based on iterated rounding; we conjecture thatthe resulting solution values are within a constant factor of the optimum.
The vertex sets constructed in our hardness proofs make critical use of thecollinearity of vertices. On the other hand, our positive (LP-based) results do notmake any assumptions on the structure of the vertex set: they can be used for vertex sets in degenerate and in general position, and can be applied to any family of
stabbing lines that can be evaluated by considering a subset of polynomially many
representatives.
We have also performed a computational study on a diverse set of instances; theresults show that our LP-based approach is good not only in theory (where we get apolynomial running time based on the ellipsoid method) but also for actually solving
instances in practice (where we use the simplex method). Details are omitted fromthis theoretical paper; a report on the practical results can be found in [12].

598Discrete Comput Geom (2008) 40: 595–621

1.3 Related Work
Existing work dealing with structures of low stabbing number can be divided intoalgorithmic applications and implications on one hand and extremal properties on theother hand.
Agarwal [1] describes improved algorithmic solutions for problems such as ray
shooting and implicit point locations queries (which by themselves have applicationsin polygon containment, implicit hidden surface removal, polygon placement, etc.);
his main tool are spanning trees with low stabbing number. One of the theoretically
best performing data structures for ray tracing in two dimensions is based on a triangulation of the polygonal scene; see Hershberger and Suri [16]: in their “pedestrian”
approach to ray shooting, the complexity of a query is simply the number of triangles visited, i.e., corresponds precisely to the stabbing number. Held, Klosowski, andMitchell [15] investigate collision detection in a virtual reality environment, again
based on “pedestrian” ray shooting. More recently, Aronov et al. [5] have performed
an experimental study of the complexity of ray tracing algorithms and run-time predictors, which include average number of intersection points for a transversal line,
and depth complexity.
Extremal properties of crossing numbers were considered by Welzl [26] and by
Matoušek [20], who showed√ that any planar set of n vertices has a spanning tree witha crossing
numberofO(n) and provided examples requiring a crossing number√of Ω( n). Another variant is studied by de Berg and van Kreveld [7]: the stabbing
number of a decomposition of a rectilinear polygon P into rectangles is the maximum number of rectangles intersected by any axis-parallel segment that lies completely inside of P ; they prove that any simple rectilinear polygon with n vertices
admits a decomposition with stabbing number O(log n) and give an example of a simple rectilinear polygon for which any decomposition has stabbing number Ω(log n).
They generalize their results to rectilinear polygons with rectilinear holes. Agarwal,
Aronov, and Suri [2] investigate extremal properties of the stabbing number of triangulations in three dimensions, where the stabbed objects are simplices; see also
Aronov and Fortune [4] for this problem. Shewchuk [24] shows that in d dimensions,a line can stab the interiors of Θ(nd/2 ) Delaunay d-simplices. This implies, in particular, that a Delaunay triangulation in the plane may have linear stabbing number.
More recently, Tóth [25] showed that for any subdivision of d-dimensional Euclidean
space, d ≥ 2, by n axis-aligned boxes, there is an axis-parallel line that stabs at least
Ω(log1/(d−1) n) boxes, which is the best possible lower bound. Generalizations of
the stabbing objects have also been considered: most notably, Chazelle and Welzl [6]describe extremal properties of stabbing spanning trees in d-dimensional space byhyperplanes; the analogous problem and a corresponding result for matchings is also
discussed in [6].
1.4 This Paper
The rest of this paper is organized as follows. After some basic definitions and notation in Sect. 2, we give details of our various hardness proofs in Sect. 3. In Sect. 4, we
describe our LP-based approach for constructing bounds. Section 5 presents an iterated rounding technique for matching and spanning tree problems; we believe that theDiscrete Comput Geom (2008) 40: 595–621

599

resulting algorithms yield constant-factor approximations. Final concluding thoughts
and miscellaneous results and problems are presented in Sect. 6.

2 Preliminaries
Given a set L of line segments in the plane, the stabbing number of a line  is thenumber of segments of L that are intersected by . The stabbing number of L is the
maximum stabbing number over all lines ; the axis-parallel stabbing number of L
is the maximum stabbing number over all axis-parallel lines . In this paper, the set
L will arise as the edges of a perfect matching, spanning tree, or triangulation of agiven set P of n vertices in the plane, and our objective is to find such a structure ofminimum stabbing number. Any reference to matching always means perfect matching. Therefore, when dealing with matchings, we assume that n is even, if necessary
by omitting one of the vertices.
We denote by St-Mat(P ) the minimum stabbing number among all matchingsof P , by St-Tre(P ) the minimum stabbing number of all spanning trees of P ,and by St-Δ(P ) the minimum stabbing number of all triangulations of P . We use
St-Mat2 (P ), St-Tre2 (P ), and St-Δ2 (P ) for the minimum axis-parallel stabbing numbers.
For a set L = {l1 , . . . , ln } of line segments in theplane, the crossing number of aline  is the number of connected components of ni=1 li ∩ . The crossing numberof L is the maximum crossing number over all lines ; just like for the stabbing number, the axis-parallel crossing number is defined for axis-parallel lines. For matchings,
trees, and triangulations, we use the analogous abbreviations Cr-Mat(P ), Cr-Tre(P ),and Cr-Δ(P ), and their subscripted counterparts Cr-Mat2 (P ), Cr-Tre2 (P ), and
Cr-Δ2 (P ) for the axis-parallel crossing numbers. Note that stabbing and crossing
number coincide for planar matchings.

3 Complexity
In this section, we prove N P-hardness of computing the minimum stabbing numberof matchings and computing the minimum crossing number of triangulations; forspanning trees, the proofs are analogous, and we only give a sketch of the proof. Our
technique is rather general and should be applicable to other structures and variants
as well.
3.1 Perfect Matchings
Theorem 1 Deciding whether St-Mat2 (P ) ≤ 5 is strongly N P-complete.
Proof Clearly, the problem is in N P. We show the completeness using a reduction from 3SAT [13]. Assume that we have a Boolean expression denoted by
B(x0 , x1 , . . . , xn−1 ) with n variables and k clauses of three literals each. We construct a set of vertices P that has a perfect matching M of stabbing number 5 if and600

Discrete Comput Geom (2008) 40: 595–621

Fig. 1 Overall layout of the construction for St-Mat2 (P ). Shown is the layout for the 3SAT instance(x0 ∨ x1 ∨ x3 ) ∧ (x0 ∨ x2 ∨ x3 ) ∧ (x1 ∨ x2 ∨ x3 ) with a truth setting of x0 = true, x1 = true, x2 = false,x3 = true. Note that in full scale, the two gadgets representing the literal x3 in clauses 0 and 1 have disjoint
x-coordinates

only if the Boolean expression can be satisfied; in case of an unsatisfiable expression,a stabbing number of at least 6 cannot be avoided.
Consider the overall layout of P as shown in Fig. 1. We make critical use of thecollinearity of vertices, using up all of the available stabbing number of 5 in a particular direction. Thus we are able to construct “barriers” which avoid any interference
between the different gadgets.
At the top of the layout, there are two groups of 10 vertices. The vertices in agroup of 10 have the same y-coordinate. We call these two groups the top rows. The
ith vertex in the first top row has the same x-coordinate as the ith vertex in the second
top row. Below the top rows, there are n groups of 6 vertices. All vertices in a group of
6 have the same x-coordinate, as shown in the figure. The vertical lines through thesegroups of 6 vertices separate the variables from each other and from other vertices leftof the variables. We call each such group a vertical barrier gadget. The vertices inbarrier i are sufficiently far below the vertices in barrier i + 5 to ensure that horizontal
lines through the vertical barriers have stabbing number at most 5. The barriers lie
between vertical lines through the last and second last vertices of the top rows. To
the left of the top rows and below the vertical barriers, there are k + 1 groups of 10
vertices. Each vertex in a group of 10 has the same y-coordinate. We call each suchgroup a horizontal barrier gadget. The vertices in barrier i are sufficiently far to theright of the vertices in barrier i + 5 to ensure that vertical lines through the horizontal
barriers have stabbing number at most 5. The horizontal barriers are used to separate
clauses from each other, to separate the clauses from the variables and to separate
variables from other vertices above the variables. Between and to the right of the top

Discrete Comput Geom (2008) 40: 595–621

601

Fig. 2 Variable xi with xi = true in (a) and xi = false in (b)Fig. 3 Clauses (x0 ∨ x1 ∨ x̄2 ) and (x0 ∨ x̄1 ∨ x̄2 ) with x0 = x2 = true and x1 = false

two horizontal barriers, there are groups of 8 vertices. Each vertex in a group of 8
has the same y-coordinate. We call each such group a reducer gadget of a variable.
The vertices in reducer i are far enough to the right of the vertices in reducer i + 1 toensure that vertical lines through the reducers have stabbing number at most 5.
Figure 2 shows a set of 6 vertices, numbered i0 to i5 in clockwise order, that
represents a variable. These variable gadgets are separated by vertical barriers and areplaced below the vertical barriers, between the top two horizontal barriers, and to theright of the reducers. Variables are placed so that the y-coordinate of the horizontal
line through the reducer of a variable is in between the y-coordinate of vertices i0
and i5 of that variable. The strip formed by vertical lines between vertices i0 and i1of variable xi is called the xi -column of the variable. The strip formed by verticallines between vertices i1 and i2 of variable xi is called the x̄i -column of the variable.
The horizontal and vertical barriers create kn locations for literal gadgets. These
are groups of 4 vertices representing the occurrence of a variable in a clause. Eachgroup of 4 vertices forms an axis-parallel square. If a literal xi appears in theclause cj , we place a literal gadget in the xi column of clause cj . If a literal x̄i
appears in the clause cj , we place a literal gadget in the x̄i column of clause cj . The
three literal gadgets for a clause are put on the same horizontal lines. The literal incolumn xi of clause cj is to the left of the literal in column xi of clause ch for j < h.
Similarly, the literal in column x̄i of clause cj is to the left of the literal in column x̄iof clause ch for j < h. Figure 3 shows the literals of two clauses.

602

Discrete Comput Geom (2008) 40: 595–621

We first assume that B(x0 , x1 , . . . , xn−1 ) is satisfiable and show that P has amatching M of stabbing number 5. We connect vertex i to vertex i + 1 in each of
the two top rows for i = 0, 2, 4, 6, 8. We connect vertex i to vertex i + 1 in eachvertical barrier for i = 0, 2, 4. We connect vertex i to vertex i + 1 in each horizontal
barrier for i = 0, 2, 4, 6, 8. We connect vertex i to vertex i + 1 in each reducer for
i = 0, 2, 4, 6.
If the variable xi has the value true, we connect the pairs (i0 , i5 ), (i1 , i2 ), and(i3 , i4 ) of the variable. If the variable xi has the value false, we connect the pairs(i0 , i1 ), (i2 , i3 ), and (i4 , i5 ). Notice that if xi is true, then any vertical line in thexi -column stabs 2 edges in the top rows of M, and a vertical line in the x̄i -column
stabs 2 edges in the top row and 2 edges in the rectangle of the variable. If xi is false,
this situation is reversed. The column with vertical stabbing number 2 is called thetrue-column of the variable, and the column with vertical stabbing number 4 is called
the false-column. In each literal gadget representing the value true, we connect thefour vertices with two horizontal edges. In each literal gadget representing the value
false, we connect the four vertices with two vertical edges.
We can now verify that M has stabbing number 5. Any vertical line in the truecolumn of variable xi stabs two edges in the top rows and at most two edges in a
literal. Any vertical line in the false column stabs two edges in the top rows, twoedges of the variable, and at most one in a literal. Any horizontal line in a clausestabs at most three literal gadgets, one of which is set to true. So these lines stab atmost 5 edges of M. It can easily be verified that all other horizontal and vertical lines
stab at most 5 edges from M.
Conversely, we assume that P has a matching of stabbing number 5. We showthat B is satisfiable. The matching used in this proof is illustrated in Figs. 1, 2,
and 3. Because the top rows contain 10 vertices, these vertices have to be connectedto each other, otherwise the stabbing number of P exceeds 5. There are several
ways to connect the sets of 10 vertices. If we connect vertex i to vertex i + 1 for
i = 0, 2, 4, 6, 8 in each row, the number of edges stabbed by any horizontal or vertical line is minimized. Therefore we may assume without loss of generality that theseedges are in the matching M. Collinear vertices are dealt with in a similar manner: If
there are several ways to connect a set of collinear vertices, we will prefer connections
that have minimal stabbing number for all stabbing lines.
Thus, we can connect vertex i to vertex i + 1 for i = 0, 2, 4, 6, 8 in each horizontal
barrier gadget. For the same reason, we can connect vertex i to vertex i + 1 for
i = 0, 2, 4, 6 in each reducer gadget. Because vertical lines through the vertical barrier
gadgets stab two edges in the top rows, we can connect vertex i to vertex i + 1 for
i = 0, 2, 4 in each vertical barrier gadget.
Now it is easy to see that no vertex in a variable or literal gadget for some variable xi can be matched with any vertex not involved with representing the same
variable xi : otherwise, the edge would cross a line through a vertical barrier, which
already crosses another five edges. Furthermore, such a vertex must be matched withvertices from the same gadget (either the same variable gadget or the same literalgadget): otherwise, we get a violation at a line through a horizontal barrier gadget.
Now each reducer gadget contributes four to a horizontal stabbing number. Thus,
we cannot connect the six vertices of a variable xi by three vertical edges. Figure 2
shows the two remaining, essentially distinct matchings.

Discrete Comput Geom (2008) 40: 595–621

603

Of the three literals in each clause, one has to be set to true, otherwise there will bea horizontal stabber intersecting six edges. The true literal, say, x, must lie in a truecolumn of a variable, because vertical lines in this column have stabbing number two.
Any other literal in this column can also be set to true. The literals x̄ lie in the falsecolumn of the same variable and have to be set to false. So if a matching of stabbing
number five exists, there is a truth assignment of the Boolean expression.

Corollary 2 There is no α-approximation algorithm for St-Mat2 (P ) with α < 6/5;
in particular there is no polynomial time approximation scheme (PTAS), unless
P = N P.
Corollary 3 Computing St-Mat(P ) is a weakly N P-hard problem.
Proof We apply a perturbation technique, similar to the one in [10]. We start withthe same basic construction as for the hardness proof for the axis-parallel case andconsider the grid formed by the coordinates of the resulting vertex set. This grid is
modified so that the interpoint distances between the vertices of the same gadget are22
Θ(ε n +2 ) for the literal gadgets and Θ(ε n ) for all other gadgets. Furthermore, therest of the grid is perturbed by powers of ε so that only axis-parallel lines can stabmore than two gadgets; in particular, we increase the vertical distance between variable gadgets and the (narrower) literal gadgets by a sufficient amount, in order tomake sure that no line through two literal gadgets for the same variable can intersect the corresponding variable gadget. Now it is easy to see that lines that are notaxis-parallel can stab at most four line segments, leaving only axis-parallel lines ascritical.

3.2 Triangulations
Our basic proof technique is the same as for matchings. We first describe the construction of barrier gadgets using the following terminology. A horizontal line is given by
a set of vertices that are horizontally collinear. A vertical line is given by a set ofvertically collinear vertices. A row consists of two horizontal lines and the (empty)
space between them. A column consists of two vertical lines and the (empty) space
between them.
Lemma 4 Consider a row consisting of two horizontal lines la and lb in P having a
and b vertices, respectively. If the combined number of edges on la and lb is a + b −i − 2, then a horizontal stabber between la and lb encounters at least a + b + i − 2triangles in any triangulation of P , and its crossing number is at least a + b + i − 1.
Proof Assume without loss of generality that la lies above lb . Suppose that there area − ia − 1 edges on the line la and b − ib − 1 edges on the line lb with ia + ib = i.
For each edge (u, v) on la , there is a triangle (u, v, w) where w lies either on or
below lb . Let A denote this set of triangles. Similarly, for each edge (u, v) on lb ,there is a triangle (u, v, w) where w lies either on or above la . Let B denote this setof triangles. For each two neighboring vertices u and v on la for which there is no604

Discrete Comput Geom (2008) 40: 595–621

edge (u, v), there are triangles (u, u0 , u1 ) and (v, v0 , v1 ) such that u0 and v0 lie on or
below lb and u1 and v1 lie above la . Let Ia denote this set of triangles. Also for each
two neighboring vertices u and v on lb for which there is no edge (u, v), there aretriangles (u, u0 , u1 ) and (v, v0 , v1 ) such that u0 and v0 lie on or above la and u1 andv1 lie below lb . Let Ib denote this set of triangles. It is not hard to verify that any twoof the four sets of triangles A, B, Ia , and Ib have an empty intersection. A horizontal
line l between la and lb stabs every triangle in A, B, Ia , and Ib . So l stabs at least|A| + |B| + |Ia | + |Ib | = (a − ia − 1) + (b − ib − 1) + 2ia + 2ib = a + b + i − 2triangles and a + b + i − 1 edges.
The lemma holds analogously for two vertical lines that form a column. Whena row consists of two horizontal lines that have Cr-Δ2 (P ) + 1 vertices altogether,
we call it full or fully triangulated. It follows from the lemma that all Cr-Δ2 (P ) − 1
edges on the lines la and lb have to be present.
Theorem 5 Finding Cr-Δ2 (P ) is N P-hard.
Proof Again we use a reduction from 3SAT, and the proof proceeds along the linesof the proof of Theorem 1. See Fig. 4 for a schematic layout of a representing vertex set P for the 3SAT instance B(x 0 , x1 , x2 ) = (x0 ∨ x1 ∨ x̄2 ) ∧ (x0 ∨ x̄1 ∨ x2 ) ∧(x̄0 ∨ x̄1 ∨ x̄2 ). Figure 5 shows the structure of variable gadgets.
For a given Boolean expression B(x0 , x1 , . . . , xn−1 ) with n variables and k clausesof three literals each, we construct a set P of vertices. We show that there is a value
K such that B is satisfiable only if Cr-Δ2 (P ) = 2K − 1; if B cannot be satisfied,
Cr-Δ2 (P ) is at least 2K.
In Fig. 4, we have K = 39 and a grid of vertices with some well-defined holes.
The maximum number of vertices in a horizontal or vertical line is K, and manylines have exactly K vertices. By Lemma 4 a full row or column in this setting has
exactly 2K − 2 triangles. Gadgets are separated by full rows and columns.
Figure 5 shows two horizontally aligned rectangles of eight vertices each that together represent a variable xi . We call the strip formed by vertical lines that stab theleft rectangle the xi -column and the strip formed by vertical lines that stab the rightrectangle the x̄i -column of the variable. The gadget works essentially the same way
as that in Fig. 2. Each rectangle has full rows and columns as neighbors. We indicate
how this can be achieved in horizontal direction in Fig. 5. By Lemma 4 we conclude
that all edges on the boundary of the convex hull of each rectangle are present inany triangulation of minimal crossing number. The horizontal lines that contain the
top and bottom lines of the two rectangles, respectively, contain K vertices each; thehorizontal line that passes through the middle of the rectangles contains K − 1 vertices. Therefore Lemma 4 shows that exactly one edge along this horizontal line in
the middle of the rectangle may be missing. We call the strip that is spanned by all
vertical lines that stab the rectangle with the missing horizontal edge the true-columnof the variable xi . The strip that is spanned by all vertical lines that stab the rectangle
for which the middle horizontal edge is present is the false-column of the variable xi .
As shown in Fig. 4, any satisfying literal adds exactly one less to the vertical crossing
number than an unsatisfied one. In the overall layout, variable xi is placed below andDiscrete Comput Geom (2008) 40: 595–621

605

Fig. 4 Overall layout for Cr-Δ2 (P ). Clauses are (x0 ∨ x1 ∨ x̄2 ), (x0 ∨ x̄1 ∨ x2 ), and (x̄0 ∨ x̄1 ∨ x̄2 ) withx0 = false and x1 = x2 = true. Arrows indicate full rows and columns, light or dark shading indicates trueor false variables and literals as before

Fig. 5 A variable gadget and how it is embedded in a grid of vertices. Arrows indicate full rows

to the left of variable xj for i < j in such a way that variables are vertically separated
from one another by a full row and horizontally separated from one another by a fullcolumn.
Each literal is represented by a square with eight vertices on its boundary. We makethe width of rectangles of the variables equal to a power of two and wide enough toaccommodate the necessary number of literals. That is, each rectangle of a variable606

Discrete Comput Geom (2008) 40: 595–621

is of width at most four times the number of occurrences of the most frequent literalin B. Figure 5 gives a hint at how this widening of a rectangle is done. Notice that if
the most frequent literal in B occurs t times, there are Θ(log t) rows above and below
the variable so that in the top and bottom lines of these groups of rows, the vertices
above and below the variables are a distance of one apart. The three literals of a clause
cj are horizontally aligned, and the two rows that are spanned by them are called theclause cj . Clauses are separated from each other by full rows. If a literal xi appears
in the clause cj , we place a literal gadget in the x i -column of the clause gadget cj . If
a literal x̄i appears in the clause cj , we place a literal gadget in the x̄ i -column of theclause gadget cj . The literal in column x i of clause cj is to the left of the literal incolumn x i of clause ch for j < h. Similarly, the literal in column x̄ i of clause cj is
to the left of the literal in column x̄i of clause ch for j < h. So no vertical line stabs
the interior of more than one literal.
By adding vertices to the right of the literals we ensure that a horizontal line
through the top or bottom row of the three literals of a clause has exactly K vertices, and a horizontal line through the middle horizontal line of the three literals ofa clause has exactly K − 2 vertices. So two edges along these middle lines may be
missing in a triangulation of minimum crossing number, but no more than two. As
we will argue later, these edges will be missing in the interior of at most two of theliterals. We call the missing of the horizontal middle edge in a literal the false setting of the literal, and the presence of this edge within a literal the true setting of theliteral.
Because the rows above and below a variable are full, we can assume that they
are triangulated as shown in Fig. 5, because any other triangulation would result instrictly higher vertical crossing numbers. So the true column of a variable has a vertical crossing number that is one less than the crossing number of a false column. In
adding vertices at the bottom of the clauses, we ensure the following vertical vertex
counts. First of all, the columns neighboring the variables have to be full; in particular, vertical lines that stab the left or the right vertices of a variable rectangle have
K vertices each. All other vertical lines through a variable should get a number ofvertices so that if the corresponding column of the variable is set to false, all remaining edges on these vertical lines have to be present. This implies that if the column is
set to true, we can have one missing edge in the vertical line to the right of the left
boundary of the rectangle, and if this edge is missing, there cannot be a missing edgein the next vertical line, one edge missing in the next line, etc.
Let B(x0 , x1 , . . . , xn−1 ) be satisfiable. We show that P has a triangulation of crossing number 2K − 1 that is minimum by Lemma 4. All full rows and full columns are
fully triangulated. If variable xi has the value true, we triangulate the interior of thetwo rectangles of variable xi in such a way that the xi -column becomes this variable’s
true-column, and the x̄i -column becomes this variable’s false-column. The triangulation of the interior of the rectangles is reversed when variable xi has the value false.
We set each literal that represents the value true to its true setting and set each literalthat represents the value false to its false setting. The triangulation can be completed
arbitrarily.
We can now convince ourselves that such a triangulation of P indeed attains
Cr-Δ2 (P ) = 2K − 1. No fully triangulated row or column has a crossing number

Discrete Comput Geom (2008) 40: 595–621

607

larger than 2K − 1. Because exactly one edge is missing in the horizontal middle
line of each variable, Lemma 4 implies that the crossing numbers of the two rows of
a variable are both equal to (2K − 1) + 1 − 1 = 2K − 1. In each clause, there is atleast one literal in its true setting. Therefore, we can afford two extra triangles causedby the false setting of the other two literals in the clause, and no row of a clause intersects more than 2K − 2 triangles. Finally, we may have one edge missing on thevertical lines passing trough the middle of a literal only in a true-column. This condition holds by definition of the setting of the literals according to the truth value of thevariables. The “arbitrary completion” of the triangulation only happens in the lower
right of the construction. In this corner, vertical and horizontal lines have a low vertex
count (except for the boundary), and the allowed crossing number is not exceeded.
For seeing the converse, assume that there is a triangulation of P that has crossing
number 2K − 1. We show that B is satisfiable. Because a full row or column canbe triangulated in such a way that the crossing number of 2K − 1 is not exceeded,
we only have to take care of the rows and columns in which we have a degree of
freedom and where the vertex count is critical by Lemma 4. Because both the top
row and the bottom row of a clause have 2K − 2 vertices, we can afford at most twoliterals of each clause set to false. One literal in each clause has to be set to true.
The true literal has to be in a true-column of a variable, for otherwise the verticalcrossing number would exceed 2K − 1. Any other literal in this column can also be
set to true. The horizontal vertex count of the horizontal lines of the variable forces
the second column of this variable to be a false-column. In order not to exceed theallowed crossing number in vertical direction, all literals in this column have to be
set to false. As one easily checks, this yields a consistent setting of the variables, andB is satisfiable.
Finally, the size of our construction is indeed polynomial: let n and c be the numbers of variables and clauses of B(x0 , x1 , . . . , xn−1 ). Let t be the number of times themost frequent literal is used in B. A rectangle that represents a variable has width at
most 4t and requires Θ(log t) rows. The number of rows used by the clauses is Θ(c).
In order to achieve the correct vertex count in each line, we may have to add vertices
to the right and below, which requires at most Θ(t) additional rows and columns.
Therefore K is polynomial in n, c, and t.

3.3 Spanning Trees
The basic construction for showing hardness of finding a spanning tree of minimum
stabbing number is similar to the one for matchings. As before, we use barriers to
restrict possible connections: we make use of the arrangement shown in Fig. 6, whichworks as a barrier gadget because of the following lemma.
Lemma 6 Consider three parallel lines, 1 , 2 , 3 , with a set Si of k vertices on line
i , i = 1, 2, 3; let S = S1 ∪ S2 ∪ S3 . Consider P ⊃ S and a spanning tree T of P
with stabbing number k + 1. Then no edge of T crosses the strip spanned by the threelines.
Proof See Fig. 6. Consider a spanning tree T of P with v ∈ P \ S lying outside of
the strip. Orient all edges of T towards v. Each vertex in S must have outdegree 1,

608

Discrete Comput Geom (2008) 40: 595–621

Fig. 6 A horizontal barrier gadget consisting of 3k vertices: (a) In a spanning tree of stabbing number
k + 1, no edge may cross the shaded region. (b) Symbol for the barrier gadget; the dotted line indicates theblocked strip

Fig. 7 A variable gadget for variable xi . (a) In a spanning tree of stabbing number k + 1, the true or thefalse setting is chosen. (b) Symbol for the variable gadget

meaning that there are k outgoing edges for each of S1 , S2 , S3 , contributing k to thestabbing numbers along 1 , 2 , 3 . One of the outgoing edges of S2 must intersect 1
or 3 in order to connect S2 to the rest of the graph; thus, one of those two lines stabs
k + 1 edges, implying the claim.

Our variable gadgets look as in Fig. 7; shown is the gadget for variable xi ; notethat the gadgets for x0 , . . . , xi−1 are left and below the box spanned by the gadget,
while the gadgets for xi+1 , . . . , xn−1 are above and to the right of the spanning box.
The bold squares below the gadget indicate the position of literal gadgets, which will
be discussed further down.
Also note the use of vertical barrier gadgets: a number of i next to it indicates agadget consisting of 3i vertices, which already requires a crossing number of i + 1;
thus, only k − i additional edges in a spanning tree may cross the dotted line inducedby such a gadget. The arrows pointing down from the bottom indicate a number ofliteral gadgets consisting of 2×2 arrangements of vertices. See Fig. 8 for the resulting
overall arrangement.

Discrete Comput Geom (2008) 40: 595–621

609

Fig. 8 The overall layout for the hardness proof for spanning trees. There is a total of n variables; k isa sufficiently large number. In question is the existence of a spanning tree with stabbing number k + 1.
Shown is the representation of the 3SAT instance (x0 ∨ x1 ∨ x̄2 ) ∧ (x̄0 ∨ x1 ∨ x2 ) ∧ (x0 ∨ x̄1 ∨ x2 ) forn = 3 with x0 = false and x1 = x2 = true

Lemma 7 Let S be the arrangement of vertices shown in Fig. 7, with barrier gadgets
placed and sized as indicated, and let P ⊇ S. Let P be constructed as shown in Fig. 8.
Then any spanning tree of P that has stabbing number at most k + 1 must use at least
one of the two edges at the bottom of the arrangement, labeled eti,1 (for true) or efi,1(for false.)
Proof Assume that there is a spanning tree of stabbing number at most k + 1. Consider the barrier gadgets labeled B1i , B2i , B3i , B4i and the corresponding lines i1 , i2 ,
i3 , i4 . By the previous lemma, no edge can cross one of those lines. Therefore, theliteral boxes below each clause must be connected within the vertical strips boundedby i2 and i3 on one hand, or i3 and i4 on the other hand. This requires at least oneedge within each of the two strips to cross the line i0 . Moreover, the lines i1 and i4must not be crossed, implying that the variable gadgets are connected to their neighbors at barriers B1i and B4i . These connections between neighboring variable gadgets
form a stair-like chain of variable gadgets, as shown in Fig. 8: connections are in increasing x- and y-order, which correspond to increasing variable indices; we call thisthe exterior stair. Similarly, the barrier gadgets associated with each of the two truth
settings of a variable form one stair-like chain each, as shown in Fig. 7; we call these
the two interior stairs.
Now consider the horizontal barrier B0i consisting of three groups of k − 5 −2(n − 1 − i) vertices each. By the previous arguments, the line 0 has to cross all of610

Discrete Comput Geom (2008) 40: 595–621

the edges connecting the true and false literal boxes of the n − 1 − i variables withhigher indices, i.e., cross 2(n − 1 − i) edges. Furthermore, in variable xi , there are
four other edges that connect vertices above line l0i to vertices below l0i and so arecrossed by l0i . For example, these edges could be the ones labeled c1i , c2i , c3i , c4i in the
figure. This allows only one of the edges eti,2 and efi,2 to be used for connecting thetwo interior stairs with each other and with the exterior stair; thus, at least one of theedges efi,1 and eti,1 must be used, proving the claim.
Making use of the above gadgets, we get the following:
Theorem 8 It is N P-hard to determine St-Tre2 (P ).
Proof The basic idea for the construction is similar to the one used in the previous
sections, making use of Lemmas 6 and 7. The use of gadgets and the overall layoutof the construction are shown in Fig. 8.
Given a Boolean expression B(x0 , x1 , . . . , xn−1 ), we can find a vertex set that has
a spanning tree of a stabbing number k + 1 if and only if B is satisfiable. Consider thevertex set as given in Fig. 8 with k = 3n. If B(x0 , x1 , . . . , xn−1 ) has a satisfying truth
assignment, we first connect the vertex on the left side of the drawing into one longpath. This path contains all horizontal and vertical barrier gadgets as shown in Fig. 8.
We connect the variable and literal gadgets according to their values in B. In eachtrue- and false-column, there is a vertex lower than all horizontal barriers and to theright of all literals in that column. We connect this vertex to the right lowest vertex of
the lowest literal in the same column. Because each clause has at least one true literal,the horizontal stabbing number of a stabber through a clause is at most k, because thehorizontal barrier on the left contributes the k − 2n − 1 variable(s) set to true and then−3 variables that do not appear in the clause contribute two each, and the variable(s)set to false contribute three each, which is at most k − 2n − 1 + 2(n − 2) + 6 = k + 1.
A horizontal stabber through the horizontal barrier in the ith variable gadget stabs
k − 5 − 2(n − 1 − i) + 1 edges in the barrier, one more edge to the left of the barrier,four edges of the variable to the right of the gadget, and two more for each of then − i variables to its right, for a total of k − 5 − 2(n − 1 − i) + 1 + 5 + 2(n − 1 − i) =k + 1. A vertical stabber through literals stabs at most k − 1 edges in the verticalbarriers, plus two more, either one from a false literal and one in the variable gadget,or two edges in the true literals. So we have a spanning tree of stabbing number
k + 1.
Conversely, assume that the vertex set has a spanning tree of stabbing number
k + 1. As we showed in the proof of Lemma 7, the literal gadgets can only be connected within their respective strips, forcing at least 2n stabbed edges. Furthermore,each false literal (being connected in a “u”-like fashion) causes an additional stabbededge, while a true literal (connected in a “c”-like fashion) does not cause any additional stabbings. Thus, each clause must contain at least one true literal. Becauseof Lemma 7, at least one of the edges ef1 and et1 must be present, guaranteeing that
only the negated or only the unnegated literals for each variable can be connected ina “c”-like fashion, i.e., forcing a feasible setting of the variables. Thus, we get a truth
setting of the variables that satisfies B.
Discrete Comput Geom (2008) 40: 595–621

611

Fig. 9 A barrier gadget for showing hardness of minimizing the crossing number of a spanning tree

This immediately implies the following:
Corollary 9 It is N P-hard to determine St-Tre(P ).
Proof The argument is similar to the one in Corollary 3 for matchings: use the construction of Theorem 8, for which the criticality of certain axis-parallel lines requires
satisfying a 3SAT instance in order to achieve low stabbing number. Scale down thebounding boxes for all gadgets, with literal gadgets ending up in appropriately smaller
bounding boxes. Then perturb the position of the gadgets, shifting all vertices in thesame gadget by the same amount such that no line can intersect the bounding boxesof any three gadgets, again inserting a sufficient vertical distance for excluding aline that stabs a variable gadget and two of its literal gadgets. This leaves only theaxis-parallel lines to be critical, implying the same combinatorial behavior as in theaxis-parallel case.

The hardness proof for minimizing the crossing number has the same structure as
the one for stabbing number. Instead of the barrier gadget implied by Lemma 6, we
use a slightly different one, as shown in Fig. 9.
Lemma 10 Let S be the k × ((k − 1)2 + k) arrangement of vertices shown in Fig. 9,
and let P ⊇ S. If P has a spanning tree T with crossing number k, then no edgeof T connecting two vertices outside of the arrangement crosses the horizontal strip
spanned by the arrangement.
Proof Suppose that there is a crossing edge. Consider the (k − 1)2 + k horizontal
lines that pass through k vertices of the vertex arrangement. Because of the crossingedge, the intersection of each line with the edges and vertices within each corresponding horizontal set cannot consist of more than k − 1 connected components, so thisintersection must contain at least one horizontal edge within the set; thus, a total of atleast (k − 1)2 + k horizontal edges within the arrangement cannot be avoided. Now
consider the k vertical lines that pass through (k − 1)2 + k vertices of the arrangement; these lines subdivide the plane into k + 1 vertical strips, k − 1 of which havewidth 1. Any of the at least (k − 1)2 + k horizontal edges within the arrangement mustcross at least one of the intermediate strips; thus, the average number of horizontal

612

Discrete Comput Geom (2008) 40: 595–621+kk
edges per bounded strip is at least (k−1)= (k − 1) + k−1> k. By the pigeonholek−1
principle, this implies that there must be a bounded vertical strip that is crossed bymore than k edges, a contradiction to our assumption that the crossing number is at
most k.

2

As the figure shows, there is a feasible subtree of the gadget, as long as no edge
crosses the indicated strip. This allows us to use the arrangement as a barrier gadget.
As for the rest of the construction for the proof of Theorem 8, stabbing and crossing
numbers coincide, this immediately implies the following:
Theorem 11 It is N P-hard to determine Cr-Tre2 (P ).
From this it is easy to derive the following corollary, again using a perturbationargument.
Corollary 12 It is N P-hard to determine Cr-Tre(P ).
Proof The argument is similar to the one in Corollary 9: use perturbation to ensurethat only axis-parallel lines can stab more than two gadgets. The only additional difficulty that has to be overcome is the fact that a diagonal line through one of the barrier
gadgets in Fig. 9 may have crossing number k: in principle, crossing number 2k could
arise from stabbing two such gadgets in a non-axis-parallel manner. However, scaling the bounding boxes of the barrier gadgets in a way that the vertical dimension is
3much smaller than the horizontal dimension (say, by a factor of O(ε n )) makes sure3
3
that only lines of slope within range [−ε n , ε n ] achieve crossing number k for one
gadget. Thus, only almost horizonal lines are of concern; it is easy to see that theabove perturbation guarantees that no such line intersects more than one barrier gadget. Therefore, only axis-parallel lines can be critical, and the hardness proof remains
valid.


4 Integer Linear Programs for Minimum Stabbing Number
In view of the negative complexity results for our problems, there are two major directions to proceed: providing (good) lower bounds on the minimum stabbing number in order to obtain approximation algorithms; and insisting on optimality despite
N P-hardness. Our (integer) linear programming approach is an elegant way to combine both issues. We deal with them in the next two sections.
4.1 Perfect Matchings
In combinatorial optimization, P corresponds to the vertex set of a straight-line
embedded complete graph G = (P , E); then a matching M can be represented by
its edge incidence vector x ∈ {0, 1}E , where xij = 1 if ij ∈ M and xij = 0 otherwise. Using these variables, we are able to state an integer linear program forDiscrete Comput Geom (2008) 40: 595–621

613

Fig. 10 An optimal fractional
solution of value 4/3 withmaximum edge weight 1/3

finding a perfect matching of minimum stabbing number. For S ⊆ P , denote byδ(S) = {ij ∈ E | i ∈ S, j ∈/ S} the cut induced by S.
minimize k
xij = 1,s.t.

(1)∀i ∈ P ,(2)∀∅ = S ⊂ P , |S| odd,(3)

ij ∈δ({i})

xij ≥ 1,ij ∈δ(S)xij ≤ k,∀ stabbing line (d) in direction d,(4)

ij :ij ∩(d)=∅xij ∈ {0, 1},∀ij ∈ E.

(5)

We obtain the associated linear programming (LP) relaxation by replacing (5) by
xij ≥ 0.

(5 )Inequalities (2) and (3) are necessarily satisfied for any perfect matching given by x,
where the blossom constraints (3) ensure that any subset of vertices of odd cardinality
has at least one edge to the outside. In his seminal paper, Edmonds [9] showed that—together with (5 )—these inequalities already constitute the complete description of
the perfect matching polytope, that is, its extreme vertices exactly correspond to theincidence vectors of perfect matchings in G, i.e., the LP relaxation is integral.
To this description we add the stabbing constraints (4), for which we count the
number of intersections of matching edges with any given line; this number isbounded by the variable k, and k is minimized. We have to choose this way of modeling because of our min-max objective. An optimal solution x to the integer program(1)–(5) represents a matching with stabbing number exactly St-Mat(P ). In a pure integer programming description, the blossom constraints are implied; however, Fig. 10shows that the introduction of stabbing constraints yields a polytope that is no longer
integral, which is to be expected for an N P-hard problem. That is why we consider

614

Discrete Comput Geom (2008) 40: 595–621

the LP relaxation, for which the use of blossom constraints yields a considerably
tighter set of solutions. We will make use of this fact in the following section; here
we comment on the complexity of the given LP and its solution.
We can limit the number of stabbing constraints (4): for the axis-parallel stabbing number, we can assume without loss of generality that a critical stabbing line
runs through a vertex, so we get at most O(n) restrictions for the axis-parallel stabbing number; for the general stabbing number, we may assume that a critical stabbing line runs through two vertices, so we can limit ourselves to O(n2 ) restrictions.
On the other hand, we have exponentially many blossom inequalities; however, it iswell known that blossom inequalities can be separated in polynomial time [22], i.e.,
one can check in polynomial time whether a given x violates some blossom inequality, and if so, identify such an inequality. This polynomial-time separation allows
us to solve the linear programming relaxation (1)–(5 ) in strongly polynomial time
[23, Theorem 5.11] by means of the ellipsoid method [14, Theorem 66.5]. An optimal solution x will in general be fractional, and we speak of fractional stabbing
number in this context. It is a lower bound on St-Mat(P ).
4.2 Spanning Trees
There are several polynomial-size LP formulations for spanning trees, see, e.g., [19].
However, similar to matchings, we choose an exponential-size integer program thatis again based on cut constraints. We directly state the LP relaxation.
minimize ks.t.
xij = n − 1,

(6)
(7)

ij ∈E



xij ≥ 1,∀∅ = S ⊂ P ,(8)ij ∈δ(S)xij ≤ k,∀ stabbing line (d) in direction d,(9)

ij :ij ∩(d)=∅x ≥ 0.

(10)

Equation (7) ensures the right number of edges in a tree solution, and connectivity
is given by the cut constraints (8). Just like blossom constraints for matching problems, separation over these constraints can be done in polynomial time by means ofa minimum cut routine, so this LP can also be solved in strongly polynomial time.

5 Iterated Rounding
The above LP relaxations provide lower bounds for optimal solutions but no upperbounds in the form of feasible solutions for our stabbing problems (except if wesolve the integer programs, which may take exponential time). Therefore, our next

Discrete Comput Geom (2008) 40: 595–621

615

Fig. 11 Finding a fractional matching of minimum stabbing number: shown is an optimal LP solution for
an instance of 100 random vertices; see [12] for technical details and results for other instances

objective is to find, in polynomial time, an integer solution that is not too far from an
optimal one.
For this purpose, we consider the support graph of a (fractional) solution x: it
consists of all edges e that have a strictly positive value xe > 0. If we could be assured that in any optimal LP solution, all edges e in the support graph solution wereb-heavy, i.e., xe ≥ b for some constant b > 0, then we could consider rounding up
all positive edge weights to one in order to get a 1/b-approximation. Unfortunately,
Fig. 11 gives an indication that there may not be such a lower bound.
An alternative to simple LP rounding is offered by the iterated rounding techniqueintroduced by Jain [17] for generalized Steiner network problems: at each step, it suffices to identify one heavy edge, round it up to one, fix it, and re-solve the remaining
LP. The key ingredient is that the modified LP also has a heavy edge, so the process
can be iterated, hence the name iterated rounding.

616

Discrete Comput Geom (2008) 40: 595–621

Fig. 12 Improving a fractional solution with crossing edges while preserving all blossom inequalities

A crucial step in Jain’s seminal work was the fact that for so-called generalized
Steiner networks, 1/2 is a valid lower bound for the value of the heaviest edge offractional weight. A sufficient condition for the validity of this bound that is purely
combinatorialis that all constraints in the LP relaxation are cut constraints, i.e., oftype e∈δ(S) xe ≥ b(S).
Unfortunately, stabbing constraints do not fall into the category of cut constraints,
and it can be seen from Fig. 10 that Jain’s lower bound does not hold for stabbing
problems. This makes it necessary to establish a separate lower bound on the valueof the heaviest fractional edge. We will do this by exploiting the underlying geometric nature of our optimization problem and establish the fact that there always is an
optimal LP solution with planar support graph. Planarity is proven by shifting weightfrom a crossing pair of edges to a noncrossing one; for matchings (Lemma 13), thisrequires some extra care because of the blossom inequalities. The proof for spanning
trees (Lemma 14) is almost completely analogous.
Lemma 13 For any even set of vertices in the plane, there is a fractional perfectmatching x of minimum stabbing number such that the support graph of x is planar.
Such a fractional matching can be found in polynomial time.
Proof The set of all LP solutions is bounded and nonempty, so the set of all optimal solutions is nonempty and compact. From this set, consider a solution x thatminimizes the total stabbing number, i.e., the sum of stabbing numbers over all combinatorially different lines. We claim that the support graph of x cannot contain any
crossing pair of edges. Refer to Fig. 12.
Suppose that there are e13 := {v1 , v3 }, e24 := {v2 , v4 } with xe13 > 0 andxe24 > 0 such that e13 and e24 cross. We will argue that this implies the existence ofan alternative solution of the same maximum stabbing number but of infinitesimallysmaller total stabbing number, i.e., a contradiction to our assumptions on optimality.

Discrete Comput Geom (2008) 40: 595–621

617

Consider e12 := {v1 , v2 }, e34 := {v3 , v4 }, e14 := {v1 , v4 }, e23 := {v2 , v3 }. Among(i.e., difference
all LP constraints (1)–(5 ), let s(x) be the smallest positive slack 
between left-hand and right-hand side), and choose 0 < ε < s(x). As e∈δ(vi ) xe = 1
and xe13 > ε, xe24 > ε, we have xe12 < 1 − ε, xe34 < 1 − ε, xe14 < 1 − ε, xe23 < 1 − ε.
Consider two possible alternative solutions arising from shifting an ε of weightfrom e13 and e24 . Let x  and x  be defined by⎧⎪⎨xe − ε for e ∈ {e13 , e24 },xe := xe + ε for e ∈ {e12 , e34 },(11)⎪⎩
for all other e,
xe
and

⎧
⎪
⎨ xe − εxe := xe + ε⎪⎩xefor e ∈ {e13 , e24 },for e ∈ {e14 , e23 },for all other e.

(12)

By convexity, both x  and x  satisfy all stabbing constraints that are valid for x.
Furthermore, it is easy to see that both x  and x  have smaller total stabbing number than x. Thus, it suffices to argue that at least one of these solutions satisfies all
blossom inequalities.
Assume that for each of the two alternative solutions, a blossom inequality is violated; by our assumptionon ε, this meansthat there are two odd sets, S1 ⊂ P and
P , such that e∈δ(S1 ) x  (e) < 1 and e∈δ(S2 ) x  (e) < 1, while e∈δ(S1 ) xe = 1S2 ⊂and e∈δ(S2 ) xe = 1. Let si := |{v1 , v2 , v3 , v4 } ∩ Si |. It is straightforward to see thatfor s i ∈ {0, 1, 3, 4}, both x  and x  satisfy all blossom inequalities that are valid forx; similarly, the blossom
 inequalities are satisfied for v1 , v3 ∈ S1 and v2 , v4 ∈ S1 ,as e∈δ(S1 ) x  (e) > e∈δ(S1 ) x(e). Therefore, we only need to consider v1 , v2 ∈ S1
and v3 , v4 ∈ S1 , and v1 , v4 ∈ S2 and v2 , v3 ∈ S2 . Let T1 := S1 ∩ S2 , T2 := S1 ∩ S2 ,T3 := S1 ∩S2 T4 := S1 ∩S2 , and Eij := {e = {x, y} ∈ E | x ∈ Ti , y ∈ Tj }. As |T1 ∪T2 |,|T1 ∪ T4 |, |T2 ∪ T3 |, and |T3 ∪ T4 | are all odd, we may assume without loss of generality that |T1 | and |T3 | are odd, and |T2 | and |T4 | are even.
Then we have


xe +
xe
(13)
2=
e∈δ(S1 )=e∈δ(S2 )xe +e∈δ(T1 )

≥



>

xe +





xe

(14)

e∈E24

xe + 2xe24

(15)

xe .

(16)

e∈δ(T3 )xe +e∈δ(T1 )xe + 2e∈δ(T3 )e∈δ(T1 )This implies that min{ e∈δ(T1 ) xe ,that x satisfies all cut inequalities.

e∈δ(T3 )e∈δ(T3 ) xe } < 1, contradicting the assumption



618

Discrete Comput Geom (2008) 40: 595–621

The above lemma establishes the existence of optimal noncrossing matchings;
when actually trying to find a noncrossing matching, it suffices to consider an additional term in the objective function of our LP that refers to the total length of theedges. This ensures that the total length of matching edges is minimized, avoiding
crossings in the first place. For more details, see our experimental paper [12].
For the case of spanning trees, we can use a similar approach based on a similar
lemma.
Lemma 14 For any set of vertices in the plane, there is a fractional spanning tree
x of minimum stabbing number such that the support graph of x is planar. Such afractional spanning tree can be found in polynomial time.
Proof We proceed completely analogously to the proof of the previous lemma to
deduce that if there was a fractional solution x of minimum total stabbing number
among all solutions with optimal stabbing number, such that the support graph of x
has two crossing edges, then we could shift an infinitesimal amount of weight fromthe crossing edges to two noncrossing ones such that the stabbing number remains
the same, but the total stabbing number decreases.
The technical steps of the argument are virtually identical: consider two crossing
edges e13 and e24 , as shown in Fig. 12, and the alternative solutions xe and xe as
defined in (11) and (12). For arguing that at least one of these solutions is feasible,
we do not have to consider blossom constraints but cut constraints of type (8).
Assume that for each of the two alternative solutions, a cut constraint is violated;by our assumptionon ε, this means
are two sets, S
1 ⊂ P and S2 ⊂ P , that there (e) < 1 and (e) < 1, while
x
x
such
that
e∈δ(S1 )e∈δ(S2 )e∈δ(S1 ) xe = 1 and

x
=
1.
Let
s
:=
|{v
,
v
,
v
,
v
}
∩
S
|.
It
is
straightforward
to see that
e
i
1
2
3
4
i
e∈δ(S2 )for s i ∈ {0, 1, 3, 4}, both x  and x  satisfy all cut inequalities that are valid forx;
the cut
 inequalities are satisfied for v1 , v3 ∈ S1 and v2 , v4 ∈ S1 , as
 similarly, (e) >xe∈δ(S1 )e∈δ(S1 ) x(e). Therefore, we only need to consider v1 , v2 ∈ S1
and v3 , v4 ∈ S1 , and v1 , v4 ∈ S2 and v2 , v3 ∈ S2 . Let T1 := S1 ∩ S2 , T2 := S1 ∩ S2 ,T3 := S1 ∩ S2 T4 := S1 ∩ S2 , and Eij := {e = {x, y} ∈ E | x ∈ Ti , y ∈ Tj }. Using to (13)–(16), we get 2 > a sequenceof estimates that is completely identicale∈δ(T1 ) xe +e∈δ(T3 ) xe , again implying that min{ e∈δ(T1 ) xe ,e∈δ(T3 ) xe } < 1,
contradicting the assumption that x satisfies all blossom inequalities.

Theorem 15 For any even set of vertices in the plane, there is a fractional perfectmatching x of minimum stabbing number that has an edge of weight at least 1/5.
For any set of vertices in the plane, there is a fractional spanning tree x of minimum
stabbing number that has an edge of weight more than 1/3.
Proof For both problems, consider a fractional vertex with a planar support graph.
To see the claim for matchings, note that there must be a vertex with degree at most
five; as the total weight for each vertex is 1, the claim follows. To see the claim forspanning trees, note that the total edge weight is n − 1, and the number of edges is at
most 3n − 6, implying that the average weight is larger than 1/3.
Discrete Comput Geom (2008) 40: 595–621

619

Theorem 15 provides the basic ingredient for an iterated rounding algorithm: ateach iteration, fix the weight of an edge of maximum fractional weight to one andre-solve the linear program. In each iteration, the number of edges with fractional
weight is reduced, so we get an overall polynomial-time algorithm for finding an
integral solution.
Unfortunately, Jain’s original proof only guarantees a constant-factor approximation for objective functions that arise as the (weighted) sum of the edge variables.
However, the situation is different for our objective function, which is a maximum
over certain sums of edge variables, so an additional argument is needed for establishing a constant-factor guarantee. We are hopeful that this argument can be completed some time in the future [18]. As we demonstrate in our experimental paper[12], the practical performance seems to be even better than the theoretically possible
guarantees of 5 and 3.
6 Notes and Conclusion
We have presented the first algorithmic paper on stabbing numbers, resolving thelong-standing open question of complexity and providing an approach that appears to
be useful in theory and in practice. There are a number of interesting open questions.
Our proofs rely on a strong degeneracy of the vertex set, and it would be interesting
to see a proof for vertices in general position.
We were not able to extend our N P-hardness proof to the case of finding a triangulation of minimum general crossing number; another interesting issue is how toconvert the N P-hardness proof for triangulations of minimum crossing number into
an N P-hardness proof for minimum stabbing number.
Probably the most intriguing open question spawned by our work is whether theiterated rounding scheme suggested by the existence of a heavy edge in an optimal
fractional solution to our linear programs (Lemmas 13 and 14) does indeed lead toa constant-factor approximation algorithm. Also, the use of the ellipsoid method (atleast as a theoretical argument) is not “combinatorial,” which always has to be considered a drawback.
Another interesting question is to decide the existence of structures of small constant stabbing number. As the hardness proof for deciding the existence of a matchingof stabbing number 5 illustrates, this is still not an easy task. From some solvable special cases, we only note one; for a proof, see [12].
Theorem 16 St-Tre2 (P ) = 2 and St-Mat(P ) = 2 can be decided in polynomial time.
One may also ask for minimizing the average instead of the maximum stabbing
number and refer to the average over the whole continuum of lines intersecting a setof line segments, instead of just a combinatorial set of representatives. This, however,amounts to solving problems of minimum length, with all implications to hardness
and approximation; again, see [12] for details.
Theorem 17 A set of line segments has minimum average (axis-parallel, resp.) stabbing number with respect to uniform distribution of lines if and only if the overall
Euclidean (Manhattan, resp.) length of all line segments is minimum.

620

Discrete Comput Geom (2008) 40: 595–621

We remark that a linear program for minimizing the average stabbing number canbe written with a sum in the objective function (instead of a maximum as we had tomodel it), allowing us to directly apply our iterated rounding technique and obtaining
the desired approximation factors of 3 and 5, respectively; see [12].
Acknowledgements We thank Joe Mitchell for pushing us to work on this problem and repeated discussions that assured further progress. We also thank Kamal Jain for some discussions on iterated rounding.
We are greatly indebted to two anonymous referees, who put in many hours of work in going through all
the details of this paper, providing an amazing number of helpful hints and greatly improving clarity andaccessibility of this paper.

References
1. Agarwal, P.K.: Ray shooting and other applications of spanning trees with low stabbing number.
SIAM J. Comput. 21(3), 540–570 (1992)
2. Agarwal, P.K., Aronov, B., Suri, S.: Stabbing triangulations by lines in 3D. In: Proc. 11th ACM
Sympos. Computational Geometry, pp. 267–276 (1995)
3. Arkin, E.M., Bender, M.A., Demaine, E., Fekete, S.P., Mitchell, J.S.B., Sethia, S.: Optimal covering
tours with turn costs. SIAM J. Comput. 35, 531–566 (2005)
4. Aronov, B., Fortune, S.: Approximating minimum-weight triangulations in three dimensions. Discrete
Comput. Geom. 21(4), 527–549 (1999)
5. Aronov, B., Brönnimann, H., Chang, A.Y., Chiang, Y.-J.: Cost-driven octree construction schemes: anexperimental study. Comput. Geom. Theory Appl. 31, 127–148 (2005)
6. Chazelle, B., Welzl, E.: Quasi-optimal range searching in space of finite vc-dimension. DISCG 4,
467–489 (1989)
7. de Berg, M., van Kreveld, M.: Rectilinear decompositions with low stabbing number. Inf. Process.
Lett. 52(4), 215–221 (1994)
8. Demaine, E.D., Mitchell, J.S.B., O’Rourke, J.: The open problems project. http://cs.smith.edu/~orourke/TOPP/Welcome.html (2003)
9. Edmonds, J.: Maximum matching and a polyhedron with 0, 1-vertices. J. Res. Natl. Burean Stand.
69B, 125–130 (1965)
10. Fekete, S.P.: On simple polygonalizations with optimal area. Discrete Comput. Geom. 23, 73–110(2000)
11. Fekete, S.P., Lübbecke, M.E., Meijer, H.: Minimizing the stabbing number of matchings, spanning
trees, and triangulations. In Proc. 15th ACM-SIAM Sympos. Discrete Algorithms, pp. 430–439(2004)
12. Fekete, S.P., Lübbecke, M.E., Meijer, H.: Computing structures of minimum stabbing number. Technical report (2008)
13. Garey, M.R., Johnson, D.S.: Computers and Intractability—A Guide to the Theory of NP-Completeness. Freeman, San Francisco (1979)
14. Grötschel, M., Lovász, L., Schrijver, A.: Geometric Algorithms and Combinatorial Optimization.
Springer, Berlin (1988)
15. Held, M., Klosowski, J.T., Mitchell, J.S.B.: Evaluation of collision detection methods for virtual reality fly-throughs. In: Proc. 7th Canadian Conf. Computational Geometry, pp. 205–210 (1995)
16. Hershberger, J., Suri, S.: A pedestrian approach to ray shooting: shoot a ray, take a walk. J. Algorithms
18, 403–431 (1995)
17. Jain, K.: A factor 2 approximation algorithm for the generalized Steiner network problem. Combinatorica 21(1), 39–60 (2001)
18. Jain, K.: Personal communication (2003)
19. Magnanti, T.L., Wolsey, L.A.: Optimal trees. In: Ball, M.O., Magnanti, T.L., Monma, C.L.,
Nemhauser, G.L. (eds.) Network Models. Handbooks in Operations Research and Management Science, vol. 7, pp. 503–616. North-Holland, Amsterdam (1995)
20. Matoušek, J.: Spanning trees with low crossing number. Inf. Theor. Appl. 25, 102–123 (1991)
21. Mitchell, J.S.B., O’Rourke, J.: Computational geometry column 42. Int. J. Comput. Geom. Appl.
11(5), 573–582 (2001)

Discrete Comput Geom (2008) 40: 595–621

621

22. Padberg, M., Rao, M.R.: Odd minimum cut-sets and b-matchings. Math. Oper. Res. 7, 67–80 (1982)
23. Schrijver, A.: Combinatorial Optimization: Polyhedra and Efficiency. Springer, Berlin (2003)
24. Shewchuk, J.R.: Stabbing Delaunay tetrahedralizations. Discrete Comput. Geom. 32(3), 339–343(2004)
25. Tóth, C.: Orthogonal subdivisions with low stabbing numbers. In: Proc. 9th International Workshop
on Algorithms and Data Structures (WADS 2005). LNCS, vol. 3608, pp. 256–268. Springer, Berlin(2005)
26. Welzl, E.: On spanning trees with low crossing numbers. In: Monien, B., Ottmann, T. (eds.) Data
Structures and Efficient Algorithms. LNCS, vol. 594. Springer, Berlin (1992)