Skip to main content
Springer Nature - PMC COVID-19 Collection logoLink to Springer Nature - PMC COVID-19 Collection
. 2020 Jun 6;12097:232–240. doi: 10.1007/978-3-030-52200-1_23

Hyperplane Arrangements in polymake

Lars Kastner 6, Marta Panizzut 6,
Editors: Anna Maria Bigatti8, Jacques Carette9, James H Davenport10, Michael Joswig11, Timo de Wolff12
PMCID: PMC7340937

Abstract

Hyperplane arrangements form the latest addition to the zoo of combinatorial objects dealt with by polymake. We report on their implementation and on a algorithm to compute the associated cell decomposition. The implemented algorithm performs significantly better than brute force alternatives, as it requires fewer convex hulls computations. The implementation is included in polymake since release 4.0.

Keywords: Hyperplane arrangements, Cell decomposition

Introduction

Hyperplane arrangements are ubiquitous objects appearing in different areas of mathematics such as discrete geometry, algebraic combinatorics and algebraic geometry. A common theme is to understand the combinatorics and the topology of the cells in the complement of the arrangement. Combinatorics and its connections to other areas of mathematics are the focus of the software framework polymake [GJ00], hence hyperplane arrangements form an almost mandatory addition to the objects available. We will discuss the implementation, such as the datatypes and properties, as well as some basic algorithms for analyzing hyperplane arrangements.

One of the main advantages of polymake are its various interfaces to other software. This allows keeping the codebase slim, while using powerful software developed by experts from other fields. Still polymake provides basic algorithms for many tasks, in case other software is not available. Hence the idea of the hyperplane arrangements is to provide a datatype with basic functionality as a basis for future interfaces to other software, e.g. to ZRAM [Brü+99] for computing the cell decomposition from the hyperplanes. Nevertheless, the polymake implementation of hyperplane arrangements comes with a basic algorithm for computing the associated cell decomposition that performs significantly better than brute force alternatives. Thus, we will discuss the main ideas of this algorithm in this article as well.

The combinatorics of hyperplane arrangements in real space is linked to zonotopes. Each arrangement endows the support space with a fan structure which is the normal fan of a zonotope. Each hyperplane subdivides the space in two halfspaces. Therefore we can encode relative positions of points with respect to the arrangement. In other words, hyperplane arrangements are examples of (oriented) matroids. Moreover, the hyperplanes in an arrangement can be seen as mirrors hyperplanes of a reflection group.

An interesting application is in Geometric Invariant Theory. GIT constructs quotients of algebraic varieties modulo group actions. The quotients depend on the choice of a linearized ample line bundle. Variation of geometric invariant theory quotients studies how quotients vary when changing the line bundle. Under some hypothesis the classes of equivalent quotients are convex subsets, called chambers. The walls among chambers are defined by certain hyperplane arrangements, see [DH98, Example 3.3.24].

Main Definitions

We begin with the basic definitions in the theory of hyperplane arrangements following our implementation in polymake.

Definition 1

A hyperplane arrangement Inline graphic in Inline graphic is given by the following data:

  1. a finite set of linear forms encoding hyperplanes Inline graphic and

  2. a polyhedral cone Inline graphic which we call the support cone.

Given a hyperplane arrangement H, the induced fan Inline graphic is a fan with support Inline graphic given by subdividing Inline graphic along all Inline graphic for Inline graphic.

Every hyperplane in the arrangement subdivides the space into two halfspaces

graphic file with name M10.gif

We remark that in the definition we allow duplicate hyperplanes, but from each hyperplane arrangement we can construct a reduced one. Let H be a hyperplane arrangement given by the hyperplanes Inline graphic. The reduced hyperplane arrangement Inline graphic has the same support cone as H and Inline graphic if and only if Inline graphic, for any Inline graphic and any Inline graphic.

To a hyperplane arrangement Inline graphic we associate the polytope

graphic file with name M18.gif

the Minkowski sum of all the line segments Inline graphic and the dual support cone Inline graphic. If Inline graphic, then Inline graphic and Inline graphic is a zonotope.

Remark 1

Often hyperplane arrangements are defined without a support cone, i.e. only for the case Inline graphic. The connection between intersecting Inline graphic is done via taking the Minkowski sum Inline graphic on the dual side. The main ingredient is the fact that

graphic file with name M27.gif

holds for two cones Inline graphic and Inline graphic.

