24
Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universit ¨ at Osnabr ¨ uck [email protected] Osnabr ¨ uck, January 15, 2013 Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Normaliz: algorithms for rational cones and affinemonoids

Winfried Bruns

FB Mathematik/InformatikUniversitat Osnabruck

[email protected]

Osnabruck, January 15, 2013

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 2: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Overview

1 introductory examples

2 basic definitions and basic theorems

3 tasks of Normaliz

4 the Normaliz algorithm for Hilbert bases5 extensions and modifications6 mastered challenges7 platforms and systems

8 contributors and references

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 3: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Affine Monoids

Definition

An affine monoid is a finitely generated submonoid of a lattice Zd ,

i.e.,

M � Zd , M C M � M , 0 2 M ,

there exist x1; : : : ; xn 2 M such that

M D fa1x1 C � � � C anxn W ai 2 ZCg:

M is positive if x ; �x 2 M ) x D 0.

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 4: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

A trivial example

0

M D Z2C

(unique) minimal system of generators given by .1; 0/; .0; 1/

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 5: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

A not so trivial example

0

M D fx 2 Z2 W x � 2y ; 3x � yg

(unique) minimal system of generators given by.2; 1/; .1; 1/; .1; 2/; .1; 3/

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 6: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Cones and lattices

Normaliz computes monoids that arise as intersections of cones andlattices (as the examples above):

Definition

A (rational) cone C is a subset

C D fa1x1 C � � � C anxn W a1; : : : ; an 2 RCg

with a generating system x1; : : : ; xn 2 Zd .

C pointed ” .x ; �x 2 C ) x D 0).

(For us) a lattice is a subgroup of Zd .

We will often assume L D Zd

C pointed and dim C D d .0

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 7: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Basic theorems: : the support hyperplanes

By the theorem of Minkowski-Weyl finitely generated cones can bedescribed by finitely many inequalities:

Theorem

For C � Rd the following are equivalent:

there are x1; : : : ; xn such that C D fP

aixi W aiRCg;

there are �1; : : : ; �s 2 .Rd/� such thatC D fx 2 R

d W �i.x/ � 0g.

In the case dim C D d (to which we have restricted ourselves)�1; : : : ; �s for minimal s define the support hyperplanes

Hi D fx W �i.x/ D 0g

and the facets Fi D C \ Hi of C.

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 8: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Basic theorems: the Hilbert basis

x 2 M is irreducible if x D y C z ) x D 0 or y D 0.

Theorem (van der Corput)

Let M be a positive affine monoid.

every element of M is a sum of irreducible elements.

M has only finitely many irreducible elements.

The irreducible elements form the unique minimal system ofgenerators Hilb.M/ of M, the Hilbert basis.

In particular, monoids of type C \ Zd (C pointed, rational) have a

unique minimal finite system of generators, often called Hilb.C/.

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 9: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Basic theorems: Gordan’s lemma

Theorem (Gordan)

Let C � Rd be the cone generated by x1; : : : ; xn 2 Z

d . Then C \ Zd

is an affine monoid.

Proof.

Let y 2 C \ Zd . Then there exist ai 2 RC such that

y D a1x1 C � � � C anxn:

Write ai D bi C qi mit bi 2 ZC and 0 � qi < 1. Then

y D b1x1 C � � � C bnxn C z; z D q1x1 C � � � C qnxn 2 C \ Zd :

Therefore the monoid C \ Zd is generated by x1; : : : ; xn and the

finite setZ

d \ fq1x1 C � � � C qnxn W 0 � qi < 1g

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 10: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

The tasks of Normaliz: Hilbert basis

Normaliz computes (together with other data)

Hilb.C \ L/

Cones C and lattices L can be specified by

generators x1; : : : ; xn 2 Zd ,

constraints: homogeneous systems of diophantine linearinequalities, equations and congruences,

relations: binomial equations.

Normaliz has two algorithms for Hilbert bases: (1) the originalNormaliz algorithm, and (2) a variant of an algorithm due to Pottier.

