Re: Implementation rest modulo 2 needed
- To: mathgroup at smc.vnet.net
- Subject: [mg93875] Re: Implementation rest modulo 2 needed
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Thu, 27 Nov 2008 05:34:05 -0500 (EST)
On 11/26/08 at 5:10 AM, grafix at csl.pl (Artur) wrote: >I want to construct algorhitm finding two divisors of numbers >(without FactorIneteger and with uses only Reduce, GroebnerBasis >etc.) >e.g. for divisors of number 15 in binary system these will be >Reduce[{x a == 1 && y a + x b == 1 && y b + x c == 1 && y c = == 1 && >x (x - 1) == 0 && y (y - 1) == 0 && c (c - 1) == 0 && b (b - 1= ) == 0 >&& a (a - 1) == 0}, {x, y, a, b, c}, Integers] You are making things more complex than necessary here. Doing Reduce[a b == 15, {a, b}, Integers] will return a list of all possible pairs of integers that when multiplied together will be 15. If you want this restricted to non-trivial positive solutions then Reduce[a b == 15 && a>1 && b>1, {a, b}, Integers] will work. Another alternative would be FindInstance[ a b == 15 && {a, b} \[Element] Integers && a > 1, {a, b}] However, it may well be using Reduce here simply masks an internal call to FactorInteger And using a different Mathematica function to solve a problem really isn't what I would refer to as constructing an algorithm. Why is it you don't want to use FactorInteger?