1 Introduction

Tropical polyhedra are the analogues of convex polyhedra in tropical algebra. The latter deals with structures like the max-plus semiring, which is the set \(\mathbb{R }\cup \{-\infty \}\), equipped with the addition \((x,y)\mapsto \max (x,y)\) and the multiplication \((x,y)\mapsto x+y\).

The study of the tropical analogues of convex sets is an active research topic, which has been treated under various aspects. It arose in the work of Zimmermann [61], following a way opened by Vorobyev [58], motivated by optimization theory. Max-plus convex cones, thought of as the analogues of linear spaces, were studied by Cuninghame-Green [20]. Their theory was independently developed by Litvinov, Maslov, and Shpiz (see, in particular, [47], and also [50]) with motivations from variations calculus and asymptotic analysis, and by Cohen, Gaubert, and Quadrat [23, 24] (see also [37]) who initiated a “geometric approach” of discrete event systems [22], further developed by Katz [26, 44]. In [25, 51], Singer, Nitica, and some of the aforementioned authors, related this theory to abstract convexity [54]. The work of Briec and Horvath [13] is also in the spirit of generalized convexity, some motivations from mathematical economy appeared in [14]. Polyhedral max-plus convex sets also appeared in the work of Bezem et al. [15], as sets defined by “max-atoms,” with motivations from sat-modulo theory (SMT) solving. Moreover, the field has been considerably developed after the work of Develin and Sturmfels [27], who related tropical and discrete geometry, showing in particular that tropical polyhedra can be thought of as regular polyhedral subdivisions of the products of two simplices. This was at the origin of a number of works, by Joswig, Santos, Yu, Block, Ardila, and the same authors [1, 19, 28, 29, 4143].

From the perspective of tropical geometry, tropical polyhedra may be thought of as degenerate limits of classical polyhedra along a logarithmic deformation (see [13] for a proof of this fact), or as the image by the valuation of polyhedra over an ordered field of real Puiseux series. This explains a certain analogy between tropical and classical convexity. In particular, tropical analogues of several theorems in classical convexity have been established, including the ones of Hahn and Banach [25, 27, 61], Minkowski [18, 34], Minkowski–Weyl [33, 35], Radon [16, 36], Helly and Carathéodory [13, 36, 38], and also more advanced discrete convexity results [36].

In contrast, algorithmic aspects of tropical polyhedra have not yet been thoroughly explored. In particular, a tropical polyhedron can be represented in two different ways, either externally, in terms of affine inequalities, or internally, as a set generated by finitely many points and rays, see [35] and the references therein. The minimal internal representations of a tropical polyhedron are essentially unique, and consist of its extreme points (vertices) and representatives of extreme rays. Passing from an external description of a polyhedron to a (minimal) internal description, or inversely, is a fundamental computational issue, comparable to the well-known vertex/facet enumeration or convex hull problems in the classical case.

In this article, we develop a combinatorial characterization of the extreme points and rays of tropical polyhedra defined externally. The characterization is equivalently expressed in terms of tropical polyhedral cones (as homogeneous representations of polyhedra). Polyhedral cones are sets consisting of vectors \(\varvec{x} = (\varvec{x}_1,\ldots ,\varvec{x}_d)\) with entries in \(\mathbb{R }\cup \{-\infty \}\) satisfying a system of linear inequalities in the tropical sense, i.e. of the form:

$$\begin{aligned} \max _{i \in [d]} A_{ki}+\varvec{x}_i \le \max _{j \in [d]} B_{kj}+\varvec{x}_j, \quad \text{ for} k \in [p], \end{aligned}$$
(1)

where for all integers \(n, [n]\) refers to the set \(\{1, \dots , n\}\), and \(A, B\) are matrices of size \(p \times d\) with entries in \(\mathbb{R }\cup \{-\infty \}\). If \(\fancyscript{C}\) refers to the cone defined by the latter inequalities, a vector \(\varvec{v} \in \fancyscript{C}\) is said to be (tropically) extreme if it cannot be written as the point-wise supremum of two vectors of \(\fancyscript{C}\) that are both different from it. We denote by \(\arg \max A_k \varvec{v}\) (respecively \(\arg \max B_k \varvec{v}\)) the set of indices \(j \in [d]\) attaining the maximum at the left-hand side (respectively right-hand side) of each inequality (1). We associate with a vector \(\varvec{v} \in \fancyscript{C}\) a directed hypergraph, referred to as the tangent directed hypergraph at \(\varvec{v}\) in the cone \(\fancyscript{C}\), consisting of the nodes \(\{i \in [d] \mid \varvec{v}_i \ne -\infty \}\), and one directed hyperarc \((\arg \max B_k \varvec{v} ,\arg \max A_k \varvec{v})\) for each index \(k \in [p]\) such that both maxima in (1) coincide and take a finite value. This definition is illustrated in Sect. 3, in which more information on directed hypergraphs can be found. The reachability relation induces a partial order on the strongly connected components of a directed hypergraph, meaning that a component is “greater” than another if the former can be reached from the latter. The main result of this paper is the following characterization:

Theorem 1

Let \(\fancyscript{C}\) be a tropical polyhedral cone. A vector \(\varvec{v} \in \fancyscript{C}\) is tropically extreme if, and only if, the set of the strongly connected components of the tangent directed hypergraph at \(\varvec{v}\) in \(\fancyscript{C}\), partially ordered by the reachability relation, admits a greatest element.

This theorem shows interesting analogies and discrepancies with the classical result stating that a point of a polyhedron defined by inequality constraints is a vertex if, and only if, the family of gradients of active constraints at this point is of full rank. In the tropical case, the expressions arising on both side of the constraints (1) are not differentiable, but they are convex, and so, they admit a subdifferential at each point at which they take a finite value. The subdifferential of the map \(\varvec{x} \mapsto \max _{i \in [d]} A_{ki}+\varvec{x}_i\) at point \(\varvec{v}\) is easily seen to be the convex hull of the set of vectors of the canonical basis of \(\mathbb{R }^d\) with indices in \(\arg \max A_k \varvec{v}\). The same is true, mutatis mutandis, for the map appearing at the right-hand side of (1). Hence, Theorem 1 appears to be an infinitesimal characterization, as the classical result. However, the classical rank condition does not have a tropical analogue: several rank notions have been considered in the tropical setting [3, 28], none of which explains the reachability condition appearing in Theorem 1.

Theorem 1 has both theoretical and algorithmic applications. In the companion paper [11], it is used to show that the tropical analogues of the polar of the cyclic polytope have fewer vertices than in the classical case (in other words, along the deformation sending a classical polyhedron to a tropical polyhedron, some classical extreme points degenerate in points which are no longer extreme in the tropical sense).

From the algorithmic point of view, a significant advantage of the criterion provided by Theorem 1 is that it can be evaluated in almost linear time in the size of the tangent hypergraph (Theorem 12). Thus, the corresponding computational complexity exclusively depends on the size of the external representation of the cone. This allows us to define an algorithm determining the extreme points and rays of a tropical polyhedron defined by inequalities (Sect. 4). We call this algorithm the tropical double description method, by analogy with the classical method which goes back to Motzkin et al. [49] and was later refined by Fukuda and Prodon [31]. Given a polyhedron defined by a system of p inequalities, it consists in determining the set of the extreme generators of the polyhedron defined by the first k inequalities, by induction on \(k = 1, \dots , p\). It is based on a result (Theorem 13) allowing to build a set of generators of the intersection of a polyhedron with a half-space. This result can be extended to the intersection with tropical hyperplanes (Theorems 19 and 20), so that the tropical double description method can also handle polyhedra defined as mixed intersections of half-spaces and hyperplanes. Theorem 1 is the cornerstone of the double description method, as the latter algorithm critically relies on an efficient criterion to eliminate non-extreme generators (propagating such generators in the induction considerably increases the time complexity).

We include for the sake of comparison an alternative algorithm (Sect. 5), based on determining the extreme generators of a polyhedron \({\fancyscript{P}}\) by computing the vertices of the arrangement formed by (tropical) hyperplanes associated with the half-spaces defining \({\fancyscript{P}}\), assuming that they are in general position. For some polyhedra, this algorithm has a better worst-case complexity than the double description method. However, its interest is rather theoretical, as this worst-case complexity is essentially tight, and it does not apply to arbitrary polyhedra.

The inductive approach used in the tropical double description presented here is reminiscent of an algorithm of Butkovič and Hegedus [12] computing a generating set of a tropical polyhedral cone described by linear (in)equalities. Gaubert [32, Chap. III] gave a similar one and derived the equivalence between the internal and external representations (see also [35, 37]). Our approach is more general in the sense that it handles intersections with other kinds of constraints. Moreover, the efficient elimination of redundant candidates using directed hypergraphs brings an important breakthrough both in theory and in practice in comparison with the previous techniques. We refer the reader to Sect. 6 for an exhaustive discussion.

In [42], Joswig defined a method which is able to compute the vertices of the polyhedral complex associated with a tropical polytope (in the sense of [27]), from a set of generating points. Other approaches [46, 56] rely on a similar technique applying on cones described by (in)equalities. While such algorithms are of interest from a combinatorial point of view, the size of the complex may be much larger than the number of vertices, leading to a suboptimal method to determine concise internal representations.

The dual problem of computing an external representation of a tropical polyhedron generated by a set of points and rays recently appeared to be more tractable: in a paper of the first two authors with Katz [10], it is shown that such a representation can be determined in incremental quasi-polynomial time, hence with a total complexity quasi-polynomial in the size of the input and the output. This result is based on the particular structure of polar cones of tropical polyhedra (relations between defining inequalities and weighted transversals in undirected hypergraphs) and it cannot be transposed to the primal problem discussed in this study.

We also note that the tropical double description method allows one, in particular, to check whether the intersection of a family of half-spaces is empty. However, if one is only interested in checking the latter emptyness property, different algorithms may be used. Indeed, the emptyness problem is equivalent [6] to solving a mean payoff game, a problem for which several combinatorial algorithms have been developed, including pseudo-polynomial algorithms (no polynomial time algorithm is currently known).

Finally, we note that the main results of this article have been announced in the proceedings article [4].

2 Preliminaries on Tropical Polyhedra and Polyhedral Cones

We denote by \(\mathbb R _{\max }:=\mathbb{R }\cup \{-\infty \}\) the tropical (max-plus) semiring. It is equipped with the addition \(x \oplus y :=\max (x,y)\) and the multiplication \(x \otimes y :=x + y\) (also denoted by concatenation \(x y\)). The neutral elements for these two laws are denoted by \(0\!\!{\mid }:=-\infty \) and \(1\!\!1:=0\). We shall use the notation \(\lambda ^{-1}\) for the tropical inverse of a scalar \(\lambda \in \mathbb R _{\max }\setminus \{0\!\!{\mid }\}\), which is nothing but the opposite of \(\lambda \).

The set \(\mathbb R _{\max }^d\) refers to the \(d\)-th fold Cartesian product of the tropical semiring. Its elements can be thought of as points of an affine space, or as vectors. They are denoted by bold symbols, for instance \(\varvec{x} = (\varvec{x}_1,\dots ,\varvec{x}_d)\). The elements \(0\!\!{\mid }\!\!\!0\!\!{\mid }\) and \(1\!\!1\!\!\!\!1\!\!1\) refer to the vectors whose coordinates are all equal to \(0\!\!{\mid }\) and \(1\!\!1\), respectively. In the sequel, the tropical semiring \(\mathbb R _{\max }\) will be equipped with the topology arising from the metric \((s,t)\mapsto |e^s-e^t|\). The set \(\mathbb R _{\max }^d\) will be equipped with the product topology, and the associated closure operator will be denoted by \(\mathrm cl\mathrm (\cdot )\).

Tropical operations are naturally extended to vectors and matrices over \(\mathbb R _{\max }\), defining \((A \oplus B)_{ij} = A_{ij} \oplus B_{ij}\) and \((A B)_{ij} = \otimes _k A_{ik} B_{kj}\). The Minkowski sum of two sets \(S, S^{\prime } \subset \mathbb R _{\max }^d\), denoted by \(S \oplus S^{\prime }\), is defined as the set \(\{ \varvec{x} \oplus \varvec{x}^{\prime } \mid (\varvec{x}, \varvec{x}^{\prime }) \in S \times S^{\prime } \}\).

A set \(\fancyscript{C}\subset \mathbb R _{\max }^d\) is said to be a tropical convex set if it contains the tropical segments between any two of its points \(\varvec{x}\) and \(\varvec{y}\). The latter is defined as the set of points of the form \(\lambda \varvec{x} \oplus \mu \varvec{y}\), for \(\lambda , \mu \in \mathbb R _{\max }\) such that \(\lambda \oplus \mu = 1\!\!1\). Note that this definition is analogous to the familiar one (in standard convexity) which requires in addition the scalars \(\lambda \) and \(\mu \) to be non-negative: the latter condition is automatically satisfied in the tropical setting, since \(0\!\!{\mid }=-\infty \le \lambda \) holds for any \(\lambda \in \mathbb R _{\max }\). The tropical convex hull \(\mathsf{co }(S)\) of a subset \(S \subset \mathbb R _{\max }^d\) is the set of the combinations \(\lambda _1 \varvec{x}_1 \oplus \cdots \oplus \lambda _p \varvec{x}_p\), where \(p \ge 1\), \(\varvec{x}_i \in S\) and \(\lambda _i \in \mathbb R _{\max }\) for all \(i\in [p]\), and \(\lambda _1 \oplus \cdots \oplus \lambda _p = 1\!\!1\).

Similarly, a set \(\fancyscript{C}\subset \mathbb R _{\max }^d\) is said to be a tropical (convex) cone if it contains all the combinations \(\lambda \varvec{x} \oplus \mu \varvec{y}\) (\(\lambda , \mu \in \mathbb R _{\max }\)) of any of two elements \(\varvec{x},\varvec{y} \in \fancyscript{C}\). Given \(S \subset \mathbb R _{\max }^d\), the tropical cone generated by \(S\), denoted by \({\mathsf{cone }}(S)\), is the set of the elements \(\lambda _1 \varvec{x}_1 \oplus \cdots \oplus \lambda _p \varvec{x}_p\) where \(p \ge 1, \varvec{x}_i \in S\) and \(\lambda _i \in \mathbb R _{\max }\) for all \(i\in [p]\). A tropical convex set (respectively convex cone) is said to be finitely generated if it is of the form \(\mathsf{co }(S)\) (respectively \({\mathsf{cone }}(S)\)) for some finite subset \(S \subset \mathbb R _{\max }^d\). In the sequel, the terms convex set or cone are interpreted in the tropical sense.

