Научная статья на тему 'On parameterized complexity of hitting set problem for axis-parallel squares intersecting a straight line'

On parameterized complexity of hitting set problem for axis-parallel squares intersecting a straight line Текст научной статьи по специальности «Математика»

CC BY
58
5
i Надоели баннеры? Вы всегда можете отключить рекламу.
Журнал
Ural Mathematical Journal
Scopus
ВАК
Область наук
Ключевые слова
HITTING SET PROBLEM / DYNAMIC PROGRAMMING / COMPUTATIONAL GEOMETRY / PARAMETERIZED COM-PLEXIT

Аннотация научной статьи по математике, автор научной работы — Khachay Daniel M., Khachay Michael Yu.

The Hitting Set Problem (HSP) is the well known extremal problem adopting research interest in the fields of combinatorial optimization, computational geometry, and statistical learning theory for decades. In the general setting, the problem is NP-hard and hardly approximable. Also, the HSP remains intractable even in very specific geometric settings, e.g. for axis-parallel rectangles intersecting a given straight line. Recently, for the special case of the problem, where all the rectangles are unit squares, a polynomial but very time consuming optimal algorithm was proposed. We improve this algorithm to decrease its complexity bound more than 100 degrees of magnitude. Also, we extend it to the more general case of the problem and show that the geometric HSP for axis-parallel (not necessarily unit) squares intersected by a line is polynomially solvable for any fixed range of squares to hit.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «On parameterized complexity of hitting set problem for axis-parallel squares intersecting a straight line»

URAL MATHEMATICAL JOURNAL, Vol. 2, No. 2, 2016

ON PARAMETERIZED COMPLEXITY OF THE HITTING SET PROBLEM FOR

AXIS-PARALLEL SQUARES INTERSECTING A STRAIGHT LINE

Daniel M. Khachay

N.N. Krasovskii Institute of Mathematics and Mechanics, Ural Branch of the Russian Academy of Sciences and Ural Federal University, Ekaterinburg, Russia, [email protected]

Michael Yu. Khachay

N.N. Krasovskii Institute of Mathematics and Mechanics, Ural Branch of the Russian Academy of Sciences and Ural Federal University, Ekaterinburg, Russia, [email protected]

Abstract: The Hitting Set Problem (HSP) is the well known extremal problem adopting research interest in the fields of combinatorial optimization, computational geometry, and statistical learning theory for decades. In the general setting, the problem is NP-hard and hardly approximable. Also, the HSP remains intractable even in very specific geometric settings, e.g. for axis-parallel rectangles intersecting a given straight line. Recently, for the special case of the problem, where all the rectangles are unit squares, a polynomial but very time consuming optimal algorithm was proposed. We improve this algorithm to decrease its complexity bound more than 100 degrees of magnitude. Also, we extend it to the more general case of the problem and show that the geometric HSP for axis-parallel (not necessarily unit) squares intersected by a line is polynomially solvable for any fixed range of squares to hit.

Key words: Hitting set problem, Dynamic programming, Computational geometry, Parameterized complexity.

Introduction

We consider the parameterized complexity of a geometric statement of the well-known Hitting Set Problem (HSP), engaging researchers in combinatorial optimization, computational geometry and statistical learning from early 1980-th.

To the best of our knowledge, HSP gains theoretical interest because it was the first intractable combinatorial optimization problem, whose approximation algorithms were dramatically improved [11] on the basis of Vapnik and Chervonenkis's [15] results in statistical learning theory. The development of randomized algorithms for HSP and related combinatorial problems defined on range spaces of finite VC-dimension, initiated by seminal papers [1] and [6] established a new field in modern computational geometry.

On the other hand, the concepts of hitting set and classifier ensemble, making decisions by some voting logic, seem to be related very closely. Consequently, approximation techniques developed for HSP and its dual Set Cover problem are closely related to the well-known boosting learning technique [14], especially in the context of the minimal committee problem looking for minimum VC-dimension correct majoritary classifier ensemble (see, e.g., [8-10]).

In addition, new efficient optimal and approximation algorithms for Hitting Set and Set Cover problems have a practical importance, e.g. in design of reliable wireless networks [13].

The Hitting Set Problem for Axis-Parallel Rectangles (HSP-APR) is a well-studied geometric setting of the HSP. This setting is also NP-hard [5] and remains intractable even for unit squares.

In papers [2,7], first polynomial time approximation schemes (PTAS) are proposed for axis-parallel squares. Paper [3] introduces 6-approximation polynomial time algorithm for the case of rectangles intersecting some axis-monotone curve. In [4], this particular case of HSP-APR is proved to be NP-hard even for a straight line and the first 4-approximation algorithm is constructed.

