CalcWorldHub
Free online calculator · no signup

Binary strings without adjacent ones calculator

Count fixed-length binary strings that contain no pair of consecutive 1 digits.

Binary strings without adjacent ones calculator — String length n (0–75) and calculation method
Binary strings without adjacent ones calculator: inputs and calculation method.

How to use this calculator

Count fixed-length binary strings that contain no pair of consecutive 1 digits.

  1. Enter String length n (0–75). Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

How Binary strings without adjacent ones calculator works

Count fixed-length binary strings that contain no pair of consecutive 1 digits.

Inputs and units

  • String length n (0–75): Enter a whole-number length from 0 through 75; leading zeros are allowed and distinct strings count separately.

Formula and method

aₙ = aₙ₋₁ + aₙ₋₂ with a₀=1, a₁=2; equivalently aₙ=Fₙ₊₂

Worked example

For length 4, the valid strings are 0000, 0001, 0010, 0100, 0101, 1000, 1001, and 1010: 8 strings.

Interpreting the result

The result counts strings, not probabilities. If every length-n binary string were equally likely, divide this count by 2ⁿ for the probability of no adjacent ones.

Assumptions and limits

Counts labeled bit positions and permits leading zeroes. It does not count binary numerals after removing leading zeroes; the configured maximum keeps exact integer arithmetic within the implementation's supported range.

Sources and method

Frequently asked questions

Why are there 8 valid strings of length 4?

The recurrence splits strings by whether they start with 0 or 10, giving a sum of the two previous counts.

Does length zero have one valid string?

Yes. There is one empty string, so the count is 1.

How do I use the Binary strings without adjacent ones calculator?

Enter String length n (0–75). Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Binary strings without adjacent ones?

For length 4, the valid strings are 0000, 0001, 0010, 0100, 0101, 1000, 1001, and 1010: 8 strings.

What does the Binary strings without adjacent ones calculator calculate?

Count fixed-length binary strings that contain no pair of consecutive 1 digits.

Related calculators