Re: modulo solving lacking domain?
- To: mathgroup at smc.vnet.net
- Subject: [mg126860] Re: modulo solving lacking domain?
- From: Andrzej Kozlowski <akozlowski at gmail.com>
- Date: Thu, 14 Jun 2012 05:29:52 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201206120659.CAA25892@smc.vnet.net> <C49675CE-DFFB-4759-A1FC-F853D06D2456@mimuw.edu.pl> <4FD7DD77.6040101@eecs.berkeley.edu> <88093364-D782-410D-8920-E66714C94086@gmail.com> <4FD8A1D4.2030201@eecs.berkeley.edu>
On 13 Jun 2012, at 15:21, Richard Fateman wrote: > The argument you are presenting is that Modulus-> ... in Solve changes > not the method of computation but the domain for the answer. Since the answer > exists outside the Solve and is not marked as a "modular" solution only, > it is a potential troublespot, though I understand the rationale. > > It is more like > (context: Change semantics to assume all integers are to be treated mod N; > consider a*x=b, solve for x. restore context returning the integer x). > > and what I want is > > Solve (Mod(a*x-b,N)==0 ,x) which Mathematica 8 refuses to do. But Mathematica does not "refuse" to do it - you are just using the wrong approach. Reduce[12*n - 8 == 20*k, {k, n}, Integers] Element[C[1], Integers] && k == 3*C[1] + 2 && n == 5*C[1] + 4 The condition on k can be ignored: it only tells you additional information. The answer is the same as the one you wanted but now you do get the Element[=85.] thing. Andrzej Kozlowski
- References:
- modulo solving lacking domain?
- From: Richard Fateman <fateman@cs.berkeley.edu>
- modulo solving lacking domain?