4-18 Computer Algebra Commands
Input: Level 2/Argument 1: A vector of the first congruence (expression and modulus).
Level 1/Argument 2: A vector of the second congruence (expression and modulus).
Output: A vector of the solution congruence (expression and modulus).
Flags: Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example: Solve the following simultaneous congruences for the polynomial u:
ux
2
1+≡
(mod x+2)
u
1
≡
(mod x+3)
Command:
CHINREM([X^2+1,X+2],[X-1,X+3])
Result: [X^3+2*X^2+5,-(X^2+5*X+6)]
See also: EGCD, ICHINREM
CHOLESKY
Type: Command
Description: Returns the Cholesky factorization of a square matrix.
Access: Matrices, !Ø
QUADRATIC FORM
Input: A positive square matrix, M
Output: An upper triangular matrix, P, such that
t
P*P=M. (
t
P is the transpose of P.)
Flags: Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example: Find the Cholesky factorization of:
11
15
Command:
CHOLESKY
11
15
⎝⎠
⎜⎟
⎛⎞
Result:
1 1
0 2
CIRC
Type: Command
Description: Composes two permutations.
Access: Arithmetic, !Þ
PERMUTATION
Input: Two lists, L1 and L2, representing two permutations. The composition L1○L2 is the
permutation equivalent to performing permutation L2 first and L1 second.
Level 2/Argument 1: L1
Level 1/Argument 2: L2
Output: A list representing the single equivalent permutation, L = L1○L2
Example: Compose the permutations given by {3,4,5,2,1} and {2,1,4,3,5}
Command: CIRC({3,4,5,2,1},{2,1,4,3,5})
Result: {4,3,2,5,1}
See also: C2P, P2C