[Tutor] How to solve it ...
Tim Peters
tim.one@comcast.net
Tue Feb 18 14:13:02 2003
[Bob Gailer, to Gregor Lindl]
> Your original request was "Find the shortest complete code which
> opens the door with certainty, regardless of the original position of
> the four switches."
That appeared to be part of the translated problem statement. Gregor's
question was
How would you solve this with Python (- just for your amusement)?
> I submitted such a solution, but have had no comment back. Was I on the
> right track? What did you think of my solution?
You got the same result as the Python program I posted, so I can testify
that, right or wrong, they're on the same track <wink>. Up to D1=P1
equivalence (which you noted), there were no other codes of length <= 7 that
solved the problem. The interest isn't really in solving the problem,
though, it's in *how* the problem gets solved.