MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

LatticeReduce


Dear Mathematica Gurus,
I want to find such inetegrs x,y,z that
x + y*2^15 + z*3^8 = 0
I'm reading in manual that I can use LatticeReduce

{a0, a1, a2} = {1,
  2^15, -3^8}; a = {{1, 0, 0, -a0}, {0, 1, 0, -a1}, {0, 0,
   1, -a2}}; b = LatticeReduce[a]

Out1:{{1, 0, 0, -1}, {18, 1, 5, 19}, {117, -171, -854, 117}}

That mean that computer don't find such solution (solution is finded 
when last number in one of rows should be 0)

If I run again:
{a0, a1, a2} = {37,
  2^15, -3^8}; a = {{1, 0, 0, -a0}, {0, 1, 0, -a1}, {0, 0,
   1, -a2}}; b = LatticeReduce[a]

Out2:{{1, 1, 5, 0}, {1, 0, 0, -37}, {170, -7, -34, 12}}

Now solution is finded by Mathematica OK!
k = Transpose[{{37, 2^15, -3^8, anything}}]; b[[1]].k

Out3: {0}

Is OK!

Is another method finding coefficients x, y, z as LatticeReduce and why 
Mathematica don't reduced
{a0, a1, a2} = {1,  2^15, -3^8}; a = {{1, 0, 0, -a0}, {0, 1, 0, -a1}, 
{0, 0, 1, -a2}}; b = LatticeReduce[a]


Best wishes
Artur


  • Prev by Date: Re: Bug in DateString with TimeZone?
  • Next by Date: Re: Basic programming
  • Previous by thread: Basic programming
  • Next by thread: Re: Basic programming