scieee AI-readable full text Open interactive document viewer

Matching random colored points with rectangles

Corujo, Josué,Flores Peñazola, David,Huemer, Clemens,Pérez Lantero, Pablo,Seara Ojea, Carlos

Abstract

Let S ¿ [0, 1]2 be a set of n points, randomly and uniformly selected. Let R ¿ B be a random partition, or coloring, of S in which each point of S is included in R uniformly at random with probability 1/2. We study the random number M(n) of points of S that are covered by the rectangles of a maximum strong matching of S with axis-aligned rectangles. The matching consists of closed rectangles that cover exactly two points of S of the same color. A matching is strong if all its rectangles are pairwise disjoint. We prove that almost surely M(n) = 0.83 n for n large enough. Our approach is based on modeling a deterministic greedy matching algorithm, that runs over the random point set, as a Markov chain.

Full text

XVIII Spanish Meeting on Computational Geometry, Girona, July 1-3, 2019 Matching random colored points with rectangles Josu´e Corujo∗1, David Flores-Pe˜naloza†2, Clemens Huemer‡3, Pablo P´erez-Lantero§4, and Carlos Seara¶3 1Universit´e Paris-Dauphine, France. Fac. de Matem´atica y Computaci´on, Universidad de La Habana, Cuba. 2Dpto. de Matem´aticas, Facultad de Ciencias, Universidad Nacional Aut´onoma de M´exico, D.F., Mexico. 3Dept. de Matem`atiques, Universitat Polit`ecnica de Catalunya, Spain. 4Dpto. de Matem´atica y Ciencia de la Computaci´on, Universidad de Santiago, Santiago, Chile. Abstract Let S⊂[0,1]2be a set of npoints, randomly and uniformly selected. Let R∪Bbe a random partition, or coloring, of Sin which each point of Sis included in R uniformly at random with probability 1/2. We study the random number M(n) of points of Sthat are covered by the rectangles of a maximum strong matching of Swith axis-aligned rectangles. The matching consists of closed rectangles that cover exactly two points of Sof the same color. A matching is strong if all its rectangles are pairwise disjoint. We prove that almost surely M(n)≥0.83 nfor nlarge enough. Our approach is based on modeling a deterministic greedy matching algorithm, that runs over the random point set, as a Markov chain. 1 Introduction Given a point set S⊂R2of npoints, and a class Cof geometric objects, a geometric matching of Sis a set M⊆ C such that each element of Mcontains exactly two points of Sand every point of Slies in at most one element of M. A geometric matching is strong if the geometric objects are pairwise disjoint, and perfect if every point of Sbelongs to (or is covered by) some element of M. This type of geometric matching problems was considered by ´ Abrego et al. [1], who studied the existence and properties of matchings for point sets in the plane when Cis the class of axis-aligned squares, or the class of disks. Let S=R∪B⊂R2be a set of ncolored points in the plane, each point colored red or blue, where ∗Email: [email protected]. †Email: dfloresp[email protected]. Research partially supported by PAPIIT IN117317 (UNAM, Mexico). ‡Email: [email protected]. Research supported by projects MTM2015-63791-R (MINECO/FEDER) and Gen. Cat. DGR 2017SGR1336. §Email: [email protected]. Research supported by project CONICYT FONDECYT/Regular 1160543 (Chile). ¶Email: [email protected]. Research supported by projects MTM2015-63791-R MINECO/ FEDER and Gen. Cat. DGR 2017SGR1640. This work has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Sk lodowska- Curie grant agreement No 734922. Rand Bare the sets of red and blue points, respectively. A geometric matching of Sis called monochromatic if all matching objects cover points of the same color, and bichromatic if all matching objects cover points of different colors. For example, monochromatic matchings of two-colored point sets in the plane with straight segments have been studied [4, 5]. In the case of bichromatic matchings with straight segments, a classical result in discrete geometry asserts that for any planar point set Sconsisting of nred points and n blue points in general position (i.e., no three points of Sare collinear) there exists a perfect, strong bichromatic matching of Swith straight segments. In this paper, we consider strong monochromatic matchings with axis-aligned rectangles. Every rectangle will be axis-aligned and a closed set. Caraballo et al. [2] studied monochromatic strong matchings of Swith rectangles from the algorithmic point of view. That is, the problem of finding a monochromatic strong matching of Swith the maximum number of rectangles; proving that the problem is NP-hard and giving a polynomial-time 4- approximation algorithm. As noted by Caraballo et al., this problem is a special case of the Maximum Independent Set of Rectangles problem (MISR): Given a finite set Rof rectangles in the plane, find a subset R0⊆ R of maximum cardinality, denoted α(R), such that every pair of rectangles in R0are disjoint. Indeed, suppose that we want to find a monochromatic matching of Swith the maximum number of rectangles. For every distinct p, q ∈R2, let D(p, q) be the minimum axis-aligned rectangle that encloses pand q. Let R(S) be the set of all rectangles D(p, q) such that p, q ∈S,pand qhave the same color, and D(p, q) contains no points of Sdifferent from pand q. Finding a monochromatic strong matching of Swith the maximum number of rectangles is equivalent to finding in R(S) a maximum subset of pairwise disjoint rectangles, whose size is α(R(S)). That is, to solving the MISR problem in R(S). We study monochromatic strong matchings of S with rectangles from the combinatorial point of view, and from this point forward, every rectangle will cover precisely two points of S. Point sets S=R∪Bexist 39 XVIII Spanish Meeting on Computational Geometry, Girona, July 1-3, 2019 in which no matching rectangle is possible (e.g., Sis a color-alternating sequence of points on the line y=x), and point sets in which a perfect strong matching with rectangles exists (e.g., an even number of red points in the negative part of the line y=x, and an even number of blue points in the positive part). These two extreme cases show that it is not worth studying the number α(R(S)) for fixed, or given, colored point sets S. Instead, we want to study α(R(S)) when S is a random point set in the square [0,1]2, in which the positions of the npoints of Sare random and the color of each point of Sis also random. Formally: Let n > 0, and let S⊂[0,1]2be a set of npoints, randomly and uniformly selected. Let R∪Bbe a random partition (i.e., coloring) of Sin which each point of Sis included in Runiformly at random with probability 1/2. We study the random variable M(n) = 2 ·α(R(S)) equal to the number of points of Sthat are covered by the rectangles of a maximum monochromatic strong matching of Swith rectangles. Given a set Sof npoints, randomly and uniformly selected in the square [0,1]2, Chen et al. [3] studied a similar variable: the random variable α(D(S)), where D(S) is the random graph with vertex set S and two points p, q ∈Sdefine an edge if and only if D(p, q)∩S={p, q}. Here, α(D(S)) denotes the size of a maximum independent set of D(S). One result of Chen et al. [3, Theorem 1] states that if ntends to infinity, then we have α(D(S)) = O(n(log2log n)/log n) with probability tending to 1. This result implies that if C(n) denotes the number of points of Sthat are covered by a maximum monochromatic matching of Swith rectangles, where the rectangles may overlap (i.e., the matching is not necessarily strong), then C(n) = n−o(n) with probability tending to 1. In fact, let M0be a maximum monochromatic matching of Swith rectangles, where M0is not necessarily strong, and let S0⊂Sbe the points not covered by M0. Note that at least |S0|/2 points of S0have the same color, and they form an independent set in the graph D(S). Then, with probability tending to 1, we have that M0covers at least n−|S0|=n−O(n(log2log n)/log n) = n−o(n) points. 2 Preliminaries Since for matching Swith rectangles, only the left-to- right and bottom-to-top orders of Sare relevant, and since the probability that two points of Sare in the same vertical or horizontal line is zero, we consider S equal to the point set Sπ={(i, π(i)) |i= 1,2, . . . , n}, where π:{1,2, . . . , n}→{1,2, . . . , n}is a randomly and uniformly selected permutation. This assumption was also done by Chen et al. [3]. We have implemented a program that, given n, generates a uniform random permutation π, and selects the color of each p∈Sπ(red or blue) randomly and n= 1000 n= 10000 kmean sdev mean sdev 1 0.6653 0.0175 0.6673 0.0052 2 0.7948 0.0104 0.7934 0.0036 3 0.8301 0.0097 0.8304 0.0034 4 0.8555 0.0094 0.8562 0.0028 5 0.8727 0.0090 0.8736 0.0026 6 0.8860 0.0087 0.8864 0.0026 ∞0.9724 0.0062 0.9780 0.0022 Table 1: The experimental results obtained when running the greedy matching algorithm for n∈ {1000,10000}, parameterized with k∈[1..6], or not parameterized (k=∞). For each combination n, k, we run the algorithm 100 times, and measured the mean and standard deviation of the ratio between the total number of matched points and n. uniformly. The program then runs a deterministic algorithm on Sπ=R∪Bthat greedily finds a maximum independent subset of rectangles in R(Sπ). The algorithm iterates the points of Sπfrom left to right, and for each point pin the iteration, it performs the following action: If pis not matched with any point prior to pin the iteration, it finds the first point qto the right of psuch that D(p, q)∈ R(Sπ) and D(p, q) has empty intersection with all matching rectangles already reported. If qexists, the algorithm reports D(p, q) as a matching rectangle. In any case, regardless of whether qexists, the algorithm continues the iteration to the next unmatched point p. For large n, say n= 10000, the implemented algorithm reports a matching covering approximately 97 100 nof the points. Then, it seems that M(n)≥97 100 n for nlarge enough and probability close to 1. Analyzing the algorithm, when run over the random Sπ, seems to be a good approach for obtaining a high lower bound for M(n). One way to analyze the algorithm is to consider a parameterized version of it, with a parameter k, such that each unmatched point pfinds its match point qamong only the next kpoints of Sπto the right of p. Let Akdenote this parameterized algorithm. For experimental results, see Table 1. We show how to model (an adaptation of) Akas a Markov chain, for any k∈ {1,2, . . .}. Then, we show that A3almost surely guarantees M(n)≥83 100 n, for nlarge enough, by computing the stationary distribution of the Markov chain and applying the Ergodic theorem. See [6] for the theory on Markov chains. 3 The Markov chains We consider S=Sπ, and whenever we say point i, for i∈ {1,2, . . . , n}, or just iwhen it is clear from the context, we are referring to the point pi:= (i, π(i)) ∈ S. Let color(i)∈ {R, B}denote the color of point i. Let k∈ {1,2,3, . . .}be a constant, and let ˜ Akbe the following adaptation of algorithm Ak, consisting 40 XVIII Spanish Meeting on Computational Geometry, Girona, July 1-3, 2019 in the next idea: Suppose that Akmatches points i and j, with i<j≤i+k, when the iteration of Sπis on point i.˜ Akiterates Sπfrom left to right, and will also match iand jbut, in contrast with Ak, when the iteration is on j, or on a point to the right of j. Using ˜ Akinstead of Ak, allows us to describe in a more compact way the states of the memory of the algorithm during the iteration of the elements of Sπ. Let E(j) be the data structure associated with point j∈ {1,2, . . . , n}, that is maintained by ˜ Akduring the iteration of Sπ. For any j, let i=i(j) be the smallest element in the set {max(1, j −(k−1)), . . . , j} such that the point iis not matched, and each point in {i+ 1, . . . , j}is matched with a point to the left of ior is not yet matched. If iexists, then E(j) consists of the following elements: •The set U(j)⊆ {i, i+1, . . . , j}of the points that are not matched, with i∈U(j). •The set Rect(j) of the (pairwise disjoint) rectangles that match the points in {i+1, . . . , j}\U(j) with points to the left of i. •The number f(j) of points of Sπthat are matched while the iteration is at point j. If idoes not exist, then E(j) consists of the same three above elements with U(j) = ∅and Rect(j) = ∅. For j= 1, we have U(1) = {1}, Rect(1) = ∅, and f(1) = 0. We show now how to obtain E(j+ 1) from E(j), for any j∈ {1, . . . , n −1}. First, we match points iand j+ 1 if and only if j+ 1 ≤i+k, color(i) = color(j+ 1), and the rectangle D(pi, pj+1) does not overlap any rectangle in Rect(j). After that, we match other points in (U(j)\ {i})∪ {j+ 1}if and only if iwas matched in the previuos step, or we have finished with point i. We say that we have finished with point iif there do not exist more chances for point ito be matched, which is equivalent to i+k≤j+ 1. This final matching procedure consists in running the original algorithm Akwith input the points {i+ 1, . . . , j, j + 1}, but with the extra condition that the algorithm terminates if the current point ton the iteration of {i+1, . . . , j, j +1}from left to right, cannot be matched with any other one to its right. This is because tmust find its match among the points in {j+ 2, . . . , t +k}, before any matching between points in {t+ 1, . . . , j + 1}occurs. We set f(j+ 1) equal to the total number of points matched in the above steps. Obtaining U(j+1) and Rect(j+1) is straightforward. Let j∈ {1,2, . . . , n}. The state of E(j) is the 2- tuple formed by: As first component, (a certificate of) the relative positions between the points of U(j) and the rectangles of Rect(j), together with the color of each point of U(j). If the leftmost point is blue, then we switch the color of every point such that the leftmost one is always red. As second component, f(j). We say that two states eand e0are equal (i.e., e=e0) j+ 1 i j+ 1 i j+ 1 i j+ 1 i j+ 1 i j+ 1 i i j E(j), Xj E(j+ 1) Xj+1 e3 e4 e5 e6 e6 e8 e7 Figure 1: Example of the data structure E(j), its state Xj=e3, and the states in the neighborhood N(e3) = {e4, e5, e6, e6, e7, e8}corresponding to E(j+ 1), for each position and color of point j+ 1. Note that f(e6) = 2, and f(e) = 0 for all e∈ {e4, e5, e7, e8}. if: (i) the first components are equal, or one first component is symmetric to the other in the vertical direction, and (ii) the second components are equal. Let E={e1, e2, . . . , eN}be the set of all possible states of E(j), which is a finite set, and let Xj∈ E be the random variable equal to the state of E(j). Let e∈ E be a state, and assume that eis the state of E(j) for some j. Let f(e) = f(j) (with abuse of notation), and let N(e) be the neighborhood of e, which is the multiset consisting of the state of E(j+1) for every color and every different relative position, with respect to the elements of both U(j) and Rect(j), of point j+ 1. See for example Figure 1. Lemma 1 Let e, e0∈ E be two states. For every j≥2, we have: Prob(Xj+1 =e0|Xj=e) = m 2 (|U(j)|+ 2|Rect(j)|+ 1), where mis the multiplicity of e0in N(e). Proof. Through each point of U(j) draw a horizontal line, and for each rectangle of Rect(j) draw a horizontal line through the top side and a horizontal line through the bottom side. Each of these K=|U(j)|+ 2|Rect(j)|lines goes through a different element of Sπ, subdividing the plane into K+1 strips. Since the point j+ 1 is to the right of every point of U(j) and every rectangle of Rect(j), its relative position w.r.t. the elements of U(j) and Rect(j) is to be in one of these strips, and this happens with probability 1/(K+ 1). Furthermore, the color of point j+ 1 is given with probability 1/2. The lemma follows.  Note that Prob(Xj+1 =xj+1 |Xj=xj, . . . , X1= x1) = Prob(Xj+1 =xj+1 |Xj=xj) for all 41 XVIII Spanish Meeting on Computational Geometry, Girona, July 1-3, 2019 x1, . . . , xj+1 ∈ E such that Prob(Xj=xj, . . . , X1= x1)>0. Thus, (Xn)n≥1is a Markov chain, denoted Ck, over the set E={e1, e2, . . . , eN}of states. Let P be the transition matrix, of dimensions N×N, such that Pi,j = Prob(X`+1 =ej|X`=ei). The key observation is that the total number of points matched by ˜ Akis precisely Mk(n) := Pn j=1 f(Xj). A Markov chain is irreducible if with positive probability any state can be reached from any other state [6]. It can be proved that Ckis irreducible. Since Ckhas a finite state set, it has a unique stationary distribution s= (s1, s2, . . . , sN), which is the solution of the system s=s·P, s1+s2+· · · +sN= 1 of linear equations [6]. Furthermore, since f(e)∈ 0,2,4, . . . , 2dk+1 2efor all e∈ E, the function fis bounded and then the Ergodic theorem ensures lim n→∞ Mk(n) n= lim n→∞ 1 n n X j=1 f(Xj) = N X i=1 sif(ei), almost surely [6]. Let αk=PN i=1 sif(ei). We then arrive to the main result of this paper: Theorem 2 Let π:{1,2, . . . , n} → {1,2, . . . , n}be a uniform random permutation. Let Sπ={(i, π(i)) | i= 1,2, . . . , n}be a random point set, where the color (red or blue) of each point of Sπis selected randomly and uniformly with probability 1/2. Let k∈ {1,2,3, . . .}be a constant. For all constant ε > 0 and nlarge enough, almost surely the number Mk(n) of points of Sπthat are matched by the algorithm ˜ Ak satisfies Mk(n)≥(αk−ε)n. 4 The Markov chain for k= 3 Using algorithm ˜ A3, we give a precise value for α3. In Table 2, we describe the states, and the transitions between the states, of the Markov chain C3. Since f(e) = 2 for all e∈ {e2, e6, e9, e10, e16, e17, e18}, f(e11) = 4, f(e) = 0 for all other state e, and the stationary distribution s= (s1, . . . , s18) satisfies s2=167959 816233 , s6=69640 816233 , s9=6800 816233 , s10 =58650 816233 , s11 =13600 816233 , s16 =5950 816233 , s17 =1360 816233 , s18 =1190 816233 , we obtain α3= 2(s2+s6+s9+s10 +s16 +s17 +s18)+4s11 =677498 816233 ≈0.830030151. By Theorem 2, taking ε=α3−0.83 >0, for nlarge enough we have almost surely that M(n)≥M3(n)≥ 0.83 n. It can be noted in Table 1 that in practice this lower bound is satisfied. References [1] B. M. ´ Abrego, E. M. Arkin, S. Fern´andez-Merchant, F. Hurtado, M. Kano, J. S. Mitchell, and J. Urrutia. Matching points with squares. Discrete & Computational Geometry, 41(1):77–95, 2009. eielem. of eif(ei)neighbors of ei e10(e2,1/2),(e3,1/2) e2 ∅ 2(e1,1) e30(e4,1/6),(e5,1/6),(e6,1/3), (e7,1/6),(e8,1/6) e40(e4,1/8),(e5,1/8),(e6,3/8), (e7,1/8),(e9,1/4) e50(e10,3/4),(e11,1/4) e62(e2,1/4),(e12,1/8),(e13,1/8), (e14,1/4),(e15,1/4) e70(e10,3/4),(e11,1/4) e80(e10,3/4),(e16,1/4) e92(e2,3/10),(e12,1/10),(e14,1/5), (e15,1/5),(e17,1/5) e10 2(e2,1/2),(e3,1/2) e11 ∅ 4(e1,1) e12 0(e2,1/2),(e3,3/10),(e6,1/5) e13 0(e2,1/2),(e3,3/10),(e6,1/5) e14 0(e2,3/10),(e3,1/2),(e6,1/5) e15 0(e2,1/2),(e3,3/10),(e6,1/5) e16 2(e2,1/5),(e12,1/10),(e13,1/10), (e14,1/10),(e15,3/10),(e18,1/5) e17 2(e1,5/6),(e2,1/6) e18 2(e1,5/6),(e2,1/6) Table 2: The 18 states of the Markov chain for k= 3. In the 2nd column we show the first component of ei, and in the 3rd column the second component f(ei). In the last column we show the neighbor states of eias a list of tuples of the form (ej, Pi,j ), where Pi,j = Prob(X`+1 =ej|X`= ei)>0 is the transition probability from eito ej. [2] L. E. Caraballo, C. Ochoa, P. P´erez-Lantero, and J. Rojas-Ledesma. Matching colored points with rectangles. Journal of Combinatorial Optimization, 33(2):403–421, 2017. [3] X. Chen, J. Pach, M. Szegedy, and G. Tardos. Delaunay graphs of point sets in the plane with respect to axis-parallel rectangles. Random Structures and Algorithms, 34(1):11–23, 2009. [4] A. Dumitrescu and R. Kaye. Matching colored points in the plane: Some new results. Computational Geometry, 19(1):69–85, 2001. [5] A. Dumitrescu and W. L. Steiger. On a matching problem in the plane. Discrete Mathematics, 211:183– 195, 2000. [6] J. R. Norris. Markov chains. Number 2. Cambridge University Press, 1998. 42