Total count of no-adjacent strings is fib(n+2)
ProvedNoAdjString.card_noAdjacentStringsbinary-stringscombinatoricsfibonacci
The total number of length- binary strings with no adjacent ones is the Fibonacci number
A valid string of length either ends in , leaving an arbitrary valid prefix of length , or ends in , leaving an arbitrary valid prefix of length . The bijection realizes exactly this recurrence, with base cases one string of length and two strings of length .
Preamble
import Definitions.Def_NoAdjacentGapEquiv import Mathlib.Data.Nat.Fib.Basic open Finset Function
Formal statement
namespace NoAdjString
theorem card_noAdjacentStrings (n : ℕ) :
(noAdjacentStrings n).card = Nat.fib (n + 2) := by sorry
end NoAdjStringSource
Kenneth H. Rosen, Discrete Mathematics and Its Applications, 8th ed., McGraw-Hill 2019. The no-consecutive-ones count is the worked example on bit strings without consecutive 1s in Section 8.1 (Applications of Recurrence Relations); the exact-k binomial count is the restricted-combinations (gap) argument of Chapter 6.