Re: integer solutions
- To: mathgroup at smc.vnet.net
- Subject: [mg30644] Re: [mg30635] integer solutions
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Sat, 1 Sep 2001 01:08:16 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
As long as the modulus is not very large the simplest thing to do is to
use Solve. For example, in your case
DeleteCases[
({x -> #1, Solve[{y^2 == #1^3 - 2*#1 + 1, Modulus == 12}, y, Mode ->
Modular]} & ) /@ Range[12] /. {Modulus -> 12, z_} -> z, {z_, {}},
Infinity]
Out[1]=
{{x -> 1, {y -> 0, y -> 6}}, {x -> 4, {y -> 3, y -> 9}},
{x -> 6, {y -> 1, y -> 5, y -> 7, y -> 11}},
{x -> 9, {y -> 2, y -> 4, y -> 8, y -> 10}},
{x -> 10, {y -> 3, y -> 9}},
{x -> 12, {y -> 1, y -> 5, y -> 7, y -> 11}}}
Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/
On Saturday, September 1, 2001, at 08:58 AM, Adrian Spalka wrote:
> hi,
>
> how can i tell mathematica to compute all solutions of an equation in
> two
> variables in Fp?
>
> eg, to compute all solutions of
>
> y^2=x^3-2*x+1 in F13, ie with x,y in [0,...,12]
>
> thanks.
>
> adrian
>
>
>
>
>
>