I just solved it but continued to play around with it to see if I could reduce the runtime. Against my own intuition (or logic? because it must have been intuition that made me try), I arranged the attempts in descending order of correct digits. This reduced the runtime by a factor of (almost) 10! From 2.67s to 275ms.
It would seem to me that 3 attempts with one correct digit each give you more information that helps reduce search space than one attempt with 3 correct digits. Can someone PM me and help me understand this 'paradox'? I'll use the discussion to write a detailed post on the Problem's Forum.
Problem 185
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
In particular don't post any code fragments or results.
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
-
enigmaticcam
- Posts: 16
- Joined: Wed Sep 30, 2015 12:07 am
Re: Problem 185
Gene, if you're still looking at this problem 6 years later
, I think the reason is that if there is just one correct digit, then there are only 16 possibilities. However, if there are three correct digits, then there are 560 possibilities. So by starting your tree at the top with the minimal amount of branches, your depth search is much lower. That's my guess anyways.
