Art, the mail carrier delivers mail to the 19 houses on the east side of a street.
Art notices that:
(i) No two adjacent houses ever get mail on the same day, and:
(ii) There are never more than two houses in a row that get no mail on the same day.
How many distinct patterns of mail delivery are possible?
(In reply to re: a manual count solution
by Steve Herman)
Thanks for your correction.
However , the non-recursive method is generally superior to
Therefore , my amendment is as follows.
Lets denote by F(n) the number of qualifying sentences, terminating by 1 (which are easily calculated my way).
Then the total T requested for n houses is:
T=F(n) + F(n-1) + F(n-2)
(F17)= 49+37=86 CALCULATED MY WAY
you will clearly see the benefit , if the street is 119 houses long
(non computer comparison) or 4674689 houses long (computer runtime affected.)
Many sincere thanks for your comment