Optimal Deterministic Algorithms for 2-d and 3-d Shallow Cuttings

We present optimal deterministic algorithms for constructing shallow cuttings in an arrangement of lines in two dimensions or planes in three dimensions. Our results improve the deterministic polynomial-time algorithm of Matoušek (Comput Geom 2(3):169–186, 1992) and the optimal but randomized algorithm of Ramos (Proceedings of the Fifteenth Annual Symposium on Computational Geometry, SoCG’99, 1999). This leads to efficient derandomization of previous algorithms for numerous well-studied problems in computational geometry, including halfspace range reporting in 2-d and 3-d, k nearest neighbors search in 2-d, (≤k)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$({\le }k)$$\end{document}-levels in 3-d, order-k Voronoi diagrams in 2-d, linear programming with k violations in 2-d, dynamic convex hulls in 3-d, dynamic nearest neighbor search in 2-d, convex layers (onion peeling) in 3-d, ε\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varepsilon $$\end{document}-nets for halfspace ranges in 3-d, and more. As a side product we also describe an optimal deterministic algorithm for constructing standard (non-shallow) cuttings in two dimensions, which is arguably simpler than the known optimal algorithms by Matoušek (Discrete Comput Geom 6(1):385–406, 1991) and Chazelle (Discrete Comput Geom 9(1):145–158, 1993).


Introduction
Shallow cuttings were introduced by Matoušek [25] as a tool for range searching, specifically, halfspace range reporting.They have since found applications to numerous other central problems in computational geometry, including (≤ k)-levels in arrangements of hyperplanes, order-k Voronoi diagrams, linear programming with k violations, dynamic convex hulls, and dynamic nearest neighbor search (see Section 1.4 for more information).At SoCG'99, Ramos [29] presented an optimal randomized algorithm for constructing shallow cuttings in two and three dimensions.A nagging question that has remained open is whether there is an equally efficient deterministic algorithm.The main result of this paper is a positive resolution to this question.Although the question is mainly about theoretical understanding, and derandomization isn't the most "fashionable" topic in computational geometry, we believe that in this case the fundamental nature of the problem and its wide-ranging consequences make the problem important to study.

Standard Cuttings
Definition 1.Let H be a set of n hyperplanes in R d .Given a parameter r ∈ [1, n] and a region L ⊆ R d , a 1 r -cutting for H covering L is a set of interior-disjoint simplices (cells) such that (i) the interior of every cell intersects at most n r hyperplanes of H, and (ii) the union of the cells covers L. The conflict list H ∆ of a cell ∆ is the set of (at most n r ) hyperplanes of H that intersect ∆.The size of the cutting is the number of its cells.
Cuttings are a fundamental tool in geometric divide-and-conquer.In the default "standard" setting, a cutting covers all of R d , i.e., L = R d .
Random sampling techniques by Clarkson [16] and Haussler and Welzl [21] imply the existence of (standard) 1  r -cuttings of size O((r log r) d ).Chazelle and Friedman [15] refined the bound to O(r d ), which is optimal.(In the 2-d case, there is a simple alternative proof based on levels by Matoušek [23].) Considerable effort was spent in finding efficient deterministic algorithms to construct such an optimal-size cutting.Even the 2-d case turned out to be a challenge.At SoCG'89, Matoušek [23] presented an O(nr 2 log r)-time algorithm for d = 2.At the same conference, Agarwal [4] (see also his PhD thesis [5]) presented an O(nr log n log 3.33 r)-time algorithm for d = 2.In a subsequent paper, Matoušek [24] improved the deterministic time bound to O(nr) for d = 2, which is optimal if the algorithm is required to output the conflict lists of all the cells (since the worst-case total size of the conflict lists is Θ(r 2 • n r ) = Θ(nr)).Matoušek's later paper also described a deterministic O(nr d−1 )-time algorithm for any constant dimension d, which is again optimal if we need to output all conflict lists, but this result holds under the restriction that r is not too big, i.e., r < n 1−δ for some constant δ > 0. Finally, Chazelle [14] obtained a deterministic O(nr d−1 )-time algorithm without any restriction on r for all constant dimensions d.All of these deterministic algorithms are complicated and/or make use of advanced derandomization techniques such as ε-approximations [21].

