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
Buyers are skeptical of a motorcycle advertisement that claims the newest model gets an average of 52 miles per gallon. They bel
Lana71 [14]

Answer:

Null hypothesis; H0: µ ≥ 52 mpg

Alternative hypothesis; Ha: µ < 52 mpg

Step-by-step explanation:

We are told that the newest model gets an average of 52 miles per gallon and that the buyers believe that the average mpg was overstated.

This means the alternative hypothesis will have an average less than 52. Thus;

Null hypothesis; H0: µ ≥ 52 mpg

Alternative hypothesis; Ha: µ < 52 mpg

3 0
3 years ago
Find the area of the following shape. Show all work
Pavel [41]

Best way to solve this is by using

\sqrt{s(s - a)(s - b)(s - c)}

where \: s =  \frac{a + b + c}{2}

s=(12+8+17)/2

=18.5

using the formulae

area =43.5

4 0
3 years ago
- 2( 8m + 8 ) -16.
Ksivusya [100]
<h2>Answer:</h2><h2>-16m - 32</h2><h2></h2><h2>Hope this helps!!</h2>

4 0
3 years ago
Frankie wanted to buy a new TV for his
Mars2501 [29]

Answer:

157.5

Step-by-step explanation:

when finding a percentage just take the percent in this case 35% and turn it into a decimal. in this case, the decimal would be 0.35. then just multiply the price and the percentage to get your answer. in this case the equation is 0.35x450=157.5

hope this helped.

5 0
3 years ago
The bricks are built to form a garden. The perimeter of the outer square is 264 centimeters. The area of the inner square is 900
zhenek [66]

Answer:

Length: 124.7875 cm

Width: 7.2125 cm

Step-by-step explanation:

The perimeter of this area can be calculated as:

P = 2L + 2W

Where P is the perimeter, L is the length and W is the width

If the perimeter is 264 centimeters, we have that:

2L + 2W = 264

L + W = 132

The area can be calculated as:

A = L*W

Where A is the area.

If the area is 900 cm2, we have that:

L*W = 900

From the first equation, we have that L = 132 - W

Using this value in the area equation, we have:

(132-W)*W = 900

132W - W2 = 900

W2 - 132W + 900 = 0

delta = b2 - 4ac = 17424 - 3600 = 13824

sqrt(delta) = 117.575

W1 = (132 + 117.575) / 2 = 124.7875 cm

W2 = (132 - 117.575) / 2 = 7.2125 cm

Using the smaller value for W, the length will be:

L + 7.2125 = 132

L = 124.7875 cm

4 0
3 years ago
Read 2 more answers
Other questions:
  • The first line in a system of linear equations has a slope of 3 and passes through the point (-1 , -8). The second line passes t
    6·1 answer
  • Find the derivative of the function using the definition of derivative. f(x) = 1 5 x − 1 6
    8·1 answer
  • In a class of 35 students, 25 girls averaged 92% on the last test, while the 10 boys averaged 85% on the same test. What is the
    13·1 answer
  • If f(x) = -x - 2 and g(x) = x2, what is (gºf)(-6)?
    9·1 answer
  • joe paid $14.00 for a board game. this is 70 percent of the original price. what was the orginal price?
    7·2 answers
  • Find the mode of the data.
    10·1 answer
  • Mark has 49 baseball cards and 70 football cards that he wants to group into package.each package will have the same number of b
    15·1 answer
  • PLEasE HELPPP WITH THISSSSS IF U KNOW THE ANSWER PLS TELL ME LIKE THIS :
    8·1 answer
  • Andre and Jillian were shopping at the same grocery store for bottles of sports drinks for their kickball teams. Andre bought 3
    6·1 answer
  • Someone please answer this quickly!<br><br><br>Note: T is the center of the circle.<br><br>​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!