Given a convex set \(\fancyscript{C}\subset \mathbb R _{\max }^d\), a point \(\varvec{p} \in \fancyscript{C}\) is said to be an extreme point (or vertex) of \(\fancyscript{C}\) if for all \(\varvec{x}, \varvec{y} \in \fancyscript{C}\) and \(\lambda ,\mu \in \mathbb R _{\max }\) such that \(\lambda \oplus \mu = 1\!\!1, \varvec{p} = \lambda \varvec{x} \oplus \mu \varvec{y}\) holds only if \(\varvec{p} = \varvec{x}\) or \(\varvec{p} = \varvec{y}\). Analogously, when \(\fancyscript{C}\) is a convex cone, a non-null vector \(\varvec{v} \in \fancyscript{C}\) is said to be extreme in \(\fancyscript{C}\) if for all \(\varvec{x}, \varvec{y} \in \fancyscript{C}\), \(\varvec{v} = \varvec{x} \oplus \varvec{y}\) implies \(\varvec{v} = \varvec{x}\) or \(\varvec{v} = \varvec{y}\). In this case, the set \(\mathbb R _{\max } {\varvec{v}} = \{ \lambda \varvec{v} \mid \lambda \in \mathbb R _{\max }\}\) is said to be an extreme ray of \(\fancyscript{C}\), and the vector \(\varvec{v}\) is a representative of this ray.

The subset \(\mathbb B :=\{0\!\!{\mid }, 1\!\!1\}\) of the tropical semiring constitutes a sub-semiring of \(\mathbb R _{\max }\). A subset \(\fancyscript{D}\) of \(\mathbb B ^d\) is said to be a boolean cone if for all \(\varvec{x}, \varvec{y} \in \fancyscript{D}\) and \(\lambda , \mu \in \mathbb B , \lambda \varvec{x} \oplus \mu \varvec{y} \in \fancyscript{D}\) (in other words, \(\fancyscript{D}\) is a sup-semilattice for the standard partial order on \(\mathbb B ^d\)). A vector of a boolean cone \(\fancyscript{D}\) is said to be extreme if it cannot be expressed as the pointwise supremum of two other vectors of \(\fancyscript{D}\).

Tropical polyhedra and polyhedral cones are defined analogously to classical ones. A tropical affine half-space is a set formed by the solutions \(\varvec{x} = (\varvec{x}_i) \in \mathbb R _{\max }^d\) of a tropical affine inequality

$$\begin{aligned} a_0 \oplus \mathop {\bigoplus }_{i\in [d]} a_i \varvec{x}_i \le b_0 \oplus \mathop {\bigoplus }_{i\in [d]} b_i \varvec{x}_i, \end{aligned}$$

where \(a_i, b_i \in \mathbb R _{\max }\) for all \(i = 0,\dots ,d\). It is said to be a tropical (linear) half-space when the coefficients \(a_0\) and \(b_0\) are omitted. In this setting, a tropical polyhedron (respectively a tropical polyhedral cone) is the intersection of finitely many tropical affine (respectively linear) half-spaces. Equivalently, any tropical polyhedron can be seen as the set of the solutions of a system of inequality constraints \(A \varvec{x} \oplus \varvec{c} \le B \varvec{x} \oplus \varvec{d}\), where \(A\) and \(B\) are \(p \times d\)-matrices with entries in \(\mathbb R _{\max }, \varvec{c}\) and \(\varvec{d}\) are vectors of \(\mathbb R _{\max }^p\), and \(\le \) denotes the standard partial ordering of vectors. Similarly, a tropical polyhedral cone is the set of the solutions of a two-sided system of the form \(A \varvec{x} \le B \varvec{x}\).

The description of tropical polyhedra and polyhedral cones as intersections of half-spaces is said to be external. Moreover, tropical polyhedra and polyhedral cones admit an internal representation, by means of finitely many points and rays, as established by the following tropical analog of the Minkowski–Weyl theorem.

Theorem 2

([35, Theorem 2]) The tropical polyhedra of \(\mathbb R _{\max }^d\) are precisely the sets of the form \(\mathsf{co }(P) \oplus {\mathsf{cone }}(R)\) where \(P\) and \(R\) are finite subsets of \(\mathbb R _{\max }^d\).

The tropical polyhedral cones of \(\mathbb R _{\max }^d\) are precisely the sets of the form \({\mathsf{cone }}(V)\) where \(V\) is a finite subset of \(\mathbb R _{\max }^d\).

Thus, a tropical polyhedron \(\fancyscript{P}\) is the sum of a bounded (finitely generated and convex) set and of a polyhedral cone. The latter coincides with the recession cone \(\mathsf{rec }(\fancyscript{P})\) of \(\fancyscript{P}\), which is defined as the set \(\{\varvec{v} \mid \varvec{x} \oplus \lambda \varvec{v} \in \fancyscript{P} \text{ for} \text{ all} \lambda \in \mathbb R _{\max }\}\), given an arbitrary point \(\varvec{x} \in \fancyscript{P}\), see [34]. When \(\fancyscript{P}\ne \emptyset \) is defined by a system of inequalities \(A \varvec{x} \oplus \varvec{c} \le B \varvec{x} \oplus \varvec{d}\), the recession cone can be shown to be the set of the solutions of the system \(A \varvec{x} \le B \varvec{x}\).

The couple \((P,R)\) is said to be a generating representation of a tropical polyhedron \(\fancyscript{P}\) when \(\fancyscript{P}= \mathsf{co }(P) \oplus {\mathsf{cone }}(R)\). Similarly, the set \(V\) is a generating set of a tropical polyhedral cone \(\fancyscript{C}\) when \(\fancyscript{C}= {\mathsf{cone }}(V)\). For algorithmic purposes, we look for representations which are minimal in a suitable sense. The following proposition, which combines several results of [34], shows that such representations do exist. (Actually, the results of [34] apply more generally to closed—not necessarily polyhedral—tropical convex sets.)

Proposition 3

([34, Theorems 3.2 and 3.3, Corollary 3.4]) A tropical polyhedron \(\fancyscript{P}\subset \mathbb R _{\max }^d\) admits a generating representation \((P,R)\) in which \(P\) consists of the extreme points of \(\fancyscript{P}\), and \(R\) contains precisely one representative of each extreme ray of the recession cone of \(\fancyscript{P}\). Moreover, if \((P^{\prime },R^{\prime })\) is any generating representation of \(\fancyscript{P}\), then \(P^{\prime }\supset P\), and \(R^{\prime }\) contains at least one scalar multiple of every element of \(R\).

Similarly, a tropical polyhedral cone \(\fancyscript{C}\subset \mathbb R _{\max }^d\) admits a generating set \(V\) consisting of precisely one element in each extreme ray of \(\fancyscript{C}\). Moreover, if \(V^{\prime }\) is any generating set of \(\fancyscript{C}\), then \(V^{\prime }\) contains at least one scalar multiple of every element of \(V\).

The generating representations \((P,R)\) and the generating set \(V\) arising in this proposition will be referred to as minimal. The minimal generating representations of a tropical polyhedron (or of a tropical polyhedral cone) are almost identical, as they only differ by multiplicative factors on the representatives of extreme rays. We obtain canonical minimal representations by requiring these vectors to be scaled for the “norm” \(\left||\cdot \right||\) over \(\mathbb R _{\max }^d\) defined by \(\left||\varvec{x} \right|| :=\max _{i\in [d]} e^{\varvec{x}_i}\), i.e. to satisfy \(\left||\varvec{x} \right|| = 1\).

Tropical polyhedra of \(\mathbb R _{\max }^d\) can be represented by polyhedral cones of \(\mathbb R _{\max }^{d+1}\). In the classical setting, such a technique is known as homogenization (see for instance Ziegler’s monograph [59]). As shown in [24, 34], the same technique works in the tropical setting.

We restrict here our attention to the case of finitely generated convex sets. The notation \((M \ \varvec{v})\) refers to the matrix obtained by appending the vector \(\varvec{v}\) after the last column of the matrix \(M\).

Definition 1

Let \(\fancyscript{P}= \{ \varvec{x} \in \mathbb R _{\max }^d \mid A \varvec{x} \oplus \varvec{c} \le B \varvec{x} \oplus \varvec{d} \}\) be a non-empty tropical polyhedron (\(A, B \in \mathbb R _{\max }^{p \times d}\), \(\varvec{c},\varvec{d} \in \mathbb R _{\max }^d\)). The homogenized cone \(\widehat{\fancyscript{P}}\) is the polyhedral cone given by

$$\begin{aligned} \widehat{\fancyscript{P}} :=\bigl \{\varvec{x} \in \mathbb R _{\max }^{d+1} \mid (A \ \varvec{c}) \, \varvec{x} \le (B \ \varvec{d}) \, \varvec{x} \bigr \}. \end{aligned}$$

When \(\varvec{x} \in \mathbb R _{\max }^d\) and \(\alpha \in \mathbb R _{\max }\), the element \((\varvec{x},\alpha )\) refers to the vector of \(\mathbb R _{\max }^{d+1}\) whose \(d\) first coordinates coincide with \(\varvec{x}\), and the last coordinate is equal to \(\alpha \). The generating representations of a tropical polyhedron and of its homogenized cone are connected by the following result, which is an immediate consequence of the relations between a convex set and its homogenized cone which are established in [34, § 2].

Proposition 4

(Corollary [34]) Let \(\fancyscript{P}\subset \mathbb R _{\max }^d\) be a non-empty tropical polyhedron. Then the following statements hold:

  1. (i)

    if \((P,R)\) is a generating representation of \(\fancyscript{P}\), then \((P \times \{1\!\!1\}) \cup (R \times \{0\!\!{\mid }\})\) is a generating set of its homogenized cone \(\widehat{\fancyscript{P}}\).

  2. (ii)

    conversely, if \(V\) is a generating set of \(\widehat{\fancyscript{P}}\), then the couple \((P,R)\) defined by \(P :=\{ \alpha ^{-1} \varvec{p} \mid (\varvec{p}, \alpha ) \in V \text{ and} \alpha \ne 0\!\!{\mid }\}\) and \(R :=\{ \varvec{r} \mid (\varvec{r}, 0\!\!{\mid }) \in V \}\) forms a generating representation of \(\fancyscript{P}\).

  3. (iii)

    in the two previous statements, if any of the representations is minimal (and canonical), then the other is also minimal (and canonical).

As a consequence, \(\varvec{p}\) is a vertex of \(\fancyscript{P}\) if, and only if, the vector \((\varvec{p}, 1\!\!1)\) is an extreme vector of the homogenized cone \(\widehat{\fancyscript{P}}\). Similarly, the extreme vectors of the recession cone \(\mathsf rec (\fancyscript{P})\) are precisely the elements \(\varvec{r} \in \mathbb R _{\max }^d\) such that \((\varvec{r}, 0\!\!{\mid })\) is extreme in \(\widehat{\fancyscript{P}}\). Thus, we will only state the main results of this work for tropical cones, leaving to the reader the derivation of the affine analogues using homogenization, along the lines of Proposition 4.

Example 1

In the following sections, we will illustrate our results on the tropical polyhedron \(\fancyscript{P}\) depicted in solid gray (the black border is included) in the left-hand side of Fig. 1. It is defined as the intersection of the half-spaces given by the inequalities:

$$\begin{aligned} 0&\le \varvec{x}_1+2 \\ \varvec{x}_1&\le \max (\varvec{x}_2,0) \\ \varvec{x}_1&\le 2 \\ 0&\le \max (\varvec{x}_1,\varvec{x}_2-1) \end{aligned}$$

This polyhedron is generated by the vertices \(\varvec{p}^1 = (-2,1)\), \(\varvec{p}^2 = (2,2)\), and \(\varvec{p}^3 = (0,-\infty )\), and by the extreme ray \(\mathbb R _{\max }{\varvec{r}^0}\) where \(\varvec{r}^0 = (-\infty ,0)\).

Its homogenized cone \(\fancyscript{C}\) is depicted in the right-hand side of Fig. 1. This cone is represented in barycentric coordinates: each element \((\varvec{x}_1,\varvec{x}_2,\varvec{x}_3)\) is represented as a barycenter with weights \((e^{\varvec{x}_1}, e^{\varvec{x}_2}, e^{\varvec{x}_3})\) of the three vertices of the outermost triangle. Two representatives of a same ray are thus represented by the same point. Besides, this barycentric representation is convenient to represent points with infinite coordinates, which are mapped to the boundary of the triangle. The cone \(\fancyscript{C}\) is given by the linear inequalities

$$\begin{aligned} \varvec{x}_3&\le \varvec{x}_1+2 \\ \varvec{x}_1&\le \max (\varvec{x}_2,\varvec{x}_3) \\ \varvec{x}_1&\le \varvec{x}_3+2 \\ \varvec{x}_3&\le \max (\varvec{x}_1,\varvec{x}_2-1) \end{aligned}$$

In accordance with Proposition 4, it is generated by the extreme elements \(\varvec{v}^0 = (-\infty ,0,-\infty )\), \(\varvec{v}^1 = (-2,1,0), \varvec{v}^2 = (2,2,0)\), and \(\varvec{v}^3 = (0,-\infty ,0)\).

Fig. 1
figure 1

A tropical polyhedron in \(\mathbb R _{\max }^2\) (left), and an equivalent representation by a cone in \(\mathbb R _{\max }^3\) (right)

3 Combinatorial Characterization of Extremality Using Directed Hypergraphs

We first show that the extremality of a vector of a (non-necessarily polyhedral) tropical cone is a local property.

Proposition-Definition 5

Let \(\fancyscript{C}\) be a tropical cone, and \(\varvec{v}\) be a non-null vector of \(\fancyscript{C}\). Then \(\varvec{v}\) is extreme in \(\fancyscript{C}\) if, and only if, there exists a neighborhood \(N\) of \(\varvec{v}\) such that

$$\begin{aligned} \forall \varvec{x}, \varvec{y} \in \fancyscript{C}\cap N, \ \varvec{v} = \varvec{x} \oplus \varvec{y} \implies \varvec{v} = \varvec{x} \text{ or} \,\varvec{v} = \varvec{y}. \end{aligned}$$

In the latter case, \(\varvec{v}\) is said to be locally extreme in \(\fancyscript{C}\).

Proof

The “only if” part of the result is straightforward. Suppose that \(\varvec{v}\) is locally extreme in \(\fancyscript{C}\), and let \(N\) be a neighborhood of \(\varvec{v}\) as in Proposition 5. Suppose that \(\varvec{x}, \varvec{y} \in \fancyscript{C}\) are two vectors distinct from \(\varvec{v}\), and satisfying \(\varvec{v} = \varvec{x} \oplus \varvec{y}\). Consider \(\alpha > 0\) sufficiently small so that \(\varvec{x}^{\prime } :=\alpha ^{-1} \varvec{v} \oplus \varvec{x}\) and \(\varvec{y}^{\prime } :=\alpha ^{-1} \varvec{v} \oplus \varvec{y}\) both belong to \(N\). Clearly, \(\varvec{v} = \varvec{x}^{\prime } \oplus \varvec{y}^{\prime }\), and it follows that \(\varvec{v}\) is equal to one of the two vectors \(\varvec{x}^{\prime }\) and \(\varvec{y}^{\prime }\). As \(\alpha > 0\), this yields a contradiction. \(\square \)