Shallow Cuttings
Given a point p, the level of p in H is the number of hyperplanes of H that are below p.We define L ≤k (H) to be the (≤ k)-level, i.e., the region of all points with level in H at most k.A shallow cutting is a variant of the standard cutting that is required to cover only points that are "shallow", i.e., have small levels.
We concentrate on the most important case of k = Θ( n r ), which is sufficient for all of the applications encountered; in fact, shallow cuttings for any value of k can be reduced to this case-see the remarks in Section 5. Matoušek [25] proved the existence of a Θ( n r )-shallow ), which is smaller than the O(r d ) bound for standard 1 r -cuttings and is optimal in the worst case.In particular, for d ∈ {2, 3}, the size is O(r).
In the same paper, Matoušek presented a deterministic algorithm that can construct such a shallow cutting in polynomial time; the running time improves to O(n log r) but only when r is small, i.e., r < n δ for a sufficiently small constant δ.Later, Ramos [29] presented a complicated randomized algorithm for d = 3 (and hence d = 2 as well) with O(n log n) expected running time to construct not just a single shallow cutting, but a hierarchy of O(log n) such shallow cuttings for all r's forming a geometric sequence from 1 to n. (Such a hierarchy is useful in certain applications.)Recently, at SODA'14, Afshani and Tsakalidis [3] managed to achieve the same bound deterministically, albeit only for an orthogonal variant of the problem where the input objects are orthants in R 3 (which nonetheless has applications to dominance range reporting); subsequently, Afshani et al. [2] improved the time bound for a single shallow cutting to O(n log log n) in the word RAM model.The case of orthants is indeed a special case, as orthants can be mapped to halfspaces via a certain transformation [12].

Our Contributions
We present deterministic algorithms to construct a Θ( n r )-shallow 1 r -cutting of size O(r) for d ∈ {2, 3} in O(n log r) time, which is optimal in a comparison-based model (the default model in this paper).Like Ramos' randomized algorithm [29], our algorithms can in fact construct a hierarchy of such shallow cuttings for all r's in a geometric sequence, along with the conflict lists of all cells, in O(n log n) total time.(Note that for our 3-d algorithm, we do not insist the cutting in one layer of the hierarchy be nested inside the cutting in the next layer.) Considering how involved known deterministic algorithms for standard cuttings are, we are happy to report that the new results are not complicated to derive.All the needed background is provided in Section 2; no advanced derandomization techniques are used.The main algorithms are describable in a few lines, as seen in Sections 3 and 4, although their analyses are not trivial.
Like in Chazelle's cutting algorithm [14], we will construct the hierarchy layer by layer, refining the shallow cutting in the previous layer to obtain the shallow cutting in the next layer.A naive implementation would cause an amplification of the constant factor in the cutting size bound, which may "blow up" after logarithmically many iterations.Chazelle used ε-approximations and sparse ε-nets to refine the cutting in each cell, and controlled the blow-up by charging cost to some easily summable quantity (namely, the number of vertices inside the cell).We replace ε-approximations and sparse ε-nets with the more elementary techniques by Megiddo and Dyer [28,17].We use a brute-force search to find the best way to refine the cutting in each cell, and control the blow-up by bounding cost in terms of the cost of an optimal cutting-this strategy is reminiscent of the analysis of approximation algorithms or PTASes (although we do not explicitly design an approximation algorithm to find the minimum-size cutting).
The strategy works beautifully in 2-d, but the constant-factor blow-up becomes tougher to deal with in 3-d, because cost of substructures along the cell boundaries becomes nonnegligible.To tackle this issue, we borrow an idea from a different paper by Ramos [30], of using planar graph separators to group cells into regions, which we call "supercells", so that the total size of the boundaries of the supercells is reduced.(Ramos originally applied this idea to obtain an optimal deterministic algorithm for the 3-d diameter problem and for computing lower envelopes of certain bivariate surfaces in 3-d, but did not consider shallow cuttings in that paper.Also, the details of his algorithms appear more complicated, using ε-nets and supercells of size n δ , whereas we use only supercells of constant size.) In the appendix, we show that our ideas can also lead to a new presentation of a deterministic O(nr)-time algorithm for constructing standard 1 r -cuttings in 2-d.This may be of independent pedagogical interest, considering the long line of previous complicated algorithms.

S o C G ' 1 5 1.4 Applications
As mentioned, shallow cuttings are important because of their numerous applications.Below we list some of the specific implications of our new 2-d and 3-d deterministic algorithms.

