Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫  π  -¹ ² ³ °

You are not logged in.

## #126 2012-04-11 03:00:42

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

Nothing, if it is working. But built in functions are faster and use less memory.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #127 2012-04-11 03:06:44

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,030

### Re: PSLQ and LLL?

Ok,I'm gonna try both.I think there is a time measuring function in Maxima.Let me see if I can use it somehow.

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #128 2012-04-11 03:09:36

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

It will you be your code so use whichever one you like, we have several more lines to translate.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #129 2012-04-11 03:12:58

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

``````pslq[l_, dig_] := Module[{a},
a = IdentityMatrix[Length[l]];
a = Append[a, 10^dig*N[l, dig]];
(*a=Transpose[a];
a=Rationalize[a,10^-dig];
a=LatticeReduce[a];
Take[a,All,{1,Length[l]}]*)
a];``````

Use the addrow function to replace the append.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #130 2012-04-11 03:16:12

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,030

### Re: PSLQ and LLL?

Hi bobbym

Should the function append it on the right or down?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #131 2012-04-11 03:29:33

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

On top of the identity matrix. Addrow is the maxima command to do that.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #132 2012-04-11 03:41:51

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,030

### Re: PSLQ and LLL?

Ok.I found the Transpose.What is Rationalize?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #133 2012-04-11 05:54:52

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

Maxima has a rationalize command.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #134 2012-04-11 05:59:36

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,030

### Re: PSLQ and LLL?

Ok.Let's go step by step.

What is what in here: 10^dig*N[l, dig]

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #135 2012-04-11 06:05:03

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

The parameter of the function call pslq(l,dig). l is basis vector and dig is the number of digits.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #136 2012-04-11 06:08:45

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,030

### Re: PSLQ and LLL?

And what is N[l,dig]?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #137 2012-04-11 06:10:41

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

That is mathematica taking the list of constants and turning them into floating point numbers.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #138 2012-04-11 06:15:28

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

``````pslq[l_, dig_] := Module[{a},
a = IdentityMatrix[Length[l]];
a = Append[a, 10^dig*N[l, dig]];
(*a=Transpose[a];
a=Rationalize[a,10^-dig];
a=LatticeReduce[a];
Take[a,All,{1,Length[l]}]*)
a];``````

The lattice reduce command that is the problem.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #139 2012-04-11 06:17:18

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,030

### Re: PSLQ and LLL?

hi bobbym

How does one append a vector length 2 to a square matrix of arbitrary size?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #140 2012-04-11 06:22:57

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

The vector is 1 x n and the matrix is n x n.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #141 2012-04-11 06:51:09

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,030

### Re: PSLQ and LLL?

What is that vector? I am confused.

How does the vector look like? And how would that translate to Maxima?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #142 2012-04-11 06:55:47

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

The vector is inputted by the user it contains the constants and the value to be fit.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #143 2012-04-11 06:57:34

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,030

### Re: PSLQ and LLL?

hi bobbym

And 'dig' is the number of digits of what?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #144 2012-04-11 06:59:41

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

For the PSLQ you have your constants, like 5, pi, sqrt(3), e and you have the value you want to determine to some amount of digits.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #145 2012-04-11 07:01:11

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,030

### Re: PSLQ and LLL?

Oh,ok.

So what is multiplied by 10^dig?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #146 2012-04-11 07:10:23

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

The vector of constants and the number.

That is easy, the problem is there does not seem to be a lattice reduce. This is the heart of the algorithm.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #147 2012-04-11 07:12:33

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,030

### Re: PSLQ and LLL?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #148 2012-04-11 07:21:13

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

Yes, I have already been looking at that. It is written in Lisp, which I have entirely forgotten. The chances of getting that to work are one in ten thousand.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #149 2012-04-11 07:22:54

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,030

### Re: PSLQ and LLL?

But,if we don't get to the lattice reduce part,there is no point in being able to do the lattice reduce part.

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #150 2012-04-11 07:26:56

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 108,666

### Re: PSLQ and LLL?

All the rest of my function is simple almost cosmetic. I could get around all of it one way or another. The lattice reduce is the actual algorithm.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline