War Dialling ?
When a few people in IRC noticed Daniel Silverstone’s post about his new phone number, that started a whole conversation regarding whether his number crunching alogorithm was good enough.
I made a lovely script in PHP, which told me the numbers that it could have been.
There are 67786 combinations that it could be, it took me about 27 seconds to find that once I’d written and debugged the code.
It’s an interesting puzzle, so if you’re bored, why not write some code and see whether you can get the same answer?
January 7th, 2008 at 9:17 pm
There’s a ton more of these types of problems at Project Euler. I’ve started on them recently, and I’m not sure if it’s that they’re just problems 7 years old but they don’t yet seem to need intelligent programming to solve. The hardest one so far was the one where I tried using a big int library, and wound up just using 64 bit arithmatic.
January 7th, 2008 at 11:04 pm
I also wrote a small PHP script.
I assume that the second number (of 4 digits) must be greater than 724 (724 are added), the first digit of the second number must be 0 or 1 because 8000 are subtracted and the STD is 0161 so the first part of the checksum is 8.
With these assumptions there are only 4077 possible numbers that could be correct (checksum must be 29-8=21).
January 8th, 2008 at 5:35 pm
I haven’t tried this, but what about the constraint that the first number must be >= 27? You didn’t mention that one, Nils, but I’m guessing you included it.