1.
The first optimal deterministic O(n log n)-time algorithm to preprocess a set of n points in R 3 into an O(n)-space data structure, so that we can answer a halfspace range reporting query (i.e., report all k points that lie within any given halfspace) in O(log n + k) time.This result follows from the work of Afshani and Chan [1], which was almost deterministic except for the invocation of Ramos' algorithm to construct a shallow cutting during preprocessing.
By a standard lifting transformation, the same result holds for circular range reporting in R 2 (reporting all k points that lie inside any given circle) and k nearest neighbors search in R 2 (reporting all k nearest neighbors to a given point, in arbitrary order, under the Euclidean metric).2. The first optimal deterministic O(n log n + nk 2 )-time algorithm to construct the (≤ k)level of an arrangement of n planes in R 3 .This result follows from the work of Chan [9], which previously required randomization.

The currently fastest deterministic O(n log n+nk•t(k))-time algorithm for constructing the
k-th order Voronoi diagram of n points in R 2 .Here, t(•) denotes the (amortized) update and query time complexity for the 2-d dynamic convex hull problem (under gift-wrapping queries).We have t(k) = O(log k log log k) [7], or better still, t(k) = O(log k) [8] if one has confidence in the over-100-page proof in the latter paper.This result again follows from the work of Chan [9].Compare the result with Ramos' randomized

log k)-time algorithm for 2-d linear programming with at most
k violations (i.e., given a set of n halfspaces, find the point that lies inside all but k of the halfspaces and is extreme along a given direction).This result follows from another work of Chan [10], which was almost deterministic except for the construction of a 2-d shallow cutting in one step.[11], which was almost deterministic except for the construction of a hierarchy of shallow cuttings during certain update operations.

A deterministic O(n log r)-time algorithm to construct a 1
r -net of size O(r) for n points in R 3 with respect to halfspace ranges.This application actually appeared in Matoušek's original paper on shallow cuttings [25].There, he was interested in proving existence of O(r)-size nets, but with our shallow cutting algorithm, the deterministic time bound follows.(Roughly speaking, in the dual, we construct a n r -shallow O( 1 r )-cutting, construct an ε-cutting within each cell for a sufficiently small constant ε, and output an arbitrary plane passing below each subcell.)Of course, ε-nets are well known and central to combinatorial and computational geometry.Previously, there were deterministic nr O(1)time algorithms (e.g., see a recent note [20]), and an O(n log r)-time algorithm but only when r is small, i.e., r < n δ for some constant δ [25].By a standard lifting transformation, the same result holds for ε-nets for points in R 2 with respect to circular disk ranges.

Preliminaries
It will be more convenient to work with the parameter K := n r instead of r.For brevity, a k-shallow K n -cutting will be referred to as a (k, K)-shallow cutting.It satisfies the properties that (i) each cell intersects at most K hyperplanes, and (ii) the cells cover L ≤k (H).Our goal is to compute a (k, Θ(k))-shallow cutting of size O( n k ).For a set V of points in R d , we denote by UH(V ) the region underneath the upper hull of V .We define the vertical decomposition VD(V ) to be the set of interior-disjoint cells covering UH(V ), such that each cell is bounded from above by a different face of UH(V ), is bounded from the sides by vertical walls, and is unbounded from below.For example, in 2-d, the boundary of UH(V ) is a concave chain; a cell in VD(V ) is bounded by an edge of UH(V ) and two walls (downward vertical rays).In 3-d, the boundary of UH(V ) is a concave polygonal surface with triangular faces; a cell in VD(V ) is bounded by a triangle and three walls (trapezoids that are unbounded from below).
In the studied dimensions d ∈ {2, 3}, we find it simpler to work with the following equivalent form of shallow cuttings: Definition 3. Given parameters k, K ∈ [1, n], a (k, K)-shallow cutting for H in vertex form is a set V of points such that (i) every point in V has level at most K, and (ii) UH(V ) covers L ≤k (H).
The conflict list of a point v ∈ V is the set of (at most K) hyperplanes in H that are below v.
A (k, K)-shallow cutting under the original definition can be transformed into a (k, k +K)shallow cutting in vertex form simply by letting V be the set of vertices of the cells (after pruning cells that do not intersect L ≤k (H)).In the reverse direction, a (k, K)-shallow cutting V in vertex form can be transformed to a (k, dK)-shallow cutting under the original definition simply by taking VD(V ), since the conflict list H ∆ of a cell ∆ is contained in the union of the conflict lists of the d vertices of ∆, and thus From now on, all shallow cuttings will be in vertex form by default.Our algorithms do not require any advanced derandomization techniques at all.Only three facts are needed (the third is used only for the 3-d case): Fact 4 (Constant-Size Cuttings).Given a set of n lines in R 2 or planes in R 3 and any constant ε > 0, a (standard) ε-cutting of constant size can be computed in O(n) worst-case time.