We concentrate on generators as input and the algorithm (1).

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 11: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

The tasks of Normaliz: Hilbert series

A grading on M is a surjective Z-linear form deg W gp.M/ ! Z suchthat deg.x/ > 0 for x 2 M , x ¤ 0

The Hilbert (or Ehrhart) function is given by

H.M; k/ D #fx 2 M W deg x D kg

and the Hilbert (Ehrhart) series is

HM.t/ D

1X

kD0

H.M; k/tk :

0

Theorem (Hilbert-Serre, Ehrhart)

HM.t/ is a rational function

H.M; k/ is a quasi-polynomial for k � 0

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 12: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

System of generators and reduction

Most likely every algorithm for the computation of Hilbert basesneeds two phases:

the determination of system of generators E ,

the reduction of E to the Hilbert basis.

We need two auxiliary, interleaved steps:

the computation of the support hyperplanes of the cone,

a triangulation of the cone.

A triangulation is a decompositioninto simplicial cones: C D

S�2˙

C� .

A cone is simplicial if it is generated by linearly independent vectors.

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 13: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Support hyperplanes: Fourier-Motzkin elimination

This is an incremental algorithm that builds a cone by successiveextending the system of generators and determining the supporthyperplanes in this process.

Start: We may assume that x1; : : : ; xd are linearly independent. Thecomputation of the support hyperplanes is then simply the inversionof the matrix with rows x1; : : : ; xd . (In principle superfluous.)

Extension: we add xdC1; : : : ; xn successively: from the supporthyperplanes of C0 D RCx1 C � � � C RCxn�1 we must compute thesupport hyperplanes of C D C0 C RCxn.

We describe this process geometrically.

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 14: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

We determine the boundary V of the part of C0 that is visible from xn

and its decomposition into subfacets. Together with xn these spanthe new facets of The facets of C0 that are visible from xn

(�i.xn/ < 0), are discarded.

In the cross-section of a 4-dimensional cone:

x1

x2

x3

x4x5

The main problem: find V .

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 15: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Incremental triangulation

It follows the same inductive scheme, interleaved withFourier-Moatzkin elimination: we obtain a triangulation of C if weextend the triangulation of C0 by the simplicial cones that arespanned by xn and the facets visible from xn.

In the cross-section of a 4-dimensional cone:

Main problem: triangulation may be very large. (Ways out: pyramiddecomposition and partial triangulation.)

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 16: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Reduction

The reduction is in principle very simple if one knows the supporthyperplanes (or rather the linear forms �1; : : : ; �s).

Theorem

Let E be a system of generators of the positive normal affine monoidM. An element is x 2 M reducible if and only if there exists y 2 E,y ¤ x, such that �i.x � y/ � 0 for i D 1; : : : ; s.

Evidently true, since for x ; y 2 Zd one has x � y 2 C \ Z

d if andonly if �i.x � y/ � 0 for i D 1; : : : ; s.

Main problems:

E is very large and many comparisons are necessary. In thiscase a sophisticated implementation can help to find y quickly.

s is very large.

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 17: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

The steps of the algorithm

The (primal) Normaliz algorithm runs as follows:

1 Input of x1; : : : ; xn, preparatory coordinate transformation.

2 Computation of the support hyperplanes, interleaved with the3 computation of the triangulation ˙ .4 For every cone C� 2 ˙

computation of a system of generators C� \ Zd .�/ and

its reduction to the Hilbert basis HB�

5 reduction ofS

�2˙HB� to Hilb.C \ Z

d/.6 inverse coordinate transformation.

Only step .�/ has not yet been explained. Or has it?

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 18: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Simplicial cones

Let x1; : : : ; xd be linearly independent and C D RCx1 C : : : RCxd . Inthe proof of Gordan’s lemma we have learnt:

E D fq1x1 C � � � C qdxd W 0 � qi < 1g \ Zd

together with x1; : : : ; xd generate the monoid C \ Zd .

