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

Login

Username

Password

Not registered yet?

#126 2012-04-12 01:00:42

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#127 2012-04-12 01:06:44

anonimnystefy
Real Member

Offline

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.


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#128 2012-04-12 01:09:36

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#129 2012-04-12 01:12:58

bobbym
Administrator

Offline

Re: PSLQ and LLL?

Code:

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#130 2012-04-12 01:16:12

anonimnystefy
Real Member

Offline

Re: PSLQ and LLL?

Hi bobbym

Should the function append it on the right or down?


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#131 2012-04-12 01:29:33

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#132 2012-04-12 01:41:51

anonimnystefy
Real Member

Offline

Re: PSLQ and LLL?

Ok.I found the Transpose.What is Rationalize?


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#133 2012-04-12 03:54:52

bobbym
Administrator

Offline

Re: PSLQ and LLL?

Maxima has a rationalize command.


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#134 2012-04-12 03:59:36

anonimnystefy
Real Member

Offline

Re: PSLQ and LLL?

Ok.Let's go step by step.

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


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#135 2012-04-12 04:05:03

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#136 2012-04-12 04:08:45

anonimnystefy
Real Member

Offline

Re: PSLQ and LLL?

And what is N[l,dig]?


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#137 2012-04-12 04:10:41

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#138 2012-04-12 04:15:28

bobbym
Administrator

Offline

Re: PSLQ and LLL?

Code:

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#139 2012-04-12 04:17:18

anonimnystefy
Real Member

Offline

Re: PSLQ and LLL?

hi bobbym

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


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#140 2012-04-12 04:22:57

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#141 2012-04-12 04:51:09

anonimnystefy
Real Member

Offline

Re: PSLQ and LLL?

What is that vector? I am confused.

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


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#142 2012-04-12 04:55:47

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#143 2012-04-12 04:57:34

anonimnystefy
Real Member

Offline

Re: PSLQ and LLL?

hi bobbym

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


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#144 2012-04-12 04:59:41

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#145 2012-04-12 05:01:11

anonimnystefy
Real Member

Offline

Re: PSLQ and LLL?

Oh,ok.

So what is multiplied by 10^dig?


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#146 2012-04-12 05:10:23

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#147 2012-04-12 05:12:33

anonimnystefy
Real Member

Offline

Re: PSLQ and LLL?


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#148 2012-04-12 05:21:13

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#149 2012-04-12 05:22:54

anonimnystefy
Real Member

Offline

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.


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#150 2012-04-12 05:26:56

bobbym
Administrator

Offline

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Board footer

Powered by FluxBB