S o C G ' 1 5
Fact 6 (Planar Graph Separators).Given a triangulated planar graph with n vertices and a parameter t ∈ [1, n], we can group the triangles into at most a 0 n t connected regions where each region contains at most t triangles, and the total number of edges along the boundaries of the regions is at most a 0 n √ t for some universal constants a 0 , a 0 .Such regions can be computed in O(n log n) time.
Fact 4 was known in the 1980s even before the term "cutting" was coined.In deriving their linear-time algorithm for 3-d linear programming, Megiddo [27] and Dyer [17] implicitly gave a linear-time construction of a 7  8 -cutting of size 4 in 2-d.Megiddo [28] subsequently generalized the construction to d dimensions, yielding a (1 − 1/2 2 d −1 )-cutting of size 2 2 d−1 in linear time.(The cells may not be simplices, but we can triangulate them and the size remains bounded by a constant.)Although these constructions give ε-cuttings for one specific constant ε > 0, iterating a constant number of times automatically yields ε-cuttings for any given constant ε > 0 in linear time.The size of such a cutting may be suboptimal, but for our purposes, any constant size bound will be sufficient.More powerful techniques based on ε-approximations and ε-nets [21,15] can yield better bounds, but a virtue of Megiddo and Dyer's constructions is that they are completely elementary, relying on linear-time median finding as the only subroutine.
Fact 5 was proved by Matoušek [25] by using Chazelle and Friedman's random sampling techniques [15].(In the 2-d case, there is a simpler alternative proof using levels, similar to [23] and implicit in one of the proofs in [6].)For our purposes, we do not actually need to know how Fact 5 is proved and do not care about the construction time-we just need the existence of O( n k )-size shallow cuttings, not for our algorithms themselves but for their analyses.
Fact 6 is a multiple-regions version [18] of the well-known planar graph separator theorem [22], as applied to the dual of the given graph.The multiple-regions version follows from the standard version by recursion.The running time O(n log n) can actually be reduced to O(n) [19], although we do not need this improvement.A version by Frederickson [18] can further guarantee that each region has O( √ r) boundary edges (Fact 6 guarantees the same bound but on average only); again, we do not need such an improvement.

A 2-d Shallow Cutting Algorithm
We begin in 2-d and prove the following theorem, from which our main result will follow as a corollary: Theorem 7.For a set H of n lines in R 2 , a parameter k ∈ [1, n], and some suitable constants B, C, C , given a (Bk, CBk)-shallow cutting V in (in vertex form) for H of size at most C n Bk along with its conflict lists, we can compute a (k, Ck)-shallow cutting V out (in vertex form) for H of size at most C n k along with its conflict lists in O(n + n k log n k ) deterministic time.

Proof.
Algorithm.Let ε be a constant to be set later.Our algorithm is conceptually simple: 1.For each cell ∆ ∈ VD(V in ): 1.1.Compute by Fact 4 an ε-cutting Γ ∆ for H ∆ of O(1) size, where the cells are clipped (and re-triangulated) to lie within ∆.Let Λ ∆ be the set of vertices that define the cells of Γ ∆ .

1.2.
Compute by brute force the smallest subset V ∆ ⊆ Λ ∆ such that (i) every vertex in V ∆ has level in H ∆ at most Ck, and (ii) UH(V ∆ ) covers all vertices in Λ ∆ that are in L ≤2k (H ∆ ).

Return
V ∆ and all its conflict lists.

Complexity.
In Line For Line 1.2, first we determine the level in H ∆ of every vertex in Λ ∆ by a linear scan over H ∆ , and then we probe all possible subsets of Λ ∆ .Since Γ ∆ and Λ ∆ have O(1) size, there are "only" O(1) subsets to test (although the constant is exponentially bigger) and each subset can be tested for the two stated conditions in O(1) time.Thus, the whole step takes time linear in |H ∆ |, which again totals to O(n).In Line 3, computing V out takes time linear in the output size.The conflict list of every output vertex in V ∆ can be computed by a linear scan over H ∆ , again in O(n) total time.

