McCulloch's second machinedef mcculloch(digits):
Esoteric programming languages should be appreciated as works of conceptual performance art. These tar pits are not designed to serve as practical programming tools, but to demonstrate in atongue-in-cheek manner how some deceptively simple mechanism (well, merely disguised as simple, the complexity naturally emerging organically from its simple rules) unexpectedly grants itswielder the powers of universal computation. Introduced by Raymond Smullyan in one of his clandestine brain teasers on logic and computability, McCulloch's second machine is a stringrewriting system that receives a string of digits between one and nine. The rewrite rule applied to the rest of the digits (denoted below by X) depends on the first digit. Notice how rule for the leading digit 2 is applied to X itself, whereas rules for the leading digits 3 to 5 are applied toY=mcculloch(X). This function should return None whenever X or Y is None.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here