LinearAlgebra[Modular] - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Modular Subpackage : LinearAlgebra/Modular/IntegerLinearSolve

LinearAlgebra[Modular]

  

IntegerLinearSolve

  

solution of a linear integer coefficient system using modular methods

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

IntegerLinearSolve(A, rcol, meth)

Parameters

A

-

Matrix (possibly augmented)

rcol

-

number of columns that represent variables

meth

-

(optional) argument of the form method='chrem' or method='padic' (the default)

Description

• 

The IntegerLinearSolve function constructs the rational solution(s) of a linear integer coefficient system in Matrix form. This is a programmer level function, it does not perform argument checking. Thus, argument checking must be handled external to this function.

• 

It is possible to solve systems with an arbitrary number of augmented columns. If one augmented column is present, the output is a Vector with dimension rcol. If multiple augmented columns are present, the output is a Matrix where each column is of length rcol and represents the solution for the corresponding right-hand side vector in the augmented part of the input Matrix.

• 

It is also possible to obtain solutions with free parameters. These free parameters represent the nullspace vectors of the input Matrix, and are output after the solution.  In this case, the output is a sequence.

  

Note: Regardless of the number of augmented columns, the trailing nullspace is described by Vectors with dimension rcol.

• 

The default method is to solve the system modulo a machine-sized prime and construct rational solutions using p-adic lifting. For large linear systems or systems with large solutions this is the fastest method. The optional argument method='padic' forces the use of this method.

• 

Alternatively, one can specify the optional argument method='chrem' and the system will be solved modulo multiple primes and the solution recovered using the Chinese remainder theorem. This method can be faster in some cases; however, it is a probabilistic approach. Information on controlling the probabilistic behavior can be found in EnvProbabilistic.

• 

This function is also available in LinearSolve as method='modular'.

• 

This command is part of the LinearAlgebra[Modular] package, so it can be used in the form IntegerLinearSolve(..) only after executing the command with(LinearAlgebra[Modular]).  However, it can always be used in the form LinearAlgebra[Modular][IntegerLinearSolve](..).

Examples

A 3x3 system with 1 augmented column.

withLinearAlgebra[Modular]:

MMatrix2,1,3,1,4,3,1,3,2,1,3,5

M:=213143132135

(1)

XIntegerLinearSolveM,3

X:=35235

(2)

M1..3,1..3.XM1..3,4

000

(3)

A 3x3 system with 3 augmented columns.

MMatrix2,1,3,1,2,5,4,3,1,3,1,3,2,1,3,5,3,2

M:=213125431313213532

(4)

XIntegerLinearSolveM,3

X:=35521352523235322910

(5)

M1..3,1..3.XM1..3,4..6

000000000

(6)

A rank deficient 3x3 system with 3 augmented columns.

MMatrix2,1,3,1,2,5,4,3,1,3,1,3,2,2,2,4,3,8

M:=213125431313222438

(7)

XIntegerLinearSolveM,3

X:=37295513000,451

(8)

M1..3,1..3.X1M1..3,4..6,M1..3,1..3.X2

000000000,000

(9)

A rank deficient 4x4 matrix which returns nullspace only.

MMatrix85,55,30,35,97,50,47,56,49,63,14,59,45,8,53,92

M:=8555303597504756496314594585392

(10)

XIntegerLinearSolveM,4

X:=1110

(11)

M.X1

0000

(12)

An inconsistent 3x3 system.

MMatrix2,1,3,1,4,3,1,3,2,2,2,5

M:=213143132225

(13)

IntegerLinearSolveM,3

Error, (in LinearAlgebra:-Modular:-IntegerLinearSolve) system is inconsistent

See Also

LinearAlgebra/Details

LinearAlgebra[LinearSolve]

LinearAlgebra[Modular]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam