MathGroup Archive 2005

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

Search the Archive

Re: Complete solution to a modular System of equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60479] Re: Complete solution to a modular System of equations
  • From: "Carl K. Woll" <carlw at u.washington.edu>
  • Date: Sat, 17 Sep 2005 02:32:06 -0400 (EDT)
  • Organization: University of Washington
  • References: <dgdvp1$1r5$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"mumat" <csarami at gmail.com> wrote in message 
news:dgdvp1$1r5$1 at smc.vnet.net...
> In coding theory one is intersted to find the dual code of a given
> code. To do this one has to solve a modular linear equation such as:
>
>
>
> eq = {a + b + d == 0, a + c + d == 0, b + c + d == 0}
>
> lhs = {{1, 1, 0, 1}, {1, 0, 1, 1}, {0, 1, 1, 1}}; rhs = {0, 0, 0};
>
> LinearSolve[lhs,{0,0,0},Modulus->2]
>
> Out[52]=
> {0,0,0,0}
>
> as you see it returns only one solution. How can I find all solutions.
> The number of solutions is a power of 2. For about example there is
> exacly one more solution which is
>
> {1,1,1,0}.
>
> Is there any function in Mathematica to do this? or I should start
> writing my own code?
>

Use Reduce:

In[11]:=
Reduce[{Mod[lhs . {a, b, c, d} - rhs, 2] == 0, 0 <= a < 2, 0 <= b < 2,
0 <= c < 2,
0 <= d < 2}, Integers]

Out[11]//OutputForm=
(a == 0 && b == 0 && c == 0 && d == 0) || (a == 1 && b == 1 && c == 1 && d 
== 0)

> thanks for your help in advance!
>
> regards,
>
> chekad
>

Carl Woll
Wolfram Research 



  • Prev by Date: Re: Complete solution to a modular System of equations
  • Next by Date: Re: Bug in Reduce?
  • Previous by thread: Re: Complete solution to a modular System of equations
  • Next by thread: NonlinearFit - Logistic Function-CalcCenter3