develooper Front page | perl.fwp | Postings from July 2003

Was Fun - Each character at most once

Thread Previous | Thread Next
Adam Rice
July 25, 2003 11:25
Was Fun - Each character at most once
Message ID:
Quoting A. Pagaltzis (
> I don't see the problem. You have 36 (or 120) pairs or encoded
> characters to allocate, and up to that many input characters.
> Looks like just one straightforward mapping.

The problem is that there are 371993326789901217467999448150835200000000
possible arrangements of the 36 characters. If most of those work then you'll
find one pretty quickly, but if there's only one solution, it'll take
something like a million million million million years to find it with a brute
force approach. I've thought of some ways of making a brute-force approach a
bit smarter and reduce the search space a bit, but I haven't found a quick way
of determining if there's a solution or not. For now, the only way to
determine that something like


is unencodable is to try every possible arrangement of characters.


Adam Rice -- -- Blackburn, Lancashire, England

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About