0x1

x2

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 19: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Easy to see:

Every residue class in Zd=U, U D Zx1 C � � � C Zxd , has exactly one

representative in U.

0x1

x2

Representatives of residue classes can be quickly computed(x1; : : : ; xd ! triangular matrix) and from an arbitrary representativewe obtain the one in E by division with remainder.

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 20: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Extensions and modifications

Computation of Hilbert series (since 2000),

based on Stanley decompositions: Versions 2.0–2.5 based online shellings, now on a theorem of Koppe–Verdoolaege,

pyramid decomposition “localizing” triangulation (since version2.7),

partial triangulation via “height 1 strategy” for Hilbert basiscomputations(since version 2.5)

Pottiers (dual) algorithm (since version 2.1, builds Csuccessively as an intersection of halfspaces)

parallelization with OpenMP (since version 2.5)

Brand-new: NmzIntegrate computes Lesbesgue integrals ofpolynomials over rational polytopes and generalized Ehrhart seriees.

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 21: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Challenges mastered

Condorcet effic. linear order 5 � 5 � 3of plurality voting polytope for S6 contigency tables

Reference Schurmann Sturmfels-Welker Ohsugi-Hibi

computation Ehrhart series volume Hilbert basis

embed dimension 24 16 55

dimension 24 16 43

# extreme rays 3928 720 75

# Hilbert basis (25,192) (720) 75

# supp hyperplanes 30 910 306,955

# full triangulation 347,225,775,338 5,745,903,354 (9,248,527,905)

# eval simpl cones 347,225,775,338 102,526,351 448,645

computation time 218:13:55 h 36:45 min 26:52 min

SUN xFire 4450 (parallelization 20 threads), RAM < 2 GB

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 22: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Platforms and systems

Normaliz (present public version 2.8) runs on

Apple

Linux

MS Windows

Access to Normaliz from

Singular (library by WB and Christof Soger)

Macaulay 2 (package by Gesa Kampf)

CoCoA (John Abbott, Anna Bigatti, Christof Soger)

Sage (optional package by Andrey Novoseltsev)

polymake (Andreas Paffenholz)

Regina (for 3-manifolds by Benjamin Burton)

GUI interface jNormaliz (by V. Almendra and B. Ichim)

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 23: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

Contributors

Robert Koch (1997-2002, implementation in C)

Witold Jarnicki (2003)

Bogdan Ichim (2007–2008, cxompletely new implementation inC++, versions 2.0, 2.1, jNormaliz)

Christof Soger (since 2009)

Gesa Kampf (Macaulay 2 package)

Andreas Paffenholz (polymake interface)

Andrey Novoseltsev (Sage package)

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids

Page 24: Normaliz: algorithms for rational cones and affine monoids...Normaliz: algorithms for rational cones and affine monoids Winfried Bruns FB Mathematik/Informatik Universitat Osnabru¨ck¨

References

W. Bruns and R. Koch, Computing the integral closure of anaffine semigroup. Univ. Iagell. Acta Math. 39 (2001), 59–70.

W. Bruns and J. Gubeladze, Polytopes, rings, and K-theory.Springer 2009.

W. Bruns, R. Hemmecke, B. Ichim, M. Koppe, and C. Soger,Challenging computations of Hilbert bases of cones associatedwith algebraic statistics. Exp. Math. 20 (2011), 1–9.

W. Bruns and B. Ichim, Normaliz: algorithms for affine monoidsand rational cones. J. Algebra 324 (2010), 1098–1113.

W. Bruns and G. Kampf, A Macaulay 2 interface for Normaliz.Preprint. J. Softw. Algebr. Geom. 2 (2010), 15–19.

W. Bruns, B. Ichim and C. Soger, The power of pyramiddecomposition in Normaliz. Submitted.

W. Bruns and C. Soger, computation of generalized Ehrhartseries in Normaliz. Submitted.

Winfried Bruns Normaliz: algorithms for rational cones and affine monoids