MathGroup Archive 2007

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

Search the Archive

Re: Is this the best way to Solve the Katsura 6 problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73945] Re: [mg73878] Is this the best way to Solve the Katsura 6 problem
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Sat, 3 Mar 2007 01:15:39 -0500 (EST)
  • References: <200703021140.GAA03968@smc.vnet.net>

Raj wrote:
> hi!
> 
> Could somebody tell me if this is the best way to solve the Katsura 6
> problem:
> 
> NSolve[{x1 + 2x2 + 2x3 + 2x4 + 2x5 + 2x6 + 2x7 - 1   ,
>     2x4 x3 + 2x5 x2 + 2x6 x1 + 2x7 x2 - x6   ,
>     x3^2 + 2x4 x2 + 2x5 x1 + 2x6 x2 + 2x7 x3 - x5   ,
>     2x3 x2 + 2x4 x1 + 2x5 x2 + 2x6 x3 + 2x7 x4 - x4   ,
>     x2^2 + 2x3 x1 + 2 x4 x2 + 2 x5 x3 + 2 x6 x4 + 2 x7 x5 - x3   ,
>     2 x2 x1 + 2 x3 x2 + 2 x4 x3 + 2 x5 x4 + 2 x6 x5 + 2 x7 x6 - x2   ,
>     x1^2 + 2 x^2 + 2 x3^2 + 2 x4^2 + 2 x5^2 + 2 x6^2 + 2 x7^2 - x1  },
> {x1,x2,x3,
> x4,x5,x6,x7}]
> 
> 
> Thanks,
> 
> Raj


For Mathematica I think it is about as good as one can do. Or rather it 
would be, if your input did not have a typo. In the last polynomial you 
have 2*x^2 instead of 2*x2^2. Below is the corrected version.

polys = {-1 + x1 + 2*x2 + 2*x3 + 2*x4 + 2*x5 + 2*x6 + 2*x7,
   2*x3*x4 + 2*x2*x5 - x6 + 2*x1*x6 + 2*x2*x7,
   x3^2 + 2*x2*x4 - x5 + 2*x1*x5 + 2*x2*x6 + 2*x3*x7,
   2*x2*x3 - x4 + 2*x1*x4 + 2*x2*x5 + 2*x3*x6 + 2*x4*x7,
   x2^2 - x3 + 2*x1*x3 + 2*x2*x4 + 2*x3*x5 + 2*x4*x6 + 2*x5*x7,
   -x2 + 2*x1*x2 + 2*x2*x3 + 2*x3*x4 + 2*x4*x5 + 2*x5*x6 + 2*x6*x7,
   2*x2^2 - x1 + x1^2 + 2*x3^2 + 2*x4^2 + 2*x5^2 + 2*x6^2 + 2*x7^2};
vars = {x1, x2, x3, x4, x5, x6, x7};

In[16]:= Timing[soln = NSolve[polys, vars];]
Out[16]= {3.35, Null}

In[17]:= InputForm[Max[Abs[polys /. soln]]]
Out[17]//InputForm= 6.652497580583727*^-10

Residuals are less than 10^(-9), which seems fairly good.


Daniel Lichtblau
Wolfram Research



  • Prev by Date: RE: Interrupt Service Routines in Mathematica v.5.2?
  • Next by Date: Re: Re: Limit of Floor function
  • Previous by thread: Is this the best way to Solve the Katsura 6 problem
  • Next by thread: Re: Is this the best way to Solve the Katsura 6 problem