One thing I noticed a few years ago but never wrote about it: Some sequences of numbers might be interpreted differently (increasing instead of decreasing) if you cover some of the segments up!
<a href="https://imgur.com/a/B2LZjqC" rel="nofollow">https://imgur.com/a/B2LZjqC</a><p>That happens when viewing off-axis some of the traffic lights that have a weather shield, like this:
<a href="https://upload.wikimedia.org/wikipedia/commons/3/3a/Semaforo_de_Avenida_Pueyrredon.JPG" rel="nofollow">https://upload.wikimedia.org/wikipedia/commons/3/3a/Semaforo...</a>
I can't help but feel bothered by the fact that the author didn't use the standard 7-segment display nomenclature/order for the segments (a-f clockwise starting from the top, middle is g) :-)<p>Another thing to note is that there isn't one standard 7-segment display font; in fact, whole papers have been written on the "optimal" font. The differences are the extra serifs that are optional on 7, 9, 6. It would be interesting to add this variability to the problem, where you don't know exactly what variant the clock is using.
Slightly tangential thing I learned: Have you ever wondered why VCR clocks always showed 12:00 and were never set[0]?<p>It's because people simply didn't bother set the time on the VCR. I learned this from Mikko Hyppönen when he was telling us that people never change the default password on their IOT devices allowing hackers to access the devices and probably use the devices for cryptocurrency mining or launching a DDoS attack.<p>[0] <a href="https://www.reddit.com/r/AskReddit/comments/3a06hk/were_vcr_clocks_actually_very_difficult_to_set/" rel="nofollow">https://www.reddit.com/r/AskReddit/comments/3a06hk/were_vcr_...</a>
That is assuming 6 segments for “6” and 5 for “9”. It is most common to use 6 for “9” also. Does it change the answer if the clock does that? How about if it uses 5 for both? Or 5 for “6” and 6 for “9”?<p>I think every display I’ve checked either uses 5 for both or 6 for both. I don’t recall ever seeing them mixed.<p>“7” also varies, using 3 segments most commonly but sometimes 4.
This reminds me of Peter Norvig's Sudoku solver: <a href="https://norvig.com/sudoku.html" rel="nofollow">https://norvig.com/sudoku.html</a>
Also check out z3 library for solving constraint satisfaction problems.<p>Python binding examples (<a href="https://ericpony.github.io/z3py-tutorial/guide-examples.htm" rel="nofollow">https://ericpony.github.io/z3py-tutorial/guide-examples.htm</a>) has really cool similar problems and solutions.