1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
jekas [21]
3 years ago
9

a)Find a recurrence relation for the number of ternary strings of length n that do not contain two consecutive 0s. b) What are t

he initial conditions? c) How many ternary strings of length six do not contain two consecutive 0s?
Mathematics
1 answer:
chubhunter [2.5K]3 years ago
4 0

Answer: Denote by a_n the number of ternary strings of length n

  • a) a_n=2(a_{n-1}+a_{n-2}) for all  n\geq 3.
  • b) a_1=3, a_2=8
  • c) 284

Step-by-step explanation:

a) Let S=x_1 x_2\cdots x_{n-2} x_{n-1} x_{n} be a ternary string of length n. If x_{n}=1, then S can be decomposed as S=L1 where L is a ternary string of length n-1 with no consecutive zeros. In this case, there are a_{n-1} choices for L therefore the number of strings S which last is digit 1 is a_{n-1}. Similarly, the number of ternary strings S with x_{n}=2 is a_{n-1}. We conclude that the number of strings S whose last digit is 1 or 2 is 2a_{n-1}

Now, if x_{n}=0, then x_{n-1}=1 or x_{n-1}=2 because S does not have consecutive zeroes. Then S=P10 or S=P20 where P is a ternary string of length n-2 with no consecutive zeros. Thus, the number of such strings S is equal to the number of strings P whose last digit is 1 or 2 is 2a_{n-1}. Applying the same reasoning from before, this number is equal to  2a_{n-2}.

Any string S has its last digit equal to 0,1 or 2 then by the sum rule, a_n=2a_{n-1}+2a_{n-2}=2(a_{n-1}+a_{n-2}).

b) 0,1,2 are the strings of length 1 with no consecutive zeroes. Then a_1=3. The corresponding strings of length 2 are 01,02,10,11,12,20,21,22, thus a_2=8.

c) This follows froma applying the recurrence relation repeatdly. a_6=2a_{5}+2a_{4}=2(a_4+a_3)+2a_4=4a_4+2a_3=8(a_3+a_2)+2a_3=10a_3+8a_2=20(a_2+a_1)+8(a_2)=20(11)+8(8)=284.

You might be interested in
Is the following shape a rectangle?how do you know?​
adelina 88 [10]

Answer:

The following shape is not a rectangle, but a square. I know this because the length and width are the same amount of square inch(feet, what ever the square counts for on your graph.) and rectangles width are typically longer than their length. However a square shares the same length and width,  

Step-by-step explanation:

8 0
4 years ago
Read 2 more answers
Rachel budgeted $76.50 for school clothes this is 0.45 of her total budget how much does Rachel have in her total budget
skad [1K]
Rachel has $170 in her total budget. You would set up a proportion to solve this.\frac{76.50}{.45} = \frac{x}{1}
6 0
4 years ago
HELP ME PLEASE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Doss [256]

Answer:

dude the first one

Step-by-step explanation:

25:10=5;2

5 0
3 years ago
Read 2 more answers
10. Mr. Ward bought a used car forx dollars. One year later the value of the car was 0.72x. Which
Cerrena [4.2K]

Answer:

D.

Step-by-step explanation:

0.72 = 72%

So that being the case, his car's value decreased by 72%

7 0
4 years ago
Jasmine thinks that the images are the same because they are both isosceles triangles. Do you agree with Jasmine why or why not?
lorasvet [3.4K]

Answer:

No, images are not same as  their dimensions are different although two sides in each of the two triangles are equal.

Step-by-step explanation:

Given: images of two isosceles triangles.

To check: if images are the same

Solution:

A triangle is a polygon made up of three sides.

An isosceles triangle is a triangle in which two sides are equal. Also, in an isosceles triangle, angles opposite to equal sides are equal.

The given images of two isosceles triangles A and B are not the same as their dimensions are different although two sides in each of the two triangles are equal.

6 0
4 years ago
Other questions:
  • What is 3 3/5 converted int a mixed number
    13·2 answers
  • PLEASE HELPPP!!! I will mark brainlist​
    11·2 answers
  • James helped arrange painting for the art show.the first row of paintings had 15 paintings the second row had 18 the third row h
    8·2 answers
  • A student randomly guesses on 10 true/false questions. use the binomial model to determine the probability that the student gets
    11·1 answer
  • At a charity function, $150,045 was donated by three companies A, B, and C in the ratio 7 : 5 : 9. How much money did company B
    14·2 answers
  • What is the range of possible sizes for side x?
    5·2 answers
  • A group of workers can plant 48 acres in 8 days. What is their rate in acres per day?
    13·1 answer
  • One positive number is 8 more than twice another. If their product is 234 find the numbers
    10·1 answer
  • What is the domain of f?
    11·2 answers
  • Is the following number rational or irrational?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!