Loading ...
Sorry, an error occurred while loading the content.

14938Re: Boolean algebra solver?

Expand Messages
  • Ron
    Jun 4, 2004
    • 0 Attachment
      --- In primenumbers@yahoogroups.com, Edwin Clark <eclark@m...> wrote:
      >
      > Actually one can solve the system eqn with Maple (in two ways):
      >

      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      Very perceptive Edwin. I didn't know we had any Maple users
      in this group. You are correct that if you copy/paste the
      following lines into a Maple worksheet:

      c1:=a1*b1:
      c2:=(a2+a1*b1+b2)*c1+1+(a2*a1*b1+1)*(a2*b2+1)*(a1*b1*b2+1):
      c3:=(a2+a1*b1+b2)*c1*(1+(a2*a1*b1+1)*(a2*b2+1)*(a1*b1*b2+1)):
      c4:=1+(a2*b1*a1*b2+1)*(a2*b1*c2+1)*(a1*b2*c2+1):
      c5:=1+(a2*b2*c3+1)*(a2*b2*c4+1)*(c3*c4+1):
      eqn := {a1+b1 = 1,
      a2+a1*b1+b2+c1 = 1,
      a2*b1+a1*b2+c2 = 1,
      a2*b2+c3+c4 = 0,
      c5 = 0}:
      Sol:=msolve(eqn,2);

      Maple provides the solutions immediately:
      Sol := {a1 = 0, b1 = 1, a2 = 1, b2 = 0},
      {a1 = 1, b1 = 0, a2 = 0, b2 = 1}

      I should have used "msolve()" in my example instead of
      "solve()." *However*, if you use the actual RSA-640 carry
      definitions and equations (all 135MB of them!) instead of the
      equations in this simple example, Maple's "msolve()" also fails.
      If you don't include the carry definitions it fails immediately,
      and if you include them it runs for awhile (hours) and then
      terminates with an "Out of Memory" error while trying to expand
      the carry definitions (if I recall correctly). If anyone wants
      to try it themselves, you can download the carry definition file
      (Carries.txt) and the equation file (equ.dat) as a single gzipped
      tar file from:
      http://snipurl.com/6uqu/rsa640.tar.gz

      or as a Windows ZIP file from:
      http://snipurl.com/6uqu/rsa640.zip

      (They are both about 10MB in size)

      To have Maple try to solve them, paste the following
      into a Maple worksheet and execute it from the same directory
      you unzipped "equ.dat" and "Carries.txt" into:

      restart:
      print("Reading Equations");
      read "equ.dat":
      print("Reading Carries");
      read "Carries.txt":
      print("Solving");
      Sol:=msolve(equ,2);

      Maybe it will work on a computer that's faster than
      mine and has more RAM, but I doubt it. I have
      an Athlon 1.1 GHz AMD processor with 1 GB RAM.

      Ron Dotson
      6/04/2004


      -----BEGIN PGP SIGNATURE-----
      Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

      iQA/AwUBQMA8TRpqFjUCnHWBEQJCuACgiJx8iXGukS9pxZpbIsNBtwbRG5gAn29u
      PVyC48adMZA1O0PDOq7aJfFL
      =ulm/
      -----END PGP SIGNATURE-----
    • Show all 13 messages in this topic