In this paper, we improve one of the recent results describing a polynomial time solvable subclass of this problem. Recently, Mudgal and Pandit [12] introduced an optimal polynomial time algorithm for the Hitting Set Problem for Axis Parallel Unit Squares Intersecting a given Straight Line (HSP-APUS-ISL). The theoretical importance of this result can hardly be overestimated, since almost all known geometric settings of the HSP, including extremely specific ones, are intractable. Unfortunately, this algorithm is impractical due to its incredibly high time consumption of O(n145). In Section 2, we propose the improved version of the algorithm, whose complexity bound O(n37) is still high but by more than 100 degrees of magnitude better. Further, in Section 3, we extend this algorithm on a case of squares of different sizes (HSP-APS-ISL) and show that this problem can be solved to optimal in polynomial time for any fixed range of square sizes.

1. Problem statement

We consider the following geometric setting of the well-known Hitting Set Problem, which is called the Hitting Set Problem for Axis-Parallel Squares Intersecting a Straight Line (HSP-APS-ISL) (see Fig. 1). In the Euclidean plane, a finite collection S = {Q1 ,..., Qn} of axis-parallel (closed) squares intersecting some straight line d is given. For the collection S, it is required to find a hitting set P* of the minimum size, i.e.

P * = arg min{|P |: P C R2, P If Q. = 0, j = 1,...,n}.

Figure 1. Problem statement

Figure 2. K does not exceed the number of rectangular cells induced by the lines defining borders of

Qi,..., Qn

Without loss of generality we assume that the line d is defined by the equation kx + y = 0 for some k > 1.

The collection S partitions the plane onto mutually disjunctive regions 61,... ,6k such that, any points p1 and p2 belong to the same region 6k if and only if

(VQj G S) ((pi G Qj) ^ (P2 G Qj)).

Since each minimal hitting set contains at most one point pk taken from any region 6k, the initial continuous problem is polynomially equivalent to the corresponding combinatorial one, which is of

finding a minimal hitting set among subsets of the finite set

P = {P1,...,Pk }, Pk e 0k \ y ft.

l=k

Indeed, for any collection of n axis-parallel squares (and even rectangles), the corresponding set P contains at most O(n2) elements (see Fig. 2) and can be constructed in polynomial time.

2. Improved algorithm for unit squares

In this section we describe parameterized optimal algorithm for HSP-APS-ISL and discuss its application to solving the special case of this problem, HSP-APUS-ISL, where collection S consists of equal squares (without loss of generality, which are assumed to be unit). We start with the similar (but not the same) notation to introduced in [12].

First, we partition the plane by straight lines Z0,..., lr+2 orthogonal to d with distance of \/2/2 between each neighboring lines such that, for each square Qj e S, its center Cj is located between l1 and lr+1 (hereinafter all tights are broken arbitrarily). For any i = 0,..., r + 1, we denote by Rj the stripe located between lj and Zj+1. Next, we introduce the notation Sj = {Qj: Qj n Rj = 0}, Sin = {Qj e Sj: Cj e Rj}, and Soui = Sj \ Sjn. By construction, Soui C Sj_ 1 U Sj+1.

As in [12], we assume that any stripe Rj is intersected at least by a single square Qj. Further, we find an optimal hitting set recursively, by the dynamic programming procedure presented in Algorithm 1.

Algorithm 1 Parameterized exact DP based algorithm

Input: a collection S = {Qi,..., Qn} of axis-parallel squares intersecting a given straight line d Outer parameter: an upper bound q of the size of subsets to search for Output: the minimum size hitting set P for S.

Construct a set P induced by the collection S; let Pj = Pn R^; for all U C Pr-1 and V C Pr, s.t. |U|, |V| < q do

define Wr = {W C Pr+1: |W| < q, U U V U W n Qj = 0 (Qj e Sr)} and

