Let andenote the number of all n-digit positive integers formed by the...
Let andenote the number of all n-digit positive integers formed by the...
Solution:
Let us first find a recursive formula for a_n, the number of all n-digit positive integers formed by the digits 0, 1 or both such that no consecutive digits in them are 0.
Consider an (n+1)-digit integer formed by appending a digit to an n-digit integer. If the last digit of the n-digit integer is 1, then we can append either 0 or 1 to it. If the last digit of the n-digit integer is 0, then we can only append 1 to it. If the last digit of the n-digit integer is neither 0 nor 1, then we can append either 0 or 1 to it. Thus, we have
a_n+1 = a_n + b_n + c_n
where b_n is the number of n-digit integers ending with digit 1 and c_n is the number of n-digit integers ending with digit 0.
Now, let us find a recursive formula for b_n and c_n. Consider an (n+1)-digit integer ending with digit 1. If the second-to-last digit is 1, then we can append any of the three digits 0, 1, or 1 to it. If the second-to-last digit is 0, then we can only append 1 to it. If the second-to-last digit is neither 0 nor 1, then we can append any of the two digits 0 or 1 to it. Thus, we have
b_n+1 = a_n + b_n
Similarly, for c_n+1, we have
c_n+1 = a_n + c_n
Using these recursive formulas, we can compute b_6 and c_6 as follows:
a_1 = 2 (the two digits 0 and 1 are allowed)
b_1 = 1 (only the digit 1 is allowed)
c_1 = 1 (only the digit 0 is allowed)
a_2 = 3 (the three digits 00, 01, and 10 are allowed)
b_2 = 1 (only the digit 1 can follow 1)
c_2 = 1 (only the digit 0 can follow 10)
a_3 = 5 (the five digits 000, 001, 010, 100, and 101 are allowed)
b_3 = 2 (the digits 11 and 101 are allowed)
c_3 = 2 (the digits 00 and 100 are allowed)
a_4 = 9
b_4 = 4
c_4 = 4
a_5 = 16
b_5 = 7
c_5 = 9
a_6 = 28
b_6 = 8
c_6 = 13
Therefore, the number of 6-digit integers ending with digit 1 is b_6 = 8. The correct answer is option B.
To make sure you are not studying endlessly, EduRev has designed JEE study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in JEE.