Correctness.
To show that V out is a correct (k, Ck)-shallow cutting for H, we just check that UH(V out ) covers L ≤k (H).This follows since for any point inside a cell of Γ ∆ with level at most k, the three vertices of the cell in Γ ∆ have levels at most k + ε|H ∆ | ≤ k + ε(2CBk) = 2k by setting the constant ε := 1 2CB , and are thus covered by UH(V ∆ ).To bound the size of V out , we compare it against a (2k, 2c 0 k)-shallow cutting V * of size c 0 n 2k provided by Fact 5. Note that V * is covered by VD(V in ) by picking a constant B ≥ 2c 0 , since every vertex in V * has level at most 2c 0 k, and VD(V in ) covers L ≤Bk (H).
We render V * comparable to V out by modifying V * in two steps (we emphasize that these steps are not part of the algorithm but are for the correctness proof only): First, we chop UH(V * ) at the walls of the cells of VD(V in ).A new vertex is formed at each wall; we create two copies of each such vertex (one assigned to each of the two incident cells of VD(V in )) and add them to V * .(See Figure 1.)For each cell ∆ ∈ VD(V in ), let V * ∆ := V * ∩ ∆.Then (i) every vertex in V * ∆ (including the extra vertices added) has level at most 4c 0 k, and (ii) UH(V * ∆ ) is exactly UH(V * ) ∩ ∆ and thus covers L ≤2k (H) ∩ ∆.The number of extra vertices added is at most 2C n Bk , so the size of V * is now at most ( Next, for every cell ∆ ∈ VD(V in ), we snap the vertices in V * ∆ to the vertices of Γ ∆ , i.e., we replace every vertex v ∈ V * ∆ with the three vertices of the cell in Γ ∆ containing v. (See Figure 1 Proof.By Theorem 7, the running time T (n, k) satisfies the recurrence

A 3-d Shallow Cutting Algorithm
We now extend the approach from the previous section to 3-d.We need to incorporate planar separators in the algorithm and further new ideas in the analysis.
Theorem 9.For a set H of n planes in R 3 , a parameter k ∈ [1, n] and some suitable constants B, C, C , given a (Bk, CBk)-shallow cutting V in for H of size at most C n Bk along with its conflict lists, we can compute a (k, Ck)-shallow cutting V out for H of size at most C n k along with its conflict lists in O(n + n k log n k ) deterministic time.

Proof.
Algorithm.Let ε and t be constants to be set later.

0.
Group the faces of UH(V in ) into regions by applying Fact 6 with parameter t.The union of the cells of VD(V in ) defined by the triangles in a region will be called a supercell of VD(V in ). 1.For each supercell ∆ of VD(V in ): 1.1.Do as in Line 1.1 of the algorithm in Section 3. 1.2.Do as in Line 1.2 of the algorithm in Section 3.

Do as in
Figure 2 Replacing the concave chain UH(Sw) with a sparse concave chain UH(S w ) at a wall w of a supercell of VD(Vin).The set S w is a planar shallow cutting.
Correctness.By the same argument as in Section 3, we see that V out is a correct (k, Ck)shallow cutting for H, this time by setting the constant ε : As in Section 3, we bound the size of V out by comparing it against a (2k, 2c 0 k)-shallow cutting V * of size c 0 n 2k provided by Fact 5.As before, V * is covered by VD(V in ), this time by picking a constant B ≥ 6c 0 .
We render V * comparable to V out by modifying V * in three steps, the second of which is new (again these steps are not part of the algorithm but are for the correctness proof only): First, we chop UH(V * ) at the walls of the supercells of VD(V in ).A new planar concave chain of vertices is formed at each wall; we create two copies of the chain (one assigned to each of the two incident cells of VD(V in )) and add their vertices to V * .For each supercell ∆ of VD(V in ), let V * ∆ := V * ∩ ∆.Then (i) every vertex in V * ∆ has level at most 6c 0 k, and (ii) UH(V * ∆ ) ∩ ∆ is exactly UH(V * ) ∩ ∆ and thus covers L ≤2k (H) ∩ ∆.Unfortunately we do not have good enough bounds on the number of extra vertices added to V * .To reduce the size of V * , we replace the chain S w of vertices at every wall w of a supercell with a sparser set S w of vertices defined as follows.(See Figure 2.) Let H w be the set of planes in H intersecting w, and let S w be a planar (6c 0 k, 6c 2 0 k)-shallow cutting provided by Fact 5 for the intersection of H w with the vertical plane through w (a set of lines).Let σ w be the slab delimited by the two vertical lines through the two subwalls of w.We clip UH(S w ) to σ w , add the two new vertices to S w , and remove any vertices outside σ w .Observe that S w is covered by w (and thus by VD(V in )) by picking a constant B ≥ 12c 2 0 , because every vertex in S w (including the two extra vertices added) has level in H w at most 12c

Final Remarks
We remark that concentrating on the k = Θ( n r ) case is indeed without loss of generalityour algorithms can be easily applied to construct k-shallow 1 r -cuttings for any k and r.Matoušek [25] proved the existence of such cuttings of size O(r d/2 ( kr n + 1) d/2 ).We can construct cuttings of this size with the following time bounds for d ∈ {2, 3}, which are optimal if we are required to output all conflict lists (since the worst-case total size is Θ(r ) by known results (e.g., Chazelle's algorithm [14], or in the d = 2 case, our algorithm from the appendix).This yields a ).The size and time bounds are exactly as stated.
We should mention that despite their conceptual simplicity, our algorithms are not likely to be practical in their present form, because of the huge hidden constant factors.
Our approach of incorporating brute-force search and comparing the cost of our solution to that of an optimal solution was inspired by approximation algorithms.An interesting problem is to actually find PTASes to compute the minimum-size (shallow or standard) cutting, or compute cuttings with constant factors approaching the worst-case optimum [26], with comparable running time.
The optimality of the O(n log r) time bound assumes a comparison-based model, but it remains to be seen if there are faster algorithms to compute a single shallow cutting in the word RAM model for integer input [13].
Generalization of our shallow cutting algorithms to higher dimensions is also open; odd dimensions appear particularly challenging.

A Appendix: A 2-d Standard Cutting Algorithm
In this appendix, we describe how our ideas can be used to rederive known results by Matoušek [24] and Chazelle [14] for standard cuttings in 2-d.As before, it will be more convenient to work with the parameter K := n r instead of r.The target O(nr) time bound becomes O( n 2 K ).Our cuttings will be the vertical decompositions of noncrossing line segments.Given a set S of noncrossing line segments inside a cell ∆, we define the vertical decomposition VD(S) to be the subdivision into trapezoids, obtained by drawing a vertical upward/downward ray at each vertex till the ray hits another segment.We define VD ∆ (S) to be VD(S) clipped inside a given cell ∆.
Theorem 12.For a set H of n lines in R 2 , a parameter K ∈ [1, n] and suitable constants B, C, given a BK n -cutting T in for H of size at most C( n BK ) 2 along with its conflict lists, we can compute a K n -cutting T out for H of size at most C( n K ) 2 along with its conflict lists in O( n 2 K ) deterministic time.

Proof.
Algorithm.Let ε be a constant to be set later.

1.
For each cell ∆ ∈ T in : 1.1.Compute by Fact 4 an ε-cutting Γ ∆ for H ∆ of O(1) size, where the cells are clipped (and re-triangulated) to lie within ∆.Further refine the cells of Γ ∆ by drawing a vertical line at every vertex of Γ ∆ .Let Λ ∆ be the set of vertices that define the cells of (the refined) Γ ∆ .
Figure 3 Simplifying a level.

1.2.
Compute by brute force the smallest set of noncrossing line segments S ∆ , whose endpoints are from Λ ∆ , such that each trapezoid in VD ∆ (S ∆ ) intersects at most K lines of H ∆ .

2.
Return T out := ∆∈Tin VD ∆ (S ∆ ) and all its conflict lists.Correctness.Clearly T out is a K n -cutting for H.To bound the size of T out , we compare it against some optimal K n -cutting for H of size O(( n K ) 2 ), specifically, the cutting produced by Matoušek's construction [23] using levels.(We would have preferred a cleaner proof that compares T out against an arbitrary optimal-size cutting, like in our earlier proofs, but were unable to make the details work.)We adapt his construction to incorporate our earlier ideas of chopping and snapping.
We first pick a random index j 0 ∈ [1, 0.5K].For each j ≡ j 0 (mod 0.5K), consider the j-level (the set of points on the arrangement with level j), which is an x-monotone chain.Since the arrangement has O(n 2 ) vertices in total, the expected total number of vertices in these chains is O( n 2 K ).We chop these chains into subchains at the boundaries of the cells of T in .Since the total number of vertices along cell boundaries is O(C( n BK ) 2 • BK) = O( C B ) n 2 K , the expected total number of subchains created is at most O( C B ) n 2 K 2 .We simplify each subchain by selecting every 0.1k-th vertex from the subchain and forming a shorter x-monotone chain through these vertices, while keeping the start and end vertex.(See Figure 3.) Note that the levels of points on a simplified subchain can deviate from the original level by at most ±0.1K.Let S * be the set of the edges of the simplified subchains.Since the size of a simplified subchain is at most one plus 1 0.1K -th the original size of the subchain, the expected size of S * is at most O(1 + C B )( n K ) 2 .We pick a j 0 so that the size of S * is at most its expectation.For each boundary edge of the cells of T in , we subdivide it by selecting every 0.1K-th vertex of the arrangement lying on the edge.We add two copies of the resulting edges to S * (one assigned to each of the two incident cells).Since the number of extra edges added is O(C( n BK ) 2 • BK 0.1K ) = O( C B ( n K ) 2 ), the size of S * remains at most O(1

S o C G ' 1 5
In 2-d and 3-d, the size of VD(V ) is O(|V |), and computing VD(V ) takes O(|V | log |V |) time by an optimal convex hull algorithm.

Fact 5 (
Existence of O( n k )-Size Shallow Cuttings).Given a set of n lines in R 2 or planes in R 3 and a parameter k ∈ [1, n], there exists a (k, c 0 k)-shallow cutting (in vertex form) of maximum size c 0 n k , for some universal constants c 0 , c 0 .

3 2 c 0 1− 6 B and picking a constant B > 6 . 8 .Figure 1
Figure 1 Modifying V * by chopping (adding points marked by black squares) and snapping (replacing a point with three points indicated by white arrows).The cutting Γ ∆ is shown in dashed lines, and its vertices Λ ∆ are marked by crosses.
Line 3 of the algorithm in Section 3. Complexity.Line 0 takes O( n k log n k ) time by Fact 6, since |V in | ≤ C n Bk = O( n k ).Lines 1.1, 1.2, and 2 take O(n + n k log n k ) time by an analysis similar to Section 3, since each supercell still has O(1) complexity for t constant. w

Complexity.
Line 1.1 takes time linear in |H ∆ | by Fact 4, for a total of ∆∈Tin O(|H ∆ |) = O(C( n BK ) 2 • BK) = O( n 2 K ) time.For Line 1.2, we probe all possible sets S ∆ of line segments with endpoints from Λ ∆ .Since Γ ∆ and Λ ∆ have O(1) size, there are "only" O(1) sets to test and each set can be tested in O(|H ∆ |) time.Thus, the whole step takes time linear in |H ∆ |, which again totals to O( n 2 K ).
2 0 k, and w covers L ≤Bk (H) ∩ σ w = L ≤Bk (H w ) ∩ σ w .Then (i) every vertex in V * ∆ now has level (in H) at most 12c 2 0 k, and (ii) UH(V * ∆ ) can only increase in its coverage, because each old set S w is contained in L ≤6c0k (H) ∩ σ w and the new concave chain UH(S w ) covers L ≤6c0k (H) ∩ σ w .For each wall w, the size of S w is at most c 0 Then Line 1.2 guarantees that |V ∆ | ≤ |V * ∆ | by setting the constant C := 12c 2 0 +1.Therefore, totalling over all cells in VD(V in ), we have|V out | ≤ |V * | ≤ (2c 0 + For a set H of n planes in R 3 , a parameter k ∈ [1, n],and some suitable constants B, C, C , we can compute a (B i k, CB i k)-shallow cutting of size at most C n B i k , along with its conflict lists, for all i = 0, 1, . . ., log B For a set H of n lines in R 2 and parameters k, r ∈ [1, n], can compute a k-shallow 1 r -shallow cutting of size O(r( kr n + 1)), along with its conflict lists, in O(n log r + r( kr n + 1) n r ) deterministic time.For a set H of n planes in R 3 and parameters k, r ∈ [1, n], we can compute a k-shallow d ) in deterministic time O(k( k n/r ) d−1