US Trends

how many bit strings of length 10 contain five consecutive 0 ’s or five consecutive 1 ’s ?

There are 222 bit strings of length 10 that contain five consecutive 0's or five consecutive 1's.

This classic combinatorics problem uses inclusion-exclusion to count the strings without overcounting overlaps.

Strings with Five Consecutive 0's

The block of five 0's can start at positions 1 through 6:

  • Position 1: 00000xxxxx (32 strings, x=anything)
  • Position 2: 100000xxx (16 strings)
  • Position 3: x100000xx (16, but first must avoid prior block)
  • Positions 4-6: Similarly 16 each

Total: 32 + 16×5 = 112 strings.

Strings with Five Consecutive 1's

By symmetry, also 112 strings.

Overlap Adjustment

Subtract strings with both (e.g., 1111100000 and 0000011111): 2 strings.

Total: 112 + 112 - 2 = 222.

TL;DR: 222 bit strings qualify.

Information gathered from public forums or data available on the internet and portrayed here.