Proposition 2.1

[Zie95, Thm. 7.16] The fan Inline graphic is the normal fan of Inline graphic.

Definition 2

To a maximal cone Inline graphic we associate its signature, which is a set Inline graphic.

Remark 2

In polymake release 4.0 the signature was defined as the set of indices such that Inline graphic. The signature will be automatically updated for data saved in polymake 4.0 and loaded in the subsequent releases.

Example 1

Let H be given by

graphic file with name M35.gif

We will have a look at the induced fans for different support cones Inline graphic. The fan Inline graphic and the polytope Inline graphic are visualized in Fig. 1 for varying Inline graphic.

Fig. 1.

Fig. 1.

Visualization of Inline graphic and Inline graphic for Example 1

In each of the pictures, the support cone is indicated as the shaded area. The structure of the fan Inline graphic depends heavily on the support cone Inline graphic. In particular, it is possible for hyperplanes to only intersect Inline graphic trivially and thereby becoming irrelevant for Inline graphic. Thus, one may loose information when going from H to Inline graphic.

The labels at the hyperplanes in the first picture indicate which side constitutes Inline graphic, Inline graphic respectively. Using these one can read of the signatures of the single cells, for example the cell Inline graphic generated by the rays (1, 0) and (1, 2) has signature Inline graphic.

Affine Hyperplane Arrangements

An affine hyperplane arrangement is usually given by a finite set of affine hyperplanes:

graphic file with name M51.gif

The whole space Inline graphic is then subdivided along the hyperplanes

graphic file with name M53.gif

resulting in a polyhedral complex Inline graphic.

Analogously to the connection between polytopes and cones, or polyhedral complexes and fans, every affine hyperplane arrangement gives rise to a (projective) hyperplane arrangement by embedding it at height 1:

graphic file with name M55.gif

If we intersect the fan Inline graphic with the affine hyperplane Inline graphic, the resulting polyhedral complex is isomorphic to Inline graphic, via the embedding Inline graphic, Inline graphic.

The support cone allows one to deal with affine hyperplanes computationally. Set

graphic file with name M61.gif

then the maximal cones of Inline graphic are in one-to-one correspondence with the maximal cells of Inline graphic. In particular, polymake can interpret Inline graphic as a polyhedral complex via the embedding mentioned above, and this polyhedral complex will be exactly Inline graphic.

Example 2

As a simple example, choose the following hyperplanes in Inline graphic:

graphic file with name M67.gif

The associated hyperplanes of Inline graphic in Inline graphic are exactly those of the hyperplane arrangement from Example 1. For Inline graphic we choose the cone Inline graphic, then Inline graphic will be at height one.

graphic file with name 495991_1_En_23_Equ16_HTML.gif

The induced affine hyperplane arrangement is indicated by the dots and thick line. It is one dimensional and the associated polyhedral complex Inline graphic has four maximal cells.

Example 3

The following is an example of code in polymake. graphic file with name 495991_1_En_23_Figa_HTML.jpg

Implementation

Hyperplane arrangements are implemented in the software polymake as a new object HyperplaneArrangement, which is derived from the already existing object VectorConfiguration. We augment the existing properties of VectorConfiguration with the following properties and methods.

  1. HYPERPLANES A matrix encoding the hyperplanes as rows, this is just an override of the property VECTORS of VectorConfiguration

  2. SUPPORT A polymake Cone, denoting the support Inline graphic.

  3. CELL_DECOMPOSITION A polymake PolyhedralFan, the cell decomposition Inline graphic.

  4. CELL_SIGNATURES A Inline graphic, the i-th set in the array contains the indices of hyperplanes evaluating positively on the i-th maximal cone of CELL_DECOMPOSITION.

  5. signature_to_cell Given a signature as Inline graphic, get the maximal cone with this signature, if it exists.

  6. cell_to_signature Given a cell, a maximal cone of CELL_DECOMPOSITION, determine its signature.

Cell Decomposition Algorithm

Given Inline graphic, we want to compute the subdivision of Inline graphic induced by the hyperplanes, the induced fan Inline graphic. This means, we want to find all the rays and maximal cones of Inline graphic. In terms of the zonotope Inline graphic, this is equivalent to knowing the facets and vertices of Inline graphic, see [Fuk04, GS93]. The facet directions of Inline graphic are the rays of Inline graphic. For very vertex of Inline graphic we get a maximal cone by determining which facets contain it.