T(rUV) = f min{|U U V U W| : W e Wr}, if Wr = 0, ( , , ' y otherwise

end for

for all 1 < i < r — 1 do

for all U C Pi-1 and V C Pj, s.t. |U|, |V| < q do

define Wj = {W C Pj+i: |W| < q, U U V U W n Qj = 0 (Qj ^l>i S;)} and

T (i,U,V)

|U| + min{T(i + 1, V, W) : W G W,}, if W, = 0,

otherwise

8: end for 9: end for

10: Output

argmin{T(1, U, V): U C Po, V C Pi, |U|, |V| < q}.

Indeed, for any i e 1,..., r, denote Pj = Pn Rj. Let, for U C Pj_1 and V C Pj, T (i, U, V) be the size of a smallest hitting set P for IJz>j Si such that P n Pj_1 = U and P n Pj = V. Similarly to [12], we express T(i, U, V) in terms of T(i + 1, U', V') but for a substantially smaller subsets U' and V'.

Algorithm 1 has an outer parameter q, which meaning is twofold. On the first hand, q depends on size-length of the squares to hit and provides a uniform upper bound for the smallest size of a hitting set for an arbitrary Si. On the other hand, q bounds the number of subset enumerated at each iteration of Algorithm 1. Therefore, its complexity bound can be defined in terms of q again.

Figure 3. Any unit square Qj G S*n is hitted by one of the centers A and B of \/2/2-squares

The following Theorem summarizes the properties of Algorithm 1.

Theorem 1. For q = 6, Algorithm 1 finds an optimal hitting set for the collection S in time of O(n37).

Proof. We start with the following simple fact. By construction, for any i G {1,..., r} and any j G S|n, Qj f {A, B} = 0 (see Fig. 3). As a consequence, for any optimal hitting set P and any i G {1,..., r}, |Pi | < 6, where Pi = P f Ri. Indeed, assume by contradiction that, for some i, |Pi| > 6. Since Si C Si-1 U Sin U Si+1 and Pi f Qj = 0 for any Qj G S, we can substitute P by an appropriate 6-point subset P' such that P U P' \ Pi remains a hitting set for S and |P' | < |P |. The contradiction obtained with optimality of P finalizes our argument. Hence, Algorithm 1 realizing classic dinamic programming technique finds an optimal hitting set for the given collection S.

Let us obtain an upper bound for its running time. Obviously, the loop 5-9 having r — 1 = O(n) iterations is the most time consuming part of Algorithm 1. In each iteration, O(|Pi-116) x O(|P|6) = O(n24) subproblems each having time complexity of O(n12) should be solved. Therefore, the overall running time is O(n37). □

3. General case of HSP-APS-ISL

By scaling, we can easily show that the result of Section 2 remains valid in the case of equal squares of any side-length. In this section, we extend this result to the more general case. Let a and b be the minimum and the maximum values of side-lengths of the given squares. By the same reason, assume that a = 1.

3.1. Case of k = 1

We proceed with the following observation. For k = 1, as in Section 2, any square Q of size at least 1, whose center belongs to some stripe R' of width \/2/2 orthogonal to the line d, is hitted by the points A and B (like in Fig. 3). Therefore, in this case, we can adapt Algorithm 1 to take into account the squares, whose side-lengths are greater then 1.

Indeed, as above, consider stripes R of width b^/2/2 consisting all the squares. Then, partition each of them onto \b] substripes of width V2/2 (see Fig. 4) and use all other notation introduced in Section 2 as is. The following assertion is valid.

Theorem 2. Let the given collection S consists of squares with side-lengths from [l,b]. Algorithm 1 with q = 6[b] finds an optimal hitting set for this collection in time of O(n6q+1) = O(n36rbl+i).

The argument proving Theorem 2 is similar to the proof of the Theorem l. For the sake of brevity, we skip the proof.

3.2. What if k > 1

In this section, we show that to find an optimal solution for HSP-APS-ISL we can use Algorithm l again with an adjusted value of the parameter q. As above, this value is defined by the number of points needed to hit any square intersecting the line d, whose center belong to some stripe of the width \/2/2. Although, for k > l, points A and B (as in Fig. 3) do not hit all such squares, we can still provide a finite point collection that does.

Without loss of generality, assume that the strip R (of width \/2/2)) orthogonal to the line d is located symmetrically with respect to the origin. An arbitrary square Q intersecting the line d, whose center C belongs to the stripe R is called R-centered.

Consider finite point sequences {At} and {Bt} defined by the following equation

At = - Bt =

k + 2t l - 2tk

V2(1 + k2)' V2(l + k2)

(t e{-l,...,p}). (3.l)

Theorem 3. For any k> l, any R-centered square Q of size belonging to the range [l,p\/2] is hitted by the points A0,... Ap, B0, B1,... Bp.

Proof. 1. Consider an arbitrary R-centered square Q. Theorem 3 is evidently valid if the center C of this square belongs to one of a/2/2 -squares centered at Ao or Bo. Consider the other option. Without loss of generality, assume that C belongs to right-upper part of the stripe R (as in Fig. 4). The square Q coincides with an intersection of four closed halfplanes bordering it from the left, top, right, and bottom sides. We denote them by hl,htand Hg, respectively. To proceed with the argument, it is sufficient to prove that there exists a point At g Q = hl d Ht d Hr d Hb .

