-
Shadoks Approach to Knapsack Polygonal Packing
Authors:
Guilherme D. da Fonseca,
Yan Gerard
Abstract:
We describe the heuristics used by the Shadoks team in the CG:SHOP 2024 Challenge. Each instance consists of a convex polygon called container and a multiset of items, where each item is a simple polygon and has an associated value. The goal is to pack some of the items inside the container using translations, in order to maximize the sum of their values. Our strategy consists of obtaining good in…
▽ More
We describe the heuristics used by the Shadoks team in the CG:SHOP 2024 Challenge. Each instance consists of a convex polygon called container and a multiset of items, where each item is a simple polygon and has an associated value. The goal is to pack some of the items inside the container using translations, in order to maximize the sum of their values. Our strategy consists of obtaining good initial solutions and improving them with local search. To obtain the initial solutions we used integer programming and a carefully designed greedy approach.
△ Less
Submitted 29 March, 2024;
originally announced March 2024.
-
The Canadian Traveller Problem on outerplanar graphs
Authors:
Laurent Beaudou,
Pierre Bergé,
Vsevolod Chernyshev,
Antoine Dailly,
Yan Gerard,
Aurélie Lagoutte,
Vincent Limouzy,
Lucas Pastor
Abstract:
We study the PSPACE-complete $k$-Canadian Traveller Problem, where a weighted graph $G=(V,E,ω)$ with a source $s\in V$ and a target $t\in V$ are given. This problem also has a hidden input $E_* \subsetneq E$ of cardinality at most $k$ representing blocked edges. The objective is to travel from $s$ to $t$ with the minimum distance. At the beginning of the walk, the blockages $E_*$ are unknown: the…
▽ More
We study the PSPACE-complete $k$-Canadian Traveller Problem, where a weighted graph $G=(V,E,ω)$ with a source $s\in V$ and a target $t\in V$ are given. This problem also has a hidden input $E_* \subsetneq E$ of cardinality at most $k$ representing blocked edges. The objective is to travel from $s$ to $t$ with the minimum distance. At the beginning of the walk, the blockages $E_*$ are unknown: the traveller discovers that an edge is blocked when visiting one of its endpoints. Online algorithms, also called strategies, have been proposed for this problem and assessed with the competitive ratio, i.e. the ratio between the distance actually traversed by the traveller divided by the distance we would have traversed knowing the blockages in advance.
Even though the optimal competitive ratio is $2k+1$ even on unit-weighted planar graphs of treewidth 2, we design a polynomial-time strategy achieving competitive ratio $9$ on unit-weighted outerplanar graphs. This value $9$ also stands as a lower bound for this family of graphs as we prove that, for any $\varepsilon > 0$, no strategy can achieve a competitive ratio $9-\varepsilon$. Finally, we show that it is not possible to achieve a constant competitive ratio (independent of $G$ and $k$) on weighted outerplanar graphs.
△ Less
Submitted 8 March, 2024; v1 submitted 4 March, 2024;
originally announced March 2024.
-
The Calissons Puzzle
Authors:
Jean-Marie Favreau,
Yan Gerard,
Pascal Lafourcade,
Léo Robert
Abstract:
In 2022, Olivier Longuet, a French mathematics teacher, created a game called the \textit{calissons puzzle}. Given a triangular grid in a hexagon and some given edges of the grid, the problem is to find a calisson tiling such that no input edge is overlapped and calissons adjacent to an input edge have different orientations. We extend the puzzle to regions $R$ that are not necessarily hexagonal.…
▽ More
In 2022, Olivier Longuet, a French mathematics teacher, created a game called the \textit{calissons puzzle}. Given a triangular grid in a hexagon and some given edges of the grid, the problem is to find a calisson tiling such that no input edge is overlapped and calissons adjacent to an input edge have different orientations. We extend the puzzle to regions $R$ that are not necessarily hexagonal. The first interesting property of this puzzle is that, unlike the usual calisson or domino problems, it is solved neither by a maximal matching algorithm, nor by Thurston's algorithm. This raises the question of its complexity.
We prove that if the region $R$ is finite and simply connected, then the puzzle can be solved by an algorithm that we call the \textit{advancing surface algorithm} and whose complexity is $O(|\partial R|^3)$ where $\partial R|$ is the size of the boundary of the region $R$. In the case where the region is the entire infinite triangular grid, we prove that the existence of a solution can be solved with an algorithm of complexity $O(|X|^3)$ where $X$ is the set of input edges. To prove these theorems, we revisit William Thurston's results on the calisson tilability of a region $R$. The solutions involve equivalence between calisson tilings, stepped surfaces and certain DAG cuts that avoid passing through a set of edges that we call \textit{unbreakable}. It allows us to generalize Thurston's theorem characterizing tilable regions by rewriting it in terms of descending paths or absorbing cycles. Thurston's algorithm appears as a distance calculation algorithm following Dijkstra's paradigm. The introduction of a set $X$ of interior edges introduces negative weights that force a Bellman-Ford strategy to be preferred. These results extend Thurston's legacy by using computer science structures and algorithms.
△ Less
Submitted 5 July, 2023;
originally announced July 2023.
-
Short Flip Sequences to Untangle Segments in the Plane
Authors:
Guilherme D. da Fonseca,
Yan Gerard,
Bastien Rivier
Abstract:
A (multi)set of segments in the plane may form a TSP tour, a matching, a tree, or any multigraph. If two segments cross, then we can reduce the total length with the following flip operation. We remove a pair of crossing segments, and insert a pair of non-crossing segments, while keeping the same vertex degrees. The goal of this paper is to devise efficient strategies to flip the segments in order…
▽ More
A (multi)set of segments in the plane may form a TSP tour, a matching, a tree, or any multigraph. If two segments cross, then we can reduce the total length with the following flip operation. We remove a pair of crossing segments, and insert a pair of non-crossing segments, while keeping the same vertex degrees. The goal of this paper is to devise efficient strategies to flip the segments in order to obtain crossing-free segments after a small number of flips. Linear and near-linear bounds on the number of flips were only known for segments with endpoints in convex position. We generalize these results, proving linear and near-linear bounds for cases with endpoints that are not in convex position. Our results are proved in a general setting that applies to multiple problems, using multigraphs and the distinction between removal and insertion choices when performing a flip.
△ Less
Submitted 24 July, 2023; v1 submitted 3 July, 2023;
originally announced July 2023.
-
Conflict Optimization for Binary CSP Applied to Minimum Partition into Plane Subgraphs and Graph Coloring
Authors:
Loïc Crombez,
Guilherme D. da Fonseca,
Florian Fontan,
Yan Gerard,
Aldo Gonzalez-Lorenzo,
Pascal Lafourcade,
Luc Libralesso,
Benjamin Momège,
Jack Spalding-Jamieson,
Brandon Zhang,
Da Wei Zheng
Abstract:
CG:SHOP is an annual geometric optimization challenge and the 2022 edition proposed the problem of coloring a certain geometric graph defined by line segments. Surprisingly, the top three teams used the same technique, called conflict optimization. This technique has been introduced in the 2021 edition of the challenge, to solve a coordinated motion planning problem. In this paper, we present the…
▽ More
CG:SHOP is an annual geometric optimization challenge and the 2022 edition proposed the problem of coloring a certain geometric graph defined by line segments. Surprisingly, the top three teams used the same technique, called conflict optimization. This technique has been introduced in the 2021 edition of the challenge, to solve a coordinated motion planning problem. In this paper, we present the technique in the more general framework of binary constraint satisfaction problems (binary CSP). Then, the top three teams describe their different implementations of the same underlying strategy. We evaluate the performance of those implementations to vertex color not only geometric graphs, but also other types of graphs.
△ Less
Submitted 24 March, 2023; v1 submitted 16 March, 2023;
originally announced March 2023.
-
Reconstruction of Convex Sets from One or Two X-rays
Authors:
Yan Gerard
Abstract:
We consider a class of problems of Discrete Tomography which has been deeply investigated in the past: the reconstruction of convex lattice sets from their horizontal and/or vertical X-rays, i.e. from the number of points in a sequence of consecutive horizontal and vertical lines. The reconstruction of the HV-convex polyominoes works usually in two steps, first the filling step consisting in filli…
▽ More
We consider a class of problems of Discrete Tomography which has been deeply investigated in the past: the reconstruction of convex lattice sets from their horizontal and/or vertical X-rays, i.e. from the number of points in a sequence of consecutive horizontal and vertical lines. The reconstruction of the HV-convex polyominoes works usually in two steps, first the filling step consisting in filling operations, second the convex aggregation of the switching components. We prove three results about the convex aggregation step: (1) The convex aggregation step used for the reconstruction of HV-convex polyominoes does not always provide a solution. The example yielding to this result is called \textit{the bad guy} and disproves a conjecture of the domain. (2) The reconstruction of a digital convex lattice set from only one X-ray can be performed in polynomial time. We prove it by encoding the convex aggregation problem in a Directed Acyclic Graph. (3) With the same strategy, we prove that the reconstruction of fat digital convex sets from their horizontal and vertical X-rays can be solved in polynomial time. Fatness is a property of the digital convex sets regarding the relative position of the left, right, top and bottom points of the set. The complexity of the reconstruction of the lattice sets which are not fat remains an open question.
△ Less
Submitted 21 July, 2023; v1 submitted 15 November, 2022;
originally announced November 2022.
-
On the Longest Flip Sequence to Untangle Segments in the Plane
Authors:
Guilherme D. da Fonseca,
Yan Gerard,
Bastien Rivier
Abstract:
A set of segments in the plane may form a Euclidean TSP tour or a matching, among others. Optimal TSP tours as well as minimum weight perfect matchings have no crossing segments, but several heuristics and approximation algorithms may produce solutions with crossings. To improve such solutions, we can successively apply a flip operation that replaces a pair of crossing segments by non-crossing one…
▽ More
A set of segments in the plane may form a Euclidean TSP tour or a matching, among others. Optimal TSP tours as well as minimum weight perfect matchings have no crossing segments, but several heuristics and approximation algorithms may produce solutions with crossings. To improve such solutions, we can successively apply a flip operation that replaces a pair of crossing segments by non-crossing ones. This paper considers the maximum number D(n) of flips performed on n segments. First, we present reductions relating D(n) for different sets of segments (TSP tours, monochromatic matchings, red-blue matchings, and multigraphs). Second, we show that if all except t points are in convex position, then D(n) = O(tn^2), providing a smooth transition between the convex O(n^2) bound and the general O(n^3) bound. Last, we show that if instead of counting the total number of flips, we only count the number of distinct flips, then the cubic upper bound improves to O(n^{8/3}).
△ Less
Submitted 17 March, 2023; v1 submitted 21 October, 2022;
originally announced October 2022.
-
Complexity Results on Untangling Red-Blue Matchings
Authors:
Arun Kumar Das,
Sandip Das,
Guilherme D. da Fonseca,
Yan Gerard,
Bastien Rivier
Abstract:
Given a matching between n red points and n blue points by line segments in the plane, we consider the problem of obtaining a crossing-free matching through flip operations that replace two crossing segments by two non-crossing ones. We first show that (i) it is NP-hard to alpha-approximate the shortest flip sequence, for any constant alpha. Second, we show that when the red points are colinear, (…
▽ More
Given a matching between n red points and n blue points by line segments in the plane, we consider the problem of obtaining a crossing-free matching through flip operations that replace two crossing segments by two non-crossing ones. We first show that (i) it is NP-hard to alpha-approximate the shortest flip sequence, for any constant alpha. Second, we show that when the red points are colinear, (ii) given a matching, a flip sequence of length at most n(n-1)/2 always exists, and (iii) the number of flips in any sequence never exceeds (n(n-1)/2) (n+4)/6. Finally, we present (iv) a lower bounding flip sequence with roughly 1.5 n(n-1)/2 flips, which shows that the n(n-1)/2 flips attained in the convex case are not the maximum, and (v) a convex matching from which any flip sequence has roughly 1.5 n flips. The last four results, based on novel analyses, improve the constants of state-of-the-art bounds.
△ Less
Submitted 22 November, 2022; v1 submitted 23 February, 2022;
originally announced February 2022.
-
Greedy and Local Search Heuristics to Build Area-Optimal Polygons
Authors:
Loïc Crombez,
Guilherme D. da Fonseca,
Yan Gerard
Abstract:
In this paper, we present our heuristic solutions to the problems of finding the maximum and minimum area polygons with a given set of vertices. Our solutions are based mostly on two simple algorithmic paradigms: greedy method and local search. The greedy heuristic starts with a simple polygon and adds vertices one by one, according to a weight function. A crucial ingredient to obtain good solutio…
▽ More
In this paper, we present our heuristic solutions to the problems of finding the maximum and minimum area polygons with a given set of vertices. Our solutions are based mostly on two simple algorithmic paradigms: greedy method and local search. The greedy heuristic starts with a simple polygon and adds vertices one by one, according to a weight function. A crucial ingredient to obtain good solutions is the choice of an appropriate weight function that avoids long edges. The local search part consists of moving consecutive vertices to another location in the polygonal chain. We also discuss the different implementation techniques that are necessary to reduce the running time.
△ Less
Submitted 28 June, 2021;
originally announced June 2021.
-
Shadoks Approach to Low-Makespan Coordinated Motion Planning
Authors:
Loïc Crombez,
Guilherme D. da Fonseca,
Yan Gerard,
Aldo Gonzalez-Lorenzo,
Pascal Lafourcade,
Luc Libralesso
Abstract:
This paper describes the heuristics used by the Shadoks team for the CG:SHOP 2021 challenge. This year's problem is to coordinate the motion of multiple robots in order to reach their targets without collisions and minimizing the makespan. It is a classical multi agent path finding problem with the specificity that the instances are highly dense in an unbounded grid. Using the heuristics outlined…
▽ More
This paper describes the heuristics used by the Shadoks team for the CG:SHOP 2021 challenge. This year's problem is to coordinate the motion of multiple robots in order to reach their targets without collisions and minimizing the makespan. It is a classical multi agent path finding problem with the specificity that the instances are highly dense in an unbounded grid. Using the heuristics outlined in this paper, our team won first place with the best solution to 202 out of 203 instances and optimal solutions to at least 105 of them. The main ingredients include several different strategies to compute initial solutions coupled with a heuristic called Conflict Optimizer to reduce the makespan of existing solutions.
△ Less
Submitted 9 March, 2022; v1 submitted 25 March, 2021;
originally announced March 2021.
-
Efficient Algorithms for Battleship
Authors:
Loïc Crombez,
Guilherme D. da Fonseca,
Yan Gerard
Abstract:
We consider an algorithmic problem inspired by the Battleship game. In the variant of the problem that we investigate, there is a unique ship of shape $S \subset Z^2$ which has been translated in the lattice $Z^2$. We assume that a player has already hit the ship with a first shot and the goal is to sink the ship using as few shots as possible, that is, by minimizing the number of missed shots. Wh…
▽ More
We consider an algorithmic problem inspired by the Battleship game. In the variant of the problem that we investigate, there is a unique ship of shape $S \subset Z^2$ which has been translated in the lattice $Z^2$. We assume that a player has already hit the ship with a first shot and the goal is to sink the ship using as few shots as possible, that is, by minimizing the number of missed shots. While the player knows the shape $S$, which position of $S$ has been hit is not known.
Given a shape $S$ of $n$ lattice points, the minimum number of misses that can be achieved in the worst case by any algorithm is called the Battleship complexity of the shape $S$ and denoted $c(S)$. We prove three bounds on $c(S)$, each considering a different class of shapes. First, we have $c(S) \leq n-1$ for arbitrary shapes and the bound is tight for parallelogram-free shapes. Second, we provide an algorithm that shows that $c(S) = O(\log n)$ if $S$ is an HV-convex polyomino. Third, we provide an algorithm that shows that $c(S) = O(\log \log n)$ if $S$ is a digital convex set. This last result is obtained through a novel discrete version of the Blaschke-Lebesgue inequality relating the area and the width of any convex body.
△ Less
Submitted 15 April, 2020;
originally announced April 2020.
-
Efficient Algorithms to Test Digital Convexity
Authors:
Loïc Crombez,
Guilherme D. da Fonseca,
Yan Gérard
Abstract:
A set $S \subset \mathbb{Z}^d$ is digital convex if $conv(S) \cap \mathbb{Z}^d = S$, where $conv(S)$ denotes the convex hull of $S$. In this paper, we consider the algorithmic problem of testing whether a given set $S$ of $n$ lattice points is digital convex. Although convex hull computation requires $Ω(n \log n)$ time even for dimension $d = 2$, we provide an algorithm for testing the digital con…
▽ More
A set $S \subset \mathbb{Z}^d$ is digital convex if $conv(S) \cap \mathbb{Z}^d = S$, where $conv(S)$ denotes the convex hull of $S$. In this paper, we consider the algorithmic problem of testing whether a given set $S$ of $n$ lattice points is digital convex. Although convex hull computation requires $Ω(n \log n)$ time even for dimension $d = 2$, we provide an algorithm for testing the digital convexity of $S\subset \mathbb{Z}^2$ in $O(n + h \log r)$ time, where $h$ is the number of edges of the convex hull and $r$ is the diameter of $S$. This main result is obtained by proving that if $S$ is digital convex, then the well-known quickhull algorithm computes the convex hull of $S$ in linear time. In fixed dimension $d$, we present the first polynomial algorithm to test digital convexity, as well as a simpler and more practical algorithm whose running time may not be polynomial in $n$ for certain inputs.
△ Less
Submitted 15 January, 2019;
originally announced January 2019.
-
Peeling Digital Potatoes
Authors:
Loïc Crombez,
Guilherme D. da Fonseca,
Yan Gérard
Abstract:
The potato-peeling problem (also known as convex skull) is a fundamental computational geometry problem and the fastest algorithm to date runs in $O(n^8)$ time for a polygon with $n$ vertices that may have holes. In this paper, we consider a digital version of the problem. A set $K \subset \mathbb{Z}^2$ is digital convex if $conv(K) \cap \mathbb{Z}^2 = K$, where $conv(K)$ denotes the convex hull o…
▽ More
The potato-peeling problem (also known as convex skull) is a fundamental computational geometry problem and the fastest algorithm to date runs in $O(n^8)$ time for a polygon with $n$ vertices that may have holes. In this paper, we consider a digital version of the problem. A set $K \subset \mathbb{Z}^2$ is digital convex if $conv(K) \cap \mathbb{Z}^2 = K$, where $conv(K)$ denotes the convex hull of $K$. Given a set $S$ of $n$ lattice points, we present polynomial time algorithms to the problems of finding the largest digital convex subset $K$ of $S$ (digital potato-peeling problem) and the largest union of two digital convex subsets of $S$. The two algorithms take roughly $O(n^3)$ and $O(n^9)$ time, respectively. We also show that those algorithms provide an approximation to the continuous versions.
△ Less
Submitted 24 June, 2019; v1 submitted 13 December, 2018;
originally announced December 2018.