LinearAlgebra[Modular] - Maple Help

Online Help

All Products    Maple    MapleSim


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

LinearAlgebra[Modular]

  

BackwardSubstitute

  

apply in-place backward substitution from an upper triangular mod m Matrix to a mod m Matrix or Vector

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

BackwardSubstitute(m, A, B)

Parameters

m

-

modulus

A

-

mod m upper triangular Matrix

B

-

mod m Matrix or Vector to which to apply backward substitution

Description

• 

The BackwardSubstitute function applies the backward substitution described by the upper triangular part of the square mod m Matrix A to the mod m Matrix or Vector B.

  

Note: It is assumed that A is in upper triangular form, or that only the upper triangular part is relevant, as the lower triangular part of A is ignored.

  

The mod m Matrix or Vector B must have the same number of rows as there are columns of A.

• 

Application of backward substitution requires that m is a prime, but in some cases it can be computed when m is composite. In cases where it cannot be computed for m composite, a descriptive error message is returned.

• 

The BackwardSubstitute function is most often used in combination with LUDecomposition, and is used in LUApply.

• 

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

Examples

Construct and solve an upper triangular system.

withLinearAlgebra[Modular]:

p97

p:=97

(1)

AModp,Matrix4,4,i,j→ifijthenrandelse0end if,integer[]:

BModp,Matrix4,2,i,j→rand,integer[]:

A,B

77961086058368000224400039,603943125522471

(2)

XCopyp,B:

BackwardSubstitutep,A,X:

X

944688125222364

(3)

Multiplyp,A,XB

00000000

(4)

Upper triangular with floats.

p97

p:=97

(5)

AModp,Matrix4,4,i,j→ifijthenrandelse0end if,float[8]:

BModp,Vector[column]4,i→rand,float[8]:

A,B

45.29.21.48.0.7.33.57.0.0.65.16.0.0.0.93.,96.71.44.70.

(6)

XCopyp,B:

BackwardSubstitutep,A,X:

X

78.67.2.31.

(7)

Multiplyp,A,XB

0.0.0.0.

(8)

See Also

LinearAlgebra/Details

LinearAlgebra[Modular]

LinearAlgebra[Modular][Copy]

LinearAlgebra[Modular][ForwardSubstitute]

LinearAlgebra[Modular][LUApply]

LinearAlgebra[Modular][LUDecomposition]

LinearAlgebra[Modular][Mod]

LinearAlgebra[Modular][Multiply]

 


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