in reply to Improving Evolutionary Algorithm

I sat down to try and write a program to solve this and ended up with this:

Starting with ? "0" ? "1" ? "2" ? "3" ? "4" ? "5" ? "6" ? "7" ? "8" ? "9" All the counts must be at least 1 1 "0" 1 "1" 1 "2" 1 "3" 1 "4" 1 "5" 1 "6" 1 "7" 1 "8" 1 "9" which makes the 1-count 11 1 "0" 11 "1" 1 "2" 1 "3" 1 "4" 1 "5" 1 "6" 1 "7" 1 "8" 1 "9" but that means an extra 1 so 1-count becomes 12, which makes the 2-count becomes 2 (which would then become 3 except that we have lost a 1) and the 1-count drops back to 11 1 "0" 11 "1" 2 "2" 1 "3" 1 "4" 1 "5" 1 "6" 1 "7" 1 "8" 1 "9"

And I have a solution. Is it the only one?


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Timing (and a little luck) are everything!

Replies are listed 'Best First'.
Re: Re: Improving Evolutionary Algorithm (no code?(spoiler))
by jweed (Chaplain) on Feb 21, 2004 at 04:08 UTC
    Hofstadter's Metamagical Themas contends that there are 2 solutions.

    Oddly enough, I came across a similar problem in a Lewis Carrol puzzle book. It was phrased as follows:

    _____________________ |0|1|2|3|4|5|6|7|8|9| --------------------- |_|_|_|_|_|_|_|_|_|_|
    The trick was to self-document the bottom row with one digit in each box. That is, the top row wasn't included in the count. The reason I bring this up is that your use of 12 seemed to rub me the wrong way (I like the idea of just single digits in each case). Whether such a solution exists for the Hofstadter variant (that is, where the top row is counted as well) is conditional on one of our programs finding the other solution.



    Code is (almost) always untested.
    http://www.justicepoetic.net/