The support of a vector \(\varvec{x}=(\varvec{x}_i) \in \mathbb R _{\max }^d\) is defined as the set of the indices of its non-null coordinates

$$\begin{aligned} \mathsf{supp }(\varvec{x}) :=\{ i \in [d] \mid \varvec{x}_i \ne 0\!\!{\mid }\}. \end{aligned}$$

The following proposition states that the extremality of an element of a tropical cone can be established only by considering the vectors of the cone which have a smaller support

Proposition 6

Let \(\fancyscript{C}\subset \mathbb R _{\max }^d\) be a tropical cone, and \(\varvec{v}\) be a non-null vector of \(\fancyscript{C}\). Then the following two statements are equivalent:

  1. (i)

    \(\varvec{v}\) is extreme in \(\fancyscript{C}\),

  2. (ii)

    \(\varvec{v}\) is extreme in \(\{ \varvec{x} \in \fancyscript{C}\mid \mathsf{supp }(\varvec{x}) \subset \mathsf{supp }(\varvec{v}) \}\).

proof

Let \(\fancyscript{D}:=\{\varvec{x} \in \fancyscript{C}\mid \mathsf{supp }(\varvec{x}) \subset \mathsf{supp }(\varvec{v}) \}\). It is straightforward that \(\fancyscript{D}\) is a tropical cone. Besides, for any vectors \(\varvec{x}, \varvec{y} \in \fancyscript{C}\) such that \(\varvec{v} = \varvec{x} \oplus \varvec{y}\), their supports are both included in \(\mathsf{supp }(\varvec{v})\), hence \(\varvec{x}, \varvec{y} \in \fancyscript{D}\). This concludes the proof. \(\square \)

For the rest of the section, the set \(\fancyscript{C}\) is supposed to be a polyhedral cone defined by a system of linear inequalities \(A \varvec{x} \le B \varvec{x}\), with \(A, B \in \mathbb R _{\max }^{p \times d}\). Using Proposition 6, it is assumed that \(\varvec{v}\) is an element of \(\fancyscript{C}\) satisfying \(\mathsf{supp }(\varvec{v}) = [d]\), up to considering the extracted system \(A^{\prime } \varvec{y} \le B^{\prime } \varvec{y}\), where \(A^{\prime }\) and \(B^{\prime }\) are respectively the matrices formed by the columns of \(A\) and \(B\) of index \(i\) in the support of \(\varvec{v}\). We denote by \(A_k\) (respectively \(B_k\)) the \(k\)-th row of the matrix \(A\) (respectively \(B\)), for \(k \in [p]\).

Following the line of Proposition 5, we introduce the notion of tangent cone at the point \(\varvec{v}\), which captures the constraints induced by the cone \(\fancyscript{C}\) in the neighborhood of \(\varvec{v}\).

Definition 2

The tangent cone to \(\fancyscript{C}\) at the element \(\varvec{v}\) is the tropical polyhedral cone \(\fancyscript{T}(\varvec{v},\fancyscript{C})\) defined by the following intersection of half-spaces:

$$\begin{aligned} \fancyscript{T}(\varvec{v},\fancyscript{C}) :=\;\; {\mathop {\mathop {\bigcap }\limits _{{k\in [p]}}}\limits _{{A_{k}}\varvec{v} = B_k \varvec{v} > 0\!\!{\mid }}} \Bigl \{\, \varvec{x} \in \mathbb R _{\max }^d \bigm | \; \; \; \mathop {\mathop {\bigoplus }}\limits _{i \in \arg \max (A_k \varvec{v})} \; \; \varvec{x}_i \; \; \le \; \; \; \; \mathop {\mathop {\bigoplus }}\limits _{j \in \arg \max (B_k \varvec{v})} \; \; \varvec{x}_j \, \Bigr \}, \end{aligned}$$

where for any \(\varvec{c} = (\varvec{c}_i) \in \mathbb R _{\max }^{1 \times d}\), the set \(\arg \max (\varvec{c} \varvec{v})\) is defined as the argument of the maximum \(\varvec{c} \varvec{v} = \max _{i\in [d]} (\varvec{c}_i + \varvec{v}_i)\).

Proposition 7

There exists a neighborhood \(N\) of \(\varvec{v}\) such that for all \(\varvec{x} \in N, \varvec{x}\) belongs to \(\fancyscript{C}\) if, and only if, it is an element of \(\varvec{v} + \fancyscript{T}(\varvec{v},\fancyscript{C})\).

Proof

Consider a neighborhood \(N\) in which all elements \(\varvec{x}\) satisfy the following conditions:

  1. (i)

    \(A_k \varvec{x} < B_k \varvec{x}\) for all \(k \in [p]\) such that \(A_k \varvec{v} < B_k \varvec{v}\),

  2. (ii)

    \(\arg \max (A_k \varvec{x}) \subset \arg \max (A_k \varvec{v})\) and \(\arg \max (B_k \varvec{x}) \subset \arg \max (B_k \varvec{v})\) for any other \(k \in [p]\).

Let \(\varvec{x} \in N\). Note that \(\varvec{x}\) belongs to \(\fancyscript{C}\) if, and only if, for each \(k \in [p]\) verifying \(A_k \varvec{v} = B_k \varvec{v}\),

$$\begin{aligned} \max _{i \in \arg \max (A_k \varvec{v})} (A_{ki} + \varvec{x}_i) \le \max _{j \in \arg \max (B_k \varvec{v})} (B_{kj} + \varvec{x}_j), \end{aligned}$$
(2)

by definition of \(N\).

Suppose that \(\varvec{x}\) belongs to \(\fancyscript{C}\). Let \(k\) such that \(A_k \varvec{v} = B_k \varvec{v} > 0\!\!{\mid }\). As for all \(i \in \arg \max (A_k \varvec{v})\) and \(j \in \arg \max (B_k \varvec{v}), A_{ki} + \varvec{v}_i = B_{kj} + \varvec{v}_j > 0\!\!{\mid }\), the term \(A_{ki} + \varvec{v}_i\) (respectively \(B_{kj} + \varvec{v}_j\)) can be subtracted from \(A_{ki} + \varvec{x}_i\) (respectively \(B_{kj} + \varvec{x}_j\)) in (2), which shows

$$\begin{aligned} \max _{i \in \arg \max (A_k \varvec{v})} (\varvec{x}_i - \varvec{v}_i) \le \max _{j \in \arg \max (B_k \varvec{v})} (\varvec{x}_j - \varvec{v}_j). \end{aligned}$$
(3)

Conversely, suppose that \(\varvec{x} - \varvec{v} = (\varvec{x}_i - \varvec{v}_i)_i\) is an element of \(\fancyscript{T}(\varvec{v}, \fancyscript{C})\). Consider \(k \in [p]\) such that \(A_k \varvec{v} = B_k \varvec{v} > 0\!\!{\mid }\). Adding the term \(A_{ki} + \varvec{v}_i\) (respectively \(B_{kj} + \varvec{v}_j\)) to each \(\varvec{x}_i - \varvec{v}_i\) (respectively \(\varvec{x}_j - \varvec{v}_j\)) in (3) shows that \(\varvec{x}\) satisfies (2). Besides, if \(A_k \varvec{v} = B_k \varvec{v} = 0\!\!{\mid }\), the row vectors \(A_k\) and \(B_k\) are identically null (since \(\varvec{v}\) has a full support), and (2) is trivially satisfied. \(\square \)

Remark 2

The term tangent cone is borrowed from convex analysis and optimization, where it is usually defined as the set of the directions which are asymptotically admissible from the vector \(\varvec{v}\) in the set \(\fancyscript{C}\)

$$\begin{aligned}&\fancyscript{T}^0(\varvec{v},\fancyscript{C}) :=\\&\quad \Bigl \{ \varvec{x} \in \mathbb R ^d \mid \exists \{t_k\}_{k \ge 0} \in (\mathbb R _+^*)^\mathbb N , \{\varvec{v}^k\}_{k \ge 0} \in \fancyscript{C}^\mathbb N , \ t_k \mathop {\longrightarrow }\limits _{k\rightarrow +\infty } 0, \ (\varvec{v}^k-\varvec{v})/t_k \mathop {\longrightarrow }\limits _{k\rightarrow +\infty } \varvec{x} \Bigr \}. \end{aligned}$$

We claim that \(\fancyscript{T}(\varvec{v},\fancyscript{C})\) defined here is the topological closure of \(\fancyscript{T}^0(\varvec{v},\fancyscript{C})\) (the latter is closed in \(\mathbb R ^d\), but not in \(\mathbb R _{\max }^d\)). Using essentially the same technique as in the proof of Proposition 7, it can be shown that \(\fancyscript{T}^0(\varvec{v},\fancyscript{C})\) coincides with the set \(\fancyscript{T}(\varvec{v},\fancyscript{C}) \cap \mathbb R ^d\). Thus, the inclusion \(\mathrm cl\mathrm (\fancyscript{T}^0(\varvec{v},\fancyscript{C})) \subset \fancyscript{T}(\varvec{v},\fancyscript{C})\) is implied by the fact that \(\fancyscript{T}(\varvec{v},\fancyscript{C})\) is closed, as any tropical polyhedral cone. The opposite inclusion \(\fancyscript{T}(\varvec{v},\fancyscript{C}) \subset \mathrm cl\mathrm (\fancyscript{T}^0(\varvec{v},\fancyscript{C}))\) comes from that the vector \(1\!\!1\!\!\!\!1\!\!1\) necessarily belongs to \(\fancyscript{T}(\varvec{v},\fancyscript{C})\), hence any element \(\varvec{x} \in \fancyscript{T}(\varvec{v},\fancyscript{C})\) can be expressed as the limit of the sequence of the elements \(\varvec{x}^k :=\varvec{x} \oplus (k^{-1} 1\!\!1\!\!\!\!1\!\!1)\), for \(k\) tending to \(+\infty \). As for \(k \ge 0\), every vector \(\varvec{x}^k\) belongs to \(\fancyscript{T}(\varvec{v},\fancyscript{C}) \cap \mathbb R ^d = \fancyscript{T}^0(\varvec{v},\fancyscript{C})\), this completes the proof of the claim.

Combining Proposition 7 with the local characterization of extremality given by Proposition 5 yields the following reduction:

Proposition 8

The vector \(\varvec{v}\) is extreme in \(\fancyscript{C}\) if, and only if, the element \(1\!\!1\!\!\!\!1\!\!1\) is extreme in \(\fancyscript{T}(\varvec{v}, \fancyscript{C})\).

Proof

Let \(N^{\prime }\) be the set consisting of the elements \(\varvec{x} - \varvec{v}\) for \(\varvec{x} \in N\), where \(N\) is given by Proposition 7. First remark that \(1\!\!1\!\!\!\!1\!\!1\in \fancyscript{T}(\varvec{v},\fancyscript{C})\).

Observe that two vectors \(\varvec{x}, \varvec{y} \in \fancyscript{C}\cap N\) satisfy \(\varvec{v} = \varvec{x} \oplus \varvec{y}\) if, and only if, \(\varvec{x^{\prime }} :=\varvec{x} - \varvec{v}\) and \(\varvec{y^{\prime }} :=\varvec{y} - \varvec{v}\) belongs to \(\fancyscript{T}(\varvec{v},\fancyscript{C}) \cap N^{\prime }\) (by Proposition 7), and \(1\!\!1\!\!\!\!1\!\!1= \varvec{x}^{\prime } \oplus \varvec{y}^{\prime }\). We deduce that \(\varvec{v}\) is locally extreme in \(\fancyscript{C}\) if, and only if, \(1\!\!1\!\!\!\!1\!\!1\) is locally extreme in \(\fancyscript{T}(\varvec{v},\fancyscript{C})\). We conclude the proof by Proposition 5. \(\square \)

The interest of Proposition 8 is that we are now reduced to characterizing extremality of a vector of \(\mathbb B ^d\) in a closed tropical cone \(\fancyscript{D}\) (here \(\fancyscript{T}(\varvec{v},\fancyscript{C})\)), which is stable under the usual multiplication by positive scalars, i.e. \(\alpha \times \varvec{x} \in \fancyscript{D}\) for all \(\varvec{x} \in \fancyscript{D}\) and \(\alpha > 0\) (the multiplication being understood entrywise).

Proposition 9

Let \(\fancyscript{D}\subset \mathbb R _{\max }^d\) be a closed tropical cone, which is stable under the multiplication by positive scalars in the usual sense. Then a vector \(\varvec{w} \in \fancyscript{D}\cap \mathbb B ^d\) is extreme in \(\fancyscript{D}\) if, and only if, it is extreme in set \(\fancyscript{D}\cap \mathbb B ^d\) seen as a boolean cone over \(\mathbb B ^d\).

Proof

The “only if” part is obvious.

For the “if” part, suppose that \(\varvec{w} = \varvec{x} \oplus \varvec{y}\), where \(\varvec{x}, \varvec{y} \in \fancyscript{D}\). Observe that every entry of \(\varvec{x}\) and \(\varvec{y}\) is non-positive, and consider the sequences of the vectors \(\varvec{x}^k :=k \times \varvec{x}\) and \(\varvec{y}^k :=k \times \varvec{y}\), for \(k \ge 1\). By assumption, all elements \(\varvec{x}^k\) and \(\varvec{y}^k\) belong to \(\fancyscript{D}\). Besides, \(\varvec{x}^k \oplus \varvec{y}^k = k \times \varvec{w} = \varvec{w}\), since \(\varvec{w} \in \mathbb B ^d\). The two sequences \((\varvec{x}^k)_k\) and \((\varvec{y}^k)_k\) admit a limit, respectively denoted by \(\varvec{x}^{\prime }\) and \(\varvec{y}^{\prime }\), which both belong to \(\fancyscript{D}\cap \mathbb B ^d\) (since \(\fancyscript{D}\) is topologically closed). The element \(\varvec{w}\) being extreme in the boolean cone \(\fancyscript{D}\cap \mathbb B ^d\), one of the two vectors \(\varvec{x}^{\prime }\) or \(\varvec{y}^{\prime }\) is equal to \(\varvec{w}\). Supposing for instance that \(\varvec{w} = \varvec{x}^{\prime }\), we know that \(\varvec{x}^{\prime } \le \varvec{x} \le \varvec{w}\), and we conclude that \(\varvec{w} = \varvec{x}\). \(\square \)

Instantiating Proposition 9 with the tangent cone \(\fancyscript{T}(\varvec{v},\fancyscript{C})\) provides the following combinatorial characterization of the extremality of \(\varvec{v}\):

Theorem 10

Let \(\fancyscript{C}\subset \mathbb R _{\max }^d\) be a polyhedral cone, and \(\varvec{v}\) a vector of \(\fancyscript{C}\) with full support. The following three propositions are equivalent:

  1. (i)

    the vector \(\varvec{v}\) is extreme in \(\fancyscript{C}\),

  2. (ii)

    the vector \(1\!\!1\!\!\!\!1\!\!1\) is extreme in the boolean cone \(\fancyscript{T}(\varvec{v},\fancyscript{C}) \cap \mathbb B ^d\),

  3. (iii)

    there exists \(i \in [d]\) such that the following inequalities hold:

    $$\begin{aligned} \forall j \in [d], \ \forall \varvec{x} \in \fancyscript{T}(\varvec{v},\fancyscript{C}) \cap \mathbb B ^d, \quad \varvec{x}_i \le \varvec{x}_j. \end{aligned}$$
    (4)

