The Architecture of Constraints
A Combinatorial Journey
Welcome, future engineer. Today, we are not just solving a problem; we are building a machine. Combinatorics is often misunderstood as a game of guessing or tedious listing.
But at the JEE Advanced level, it is about identifying the hidden structure—the 'DNA'—of a sequence. We are looking at n-digit integers formed by 0 and 1, with the strict constraint that no two zeros can stand side-by-side. This is a classic problem, and I want you to see the elegance behind the math.
Phase 1
The Anatomy of the Problem
Imagine you are standing at the end of an n-digit number. You have two choices for the last digit: it is either a 1 or a 0. This binary choice is the key to everything.
Let an be the total number of valid n-digit integers. We can partition this set into two mutually exclusive groups:
1. Those ending in 1 (let's call this count bn).
2. Those ending in 0 (let's call this count cn).
Naturally, the total is an=bn+cn. This is our foundation. Now, let us analyze the behavior of these groups. This is where the magic happens.
Phase 2
The State Transition
Consider the group bn (numbers ending in 1). If the last digit is 1, does it restrict the digit before it? Absolutely not. The digit before it could be 0 or 1.
Because there is no restriction, the first (n−1) digits can be any valid (n−1)-digit integer. Therefore, the number of ways to form a valid n-digit integer ending in 1 is exactly the same as the number of ways to form a valid (n−1)-digit integer. Mathematically, we write this as:
Now, consider the group cn (numbers ending in 0). This is where the constraint bites. If the last digit is 0, the digit immediately preceding it must be 1 to avoid the forbidden '00' sequence.
So, the last two digits are fixed as '10'. What about the remaining (n−2) digits? They can be any valid (n−2)-digit integer. Thus, the number of valid integers ending in 0 is exactly the number of valid integers of length (n−2). We arrive at:
Phase 3
The Fibonacci Emergence
We have our two pillars: bn=an−1 and cn=an−2. Substituting these into our total sum equation, an=bn+cn, we get the beautiful recurrence relation:
This is the Fibonacci recurrence! It appears here not by coincidence, but because the constraints of the problem naturally partition the set into the previous two states. This relation holds for all n≥3.
Phase 4
The Calculation
To solve for specific values, we need our base cases. For n=1, the only valid integer is 1, so a1=1. For n=2, the valid integers are 10 and 11, so a2=2.
Now, we can climb the ladder:
a3=a2+a1=2+1=3
a4=a3+a2=3+2=5
a5=a4+a3=5+3=8
a6=a5+a4=8+5=13
The question asks for b6. We know b6=a5. Looking at our sequence, a5=8. Therefore, b6=8.
Final Reflection
When you look at the second part of the question, asking about a17, you don't need to calculate it. You simply recognize the recurrence relation a17=a16+a15.
Do you see the beauty here? We didn't brute-force the counting. We didn't list thousands of numbers. We understood the rules of the system, translated them into a mathematical recurrence, and let the logic do the heavy lifting. This is the mindset of a JEE Advanced topper.