The brute force approach is to loop over all possible signatures in Inline graphic and for every signature s to build the cone

graphic file with name M88.gif

For comparing the different algorithms, we count the number of times they have to perform a convex hull computation for converting a signature to a cone. There are Inline graphic signatures, so we have to perform Inline graphic convex hull computations. As we saw in Example 1, it can happen that some hyperplanes are irrelevant, either completely or just for single cells. Furthermore, in Example 1 the fan Inline graphic had at most six maximal cones, however we would have to compute eight intersections with the brute force approach regardless.

Remark 3

This brute force approach is in some ways parallel to the brute force approach for computing the Minkowski sum making up Inline graphic, by taking considering all possible sums of the endpoints of the line segments. One arrives at Inline graphic points whose convex hull is Inline graphic. There are several ways to go on: either attempt a massive convex hull computation directly, or check each point individually whether it is a vertex.

Our approach is to first find a full-dimensional cone Inline graphic of Inline graphic and then to flip hyperplanes in order to compute its neighbors. First take a facet f of Inline graphic, then set

graphic file with name M98.gif

where Inline graphic denotes that Inline graphic and f are parallel. This is the signature of the cell neighboring Inline graphic at facet f, so we can use it to determine the rays of the neighboring cell. Finding the neighbors of a cell allows one to traverse the dual graph of the fan Inline graphic. Taking the support cone Inline graphic into account just requires some minor tweaks, like ignoring facets of Inline graphic that are also facets of Inline graphic. By storing signatures one can avoid recomputation of cones.

To find a starting cone, one selects a generic point x from Inline graphic. A generic point will be contained in a maximal cone, this maximal cone will be

graphic file with name M107.gif

The point x may be contained in some hyperplanes, but these hyperplanes are exactly those that also contain the entire Inline graphic. Using this approach we would do one convex hull computation per maximal cone, arriving at Inline graphic convex hull computations.

Remark 4

As the fan Inline graphic is polytopal, there is a reverse search structure on it, corresponding to the edge graph of the zonotope Inline graphic. This has already been exploited by Sleumer in [Sle99] using the software framework [Brü+99]. Reverse search allows for different kinds of parallelisation and it would be interesting to study the performance of budgeted reverse search [AJ18, AJ16] on this particular problem. Note that the dual problem, finding the vertices of Inline graphic, is equally hard, as it is a Minkowski sum with potentially many summands. We refer the reader to [GS93] for a detailed analysis.

Sample Code

We conclude with a few examples which illustrate the object HyperplaneArrangement and its properties. Example 6 reports the comparison between the running times of the new algorithm implemented in polymake and the brute force algorithm to compute cell decompositions.

Example 4

The following examples compute the Inline graphic cells in the Coxeter arrangement of type A3. The 6 linear hyperplanes in the arrangements are

graphic file with name M114.gif

graphic file with name 495991_1_En_23_Figb_HTML.jpg Now we compute the 36 cells in the Linial arrangement [PS00] given by the 6 affine hyperplanes

graphic file with name M115.gif

As explained in Sect. 2.1, the support cone allows us to deal with affine hyperplanes. We transform the hyperplanes Inline graphic in the projective arrangement Inline graphic with hyperplanes Inline graphic and then we intersect the latter with the support cone Inline graphic (Fig. 2). graphic file with name 495991_1_En_23_Figc_HTML.jpg

Fig. 2.

Fig. 2.

The arrangement of type A3.

Example 5

This example is based on [Süß19]. Let X be a del Pezzo surface of degree 5 and Inline graphic the class of the canonical divisor. The cone of effective divisors Inline graphic is spanned by ten exceptional curves Inline graphic indexed by Inline graphic and characterized by Inline graphic and Inline graphic. Applying the change of basis Inline graphic, described in [Süß19, Section 3], we see that the polytope P given by points in Inline graphic intersecting Inline graphic with multiplicity Inline graphic coincides with the hypersimplex Inline graphic. In the aforementioned article the author considers the cell decomposition of P induced by the hyperplane arrangement defined by

graphic file with name M131.gif

The decomposition is used to study the toric topology of the Grassmannian of planes in complex 5-dimensional space.

The following code allows one to compute the cell decomposition in polymake. We first compute the new pairing in the new basis Inline graphic. graphic file with name 495991_1_En_23_Figd_HTML.jpg