Proof

The equivalence \((i) \Leftrightarrow (ii)\) follows from Propositions 8 and 9. It remains to show \((ii) \Leftrightarrow (iii)\).

Suppose that \(1\!\!1\!\!\!\!1\!\!1\) is extreme in the boolean cone \(\fancyscript{D}:=\fancyscript{T}(\varvec{v}, \fancyscript{C}) \cap \mathbb B ^d\). We claim that there exists \(i \in [d]\) such that for all \(\varvec{x} \in \fancyscript{D}\setminus \{1\!\!1\!\!\!\!1\!\!1\}, \varvec{x}_i = 0\!\!{\mid }\). If not, \(1\!\!1\!\!\!\!1\!\!1\) could be written as the sum of some elements \(\varvec{x}^j \in \fancyscript{D}\) such that \(\varvec{x}^j_j = 1\!\!1\), for \(j = 1, \dots , d\). It follows that for all elements \(\varvec{x}\) of \(\fancyscript{D}\) and \(j \in [d], \varvec{x}_i \le \varvec{x}_j\).

Reciprocally, if (4) is satisfied, then every vector \(\varvec{x} \in \fancyscript{D}\setminus \{1\!\!1\!\!\!\!1\!\!1\}\) verifies \(\varvec{x}_i = 0\!\!{\mid }\). Then for all pairs \((\varvec{x}, \varvec{y})\) of such elements, we have \((\varvec{x} \oplus \varvec{y})_i = 0\!\!{\mid }\). We conclude that \(1\!\!1\!\!\!\!1\!\!1\) is extreme. \(\square \)

As the tangent cone \(\fancyscript{T}(\varvec{v},\fancyscript{C})\) is defined by inequalities with coefficients in \(\mathbb B \), the nature of the characterization provided by Theorem 10 is purely boolean. However, testing, by exploration, whether there exists \(i \in [d]\) such that every vector of \(\fancyscript{T}(\varvec{v},\fancyscript{C}) \cap \mathbb B ^d\) satisfies \(\varvec{x}_i \le \varvec{x}_j\) for all \(j \in [d]\), does not have acceptable complexity. Instead, we propose to express the satisfiability of the inequalities (4) as a reachability problem on directed hypergraphs.

Directed hypergraphs are a generalization of directed graphs, in which arcs leave and enter subsets of vertices. A directed hypergraph over the nodes \(1, \dots , d\) is a set of hyperarcs of the form \((T, H)\), where \(T, H \in 2^d\). The notion of reachability is extended from directed graphs to directed hypergraphs, and defined inductively as follows: given a hypergraph \(\mathcal G \), and \(i, j \in [d]\), \(i\) is reachable from \(j\) in \(\mathcal G \), which is denoted by \(j \rightsquigarrow _\mathcal G i\), if \(i = j\), or there exists a hyperarc \((T, H)\) in \(\mathcal G \) such that \(i \in H\), and all elements of \(T\) are reachable from \(j\).

Example 3

Figure 2 depicts an example of directed hypergraph consisting of the hyperarcs \(a_1 =(\{ 1\}, \{2\}), a_2 = (\{ 2\}, \{3\}), a_3 = (\{ 3\}, \{1\}), a_4 = (\{ 2,3 \}, \{4,5\})\), and \(a_5 = (\{ 3,5 \}, \{6\})\). We visualize a hyperarc as a bundle of arrows: a solid disk sector indicates that the different arrows going through it belong to the same hyperarc; the head (respectively tail) of the hyperarc is the union of the heads (respectively tails) of these arrows. Applying the recursive definition of reachability from the node \(1\) discovers the nodes \(2\), then \(3\), which leads to the two nodes \(4\) and \(5\) through the hyperarc \(a_4\), and finally the node \(6\) through \(a_5\).

Fig. 2
figure 2

A directed hypergraph

We now introduce the notion of tangent directed hypergraph, which is an equivalent encoding of the tangent cone as a directed hypergraph. It derives from the system of inequalities defining the tangent cone:

Definition 3

The tangent directed hypergraph at \(\varvec{v}\), denoted by \(\mathcal G (\varvec{v},\fancyscript{C})\), is the directed hypergraph consisting of the hyperarcs \((\arg \max (B_k \varvec{v}), \arg \max (A_k \varvec{v}))\) for every \(k \in [p]\) such that \(A_k \varvec{v} = B_k \varvec{v} > 0\!\!{\mid }\).

The reachability relation of the tangent directed hypergraph precisely captures the constraints of the form \(\varvec{x}_i \le \varvec{x}_j\) satisfied by the boolean elements \(\varvec{x}\) of the tangent cone, as shown below:

Proposition 11

The following two conditions are equivalent:

  1. (a)

    \(i\) is reachable from \(j\) in the hypergraph \(\mathcal G (\varvec{v},\fancyscript{C})\),

  2. (b)

    for all \(\varvec{x} \in \fancyscript{T}(\varvec{v},\fancyscript{C}) \cap \mathbb B ^d\), \(\varvec{x}_i \le \varvec{x}_j\),

Proof

We first prove by induction that for every node \(i\) reachable from \(j\), the inequality \(\varvec{x}_i \le \varvec{x}_j\) holds for all \(\varvec{x} \in \fancyscript{T}(\varvec{v},\fancyscript{C}) \cap \mathbb B ^d\). The case \(i = j\) is trivial. Suppose that there exists a hyperarc \((T,H)\) in \(\mathcal G (\varvec{v},\fancyscript{C})\) such that \(i \in H\), and each \(k \in T\) is reachable from \(j\). Then for all \(\varvec{x} \in \fancyscript{T}(\varvec{v},\fancyscript{C}) \cap \mathbb B ^d, \oplus _{k \in T} \varvec{x}_k \le \varvec{x}_j\). Besides, \(\varvec{x}_i \le \oplus _{k \in T} \varvec{x}_k\) by definition of \(\fancyscript{T}(\varvec{v},\fancyscript{C})\) and \(\mathcal G (\varvec{v},\fancyscript{C})\). Hence \(\varvec{x}_i \le \varvec{x}_j\). This shows that \((a) \Rightarrow (b)\).

Then, let us show by contraposition that \((b) \Rightarrow (a)\). Let \(R\) be the set of nodes \(k \in [d]\) reachable from \(j\), and assume that \(i \not \in R\). Consider the element \(\varvec{x} \in \mathbb B ^d\) defined by \(\varvec{x}_k = 0\!\!{\mid }\) if \(k \in R\), and \(1\!\!1\) otherwise. In particular, \(\varvec{x}_i > \varvec{x}_j\). Let \((T,H)\) be a hyperarc of \(\mathcal G (\varvec{v},\fancyscript{C})\). If \(T \subset R\), then \(H\) is included into \(R\), so that the inequality \(\oplus _{k \in H} \varvec{x}_k \le \oplus _{l \in T} \varvec{x}_l\) is satisfied. If \(T \not \subset R\), the latter inequality is still valid because \(\oplus _{l \in T} \varvec{x}_l = 1\!\!1\). We deduce that \(\varvec{x}\) belongs to \(\fancyscript{T}(\varvec{v},\fancyscript{C}) \cap \mathbb B ^d\). \(\square \)

Remark 4

The two statements of Proposition 11 can also be shown to be equivalent to the property:

  1. (c)

    for all \(\varvec{x} \in \fancyscript{T}(\varvec{v},\fancyscript{C})\), \(\varvec{x}_i \le \varvec{x}_j\). Replacing \(\fancyscript{T}(\varvec{v},\fancyscript{C}) \cap \mathbb B ^d\) by \(\fancyscript{T}(\varvec{v},\fancyscript{C})\), the first part of the proof of Proposition 11 indeed shows \((a) \Rightarrow (c)\). The implication \((c) \Rightarrow (b)\) is trivial.

Given a directed hypergraph \(\mathcal G \), the strongly connected components (Sccs for short) are defined as the equivalence classes of the relation \(\equiv _\mathcal G \), given by \(i \equiv _\mathcal G j\) if \(i \rightsquigarrow _\mathcal G j\) and \(j \rightsquigarrow _\mathcal G i\). Strongly connected components are partially ordered by the relation \(\preceq _\mathcal G \) induced by reachability, i.e. \(C \preceq _\mathcal G C^{\prime }\) if \(C\) and \(C^{\prime }\) admit a representative \(i\) and \(j\), respectively, such that \(i \rightsquigarrow _\mathcal G j\).

The theorem stated in the introduction now follows as a consequence of the previous results.

Proof of Theorem 1

From Theorem 10 and Proposition 11, the vector \(\varvec{v}\) is extreme if, and only if, there is a node \(i\) reachable from every node \(j\) in the tangent directed hypergraph \(\mathcal G (\varvec{v},\fancyscript{C})\). This holds if, and only if, \(i\) belongs to a strongly connected component \(C\) such that \(C^{\prime } \preceq _\mathcal{G (\varvec{v},\fancyscript{C})} C\) for any Scc \(C^{\prime }\).

Example 5

Let us illustrate Theorem 1 by establishing the extremality of the vector \(\varvec{v}^2 = (2,2,0)\) of the cone \(\fancyscript{C}\) defined in Example 1. In (5), only the second and third inequalities are active at \(\varvec{v}^2\), and the terms which belong to the arguments of the left/ right-hand sides are underlined. A system of inequalities defining the cone \(\fancyscript{T}(\varvec{v}^2,\fancyscript{C})\), in (6), is obtained by keeping only the underlined terms.

$$\begin{aligned} \varvec{x}_3&\le \varvec{x}_1+2 \nonumber \\ {\underline{\varvec{x}_1}}&\le \max (\underline{\varvec{x}_2},\varvec{x}_3) \nonumber \\ {\underline{\varvec{x}_1}}&\le \underline{\varvec{x}_3+2} \nonumber \\ \varvec{x}_3&\le \max (\varvec{x}_1,\varvec{x}_2-1) \end{aligned}$$
(5)
$$\begin{aligned} \varvec{x}_1&\le \varvec{x}_2 \nonumber \\ \varvec{x}_1&\le \varvec{x}_3 \end{aligned}$$
(6)

Figure 3 illustrates that the cones \(\fancyscript{C}\) and \(\varvec{v}^2 + \fancyscript{T}(\varvec{v}^2,\fancyscript{C})\) locally coincide in a neighborhood of \(\varvec{v}^2\). The tangent directed hypergraph \(\mathcal G (\varvec{v}^2,\fancyscript{C})\) associated with the vector \(\varvec{v}^2\) is formed by the two hyperarcs \((\{2\},\{1\})\) and \((\{3\},\{1\})\). The node \(1\) consequently forms the greatest strongly connected component of the hypergraph (for the partial order \(\preceq _\mathcal{G (\varvec{v}^2,\fancyscript{C})}\)).

Fig. 3
figure 3

The set \(\varvec{v}^2+\fancyscript{T}(\varvec{v}^2,\fancyscript{C})\) (in light blue) (Color figure online)

Remark 6

It was shown in the proof of Theorem 3.1 of [34] (see also [33]), and independently in [18, Theorem 14], that the vector \(\varvec{v} \in \fancyscript{C}\) is extreme if, and only, if there exists \(i \in [d]\) such that \(\varvec{v}\) is minimal of type \(i\), i.e. minimal in the set \(\{ \varvec{x} \in \fancyscript{C}\mid \varvec{x}_i = \varvec{v}_i\}\). This result can be recovered as a corollary of Theorem 1.

Observe that \(i\) is reachable from any node \(j \in [d]\) in \(\mathcal G (\varvec{v},\fancyscript{C})\) if, and only if, the hypergraph \(\mathcal G ^{\prime } = \mathcal G (\varvec{v},\fancyscript{C}) \cup \{\, (\{i\}, \{j\}) \mid j \in [d] \, \}\) is strongly connected. Let \(\fancyscript{C}^{\prime } = \{\varvec{x} \in \mathbb R _{\max }^d \mid A \varvec{x} \le B \varvec{x}, \ \varvec{x}_j - \varvec{v}_j \le \varvec{x}_i - \varvec{v}_i \text{ for} \text{ all} j \in [d]\}\). Then \(\mathcal G ^{\prime }\) is precisely the tangent directed hypergraph \(\mathcal G (\varvec{v}, \fancyscript{C}^{\prime })\). By Proposition 11 and Remark 4, \(\mathcal G ^{\prime }\) is strongly connected if, and only if, the tangent cone \(\fancyscript{T}(\varvec{v},\fancyscript{C}^{\prime })\) is reduced to the ray \(\mathbb R _{\max }1\!\!1\!\!\!\!1\!\!1\). By Proposition 7, this amounts to the equality \(\fancyscript{C}^{\prime } \cap N = \mathbb R _{\max }\varvec{v}\) for a certain neighborhood \(N\) of \(\varvec{v}\), or equivalently, \(\fancyscript{C}^{\prime } = \mathbb R _{\max }\varvec{v}\) (as \(\fancyscript{C}^{\prime }\) is connected). The latter holds if, and only if, \(\varvec{v}\) is minimal of type \(i\).

It follows that the nodes contained in the greatest strongly connected component of \(\mathcal G (\varvec{v},\fancyscript{C})\) (if it exists) are precisely the integers \(i \in [d]\) such that \(\varvec{v}\) is minimal of type \(i\). This suggests an alternative proof of Theorem 1.

An algorithm due to Gallo et al.[39] shows that the set of nodes that are reachable from a given node in a directed hypergraph \(\mathcal G \) can be computed in linear time in the size of the hypergraph, \(\mathsf{size }(\mathcal G ) :=\sum _{(T,H) \in \mathcal G } (|T | + |H |)\). The following result shows that one can in fact compute the maximal Sccs with almost the same complexity. The algorithm, which is too technical to be included here, is detailed in [8].

Theorem 12

([8]) The set of maximal Sccs of a hypergraph \(\mathcal G \) over the nodes \(1, \dots , d\) can be computed in time \(O(\mathsf{size }(\mathcal G ) \times \alpha (d))\), where \(\alpha \) denotes the inverse of the Ackermann function.

The function \(\alpha \) is a very slowly growing map. In particular, \(\alpha (x) \le 5\) for any practical values of \(x\). Hence, the complexity is said to be almost linear. The term \(\alpha (d)\) originates from the use of Tarjan’s union-find structure [57] to efficiently manipulate partitions of the set of nodes \(1, \dots , d\). In the sequel, \({\textsc {MaxScc}}\) denotes an algorithm returning the set of the maximal Sccs of the hypergraph given in input, with the time complexity given in Theorem 12.

