Close
Close window
LinearDependency - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

IntegerRelations

LinearDependency

find an integer dependence (relation)

Calling Sequence

LinearDependency(v,opts)

Parameters

v

-

list or Vector of (complex) floating-point numbers

opts

-

(optional); equation of the form method=LLL or method=PSLQ specifying the algorithm used

Description

The LinearDependency(v,opts) command finds an integer relation between the numbers in v - if they are linearly dependent. Given a list (or a Vector) of n real or complex numbers, LinearDependency outputs a list (or a Vector) u of n integers such that i=1nuivi is close to zero.

By default, Bailey and Ferguson's PSLQ (Partial Sum of Least Squares) algorithm is used if the numbers in v are real.

The optional argument method=LLL specifies that the LLL (Lenstra-Lenstra-Lovasz) lattice basis reduction algorithm be used, which is the default if v contains non-real values.

The internal working precision of the LinearDependency command corresponds to the value of Digits . For best results, the same value of Digits should be used with which the input approximation was obtained.

Examples

>

withIntegerRelations:

>

rsqrt2+sqrt3

r2+3

(1)
>

vexpandseqri,i=0..4

v1,2+3,5+223,112+93,49+2023

(2)
>

vevalfv,12

v1.,3.14626436994,9.89897948556,31.1448064542,97.9897948556

(3)
>

vevalfv

v1.,3.146264370,9.898979486,31.14480645,97.98979486

(4)
>

uLinearDependencyv

u1,0,−10,0,1

(5)
>

adduivi,i=1..5

0.

(6)
>

madduizi1,i=1..5

mz410z2+1

(7)
>

simplifyevalm,z=r

0

(8)
>

r1+213

r1+−213

(9)
>

vVectorexpandseqri,i=0..4,12

v11+−2131+2−213+−2231+3−213+3−2237+2−213+6−223

(10)
>

vevalfv,12:vevalfv

v1.1.629960525+1.091123636I1.466220524+3.556976909I−1.491220003+7.397559819I−10.50228211+10.43062509I

(11)
>

uLinearDependencyv,method=LLL

u−1−26−41

(12)
>

adduivi,i=1..5

0.1.×10−8I

(13)
>

madduizi1,i=1..5

mz44z3+6z22z1

(14)
>

simplifyevalm,z=r

0

(15)
>

solvem=0,z

1,213+1,2132I32132+1,2132+I32132+1

(16)
>

evalcr

2132+I32132+1

(17)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /