I encourage you to look through the full text to be able to easily follow along.
The definition of OMCOFs is phrased in quite a terse (though precise) way, but to put it simply there are no odd-length maximal substrings of just 1's.
I started by writing out this:
- H(0) = 1 {}
- H(1) = 1 {0}
- H(2) = 2 {00, 11}
- H(3) = 3 {000, 110, 011}
- H(4) = 5 {0000, 1100, 0110, 0011, 1111}
- H(5) = 8 {00000, 11000, 01100, 00110, 00011, 11110, 11011, 01111}
I immediately saw the recurrence was Fibonacci in nature and wrote it out. But...then we had to explain why it was correct. Suddenly, chaos.
I stared at this sequence for 3 hours straight. I drew trees, tables, lots of arrows; the page borders were filled to the brim with 0s and 1s. I was a mess, and thoughts about getting a late penalty were rampant in my mind. I just couldn't see it, and except for the fact that my deadline was coming up, I loved every minute of it.
I find nothing in maths or computer science can be as exciting as that process of discovery associated with an unfamiliar problem, and nothing as exhilarating as finally reaching that elusive solution.
After about 2.5 hours, something clicked. I realized the recurrence I was using only depended on the previous two values, so my intuition led me to believe perhaps the set construction would work the same. At this point I suspect many readers should be able to see the pattern, but for some reason it didn't jump out at me until half an hour later in a whoosh of inspiration...followed by half an hour of berating myself for not seeing something so simple.
It was exactly like the postage stamps example we had done in class, the recursive aspect was just a dimension meant to throw you off. Just add a 0 to the set before and a 11 to the set before that!