Click to Chat
1800-2000-838
+91-120-4616500
CART 0
Use Coupon: CART20 and get 20% off on all online Study Material
Welcome User
OR
LOGIN
Complete Your Registration (Step 2 of 2 )
How many Number of 7digit natural number in which both 2&3 are present as digits if no 2`s are consecutive in any number?
Dear student I’ll presume you mean 7-digit natural numbers with only 2s and 3s, but with no 2s adjacent to each other.For example, 2323232 would be fine, but 3223332 would not be.One way to do this is with a recurrence relation.Let A(n) = the number of n-digit natural numbers with only 2s and 3s, but with no 2s adjacent to each other.Consider the last digit. Either it’s a 2 or a 3. If it’s a 3, then the first n-1 digits can be any valid number, because any valid number followed by a 3 is valid. By definition, there are A(n-1) of these.But the last digit could also be a 2. In this case, the n-1 digit could not be a 2, otherwise you’d have two 2s together. So the n-1 digit must be a 3. Now, the first n-2 digits can be any valid number. By definition, there are A(n-2) of these.So this gives us the recurrence relation A(n) = A(n-1) + A(n-2). We’ll need two boundary conditions, since this is a 2nd order recurrence relation.A(1) = 2, because either 2 or 3 is valid. A(2) = 3 because 23, 32, and 33 are valid 2-digit numbers.Now we can use these to compute A(7), which is what we want. So:A(3) = A(2) + A(1) = 3 + 2 = 5A(4) = A(3) + A(2) = 5 + 3 = 8A(5) = A(4) + A(3) = 8 + 5 = 13A(6) = A(5) + A(4) = 13 + 8 = 21 and finallyA(7) = A(6) + A(5) = 21 + 13 = 34And that’s our answer. RegardsArun (askIITians forum expert)
Dear student
I’ll presume you mean 7-digit natural numbers with only 2s and 3s, but with no 2s adjacent to each other.
For example, 2323232 would be fine, but 3223332 would not be.
One way to do this is with a recurrence relation.
Let A(n) = the number of n-digit natural numbers with only 2s and 3s, but with no 2s adjacent to each other.
Consider the last digit. Either it’s a 2 or a 3. If it’s a 3, then the first n-1 digits can be any valid number, because any valid number followed by a 3 is valid. By definition, there are A(n-1) of these.
But the last digit could also be a 2. In this case, the n-1 digit could not be a 2, otherwise you’d have two 2s together. So the n-1 digit must be a 3. Now, the first n-2 digits can be any valid number. By definition, there are A(n-2) of these.
So this gives us the recurrence relation A(n) = A(n-1) + A(n-2). We’ll need two boundary conditions, since this is a 2nd order recurrence relation.
A(1) = 2, because either 2 or 3 is valid. A(2) = 3 because 23, 32, and 33 are valid 2-digit numbers.
Now we can use these to compute A(7), which is what we want. So:
A(3) = A(2) + A(1) = 3 + 2 = 5
A(4) = A(3) + A(2) = 5 + 3 = 8
A(5) = A(4) + A(3) = 8 + 5 = 13
A(6) = A(5) + A(4) = 13 + 8 = 21 and finally
A(7) = A(6) + A(5) = 21 + 13 = 34
And that’s our answer.
Regards
Arun (askIITians forum expert)
Post Question
Dear , Preparing for entrance exams? Register yourself for the free demo class from askiitians.
points won -