The inclusion At g Ht is valid for any t = 0,1,. .. ,p, since yAt — yc by the location assumption for the square Q. Furthermore, this assumption implies that A-i can not be located to the right of the border of hl. Suppose, At-i g hl and Ai g hl for any i > t. Now, we show that At is the desired point hitting the square Q. Indeed, consider the intersection point D of the line d with the vertical line visiting the point Ai-i. Since

k + 2(t - 1)

Xd

V2(1 + k2)

and

we obtain

kxD + yD = 0,

1 - 2tk + k(k + 2(t - 1)) (k - 1)2

yAt - yD = -, =- = -. = > 0.

At 2^2(1 + k2) 2^2(1 + k2) >

Therefore, At g Hg (see Fig. 6).

Inclusion At g Hr follows easily from equation (3.1). Indeed, for any k > 1

XAt - XA- = 2T2(TTk^ < 1/2 - XC - ^t-1,

since a size of the square Q is at least 1. Thus, At g Hl d Ht d Hr d Hg = Q.

2. To obtain the upper side-length bound of the fittable squares, it is sufficient to calculate the minimum side-length of the R-centered square touching the point Ap by its left side (Fig. 7). It

Figure 6. At belongs to Hb .

is easy to show that this length coincides with s = 2(xp — xap ), where Xf can be found from the following system

k + 2p

xe = xa

V2(l + k2)

kxE + Ve = 0, —xe + Ve = z,

—xf + kyF = —

—xf + VF = z,

vTTk2 2^2 ,

i.e.

and

xf =

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

k3 + 2pk2 + 2pk — l 2v^(k — l)vTTP

k3 + 2pk2 + 2pk — l k + 2p

(k — lV2(l + k2) ^/2(l + k2)

a/2(1 + k2] + py/2(l + k2)

2

kl

s

To complete our proof, we should minimize s = s(k) for k > l. The derivative

V2 k(k — l)2 — 2p(k + l)

s'(k) =

2 (k — 1)2vT + F

is vanishing if and only if

k3 — 2k2 + k = 2p(k + l). (3.2)

For p = 0, the function s(k) has no minimizers in (l, The right limit

lim s(k) = inf{s(k): k > l} = l, although s(l) = as it follows from Subsection 3.l.

Given that p > 1, it is sufficient to consider a few cases. If p = 1 we have a single root (in the feasible domain {k: k > 1}) and it is easy to see that this root is a minimizer of s(k), since s'(k) changes its sign at this point. Further, it can be verified that, for any p > 1, we also have the unique extremal point.

Denote by fc = fc(p) this extremum for the given p. Using equation (3.2), we obtain

s(fc) =

y5(1 + fc2)3/2 2(1 +fc) '

Therefore, since k > 1,

Theorem is proved.

s(fc(p)) p

y5(1 + fc2)3/^ ^2(3/2 + fc2) > fc(1 - fc)2 > (fc - 1)2

Figure 7. Estimation of s(fc).

Remark 1. It is easily to verify that k = fc(p) is a monotonically increasing function and tends to as p ^ +rc>. Therefore,

lim #M= .¡m = ^

p 2(1 +fc)

Applying the approach proposed in Subsection 3.1, we obtain our final result. Indeed, let we should find the minimum hitting set for n squares intersecting the line d; sizes of the squares belong to [a',b']. First, by scaling, transform their sizes to the range [1,b], where b = b'/a'.

Further, partition the plane onto d-orthogonal stripes of width b\/2/2; we call these stripes wide. Finally, we partition each wide stripe onto |"b] \/2/2-width narrow substripes.

By construction, any square intersecting a wide stripe is centered at this or two neighboring wide stripes. Therefore, by Theorem 3, it can be hit by q = 6|b] +2|"b/\/2], and the optimal hitting set can be found by Algorithm 1 using this value of q. Hence, we proved the following theorem.

Theorem 4. For any constant c and any square collection with size-range [a,ca], the problem HSP-ASP-ISL can be solved to optimality in time O(n6q+1), where q = 6[c] + 2|"c/\/2"|.

Remark 2. Results of Theorem 2 and 3 shows that HSP-APS-ISL is polynomial solvable for any fixed range of squares, since the running time bound of Algorithm 1 in this case is

O(n6(6\cl+2\c/V2l)+1)_

Unfortunately, the question of constructing for this problem an FPT algorithm having parameterized complexity bound like f (c) ■ nO(1) still remains open.

4. Conclusion

In the paper, the improved version of the optimal polynomial time hitting set construction algorithm for axis-parallel squares intersecting the given straight line introduced in [l2] is proposed. Our modification has better upper time complexity bound by l00 orders of magnitude.

Also, we propose an extension of this algorithm to the case of non-unit squares and show that the problem can be solved to optimality in polynomial time for any fixed range of squares.

As for the future work, it would be interesting to establish the complexity status of the considered problem in the case, where this parameter is unbounded. Also, it is interesting to answer the question, does the Hitting Set Problem for Axis-Parallel Squares belong to the class of Fixed Parameter Tractable (FPT) problems.

Acknowledgements

This research was supported by Russian Foundation for Basic Research, grant no. l6-07-00266 and Complex Program of Ural Branch of RAS, grant no. l5-7-l-23.

REFERENCES

1. Bronnimann H. and Goodrich M. T. Almost optimal set covers in finite vc-dimension // Discrete & Computational Geometry, l995. Vol. l4, no. 4. P. 463-479. DOI: l0.l007/BF025707l8

2. Chan T. M. Polynomial-time approximation schemes for packing and piercing fat objects // J. of Algorithms, 2003. Vol. 46, no. 2. P.l78-l89. DOI: l0.l0l6/S0l96-6774(02)00294-8

3. Chepoi V. and Felsner S. Approximating hitting sets of axis-parallel rectangles intersecting a monotone curve. Computational Geometry, 20l3. Vol. 46, no. 9. P. l036-l04l. DOI: l0.l0l6/j.comgeo.20l3.05.008

4. Correa J., Feuilloley L., Perez-Lantero P. and Soto J. A.Independent and hitting sets of rectangles intersecting a diagonal line // Algorithms and complexity. Discrete & Computational Geometry, 20l5. Vol. 53, no. 2. P. 344-365. DOI: l0.l007/s00454-0l4-966l-y

5. Fowler R. J., Paterson M. S. and. Tanimoto S. L. Optimal packing and covering in the plane are np-complete. Information Processing Letters, l98l. Vol. l2, no. 3. P. l33-l37. DOI: l0.l0l6/0020-0l90(8l)90lll-3

6. Haussler D. and Welzl E. Epsilon-nets and simplex range queries // Discrete & Computational Geometry, l987. Vol. 2, no. 2. P. l27-l5l. DOI: l0.l007/BF02l87876

7. Hochbaum D.and Maass W. Approximation schemes for covering and packing problems in image processing and vlsi // J. ACM, l985. Vol. 32, no. l. P. l30-l36. DOI: l0.ll45/2455.2l4l06

8. Khachay M. Committee polyhedral separability: complexity and polynomial approximation // Machine Learning, 20l5. Vol. l0l, no. l. P. 23l-25l. DOI: 10.1007/s10994-015-5505-0

9. Khachay M. and Poberii M. Complexity and approximability of committee polyhedral separability of sets in general position. Informatica, 2009. Vol. 20, no. 2. P. 217-234.

10. Khachay M., Pobery M. and Khachay D. Integer partition problem: Theoretical approach to improving accuracy of classifier ensembles // International J. of Artificial Intelligence, 2015. Vol. 13, no. 1. P. 135-146.

11. MatouSek J. Lectures on Discrete Geometry. Springer: New York, 2002. DOI: 10.1007/978-1-46130039-7

12. Mudgal A. and Pandit S. Covering, hitting, piercing and packing rectangles intersecting an inclined line // Proceedings of the Combinatorial Optimization and Applications: 9th International Conference, (COCOA 2015, Houston, TX, USA, December 18-20, 2015), Zaixin Lu, Donghyun Kim, Weili Wu, Wei Li, and Ding-Zhu Du (Ed.). LNCS, Springer International Publishing: Cham, 2015. Vol. 9486. P. 126-137. DOI: 10.1007/978-3-319-26626-8_10

13. Ramakrishnan S. and Emary I. M. M. El. Wireless sensor networks: from theory to applications. CRCPress, Taylor & Francis, 2014.

14. Schapire R. and Freund Y. Boosting: Foundations and algorithms. MIT Press, 2012.

15. Vapnik V. and Chervonenkis A. On the uniform convergence of relative frequencies of events to their probabilities // Theory Probab. Appl., 1971. Vol. 16. P. 264-280. DOI: 10.1137/1116025

i Надоели баннеры? Вы всегда можете отключить рекламу.