[Haskell-cafe] About Fibonacci again...
Thomas Schilling
nominolo at googlemail.com
Thu Nov 8 09:02:05 EST 2007
On Thu, 2007-11-08 at 00:56 +0100, jerzy.karczmarczuk at info.unicaen.fr
wrote:
> Don't shoot me...
>
> The last exchange with Andrew Bromage made me recall a homework which was
> given to some students by a particularly nasty teacher I happen to know.
>
> The question is to generate the whole infinite Rabbit Sequence in one
> shot (co-recursive, selbstverständlich).
>
> The Rabbit Sequence:
> 1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,1,1,0,...
> may be obtained in two ways.
>
> A.
> 1. Begin with one *young* rabbit: 0.
> 2. In one unit of time a young rabbit grows, becomes *old*: 1.
> 3. In one unit of time an old rabbit has an offspring, transmutes into [1,0]
> (Yes, the rewriting order is meaningful).
Don't rabbits ever die?
Guess they just become zombie rabbits ... [1]
But that still doesn't work, because those would then eat all those
other rabbits ...
Hm ...
[1] ..
http://www.ebsqart.com/Artists/cmd_3739_profile_portfolio__3_3_G.htm
More information about the Haskell-Cafe
mailing list