As a consequence, the criterion of Theorem 1 can be very efficiently evaluated, in almost linear time in the size of the system of inequalities defining the tropical polyhedral cone. It can also benefit from the sparsity of the system, as the size of the tangent directed hypergraph is bounded by the number of non-null coefficients in the inequalities.

4 The Tropical Double Description Method

We next present a tropical analogue of the double description method of Motzkin et al. [49]. The tropical method computes a minimal generating set of a polyhedral cone, starting from a system of tropically linear inequalities defining it. We first deal with the inductive scheme of the method (Sect. 4.1), then present the main algorithm (Sect. 4.2), and its extension to intersections with tropical hyperplanes (Sect. 4.3).

4.1 Inductive Scheme

The tropical double description method relies on an incremental technique based on a successive elimination of inequalities. Given a polyhedral cone defined by a system of \(p\) constraints, it computes by induction on \(k = 1, \dots , p\) a generating set \(V_k\) of the intermediate cone defined by the first \(k\) constraints.

Passing from the set \(V_k\) to the set \(V_{k+1}\) relies on a result which, given a polyhedral cone \(\fancyscript{C}\) and a tropical half-space \(\fancyscript{H}\), allows to build a generating set \(V^{\prime }\) of \(\fancyscript{C}\cap \fancyscript{H}\) from a generating set \(V\) of \(\fancyscript{C}\). This is referred to as the elementary step of the scheme. (Note that the next result applies more generally to non-polyhedral tropical cones provided they are closed.)

Theorem 13

(Elementary step) Let \(\fancyscript{C}\subset \mathbb R _{\max }^d\) be a closed tropical cone generated by a set \(V\) of elements of \(\mathbb R _{\max }^d\), and let \(\fancyscript{H}\) be a half-space. Then the cone \(\fancyscript{C}\cap \fancyscript{H}\) is generated by the following set:

$$\begin{aligned} (V \!\cap \! \fancyscript{H}) \!\cup \! \bigl \{ \varvec{v} \oplus \rho \varvec{w} \mid (\varvec{v},\varvec{w}) \!\in \! (V \!\cap \! \fancyscript{H}) \!\times \! (V \!\setminus \! \fancyscript{H}), \rho \!=\! \max \{ \mu \lambda ^{-1} \mid \lambda \varvec{v} \oplus \mu \varvec{w} \!\in \! \fancyscript{H}\} \bigr \}.\nonumber \\ \end{aligned}$$
(7)

The cone \(\fancyscript{C}\cap \fancyscript{H}\) is thus generated by the elements \(\varvec{v}\) of \(V\) satisfying the constraint associated with the half-space \(\fancyscript{H}\), and by their pairwise combinations with the vectors \(\varvec{w}\) which are not located in \(\fancyscript{H}\). Each combination \(\varvec{v} \oplus \rho \varvec{w}\) corresponds to the last element belonging to the half-space \(\fancyscript{H}\) encountered when following the path from \(\varvec{v}\) to \(\varvec{w}\) along the tropical (projective) segment \(\{ \lambda \varvec{v} \oplus \mu \varvec{w} \mid \lambda , \mu \in \mathbb R _{\max }\}\).

Remark 7

Observe that the scalar \(\rho \) is correctly defined in (7), meaning that the set \(M = \{ \mu \lambda ^{-1} \mid \lambda \varvec{v} \oplus \mu \varvec{w} \in \fancyscript{H}\}\) admits a maximal element. First, note that \(M\) is not empty (consider \(\lambda = 1\!\!1\) and \(\mu = 0\!\!{\mid }\)). We claim that it is bounded. If not, \(\varvec{v} \oplus \rho \varvec{w} \in \fancyscript{H}\) for arbitrarily large scalar \(\rho \in \mathbb R _{\max }\), so that \(\rho ^{-1} \varvec{v} \oplus \varvec{w} \in \fancyscript{H}\) as soon as \(\rho > 0\!\!{\mid }\). As \(\fancyscript{H}\) is closed, this would imply that \(\varvec{w} \in \fancyscript{H}\) (taking \(\rho \rightarrow +\infty \)), which is nonsense. Finally, the set \(M\) is closed, as the inverse image of \(\fancyscript{H}\) by the continuous map \(\rho \mapsto \varvec{v} \oplus \rho \varvec{w}\). The supremum of the set \(M\) therefore belongs to \(M\).

Proof

(Theorem 13) Any element of the set given in (7) obviously belongs to \(\fancyscript{C}\cap \fancyscript{H}\).

Now consider \(\varvec{x} \in \fancyscript{C}\cap \fancyscript{H}\). Using the tropical analogue of the Minkowski–Carathéodory theorem established in [34, Theorem 3.1], \(\varvec{x}\) can be written as a combination of at most \(d\) elements of \(V\), i.e. there exist \(V^{\prime } \subset V \cap \fancyscript{H}\) and \(W^{\prime } \subset V \setminus \fancyscript{H}\) with \(|V^{\prime } | + |W^{\prime } | \le d\), and:

$$\begin{aligned} \varvec{x} = \mathop {\bigoplus }_{\varvec{v} \in V^{\prime }} \lambda _{\varvec{v}} \varvec{v} \oplus \mathop {\bigoplus }_{\varvec{w} \in W^{\prime }} \lambda _{\varvec{w}} \varvec{w}, \end{aligned}$$

where the \(\lambda _{\varvec{v}}\) and \(\lambda _{\varvec{w}}\) are non-zero scalars (in the tropical sense). Let \(\rho _{(\varvec{v},\varvec{w})} = \max \{ \mu \lambda ^{-1} \mid \lambda \varvec{v} \oplus \mu \varvec{w} \in \fancyscript{H}\}\) for any pair \((\varvec{v}, \varvec{w}) \in V^{\prime } \times W^{\prime }\). First, let us show that for all \(\varvec{w} \in W^{\prime }\), there exists \(\varvec{v} \in V^{\prime }\) such that \(\lambda _{\varvec{v}} \rho _{(\varvec{v},\varvec{w})} \ge \lambda _{\varvec{w}}\). If not, there is a given \(\varvec{w} \in W^{\prime }\) satisfying \(\lambda _{\varvec{v}} \rho _{(\varvec{v},\varvec{w})} < \lambda _{\varvec{w}}\) for all \(\varvec{v} \in V^{\prime }\), hence \(\lambda _{\varvec{v}} \varvec{v} \oplus \lambda _{\varvec{w}} \varvec{w} \not \in \fancyscript{H}\) (since \(\lambda _{\varvec{v}} > 0\!\!{\mid }\)). Observe that the complementary of \(\fancyscript{H}\) is stable by addition and by multiplication by a non-zero scalar, so that

$$\begin{aligned} \varvec{x} = \Bigl (\mathop {\bigoplus }_{\varvec{v} \in V^{\prime }} \lambda _{\varvec{v}} \varvec{v} \oplus \lambda _{\varvec{w}} \varvec{w} \Bigr ) \oplus \Bigl (\mathop {\bigoplus }_{\varvec{w}^{\prime } \in W^{\prime } \setminus \{\varvec{w}\}} \lambda _{\varvec{w}^{\prime }} \varvec{w}^{\prime }\Bigr ) \end{aligned}$$

should not belong to \(\fancyscript{H}\), which is a contradiction.

For all \(\varvec{w} \in W^{\prime }\), let \(\varvec{v}_{\varvec{w}}\) be an element of \(V^{\prime }\) such that \(\lambda _{\varvec{v}_{\varvec{w}}} \rho _{(\varvec{v}_{\varvec{w},\varvec{w}})} \ge \lambda _{{\varvec{w}}}\). As \(\lambda _{\varvec{w}}\) is not null, we have \(\rho _{(\varvec{v}_{\varvec{w},\varvec{w}})} > 0\!\!{\mid }\), hence we can write:

$$\begin{aligned} \varvec{x} = \Bigl (\mathop {\bigoplus }_{\varvec{v} \in V^{\prime }} \lambda _{\varvec{v}} \varvec{v}\Bigr ) \oplus \Bigl (\mathop {\bigoplus }_{\varvec{w} \in W^{\prime }} \bigl (\lambda _{\varvec{w}} (\rho _{(\varvec{v}_{\varvec{w},\varvec{w}})})^{-1}\bigr ) (\varvec{v}_{\varvec{w}} \oplus \rho _{(\varvec{v}_{\varvec{w},\varvec{w}})} \varvec{w})\Bigr ). \end{aligned}$$

This shows that any element \(\varvec{x}\) of \(\fancyscript{C}\cap \fancyscript{H}\) can be expressed as a combination of vectors of the set given in (7). \(\square \)

Let us denote by \(\varvec{\epsilon }^i\) the element of \(\mathbb R _{\max }^d\) whose \(i\)th coordinate is equal to \(1\!\!1\), and the other coordinates to \(0\!\!{\mid }\). The following theorem describes the whole inductive approach:

Theorem 14

(Inductive scheme of the tropical double description method) Let \(\fancyscript{C}\subset \mathbb R _{\max }^d\) be a polyhedral cone defined as the set \(\{ \varvec{x} \in \mathbb R _{\max }^d \mid A \varvec{x} \le B \varvec{x} \}\), where \(A, B \in \mathbb R _{\max }^{p \times d}\) (with \(p \ge 0\)). Let \(V_0,\dots ,V_p\) be the sequence of finite subsets of \(\mathbb R _{\max }^d\) defined as follows:

