Re: Re: polynomial congruence
- To: mathgroup at smc.vnet.net
- Subject: [mg26196] Re: [mg26145] Re: [mg26138] polynomial congruence
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Thu, 30 Nov 2000 22:02:13 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Yes, that was a case of carelessness followed by thoughtlessness. What I
meant was (of course):
f[x_, y_] := x^2 + y^2 - 25
Table[Solve[{f[x, y] == 0, Modulus == 11}, x], {y, 0, 10}]
Out[4]=
{{{Modulus -> 11, x -> 5}, {Modulus -> 11, x -> 6}}, {}, {}, {{Modulus ->
11, x -> 4}, {Modulus -> 11, x -> 7}}, {{Modulus -> 11, x -> 3}, {Modulus ->
11, x -> 8}}, {{Modulus -> 11, x -> 0}, {Modulus -> 11, x -> 0}}, {{Modulus
-> 11, x -> 0}, {Modulus -> 11, x -> 0}}, {{Modulus -> 11, x -> 3}, {Modulus
-> 11, x -> 8}}, {{Modulus -> 11, x -> 4}, {Modulus -> 11, x -> 7}}, {}, {}}
I then wanted to get rid of the irritating Modulus->11, and the rest was
just as I wrote above.
What I meant to do was something like:
In[5]:=
DeleteCases[%, Rule[Modulus, _], Infinity]
Out[5]=
{{{x -> 5}, {x -> 6}}, {}, {}, {{x -> 4}, {x -> 7}}, {{x -> 3}, {x ->
8}}, {{x -> 0}, {x -> 0}}, {{x -> 0}, {x -> 0}}, {{x -> 3}, {x ->
8}}, {{x -> 4}, {x -> 7}}, {}, {}}
Andrzej
on 00.12.1 2:02 AM, Daniel Lichtblau at danl at wolfram.com wrote:
> Andrzej Kozlowski wrote:
>>
>> As long as p is not very large it is easy to do. For example, suppopse you
>> want to solve all the congruences
>>
>> In[1]:=
>> f[x_, y_] := x^2 + y^2 - 25
>>
>> In[2]:=
>> Table[Solve[{f[x, y] == 0, Modulus == 11}[[1]], x], {y, 0, 10}]
>>
>> Out[3]=
>> {{{x -> -5}, {x -> 5}}, {{x -> -2 Sqrt[6]},
>>
>> {x -> 2 Sqrt[6]}}, {{x -> -Sqrt[21]}, {x -> Sqrt[21]}},
>>
>> {{x -> -4}, {x -> 4}}, {{x -> -3}, {x -> 3}},
>>
>> {{x -> 0}, {x -> 0}}, {{x -> -I Sqrt[11]},
>>
>> {x -> I Sqrt[11]}}, {{x -> -2 I Sqrt[6]},
>>
>> {x -> 2 I Sqrt[6]}}, {{x -> -I Sqrt[39]},
>>
>> {x -> I Sqrt[39]}}, {{x -> -2 I Sqrt[14]},
>>
>> {x -> 2 I Sqrt[14]}},
>>
>> {{x -> -5 I Sqrt[3]}, {x -> 5 I Sqrt[3]}}}
>>
>> Note that these answers really lie in the algebraic closure of the finite
>> filed Z/11.
>>
>> on 11/28/00 3:56 PM, Constantinos Draziotis at roth at math.auth.gr wrote:
>>
>>>
>>> Hello,i am a new user of mathematica,i will appreciate very much if you
>>> can help me with this(it seems simple) problem:i want to solve a
>>> polynomial congruence modulo prime number i.e f(x,y)=0modulo(p)(prime
>>> number) with y=0,1,2,3...,n (n:integer).i have to find the classes
>>> xmodulo(p)
>>>
>>> thanks for your time
>>>
>>> Costas
>>>
>
> Your mislocated ...[[1]] messed this up.
>
> We used to return "radical" solutions for modular equations, but that
> was fixed years ago, I think in version 2.2.
>
> Daniel
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/
http://sigma.tuins.ac.jp/