Abstract 1 Introduction 2 Initial Observations 3 Recovery Algorithm References

Recovering Graphs from Their Witness Unit Square Representation

Maarten Löffler ORCID Department of Information and Computing Sciences, Utrecht University, The Netherlands Frank Staals ORCID Department of Information and Computing Sciences, Utrecht University, The Netherlands Soeren Terziadis ORCID Algorithms Group, TU Eindhoven, The Netherlands
Abstract

A wUSR of a graph G is a set of unit squares in the plane, one per vertex, if two vertices have an edge in G if their squares overlap and the overlap contains no witness. We present an output sensitive algorithm to compute a graph G based on its given witness unit square representation.

Keywords and phrases:
proximity graphs, geometric intersection graphs, witness representation, unit square intersection graph, output sensitive algorithm, range searching
Category:
Poster Abstract
Funding:
Soeren Terziadis: funded by the NWO Gravitation project NETWORKS (no. 024.002.003.)
Copyright and License:
[Uncaptioned image] © Maarten Löffler, Frank Staals, and Soeren Terziadis; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Mathematics of computing Graph theory
Editors:
Vida Dujmović and Fabrizio Montecchiani

1 Introduction

Witness representations of graphs are a variant of geometric intersection representations of graphs, where we are given a set of convex objects and a set of points (witnesses). Every vertex is represented by one object and two vertices are connected if they intersect and their intersection contains no witness. Given a witness representation of n objects and m witnesses, we want to compute (recover) the graph it represents. Explicitly computing the intersection graph of all n objects which intersect at most kO(n2) times and checking for every intersection if it contains a witness requires O(n2m) time. If the intersection graph is sparse, then the runtime can be reduced to O(nlogm). However if there are O(n2) intersections between objects but the witness intersection graph has only kO(n) edges, the naïve method would still require O(n2m) time. Our goal is to reduce this to O~(n+m+k) by using an output sensitive algorithm. Towards this goal, we consider here the square version.

(a) A wUSR𝒲
(b) Graph G(𝒲)
(c) Duality
(d) Dual representation
Figure 1: A wUSR 𝒲 (a), its graph (b), the dual construction (c) and the dual of 𝒲 (d).

A witness unit square representation (wUSR) – also shown in Figure 1(a)) – is a tuple (𝒮,𝒲) where 𝒮 is a set of n axis-aligned unit squares and 𝒲 is a set of m point features (witnesses). The witness unit square graph G(R)={𝒮,E} is shown in Figure 1(b)). If {Si,Sj} intersect and their intersection contains a witness W, the edge {Si,Sj} is blocked by W.

2 Initial Observations

To solve the problem we consider the dual of the representation, which represents any square in 𝒮 with its center point and every witness with a unit square centered at the witness (Figure 1(c)). The large square Bi of S is a square of side length 2 centered at Pi.

Observation 1.

Let Si,Sj𝒮 be two intersecting squares and let Wk𝒲 be a witness such that WkSiSj. Then PiZk and PjZk. Or in other words, if a witness is contained in the intersection of two squares, the dual points of both squares are contained in the dual square of the witness.

Observation 2.

Let Si,Sj𝒮 be two intersecting squares. Then PjBi. Or in other words, if two squares intersect, then the dual point of one is in the large square of the other.

Observation 3.

Let Si𝒮 be a squares and let Wj𝒲 be a witness such that WjSi. Then ZjBi. Or in other words, if a square contains a witness, the large square of the square contains the dual square of the witness.

Intuitively the previous observations state that everything relevant for a dual point of a square S is contained in its large square. We assume general position. The edges of G(R) are partitioned into a set with positive slope (right edges) and negative slope (left edges). For the remainder of this paper we focus on right edges; left edges are handled symmetrically.

Consider the top-right quadrant B of a large square B of S. For every right edge {S,S}, with S lower than S, the dual point P of S is in B. For every witness W that is contained within S, we know by Observation 3 that it’s dual square ZB and in particular the top-right corner of Z is contained in B. Let 𝒯 be the set of top-right corners of witness dual squares that are contained in B. We say a point AB dominates a point AB if A is higher and further right than A.

Claim 4.

Let P,P be two dual points of the squares S and S, respectively. Let B be the top-right quadrant of the large square of S. The edge {P,P} is a right edge in G(R), if and only if PB and there is no top right corner T𝒯B, s.t., T dominates P.

Proof.

By Observation 2 S and S overlap if and only if PB. By Observation 3 any witness contained in S has a dual square whose top right corner is contained in B, therefore no corners outside of B have to be considered. Finally by Observation 1 any witness contained in both S and S would have a top-right corner that dominates P

3 Recovery Algorithm

Figure 2: Query result as partition of query square with dual points (blue) and staircases of witness square corners (red). Cells are processed as numbered. Four cases for processing the cells are shown on the right.

We build a two dimensional range tree on all points in the set 𝒫, i.e., all dual points of squares in 𝒮. Every secondary level node N corresponds to some region RN, a (canonical) subset of points PN𝒫, and a subset TN𝒯. We order TN to form a staircase. Let PN be the subset of PN not dominated by a point in TN, i.e. PN is the subset above the staircase. We store PN in a priority search tree [1] enabling efficient reporting of all points in PN, above and to the right of a query point. This can be done in O((n+m)log(n+m)) time

For every point Pi𝒫 of a square Si𝒮, we query this data-structure with a search window corresponding to Bi of the large square of Si in O(log2n).The query will report a number of subsets of 𝒫. The returned sets can be interpreted as a partition of the search quadrant into columns, which are again subdivided into rows (forming cells); see Figure 2. The cells are processed column by column, right to left and top to bottom within a column. When processing these cells, we track x^ and y^, i.e., the highest x and y coordinates over all staircases and report the canonical subsets without points dominated by (x^,y^). Four cases of previous staircase encounters are distinguished (none, previously this column, previously in earlier column, previously this and earlier column); we refer again to Figure 2.

The last case (at most once per column, i.e., O(logn) times) requires an additional query in the priority search tree. Since the query square is subdivided into at most O(log2n) cells – let 𝒞 be the set of all cells – in the query result of the range query, the entire time requirement for a single query plus processing of the cells is

O(log2n)+O(lognlog(n+m))+O(C𝒞kC)=O(log2(n+m)+ki)

since C𝒞kC=ki, the number of reported edges. We need one query per dual point of a square in S and correctly compute all k right edges in time O(nlog2(n+m)+i=1nki).

Theorem 5.

Given a wUSR 𝒲 with n unit squares and m witnesses, we can compute the implied graph G(R) in O~(n+m+k) time, where k is the number of edges in G(𝒲).

References

  • [1] Mark de Berg, Otfried Cheong, Marc J. van Kreveld, and Mark H. Overmars. Computational geometry: Algorithms and applications, 3rd Edition. Springer, 2008. doi:10.1007/978-3-540-77974-2.
Figure 3: The poster.