$$\begin{aligned} \left\{ \begin{array}{ll} V_0&= \{\varvec{\epsilon }^i\}_{i\in [d]},\\ V_k&= \bigl \{\varvec{v} \in V_{k-1} \mid A_k \varvec{v} \le B_k \varvec{v}\bigr \} \\&{}\cup \bigl \{(A_k \varvec{w}) \varvec{v} \oplus (B_k \varvec{v}) \varvec{w} \mid \varvec{v},\varvec{w} \in V_{k-1} \text{,} A_k \varvec{v} \le B_k \varvec{v} \text{,} \text{ and} \,A_k \varvec{w} > B_k \varvec{w} \bigr \} , \end{array} \right. \end{aligned}$$

for all \(k = 1, \dots , p\). Then \(\fancyscript{C}\) is generated by the finite set \(V_p\).

proof

We show by using Theorem 13 that each \(V_k\) forms a generating set of the polyhedral cone \(\{\varvec{x} \in \mathbb R _{\max }^d \mid A_l \varvec{x} \le B_l \varvec{x} \text{ for} \text{ all} l = 1,\dots ,k\}\). For \(k = 0\), this is obvious.

Now suppose \(k \ge 1\). Let \(\fancyscript{H}_k\) be half-space defined by the inequality \(A_k \varvec{x}\le B_k \varvec{x}\), and \(\varvec{v}, \varvec{w} \in V_{k-1}\) such that \(\varvec{v} \in \fancyscript{H}_k\) and \(\varvec{w} \not \in \fancyscript{H}_k\). We are going to show that \(\max \{ \mu \lambda ^{-1} \mid \lambda \varvec{v} \oplus \mu \varvec{w} \in \fancyscript{H}_k \} = (A_k \varvec{w})^{-1} (B_k \varvec{v})\) (note that \(A_k \varvec{w}\) is not null as \(A_k \varvec{w} > B_k \varvec{w}\)). Indeed, if we set \(\varvec{x}\) to \(\varvec{v} \oplus ((A_k \varvec{w})^{-1} (B_k \varvec{v})) \varvec{w}\), we have \(A_k \varvec{x} = A_k \varvec{v} \oplus B_k \varvec{v} \le B_k \varvec{v} \le B_k \varvec{x}\). Besides, if \(\lambda > 0\!\!{\mid }\) and \(\lambda \varvec{v} \oplus \mu \varvec{w} \in \fancyscript{H}_k\), then \(\lambda (A_k \varvec{v}) \oplus \mu (A_k \varvec{w}) \le \lambda (B_k \varvec{v}) \oplus \mu (B_k \varvec{w})\). If \(\mu > 0\!\!{\mid }\), then \(\mu (A_k \varvec{w}) > \mu (B_k \varvec{w})\) so that \(\mu (A_k \varvec{w}) \le \lambda (B_k \varvec{v})\). Thus \(\mu \lambda ^{-1} \le (A_k \varvec{w})^{-1} (B_k \varvec{w})\). The inequality also trivially holds as soon as \(\mu = 0\!\!{\mid }\).

As a consequence, up to multiplicative factors, \(V_k\) coincides with the set provided by Theorem 13 for \(V = V_{k-1}\) and \(\fancyscript{H}= \fancyscript{H}_k\). This completes the proof. \(\square \)

Observe that Theorem 14 provides a constructive proof of the “Minkowski part” of the Minkowski–Weyl theorem (Theorem 2), as it shows that all tropical polyhedral cones are generated by finite sets of elements of \(\mathbb R _{\max }^d\).

Example 8

Figure 4 provides an illustration of the elementary step on the cone defined in Example 1 and the half-space given by the constraint \(\varvec{x}_2 \le \varvec{x}_3 + 5/2\) (depicted in light blue in Fig. 4, while the set of elements activating the inequality is in darker blue). The three elements \(\varvec{v}^1\), \(\varvec{v}^2\), and \(\varvec{v}^3\) satisfy the constraint, while \(\varvec{v}^0\) does not. Their combinations are the elements \(\varvec{w}^{1,0}\), \(\varvec{w}^{2,0}\), and \(\varvec{w}^{3,0}\), respectively.

Fig. 4
figure 4

The elementary step of the double description method (Color figure online)

Remark 9

The inductive scheme of the tropical double description method looks very similar to its classical counterpart, but they are distinguished by a minor difference: the combinations \((A_k \varvec{w}) \varvec{v} \oplus (B_k \varvec{v})\varvec{w}\) with \(A_k \varvec{v} = B_k \varvec{v}\) and \(A_k \varvec{w} > B_k \varvec{w}\) do not appear in the classical case (see [31, Lemma 3]), while they are essential in the tropical setting.

For instance, consider the cone of \(\mathbb R _{\max }^3\) generated by the set \(V\) consisting of the elements where \(\varvec{v} = (0,0,0)\) and \(\varvec{w} = (2,1,0)\) (in bold black in Fig. 5). Its intersection with the half-space \(\{ (\varvec{x}_1, \varvec{x}_2, \varvec{x}_3) \mid \varvec{x}_2 \le \varvec{x}_3 \}\) (in light blue) is generated by a minimal set containing: the vectors \(\varvec{v}\) (which activates the constraint \(\varvec{x}_2 \le \varvec{x}_3\)) and \(\varvec{v}^{\prime } = (2,1,1)\) (obtained by combining \(\varvec{v}\) and \(\varvec{w}\)). Thus, the element \(\varvec{v}^{\prime }\) cannot be dispensed with.

Fig. 5
figure 5

Illustration of Remark 9 (Color figure online)

4.2 The Tropical Double Description Method Algorithm

Theorem 13 and subsequently Theorem 14 may return non-extreme elements (see Example 8 in which \(\varvec{w}^{2,0}\) and \(\varvec{w}^{3,0}\) are not extreme). If these redundant elements are not eliminated, the cardinality of the sets \(V_k\) grows quadratically in the worst case at each step (because of the pairwise combinations in Theorem 14 of the \(\varvec{v}\) and \(\varvec{w}\)). Hence, the complexity of the inductive technique previously discussed is double exponential (\(O(d^{2^p})\)), both in time and space, which is clearly untractable. We propose to eliminate non-extreme elements at each step of the induction using the criterion based on directed hypergraphs, and the associated almost linear algorithm \({\textsc {MaxScc}}\).

The resulting algorithm \({\textsc {ComputeExtRays}}\) (Fig. 6) provides the scaled representatives of the extreme rays of the cone \(\fancyscript{C}\). The argument \(p\) corresponds to the number of constraints of the system \(A \varvec{x} \le B \varvec{x}\). When \(p = 0\), the cone coincides with \(\mathbb R _{\max }^d\), and it is generated by the set \(\{\varvec{\epsilon }^i\}_{i\in [d]}\). When \(p > 0\), the system is split into the system \(C \varvec{x} \le D \varvec{x}\) formed by the first \((p-1)\) inequalities, and the last inequality \(\varvec{a} \varvec{x} \le \varvec{b} \varvec{x}\). The elements provided by Theorem 14 are computed from the set \(V\) of extreme elements of the intermediate cone \(\fancyscript{D}= \{\varvec{x} \in \mathbb R _{\max }^d \mid C \varvec{x} \le D \varvec{x} \}\). The set \(W\) is used to store the extreme rays of \(\fancyscript{C}\). The extremality test is evaluated at Lines 10-11. First, the tangent hypergraph \(\mathcal G (\varvec{w}, \fancyscript{C})\) is computed thanks to a function \({\textsc {BuildHypergraph}}\). Then, the function \({\textsc {MaxScc}}\) returning the set of the maximal Sccs of the hypergraph is called. If the test succeeds, the element \(\varvec{w}\) is first normalized into the scaled element \(\left||\varvec{w} \right||^{-1} \varvec{w}\), and then appended to the set \(W\).

Observe that the extremality test is applied only to the elements associated with the combinations \((\varvec{a}\varvec{v}^j)\varvec{v}^i \oplus (\varvec{b} \varvec{v}^i) \varvec{v}^j\), and not to the elements \(\varvec{v} \in V^\le \) which satisfy \(\varvec{a} \varvec{v} \le \varvec{b} \varvec{v}\). Indeed, each element \(\varvec{v} \in V^\le \) is extreme in the cone \(\fancyscript{D}\), and subsequently in the cone \(\fancyscript{C}\), since \(\fancyscript{C}\subset \fancyscript{D}\).

Fig. 6
figure 6

Implementation of the tropical double description method

4.2.1 Complexity Analysis

Each operation in \(\mathbb R _{\max }\) is supposed to take a unit time. We use hash sets to encode subsets of \(\mathbb R _{\max }^d\). A hash set is a hash table which maps keys to a fixed value (chosen arbitrarily, for instance \( Nil \)). The keys stored in the hash table correspond to the elements of the represented set. The amortized time complexity of adding, searching, and removing an element in the set is bounded by the complexity of hashing a vector of \(\mathbb R _{\max }^d\), which is supposed to be \(O(d)\).

We first study the complexity of the inductive step, which refers to the set of operations performed since the last call to \({\textsc {{ComputeExtRays}}}\) (Lines 7–14). Starting from the last intermediate generating set \(V\), it consists in (i) computing the set given in (7), and (ii) eliminating non-extreme combinations. Its complexity can be precisely characterized in terms of the size of \(V\). It can be verified that it is dominated by the complexity of the extremality tests performed in the loop from Lines 8–14. Each test requires to build a hypergraph \(\mathcal G \) (Line 10). This operation can be done in linear time in its size, which is in \(O(p d)\). According to Theorem 12, \({\textsc {MaxScc}}\)(G) is executed in time \(O(\mathsf{size }(\mathcal G ) \alpha (d)) = O(p d \alpha (d))\). The loop is iterated \(O(|V |^2)\) in the worst case, so that the following statement holds:

Proposition 15

The worst case time complexity of the inductive step in \({\textsc {{ComputeExtRays}}}\) is \(O(p d \alpha (d) |V |^2)\).

We also stress that the inductive step is optimal in terms of space complexity, since a non-extreme element is never stored in the resulting set \(W\), even temporarily. It follows that its space complexity is bounded by \(O(d \max (|V |,|W |))\).

Remark 10

Observe that the construction of the hypergraph \(\mathcal G \) (Line 10) can be optimized by maintaining some extra information for each element of the intermediate set \(V\).

Indeed, consider a tropical linear form \(\varvec{c} \in \mathbb R _{\max }^{1 \times d}\) and a non-null combination \(\varvec{v} = \lambda \varvec{x} \oplus \mu \varvec{y}\) of two elements \(\varvec{x} , \varvec{y} \in \mathbb R _{\max }^d\). The set \(\arg \max (\varvec{c} \varvec{v})\) can be computed efficiently from the sets \(\arg \max (\varvec{c} \varvec{x})\) and \(\arg \max (\varvec{c} \varvec{y})\):

$$\begin{aligned} \arg \max (\varvec{c} \varvec{v}) = \left\{ \begin{array}{l@{\quad }l} \arg \max (\varvec{c} \varvec{x})&\text{ if} \ \lambda (\varvec{c} \varvec{x}) > \mu (\varvec{c} \varvec{y}), \\ \arg \max (\varvec{c} \varvec{y})&\text{ if} \ \lambda (\varvec{c} \varvec{x}) < \mu (\varvec{c} \varvec{y}), \\ \arg \max (\varvec{c} \varvec{x}) \cup \arg \max (\varvec{c} \varvec{y})&\text{ otherwise}.\\ \end{array}\right. \end{aligned}$$
(8)

The value of \(\varvec{c} \varvec{v}\) can be computed in \(O(1)\) time from \(\varvec{c} \varvec{x}\) and \(\varvec{c} \varvec{y}\) using the same idea.

Now, let \(\varvec{v}\) be an element returned by \({\textsc {{ComputeExtRays}}}{(A, B, p)}\). Using (8), the list of the tuples \(((A_k \varvec{v}, \arg \max (A_k \varvec{v})), (B_k \varvec{v}, \arg \max (B_k \varvec{v})))\) (\(k\in [p]\)) can be propagated by induction during the execution of \({\textsc {ComputeExtRays}}{(A, B, p)}\). In practice, we have observed that this optimization considerably speeds up the computation of the associated hypergraph.

The overall complexity of the algorithm \({\textsc {ComputeExtRays}}\) depends on the maximal size of the sets \(V_k\) (\(0 \le k \le p-1\)) returned in the intermediate steps

Proposition 16

The worst case time complexity of the \({\textsc {ComputeExtRays}}\) algorithm is bounded by

$$\begin{aligned} O(p^2 d \alpha (d) V^2_{\max }), \end{aligned}$$

where \(V_{\max }\) is the maximal cardinality of the sets \(V_k\) for \(k = 0,\dots ,p-1\).

In classical geometry, the upper bound theorem of McMullen [48] shows that the maximal number of extreme points of a convex polytope in \(\mathbb{R }^d\) defined by \(p\) inequality constraints is equal to

$$\begin{aligned} U(p,d) :=\left\{ \begin{array}{l@{\quad }l} \genfrac(){0.0pt}{}{p-\lfloor d/2\rfloor }{\lfloor d/2\rfloor } + \genfrac(){0.0pt}{}{p-\lfloor d/2\rfloor -1}{\lfloor d/2\rfloor -1}&\text{ for}\ d { \text{ even}}, \\ 2\genfrac(){0.0pt}{}{p-\lfloor d/2\rfloor -1}{\lfloor d/2\rfloor }&\text{ for} \ d { \text{ odd}}.\\ \end{array}\right. \end{aligned}$$

The polars of the cyclic polytopes [59] are known to reach this bound. In the tropical setting, a recent work of Allamigeon, Gaubert, and Katz [11] proves that the number of extreme rays of a tropical polyhedral cone \(\fancyscript{C}\) in \(\mathbb R _{\max }^d\) defined by \(p\) inequalities is bounded by a similar quantity.

Theorem 17

([11]) The number of extreme rays of a tropical cone in \(\mathbb R _{\max }^d\) defined as the intersection of \(p\) tropical half-spaces cannot exceed \(U(p+d,d-1).\)

The bound of Theorem 17 is shown in [11] to be asymptotically tight for a fixed \(p\), as \(d\) tends to infinity, being approached by the signed cyclic tropical polyhedral cones, which are a tropical generalization of the (polar of) the cyclic polytope, taking into account a sign pattern. The bound is believed not to be tight for a fixed \(d\), as \(p\) tends to infinity, because the growth of the number of extreme rays for the model of signed cyclic polyhedral cones is too slow. Finding the optimal bound is an open problem.

By combining Proposition 16 and Theorem 17, we readily get the following upper bound on the complexity of \({\textsc {ComputeExtRays}}\):

Corollary 18

The worst-case time complexity of the \({\textsc {ComputeExtRays}}\) algorithm is bounded by \(O\bigl (p^2 d \alpha (d) \cdot (U(p+d-1,d-1))^2\bigr )\).

The asymptotic behavior of the bound of Corollary 18 is the following one:

$$\begin{aligned}&O\biggl (p^2 d \alpha (d) \cdot \Bigl (1 + \frac{p}{\lfloor (d-1)/2\rfloor }\Bigr )^{2\lfloor \frac{d-1}{2} \rfloor } \Bigl (1 + \frac{\lfloor (d-1)/2\rfloor }{p}\Bigr )^{2p}\biggr ) \nonumber \\&\quad \text{ when} \,p+d \gg 1. \end{aligned}$$
(9)

In particular, the bound (9) is dominated by \(O(p^2 d \alpha (d) \cdot (e(1+\frac{M}{m})^{2m}))\), where \(m\) and \(M\) are respectively the minimum and the maximum of \(p\) and \(\lfloor (d-1)/2\rfloor \). The algorithm \({\textsc {ComputeExtRays}}\) is therefore polynomial time as soon as one of the parameters \(d\) or \(p\) is constant. In general, we shall keep in mind that the quality of the bounds given above directly depends on the quality of the upper bound of Theorem 17. As the latter may not be tight for certain asymptotic regimes of the \((p,d)\) parameters, the former may give a loose overestimate of the complexity of the algorithm \({\textsc {ComputeExtRays}}\).

4.3 Variants of the Algorithm with Other Kinds of Constraints

Our algorithm defined in Sect. 4.2 can be generalized to handle systems including tropical linear constraints other than inequalities.

4.3.1 Tropical Hyperplanes

Tropical geometry originates when looking at classical objects with logarithmic glasses or valuations. Let \(k\) denotes the field of complex Puiseux series in an indeterminate \(t\), equipped with the valuation \(v\) which takes the opposite of the smallest exponent arising in a series. Then, a tropical linear space may be defined as the closure of the image of a linear space over \(k\) by the map which applies the valuation \(v\) to each coordinate, see [53, 55] for more information. In particular, consider the hyperplane in \(k^d\) defined by the equation \(\sum _{i = 1}^d a_i\varvec{x}_i = 0\), with \(a_i\in k\). Then, a theorem of Kapranov characterizing more generally the non-archimedian amoebas of hypersurfaces [30] shows that the closure of the image of this hyperplane by the valuation coincides with the set of points \(\varvec{y} \in \mathbb R _{\max }^d\) such that the maximum in the expression \(\max _{1 \le i \le d} v(a_i)+ \varvec{y}_i\) is attained at least twice. Such a set is known as a tropical hyperplane [27, 53]. Tropical hyperplanes form a subclass of tropical polyhedral cones of \(\mathbb R _{\max }^d\), see Fig. 7.

Fig. 7
figure 7

The tropical hyperplane “\(\max (\varvec{x}_1,1/2+\varvec{x}_2,1+\varvec{x}_3)\) attained at least twice” (left), and the signed tropical hyperplane \(1/2+\varvec{x}_2 = \max (\varvec{x}_1,1+\varvec{x}_3)\) (right)

Tropical hyperplanes can be handled in the elementary step of the double description method thanks to the following result:

Theorem 19

Let \(\fancyscript{C}\subset \mathbb R _{\max }^d\) be a closed tropical cone generated by a set \(V\) of elements of \(\mathbb R _{\max }^d\), and let \(\fancyscript{H}= \{ \varvec{x} \in \mathbb R _{\max }^d \mid \varvec{c} \varvec{x} = \max _{i \in [d]} (\varvec{c}_i + \varvec{x}_i) \text{ is} \text{ attained} \text{ at} \text{ least} \text{ twice} \}\) be a tropical hyperplane (\(\varvec{c} \in \mathbb R _{\max }^{1 \times d}\)). Then the cone \(\fancyscript{C}\cap \fancyscript{H}\) is generated by:

$$\begin{aligned}&\{ \varvec{v} \in V \mid \varvec{c} \varvec{v} \ \mathrm{is \ attained \ at least \ twice} \} \nonumber \\&\qquad {}\cup \{ (\varvec{c} \varvec{w})\varvec{v} \oplus (\varvec{c} \varvec{v}) \varvec{w} \mid \varvec{v}, \varvec{w} \in V , \varvec{c} \varvec{v} \ \mathrm{attained \ only \ once \ and } \ \varvec{c} \varvec{w} \ \mathrm{at \ least \ twice} \} \nonumber \\&\qquad {}\cup \{ (\varvec{c} \varvec{w})\varvec{v} \oplus (\varvec{c} \varvec{v}) \varvec{w} \mid \varvec{v}, \varvec{w} \!\in \! V \text{,} \varvec{c} \varvec{v} \ { \mathrm and } \varvec{c} \varvec{w} \ \mathrm{are \ attained \ only \ once \ and} \ \ \mathrm{at \ distinct \ indices} \}.\nonumber \\ \end{aligned}$$
(10)

Proof

If \(V^{\prime }\) is the set of vectors given in (10), then we clearly have \(V^{\prime } \subset \fancyscript{C}\cap \fancyscript{H}\) so that \({\mathsf{cone }}(V^{\prime }) \subset \fancyscript{C}\cap \fancyscript{H}\).

Conversely, supposing \(\varvec{x} \in \fancyscript{C}\cap \fancyscript{H}\), then by Minkowski-Carathéodory theorem on \(\fancyscript{C}= {\mathsf{cone }}(V)\), we have \(\varvec{x} = \mathop {\bigoplus }_{i = 1}^d \lambda _i \varvec{v}^i\) with \(\varvec{v}^i \in V\) (\(i = 1,\dots ,d\)). Let \(I, J \subset [d]\) such that for all \(i \in I\), \(\varvec{c} \varvec{v}^i\) is attained at least twice, and for every \(j \in J\), \(\varvec{c} \varvec{v}^j\) is attained only once (\(I \cap J = \emptyset \)).

We know that the maximum \(\mathop {\bigoplus }_{i \in I} \lambda _i (\varvec{c} \varvec{v}^i) \oplus \mathop {\bigoplus }_{j \in J} \lambda _j (\varvec{c} \varvec{v}^j)\) is reached at least twice. Let \(\kappa = \varvec{c} \varvec{x}\). If \(\kappa = 0\!\!{\mid }\), then necessarily for any \(j \in J\), \(\lambda _j (\varvec{c} \varvec{v}^j) = 0\!\!{\mid }\) hence \(\lambda _j = 0\!\!{\mid }\) (if not, \(\varvec{c} \varvec{v}^j = 0\!\!{\mid }\) would be attained more than once). Thus \(\varvec{x} \in {\mathsf{cone }}(V^{\prime })\) obviously.

Now, suppose that \(\kappa > 0\!\!{\mid }\). We distinguish two cases:

  1. (i)

    Suppose that there exists \(i_0 \in I\) such that \(\lambda _{i_0} (\varvec{c} \varvec{v}^{i_0}) = \kappa \). Then

    $$\begin{aligned} \varvec{x}&= \mathop {\bigoplus }_{i \in I} \lambda _i \varvec{v}^i \oplus \mathop {\bigoplus }_{j \in J} \lambda _j \varvec{v}^j \\&= \mathop {\bigoplus }_{i \in I} \lambda _i \varvec{v}^i \oplus \kappa ^{-1} \biggl (\mathop {\bigoplus }_{j \in J} \lambda _j (\varvec{c} \varvec{v}^j)\biggr ) \lambda _{i_0} \varvec{v}^{i_0} \oplus \kappa ^{-1} \mathop {\bigoplus }_{j \in J} \bigl (\lambda _{i_0} (\varvec{c} \varvec{v}^{i_0})\bigr ) \lambda _j \varvec{v}^j \\&\quad \text{ as} \,\kappa \ge \mathop {\bigoplus }_{j \in J} \lambda _j (\varvec{c} \varvec{v}^j) \\&= \mathop {\bigoplus }_{i \in I} \lambda _i \varvec{v}^i \oplus \kappa ^{-1} \mathop {\bigoplus }_{j \in J} \lambda _{i_0} \lambda _j \bigl ((\varvec{c} \varvec{v}^j) \varvec{v}^{i_0} \oplus (\varvec{c} \varvec{v}^{i_0}) \varvec{v}^j\bigr ). \end{aligned}$$
  2. (ii)

    Otherwise, for all \(i \in I\), \(\lambda _i (\varvec{c} \varvec{v}^i) < \varvec{c} \varvec{x}\). In this case, the maximum \(\varvec{c} \varvec{x}\) is necessarily attained by two distinct terms \(\lambda _{j_1} (\varvec{c} \varvec{v}^{j_1})\) and \(\lambda _{j_2} (\varvec{c} \varvec{v}^{j_2})\), with \(j_1, j_2 \in J\), \(j_1 \ne j_2\), and if \(k_1\) and \(k_2\) are respectively the arguments of the maxima \(\varvec{c} \varvec{v}^{j_1}\) and \(\varvec{c} \varvec{v}^{j_2}\), we have \(k_1 \ne k_2\). Let \(J_l = \{ j \in J \mid k_l \not \in \arg \max (\varvec{c} \varvec{v}^j)\}\) for \(l = 1, 2\). Note that \(J_1 \cup J_2 = J\). Then

    $$\begin{aligned} \varvec{x}&= \mathop {\bigoplus }_{i \in I} \lambda _i \varvec{v}^i \oplus \mathop {\bigoplus }_{j \in J} \lambda _j \varvec{v}^j \\&= \mathop {\bigoplus }_{i \in I} \lambda _i \varvec{v}^i \oplus \kappa ^{-1} \biggl (\mathop {\bigoplus }_{j \in J_1} \lambda _j (\varvec{c} \varvec{v}^j) \biggr ) \lambda _{j_1} \varvec{v}^{j_1} \\&\oplus \; \kappa ^{-1} \mathop {\bigoplus }_{j \in J_1} \bigl ( \lambda _{j_1} (\varvec{c} \varvec{v}^{j_1}) \bigr ) \lambda _j\varvec{v}^j \oplus \kappa ^{-1} \biggl (\mathop {\bigoplus }_{j \in J_2} \lambda _j (\varvec{c} \varvec{v}^j) \biggr ) \lambda _{j_2} \varvec{v}^{j_2} \\&{}\oplus \kappa ^{-1} \mathop {\bigoplus }_{j \in J_2} \bigl ( \lambda _{j_2} (\varvec{c} \varvec{v}^{j_2}) \bigr ) \lambda _j\varvec{v}^j \quad \text{ since} \kappa = \lambda _{j_1} (\varvec{c} \varvec{v}^{j_1}) = \lambda _{j_2} (\varvec{c} \varvec{v}^{j_2}), \\&\text{ and} \kappa \ge \mathop {\bigoplus }_{j \in J} \lambda _j (\varvec{c} \varvec{v}^j) \\&= \mathop {\bigoplus }_{i \in I} \lambda _i \varvec{v}^i \oplus \kappa ^{-1} \mathop {\bigoplus }_{j \in J_1} \lambda _j \lambda _{j_1} \bigl ( (\varvec{c} \varvec{v}^j) \varvec{v}^{j_1} \oplus (\varvec{c} \varvec{v}^{j_1}) \varvec{v}^j \bigr ) \oplus \kappa ^{-1} \mathop {\bigoplus }_{j \in J_2} \lambda _j \lambda _{j_2}\\&\bigl ( (\varvec{c} \varvec{v}^j) \varvec{v}^{j_2} \oplus (\varvec{c} \varvec{v}^{j_2}) \varvec{v}^j \bigr ). \end{aligned}$$

In both cases, \(\varvec{x} \in {\mathsf{cone }}(V^{\prime })\), which completes the proof. \(\square \)

The extremality criterion of Theorem 1 can be extended to systems containing tropical hyperplane constraints. Every hyperplane \(\{ \varvec{x} \in \mathbb R _{\max }^d \mid \varvec{c} \varvec{x} \text{ is} \text{ attained} \text{ at} \text{ least} \text{ twice} \}\) generates the hyperarcs \((\arg \max (\varvec{c} \varvec{v}) \setminus \{ i \}, \{ i \})\) (for each \(i \in \arg \max (\varvec{c}\varvec{v})\)) in the directed hypergraph \(\mathcal G (\varvec{v},\fancyscript{C})\). This results from the fact that the hyperplane can be equivalently expressed as the set of the solutions of the following system:

$$\begin{aligned} \varvec{c}_i \varvec{x}_i \le \mathop {\bigoplus }_{\begin{matrix} 1 \le j \le d \\ j \ne i \end{matrix}} \varvec{c}_j \varvec{x}_j \quad \text{ for} \ i = 1,\dots ,d \end{aligned}$$
(11)

and that (11) is active on \(\varvec{v}\) if, and only if, \(i \in \arg \max (\varvec{c} \varvec{v})\).

Thus, the extreme rays of the intersection of \(p\) tropical hyperplanes can be determined in time \(O((p d)^2 \alpha (d) (V^{\prime }_{\max })^2)\), where \(V^{\prime }_{\max }\) is the maximal size of the sets arising in the intermediate steps of the induction. In comparison, by expanding hyperplanes to a collection of \(p d\) half-spaces using (11), the complexity of the algorithm \({\textsc {ComputeExtRays}}\) is \(O(p^2 d^3 \alpha (d) V_{\max })\). Since \(V^{\prime }_{\max } \le V_{\max }\), the variant presented here improves time bounds by a factor \(d V_{\max }/V^{\prime }_{\max }\).

4.3.2 Signed Tropical Hyperplanes

Another noticeable case of tropical polyhedral cones consists of signed tropical hyperplanes, which are sets of points satisfying an equality \(\varvec{a} \varvec{x} = \varvec{b} \varvec{x}\), where the support of the vectors \(\varvec{a}\) and \(\varvec{b}\) are disjoint [3, 52]. They correspond to subsets of (non-signed) hyperplanes (Fig. 7). The elementary step of the double description method can be extended to such sets, as follows:

Theorem 20

Let \(\fancyscript{C}\subset \mathbb R _{\max }^d\) be a closed tropical cone generated by a set \(V\) of elements of \(\mathbb R _{\max }^d\), and let \(\varvec{a}, \varvec{b} \in \mathbb R _{\max }^{1 \times d}\). Then the cone \(\fancyscript{C}\cap \{ \varvec{x} \in \mathbb R _{\max }^d \mid \varvec{a} \varvec{x} = \varvec{b} \varvec{x} \}\) is generated by the following set:

$$\begin{aligned}&\{ \varvec{v} \in V \mid \varvec{a} \varvec{v} = \varvec{b} \varvec{v} \} \cup \{ (\varvec{a} \varvec{w}) \varvec{v} \oplus (\varvec{b} \varvec{v}) \varvec{w} \mid \varvec{v},\varvec{w} \in V , \varvec{a} \varvec{v} < \varvec{b} \varvec{v} \ \mathrm{and } \ \varvec{a} \varvec{w} > \varvec{b} \varvec{w} \} \\&\qquad {}\cup \{ (\varvec{a} \varvec{w}) \varvec{v} \oplus (\varvec{b} \varvec{v}) \varvec{w}) \mid \varvec{v},\varvec{w} \in V \text{,} \,\varvec{a} \varvec{v} < \varvec{b} \varvec{v} \text{ and} \,\varvec{a} \varvec{w} = \varvec{b} \varvec{w} \} \\&\qquad {}\cup \{ (\varvec{a} \varvec{w}) \varvec{v} \oplus (\varvec{b} \varvec{v}) \varvec{w} \mid \varvec{v},\varvec{w} \in V \text{,} \,\varvec{a} \varvec{v} = \varvec{b} \varvec{v} \text{ and} \,\varvec{a} \varvec{w} > \varvec{b} \varvec{w} \}. \end{aligned}$$

Proof

Straightforward from two successive applications of Theorem 13 on the inequalites \(\varvec{a} \varvec{x} \le \varvec{b} \varvec{x}\) and \(\varvec{a} \varvec{x} \ge \varvec{b} \varvec{x}\). \(\square \)

The extremality criterion of Theorem 1 can also be generalized to signed hyperplanes, by introducing two symmetric hyperarcs per equality in the tangent directed hypergraph: for an equality \(\varvec{a} \varvec{x} = \varvec{b} \varvec{x}\), the tangent hypergraph \(\mathcal G (\varvec{v},\fancyscript{C})\) at the element \(\varvec{v}\) will contain the hyperarcs \((\arg \max (\varvec{a} \varvec{v}), \arg \max (\varvec{b} \varvec{v}))\) and \((\arg \max (\varvec{b} \varvec{v}), \arg \max (\varvec{a} \varvec{v}))\).

5 Arrangements of Tropical Hyperplanes

In this section, for the sake of comparison, we present an alternative approach to the problem of computing the extreme rays of a tropical cone described as the intersection of half-spaces in general position. This approach relies on arrangements of signed tropical hyperplanes.

We consider the case in which the tropical cone \(\fancyscript{C}\) is defined as the set of the solutions \(\varvec{x} \in \mathbb R _{\max }^d\) of the system of inequalities \(A \varvec{x} \le B \varvec{x}\) (\(A, B \in \mathbb R _{\max }^{p \times d}\)). We suppose, without loss of generality, that for all \(k \in [p]\), the supports of the \(k\)-th rows of \(A\) and \(B\) are disjoint. For each half-space \(\{ \varvec{x} \in \mathbb R _{\max }^d \mid A_k \varvec{x} \le B_k \varvec{x} \}\), we introduce the associated signed hyperplane, denoted by \(H_k\) and defined as the set of the elements \(\varvec{x} \in \mathbb R _{\max }^d\) satisfying the equality \(A_k \varvec{x} = B_k \varvec{x}\).

Following [28, 53], a matrix \(M \in \mathbb R _{\max }^{k \times k}\) is said to be tropically non-singular if, and only if, the tropical permanent

$$\begin{aligned} \mathrm{tper}\,M = \oplus _{\sigma \in S_k} M_{1\sigma (1)}\dots M_{k\sigma (k)} \end{aligned}$$
(12)

is not null, and the maximum in (12) is reached at precisely one permutation \(\sigma \) in the symmetric group \(S_k\). In this section, we will assume that the half-spaces defining the cone \(\fancyscript{C}\) are in general position, meaning that every square submatrix of \(A \oplus B\) is (tropically) non-singular.

A finite set of signed hyperplanes constitutes an arrangement. In this setting, a vertex of the arrangement will refer to the intersection of some of the hyperplanes when this intersection is reduced to a ray \(\mathbb R _{\max }\varvec{x}\) (i.e., a point, written in homogeneous coordinates).

Proposition 21

When the half-spaces defining the cone \(\fancyscript{C}\) are in general position, the extreme rays of \(\fancyscript{C}\) are vertices of the arrangement formed by the signed hyperplanes \(H_k\) (\(1 \le k \le p\)) and the hyperplanes \(Z_j = \{\varvec{x} \in \mathbb R _{\max }^d \mid \varvec{x}_j = 0\!\!{\mid }\}\) (\(1 \le j \le d\)).

Before proving Proposition 21, we first recall that the max-plus Cramer Theorem [3, 52, 53] shows that the vertices of the arrangement of Proposition 21 are precisely given as the non-trivial intersections of \((d-1)\) signed hyperplanes. It also provides a constructive method to determine the vertices using Cramer permanents.

Proposition 22

(Corollary of [52],[53, § 5],[3, Theorem 6.6]) Given \(n \in [d]\), let \(A^{\prime }\) (respectively \(B^{\prime }\)) the sub-matrix formed by the first \((n-1)\) rows and \(n\) columns of \(A\) (respectively \(B\)). Let \(C_i\) be the matrix of size \((n-1) \times (n-1)\) obtained from \(A^{\prime } \oplus B^{\prime }\) by deleting the \(i\)-th column (\(i \in [n]\)). Let \(\varvec{x} \in \mathbb R _{\max }^d\) be the vector of support \([n]\) defined by \(\varvec{x}_i = \mathrm{tper}\,C_i\) for all \(i \in [n]\).

Then the intersection of the hyperplanes \(H_k\) (\(1 \le k \le n-1\)) and \(Z_j\) (\(n+1 \le j \le d\)) is either empty, or reduced to the ray \(\mathbb R _{\max }\varvec{x}\).

These \(d\) Cramer permanents \(\mathrm{tper}\,C_k\) can be naively computed by solving \(d\) assignment problems, leading to a time complexity \(O(d^4)\). However, as remarked in [53], all the permanents can be determined (up to a multiplicative constant) as the optimal solution of a single transportation problem. This allows to determine the vertex of the arrangement in time \(O(d^3)\). Alternatively, all the Cramer permanents can be determined by solving a single optimal assignment problem, and then by applying a variant of the Jacobi algorithm in [52], which also gives a \(O(d^3)\) algorithm. Note also, although that it will not be needed here, that the emptyness of the intersection can be checked a priori by inspecting the parity of the optimal permutations in the tropical Cramer permanents [52], [3, Theorem 6.4]. Finally, observe that Proposition 22 applies to the intersection of hyperplanes \(H_k\) (\(k \in K\)), and \(Z_j\) (\(j \in J\)), with \(|J | + |K | = d-1\), up to permuting hyperplanes and coordinates.

Proof of Proposition 21

Given a representative \(\varvec{v}\) of an extreme ray of \(\fancyscript{C}\), we are going to show that at least \((n-1)\) inequalities among the system \(A \varvec{x} \le B \varvec{x}\) are active at the point \(\varvec{v}\), where \(n\) is the cardinality of the support of \(\varvec{v}\).

Without loss of generality, we will assume that \(\mathsf{supp }(\varvec{v}) = [n]\), with \(n \le d\). Let \(\varvec{w}\) be the vector of \(\mathbb R _{\max }^n\) reduced to the first \(n\) coordinates of \(\varvec{v}\). Applying Proposition 6, the element \(\varvec{w}\) is extreme in the cone \(\fancyscript{C}^{\prime }\) defined the system \(A^{\prime } \varvec{y} \le B^{\prime } \varvec{y}\) over \(\varvec{y} \in \mathbb R _{\max }^n\), where \(A^{\prime }\) and \(B^{\prime }\), respectively, correspond to the first \(n\) columns of \(A\) and \(B\). By Theorem 1, let \(i\) be a node of the greatest Scc of the tangent directed hypergraph \(\mathcal G (\varvec{w},\fancyscript{C}^{\prime })\). Any other node \(j \in [n] \setminus \{i\}\) of \(\fancyscript{H}(\varvec{w},\fancyscript{C}^{\prime })\) has to reach \(i\). Hence, there exists a hyperarc \(a_{k_j}\) such that \(T(a_{k_j})\) is reduced to the singleton \(\{j\}\) (if not, \(j\) would not reach any node except itself). Each hyperarc corresponds to an inequality active at \(\varvec{w}\), and subsequently at \(\varvec{v}\).

The extreme ray \(\mathbb R _{\max }\varvec{v}\) is therefore included into the intersection of the signed hyperplanes \(H_{k_j}\) with \(j \in [n] \setminus \{i\}\) and \(Z_{n+1}, \dots , Z_d\). By Proposition 22 and the subsequent discussion, we deduce that the intersection of the hyperplanes is reduced to the ray \(\mathbb R _{\max }\varvec{v}\). The latter is consequently a vertex of the arrangement. \(\square \)

Remark 11

Observe that the converse of Proposition 21 does not hold, in the sense that not every vertex of the arrangement belonging to the cone \(\fancyscript{C}\) is an extreme ray. For instance, for \(d = 3\), consider the cone \(\fancyscript{C}\) defined as the intersection of the half-spaces associated with the inequalities \(\varvec{x}_1 \oplus (-1) \varvec{x}_2 \le \varvec{x}_3\) and \((-1)\varvec{x}_1 \oplus \varvec{x}_2 \le \varvec{x}_3\). These two half-spaces are in general position, and the intersection of the associated hyperplanes are reduced to the ray \(\mathbb R _{\max }(0,0,0)\), which is not extreme in the cone \(\fancyscript{C}\).

Proposition 21 naturally leads to the idea of determining the extreme rays of the cone \(\fancyscript{C}\) by enumerating of all the vertices of the arrangement, then keeping only the vertices belonging to the cone, and eliminating the non-extreme ones using the characterization of Theorem 1. This algorithm is provided in Fig. 8. Its complexity is given by the following result:

Fig. 8
figure 8

Computing the extreme rays from the vertices of signed hyperplane arrangement

Theorem 23

When the half-spaces defining the tropical cone \(\fancyscript{C}\) are in general position, the extreme rays of \(\fancyscript{C}\) can be determined in time \(O\bigl ((p d \alpha (d) + d^3) \cdot \genfrac(){0.0pt}{}{p+d}{d-1}\bigr )\).

The complexity of the algorithm is thus asymptotically given by

$$\begin{aligned} O\left((p d \alpha (d) + d^3) \cdot \left(1 + \frac{p+1}{d-1}\right)^{d-1} \left(1 + \frac{d-1}{p+1}\right)^{p+1}\right) \quad \text{ when} \,p+d \gg 1. \end{aligned}$$

In theory, this improves the worst-case bound of the algorithm \({\textsc {ComputeExtRays}}\) given in Corollary 18 in some cases. Nevertheless, in practice, the algorithm of Fig. 8 appears to be of little use, since the worst case execution time is essentially always achieved. The leading term \(\genfrac(){0.0pt}{}{p+d}{d-1}\) of the complexity bound is indeed a lower bound on the execution time of the algorithm (every subset \(S\) of \((d-1)\) hyperplanes is examined). In contrast, the algorithm \({\textsc {ComputeExtRays}}\) takes advantage of the fact that \(V_{\max }\) is in general much smaller than the upper bound of Theorem 17.

Furthermore, the algorithm presented here can only be applied to the general position setting, contrary to \({\textsc {ComputeExtRays}}\). Given an arbitrary polyhedral cone \(\fancyscript{C}\), this is certainly possible to execute the algorithm of Fig. 8 on an intersection of half-spaces in general position approximating \(\fancyscript{C}\). However, this approach may provide many more rays than the cone \(\fancyscript{C}\) actually has. Indeed, the approximation of a polyhedral cone \(\fancyscript{C}\) by a sequence of polyhedral cones \(\fancyscript{C}(m)\) defined by half-spaces in general position is discussed in Sect. 5 of [11]. The proof of Theorem 8 there deals with the case where \(\fancyscript{C}\subset \fancyscript{C}(m)\) holds for all \(m\). It shows that any accumulation point of a family of representatives of extreme rays of \(\fancyscript{C}(m)\), as \(m\rightarrow \infty \), is a generating family of \(\fancyscript{C}\). However, in general the generating family obtained in this way contains many redundant generators.

6 Comparison with Alternative Approaches and Experimental Results

6.1 Existing Incremental Algorithms in the Tropical Setting

Butkovič and Hegedus [12] were the first to establish the existence of a finite generating family for the set of solutions of \(A\varvec{x}\le B\varvec{x}\) (see also [17] for a recent account), but their method was not intended to be algorithmically efficient. Unlike the present approach, their elementary step leads to an algorithm which is not tail-recursive, and in which it is not natural to incorporate an incremental elimination of redundant generators. This provides a method with a double exponential complexity.

The principle of the approach implemented by the second author in the Maxplus toolbox of Scilab [21], and refined in our previous work [2], is similar to the one of \({\textsc {{ComputeExtRays}}}{}\). However, it uses a much less efficient elimination of non-extreme vectors, which does not take the external representation of the cone into account. This elimination relies on a characterization in terms of set covers due to Vorobyev and Zimmermann, or equivalently on residuation [5, 58, 60] for a recent overview). Its time complexity is \(O(d |V |^2)\), where \(V\) is the set of extreme rays of the previous intermediate cone \(\fancyscript{D}\). Subsequently, the total complexity of the inductive step is \(O(d |V |^4)\).

Butkovič et al. [18] proposed a characterization of extreme points in terms of minimal elements of a given type (see Remark 6) to compute a minimal generating family of a polyhedral cone given by a set of rays. This characterization reduces the latter problem to computing the set of (Pareto) minimal vectors of a given set of \(k\) vectors in dimension \(d\), which can be solved in time time \(O(k(\log _2 k)^{d-3})\) (for \(d \ge 4\)) using [45]. Using this approach as a replacement of Theorem 1, this leads to a variant in which the inductive step has a complexity of \(O(d|V |^22^{d-3}(\log _2|V |)^{d-3})\) (the algorithm of  [45] must be called \(d\) times, on a set of \(O(|V |^2)\) vectors).

6.1.1 Time Complexities

The complexities of the different approaches are compared in Table 1. Recall that \(V_{\max }\) denotes the maximal cardinality of the intermediate generating sets. As shown in [11], there exists instances in which \(V_{\max }\) is of order \((p+d)^{(d-1)/2}\), for \(d\gg p\), other instances in which it is of order \(p2^{d-2}\) for \(p\gg d\), and in general, experiments (§ 6.3 below) suggest that \(V_{\max }\) is by far the leading term. Hence, our algorithm yields a significant speedup over the method described in [2], as indicated by the ratio \(V_{\max }^2/(p \alpha (d))\) of their worst-case time complexities. The same remains true by comparison with the variant of based in the extremality criterion of [18], in which case the factor becomes \(2^{d-3}(\log _2V_{\max })^{d-3}/(p\alpha (d))\).

Observe that, unlike \({\textsc {ComputeExtRays}}\), the other algorithms may temporarily store non-extreme elements of \(\fancyscript{C}\) during the inductive step. As a result, the space complexity is not optimal, and it can only be bounded by \(O(d |V |^2)\). This may be harmful to the scalability of these algorithms.

Table 1 Comparison of the complexity of incremental methods

For the sake of completeness, we provide in Table 1 a comparison with the classical double description method, whose principle is close to our algorithm. In the classical case, the elimination of redundant elements can be performed using either an algebraic criterion which can be checked in \(O(p d^2)\) arithmetical operations, or a combinatorial criterion of complexity \(O(p |V |)\). See [31] for a detailed presentation. We observe that the complexity of the extremality test and the inductive step of our algorithm, as functions of the size of their inputs (\(d\), \(p\), and \(|V |\)), is smaller than the complexity of their classical analogues (in general, the size of \(V\), both in the classical and the tropical settings, is much larger than \(d \alpha (d)\)).

6.2 Tropical Extreme Rays Versus Tropical Polyhedral Complexes

Another approach, along the lines of [27, 42], would consist in representing tropical polyhedra by polyhedral complexes in the usual sense. However, an inconvenient of polyhedral complexes is that their number of vertices (called “pseudo-vertices” to avoid ambiguities) is exponential in the number of extreme rays [27]. Hence, the representations used here are more concise. This is illustrated in Fig. 9 (generated using Polymake [40]), which shows an intersection of 10 tropical half-spaces, corresponding to the “natural” pattern studied in [11]. There are only 24 extreme rays, but 1381 pseudo-vertices.

Fig. 9
figure 9

An intersection 10 affine half-spaces in dimension 3 which has 24 vertices (in red) and 1381 pseudo-vertices (consisting of the 24 vertices, and the points depicted in yellow) (Color figure online)

Another approach, developed by Lorenzo and de la Puente in [46] (see also Truffet [56]), relies on a similar decomposition of tropical polyhedral cones as polyhedral complexes. Unlike the previous one, the decomposition arises from half-spaces. Given a cone \(\fancyscript{C}\) defined by a system \(A \varvec{x}\le B \varvec{x}\) with \(A, B \in \mathbb R _{\max }^{p \times d}\), the algorithm of [46] consists in the enumeration of tuples of \(2d\) integers in \(\{1, \dots , p\}\) corresponding to (possibly empty) cells of the associated complex. Its worst-case complexity is in \(O(p^{2d})\), which is greater than the bound given in (9) on the complexity of \({\textsc {ComputeExtRays}}\), as soon as \(d \gg 1\) or \(p \gg 1\). On top of that, it is possible to exhibit tropical cones with a polynomial number of extreme rays, but on which the algorithm of [46] have an exponential complexity. Given \(p\) reals \(t_1 < \cdots < t_p\), consider the polyhedral cone \(\fancyscript{C}\) [11] defined by the inequalities \(t_k \varvec{x}_2 \le \oplus _{j \ne 2} t_k^{j-1} \varvec{x}_j\), for \(1 \le k \le p\). This cone arises as the second polar of the cyclic cone studied in [10]. Here, \(t_k^{j-1}\) refers to the scalar \((j-1) \times t_k\). It can be verified that the algorithm of [46] enumerates \(\genfrac(){0.0pt}{}{2p+d-2}{2p}\) tuples. In contrast, as shown in the proof of [10, Proposition 6], the number of extreme rays of the cone \(\fancyscript{C}\), and also of all intermediate cones \(\fancyscript{C}_j\) (\(1 \le j \le p\)) defined by the \(j\) first inequalities, is bounded by \(O(p d)\). The complexity of the algorithm \({\textsc {ComputeExtRays}}\) is thus polynomial, bounded by \(O(p^4 d^3 \alpha (d))\).

6.3 Benchmarks

The algorithm \({\textsc {ComputeExtreme}}\) has been implemented by Allamigeon in the library TPLib (Tropical Polyhedral Library) written in OCaml [9]. Table 2 reports some experiments for different classes of tropical cones: (i) samples formed by several cones chosen randomly (referred to as rnd\(x\) where \(x\) is the size of the sample), (ii) and the polars of signed cyclic cones which are known to have a very large number of extreme elements [11]. For each cone, the first columns respectively report the dimension \(d\), the number of half-spaces \(p\), the size of the final set of extreme rays, the mean size of the intermediate sets, and the execution time \(T\) (for samples of “random” cones, we give average results).

Table 2 Execution time benchmarks of TPLib on a single core of a \(3 \,\mathrm{GHz }\) Intel Xeon with \(3 \, \mathrm{Gb }\) RAM

In our implementation, inequalities are dynamically ordered during the execution: at each step of the induction, the inequality \(\varvec{a} \varvec{x} \le \varvec{b} \varvec{x}\) is chosen so as to minimize the number of combinations \((\varvec{a}\varvec{v}^j)\varvec{v}^i \oplus (\varvec{b} \varvec{v}^i) \varvec{v}^j\). Note that this strategy does not guarantee that the size of the intermediate sets of extreme elements is smaller. However, it reports better results than without ordering.

We compare our algorithm with an implementation of the algorithm of [2, 21] incorporating the optimizations in [7], whose execution time \(T^{\prime }\) is given in the seventh column. When the number of extreme rays is of order of \(10^4\), the second algorithm needs several days to terminate. For instance, its execution have lasted \(45\) days on the signed cyclic cone with the parameters \(d = 20\) and \(p = 8\), while our algorithm \({\textsc {ComputeExtRays}}\) has returned in only \(690\) seconds. Therefore, for some extreme cases (for instance \(d \ge 30\)), the comparison could not be made in practice.

The ratio \(T/T^{\prime }\) illustrates that our algorithm brings a breakthrough in terms of execution time, which confirms the discussion of Sect. 6.1. Recall that the main difference between the two algorithms lies in the criterion of elimination of non-extreme vectors, which can be evaluated in time \(O(p d \alpha (d))\) (Theorem 12) and \(O(d |V |^2)\) respectively. As indicated by the experiments, the term \(|V |^2\) is by far dominating, so that our algorithm benefits from relying on an extremality criterion which does not depend on this factor. This shows that the result of Theorem 1 is interesting not only in theory but also in practice.