in reply to Coming soon: Algorithm::Loops
But 3 has no inverse mod 9 because of the common factor, so it's impossible with 3 permutations.(3*($x+$y+$z) % 9) == 5
6 is impossible because of the common factor. For any given $x, $y you can calculate what $z would have to be (or eliminate it if it's a duplicate of the others). That should cut down your search space by a lot.if (4*($x+$y+$z) % 9) == 5 then ($x+$y+$z) % 9 = 8 if (5*($x+$y+$z) % 9) == 5 then ($x+$y+$z) % 9 = 1 if (7*($x+$y+$z) % 9) == 5 then ($x+$y+$z) % 9 = 2
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Coming soon: Algorithm::Loops (analysis)
by tye (Sage) on Apr 12, 2003 at 06:50 UTC |