We then introduce the support cone given by the hypersimplex Inline graphic in the new basis graphic file with name 495991_1_En_23_Fige_HTML.jpg

Finally, we can compute the cell decomposition. graphic file with name 495991_1_En_23_Figf_HTML.jpg

Example 6

Let H be the hyperplane arrangement in Inline graphic given by the Inline graphic hyperplanes normal to Inline graphic-vectors. The number of maximal cones in Inline graphic are known up to Inline graphic, see entry A034997 in the Online Encyclopedia of Integer Sequences. We run polymake implementations of the BFS algorithm described above and the brute force alternative. Our results are reported in Table 1, where we can see that the BFS algorithm performs better than the brute force approach.

Table 1.

Results and runtimes for arrangements in Example 6

d Inline graphic hyperplanes Inline graphic rays Inline graphic maximal cones Time BFS (s) Time brute force (s)
2 3 6 6 0.10 0.1
3 7 18 32 0.40 1.2
4 15 90 370 4.98 324.1
5 31 1250 11292 209.19
6 63 57750 1066044 40517.84

Footnotes

Research by L. Kastner is supported by Deutsche Forschungsgemeinschaft (SFB-TRR 195: “Symbolic Tools in Mathematics and their Application”).

Contributor Information

Anna Maria Bigatti, Email: bigatti@dima.unige.it.

Jacques Carette, Email: carette@mcmaster.ca.

James H. Davenport, Email: j.h.davenport@bath.ac.uk

Michael Joswig, Email: joswig@math.tu-berlin.de.

Timo de Wolff, Email: t.de-wolff@tu-braunschweig.de.

Lars Kastner, Email: kastner@math.tu-berlin.de.

Marta Panizzut, Email: panizzut@math.tu-berlin.de.

References

  • [AJ18].Avis D, Jordan C. mplrs: a scalable parallel vertex/facet enumeration code. Math. Program. Comput. 2017;10(2):267–302. doi: 10.1007/s12532-017-0129-y. [DOI] [Google Scholar]
  • [AJ16].Avis, D., Jordan, C.: A parallel framework for reverse search using mts. Preprint arXiv:1610.07735 (2016)
  • [Brü+99].Brüngger A, Marzetta A, Fukuda K, Nievergelt J. The parallel search bench ZRAM and its applications. Ann. Oper. Res. 1999;90:45–63. doi: 10.1023/A:1018972901171. [DOI] [Google Scholar]
  • [DH98].Dolgachev IV, Hu Y. Variation of geometric invariant theory quotients. Inst. Hautes Études Sci. Publ. Math. 1998;87:5–51. doi: 10.1007/BF02698859. [DOI] [Google Scholar]
  • [Fuk04].Fukuda K. From the zonotope construction to the Minkowski addition of convex polytopes. J. Symb. Comput. 2004;38(4):1261–1272. doi: 10.1016/j.jsc.2003.08.007. [DOI] [Google Scholar]
  • [GJ00].Gawrilow E, Joswig M. polymake: a framework for analyzing convex polytopes. In: Kalai G, Ziegler GM, editors. Polytopes Combinatorics and Computation (Oberwolfach, 1997) Basel: Birkhäuser; 2000. pp. 43–73. [Google Scholar]
  • [GS93].Gritzmann P, Sturmfels B. Minkowski addition of polytopes: computational complexity and applications to Gröbner bases. SIAM J. Discrete Math. 1993;6(2):246–269. doi: 10.1137/0406019. [DOI] [Google Scholar]
  • [PS00].Postnikov A, Stanley R. Deformations of Coxeter hyperplane arrangements. J. Comb. Theory Ser. A. 2000;91(1–2):544–597. doi: 10.1006/jcta.2000.3106. [DOI] [Google Scholar]
  • [Sle99].Sleumer NH. Output-sensitive cell enumeration in hyperplane arrangements. Nord. J. Comput. 1999;6(2):137–147. [Google Scholar]
  • [Süß19].Süß, H.: Toric topology of the Grassmannian of planes in C5 and the del Pezzo surface of degree 5. arXiv e-prints arxiv.org/abs/1904.13301 (2019)
  • [Zie95].Ziegler GM. Lectures on Polytopes. New York: Springer; 1995. [Google Scholar]

Articles from Mathematical Software – ICMS 2020 are provided here courtesy of Nature Publishing Group

RESOURCES