Examples

Generators

<#Include Label="Demo_example">

System of equations <#Include Label="Demo_example_equation">

System of inhomogeneous equations <#Include Label="Demo_example_inhom_equation">

Combined input Normaliz also allows the combination of different kinds of input, e.g. multiple constraint types, or additional data like a grading.

Suppose that you have a 3 by 3 square of nonnegative integers such that the 3 numbers in all rows, all columns, and both diagonals sum to the same constant M. Sometimes such squares are called magic and M is the magic constant. This leads to a linear system of equations. The magic constant is a natural choice for the grading. Additionally we force here the 4 corner to have even value by adding congruences.

<#Include Label="Demo_example_3x3magiceven">

Using the dual mode For solving systems of equations and inequalities it is often faster to use the dual Normaliz algorithm. We demonstrate how to use it with an inhomogeneous system of equations and inequalities.

The input consists of a system of 8 inhomogeneous equations in R^3. The first row of the matrix M encodes the inequality 8x + 8y + 8z + 7 \geq 0. Additionally we say that x, y, z should be non-negative by giving the sign vector and use the total degree. <#Include Label="example_dual">

As result we get the Hilbert basis of the cone of the solutions to the homogeneous system and the module generators which are the base solutions to the inhomogeneous system.