Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# lllint

Compute an LLL-reduced basis of a lattice

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```lllint(A)
```

## Description

lllint(A) applies the LLL algorithm to the list of integer vectors A.

lllint applies the LLL algorithm to the entries of the list A. The entries of A must be lists of integers, all of the same length; the number of lists need not equal that length.

The return value of lllint has the same form.

The computations are done entirely with integers and are both accurate and quite fast.

## Examples

### Example 1

We apply the LLL algorithm to a list of two vectors of length three:

```A := [[1, 2, 3], [4, 5, 6]]:
lllint(A)```

The result is to be interpreted as follows: the two vectors in the output form an LLL-reduced basis of the lattice genberated by the two vectors in the input.

### Example 2

If the input vectors are not linearly independent, FAIL is returned:

`lllint([[1, 2], [2, 4]])`

## Parameters

 A A list of vectors, each being a list of integers

## Return Values

list of lists is returned whose entries form an LLL-reduced basis of the lattice spanned by the entries of A. If the entries of A are not linearly independent, FAIL is returned.

## References

A. K. Lenstra, H. W. Lenstra Jr., and L. Lovasz, Factoring polynomials with rational coefficients. Math. Ann. 261, 1982, pp. 515–534.

Joachim von zur Gathen and Jürgen Gerhard, Modern Computer Algebra. Cambridge University Press, 1999, Chapter 16.

George L. Nemhauser and Laurence A. Wolsey, Integer and Combinatorial Optimization. New York, Wiley, 1988.

A. Schrijver, Theory of Linear and Integer Programming. New York, Wiley, 1986.