Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

How many ternary strings of length six do not contain two consecutive0'sor twoconsecutive1's?

Short Answer

Expert verified

There are 239 ternary strings of length six that do not contain two consecutive 0'sor two consecutive 1's.

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

Over 22 million students worldwide already upgrade their learning with Vaia!

01

Given data

A string that contains only 0's, 1'sand 2'sis called a ternary string.

02

Concept used of recurrence relation 

A recurrence relation is an equation that recursively defines a sequence where the next term is a function of the previous terms (Expressing Fnas some combination of Fi with i<n).

03

Find the number of ternary strings

We will compute a2 through a6 using the recurrence relation:

a2=a1+2a0+2=3+2·1+2=7a3=a2+2a1+2a0+2=7+2·3+2·1+2=17a4=a3+2a2+2a1+2a0+2=17+2·7+2·3+2·1+2=41a5=a4+2a3+2a2+2a1+2a0+2=41+2·17+2·7+2·3+2·1+2=99a6=a5+2a4+2a3+2a2+2a1+2a0+2=99+2·41+2·17+2·7+2·3+2·1+2=239

Thus there are 239 ternary strings of length 6 that do not contain two consecutive 0'sor two consecutive 1's.

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Suppose that c1,c2,,cpis a longest common subsequence of the sequences a1,a2,,amandb1,b2,,bn.
a) Show that if am=bn, then cp=am=bnand c1,c2,,cp-1is a longest common subsequence of a1,a2,,am-1and b1,b2,,bn-1 when p>1.
b) Suppose that ambn. Show that if cpam, then c1,c2,,cpis a longest common subsequence of a1,a2,,am-1and b1,b2,,bnand also show that if cpbn, then c1,c2,,cpis a longest common subsequence of a1,a2,,amandb1,b2,,bn-1

Use generating functions to solve the recurrence relation ak=5ak-1-6ak-2with initial conditions a0=6and a1=30.

Find the coefficient of x5y8in(x+y)13.

Give a big-O estimate for the number of comparisons used by the algorithm described in Exercise \(1{22}\).

Use generating functions to find the number of ways to make change for \(100 using

a) \)10, \(20, and \)50 bills.

b) \(5, \)10, \(20, and \)50 bills.

c) \(5, \)10, \(20, and \)50 bills if at least one bill of each denomination is used.

d) \(5, \)10, and $20 bills if at least one and no more than four of each denomination is used.

Find a closed form for the generating function for each of these sequences. (Assume a general form for the terms of the sequence, using the most obvious choice of such a sequence.)

a) \( - 1, - 1, - 1, - 1, - 1, - 1, - 1,0,0,0,0,0,0, \ldots \)

b) \(1,3,9,27,81,243,729, \ldots \)

c) \(0,0,3, - 3,3, - 3,3, - 3, \ldots \)

d) \(1,2,1,1,1,1,1,1,1, \ldots \)

e) \(\left( {\begin{array}{*{20}{l}}7\\0\end{array}} \right),2\left( {\begin{array}{*{20}{l}}7\\1\end{array}} \right),{2^2}\left( {\begin{array}{*{20}{l}}7\\2\end{array}} \right), \ldots ,{2^7}\left( {\begin{array}{*{20}{l}}7\\7\end{array}} \right),0,0,0,0, \ldots \)

f) \( - 3,3, - 3,3, - 3,3, \ldots \)

g) \(0,1, - 2,4, - 8,16, - 32,64, \ldots \)

h) \(1,0,1,0,1,0,1,0, \ldots \)

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free