Skip to content
Quantoros

Count nine-bit strings with exactly five ones that start with 101 or end with 11, with inclusive or.

Quant ResearchLevel: IntermediateOverlapping string restrictions

Count nine-bit strings with exactly five ones that start with 101 or end with 11, with inclusive or.

Hints
  • Count prefix and suffix cases separately.
  • Then count strings satisfying both restrictions.

Answer

Prefix condition leaves three ones in six places: C(6,3)=20. Suffix condition leaves three in seven: C(7,3)=35. Both fix four ones in five positions, leaving one in four: 4. Total 20+35-4=51.

Source and licence: Oscar Levin — Discrete Mathematics: An Open Introduction, 3rd edition · CC-BY-SA-4.0 · answer: Quantoros editorial

Related questions