[Wellington-pm] SEND + MORE = MONEY
Malcolm.Allison at computerland.co.nz
Wed Mar 2 20:58:44 PST 2005
so $a + $a == 1 if $a != $a?
this seems a little like cheating to me ;)
Enterprise Systems Management Bureau
From: wellington-pm-bounces at pm.org [mailto:wellington-pm-bounces at pm.org]
On Behalf Of Ewen McNeill
Sent: Thursday, 3 March 2005 5:55 p.m.
To: Wellington Perl Mongers (Perl user group)
Subject: Re: [Wellington-pm] SEND + MORE = MONEY
In message <422694C1.7010600 at vilain.net>, Sam Vilain writes:
> use Quantum::Superpositions;
> my $a = any(1,0);
> print ($a + $a == 1); # prints 1, actually impossible
> print (2 * $a == 1); # prints any() (ie, none)
$a + $a == 1 is possible if the first $a is taken as 1, and the second
$a is taken as 0 (or vice versa). Where as there is no value in $a
which can be multiplied by 2 and yeild 1 (you get 2 or 0).
Seems to me that it's working the way that it should there.
So your solution using Quantum::Superpositions may well work. Just be
prepared for it to take a while. (Some of my early test runs of my
brute force method took around 12 minutes; a bit of tuning got that down
to the 4 minutes something that I posted.)
Wellington-pm mailing list
Wellington-pm at pm.org
More information about the Wellington-pm