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
vitfil [10]
4 years ago
12

In each situation, write a recurrence relation, including base case(s), that describes the recursive structure of the problem. Y

ou do not need to solve the recurrence.
a) Let B(n) be the number of length n bit sequences that have no three consecutive 0s (i.e., do not contain the substring "000"). Write a recurrence for B(n).
b) Let S(n) be the number of subsets of {1, 2, ..., n} having the following property: no two elements in the subset are consecutive integers. The empty set with no elements should be included in your count. Write a recurrence for S(n).
c) Say you are tiling a 2 times n rectangle with L-shaped tiles of area 3 (trominoes). To tile the rectangle is to cover it with tiles so that no tiles overlap and every cell is covered by some tile. Let T(n) denote the number of ways to tile the rectangle. Write a recurrence for T(n).
d) A ternary string is like a binary string except it uses three symbols, 0, 1, and 2. For example, 12210021 is a ternary string of length 8. Let T(n) be the number of ternary strings of length n with the property that there is never a 2 appearing anywhere after a 0. For example, 12120110 has this property but 10120012 does not. Write a recurrence for T(n).
Engineering
1 answer:
Rina8888 [55]4 years ago
7 0

Explanation:

a) Given B(n) is the number of the length 'n' bit sequences which have no three consecutive 0s(i.e., they does not contain substring “000”)

Any bit string which has no 000 should have a 1 in at least one of the 1st three positions. Then, the n we will break all the bit strings by avoiding the 000 by when the 1st 1 occurs. i.e., each of the bit of string of the length of n will avoid 000 falls into the exactly any one of these cases:

1 is followed by the bit string of the length of (n-1) avoiding the 000.

01 is followed by some bit string of the length of (n-2) avoiding a 000.

001 which is followed by any bit string of the length(n-3) avoiding the 000.

Therefore, recurrence is

B(n)=B(n-1)+ B(n-2)+ B(n-3), with B(0)=1, B(1)=2, B(2)=4

Or

B(n)=B(n-1)+ B(n-2)+ B(n-3), with B(1)=2, B(2)=4, B(3)=7

b) Let the S(n)={1,2,3,…,n}. We will say that the subset A of S(n) is very good if A does not have any of the two integers that are consecutive.

For any k, let a(k) be a number of any good subsets of a S(k).

There are two types of good subsets of S(n).

Type 1 of  good subsets of S(n) which  contain the element n,

Type 2 of good subsets of S(n)  which do not contain n.

We will first get an expression for a number of Type 1 of good subsets of the S(n) , where n≥2. This a subset does not contain n-1. So any Type 1 of the good subset of the S(n)  is obtainable when adding n to good subset of the S(n-2) . Also, on adding n to a good subset of the S(n-2) , we always get a Type 1 good subset of the S(n). Thus there are exactly as many good Type 1 of subsets of S(n) as there is good subsets of S(n-2) . By the definition there are a(n-2) good subsets of S(n-2) .

A good subset of a S(n)  is either Type 1 or Type 2. Thus the number of the good subsets of S(n)  is a(n-2)+a(n-1)

We have therefore shown that a(n) = a(n-2)+a(n-1)

c). Here firstly see that if the n is not the multiple of a 3, then there will be no chance to tile the rectangle. And also if n is a multiple of a 3, then there may be two ways to tile the 1st three columns:

And the rest of tilling is the tilling of  2x(n-3) rectangle for which there are T(n-3).

So, the recurrence is

T(n )= {2T(n-3), with T(0)=1     if n=0(mod 3)   or 0 else

We could use the base case T(3)=2

So, the following recurrence can be aslo equivalent to T(n)= 2T(n-3), with T(0)=1, T(1)=0,T(2)=0

Or

T(n)= 2T(n-3), with T(1)=0, T(2)=0,T(3)=2

d)A ternary string may be defined as a sequence of some digits, where each digit has either 0,1,or 2.

According to the problem given, we do not have a 2 anywhere after  0, and the dot which represents the binary string of length(n-1) with the property which we cannot use 2 anywhere after we use the 0.

Now for base case,  we should note that any of the ternary string which has a length of 1 satisfies the given required property. Hence the recurrence is

T(1)=3

T(n)=2T(n-1)+2^(n-1)

You might be interested in
What careers could you potential do if you
Margarita [4]

Answer:

Engineering careers. If you want to stay in engineering, your job opportunities are very much linked to your degree type, and you probably know what many of them are already. ...

Consulting. ...

Technical writing. ...

Business. ...

Investment banking. ...

Law. ...

Manufacturing and production. ...

Logistics and supply chain.

Explanation:

3 0
3 years ago
Determine the constant speed at which the cable at A must be drawn in by the motor in order to hoist the load 6 m in 1.5s
zlopas [31]

Answer:

4m/s

Explanation:

We know that power supplied by the motor should be equal to the rate at which energy is increased of the mass that is to be hoisted

Mathematically

Power_{motor} } =\frac{Energy }{time}\

We also know that Power = force x velocity      ..................(i)

The force supplied by the motor should be equal to the weight (mg) of the block since we lift the against a force equal to weight of load

=> power = mg x Velocity........(ii)

While hoisting the load at at constant speed only the potential energy of the mass increases

Thus Potential energy = Mass x g x H...................(iii)

where

g = accleration due to gravity (9.81m/s2)

H = Height to which the load is hoisted  

Equating equations (ii) and (iii) we get

m x g x v = \frac{mgh}{t}

thus we get v = H/t

Applying values we get

v = 6/1.5 = 4m/s

5 0
3 years ago
A ____________ is a term that originally was referring to a way to reproduce a technical drawing documenting an architectural or
larisa86 [58]

Answer:

The answer is  blueprint.

Explanation:

Have a nice day or night!

7 0
2 years ago
In 1945, the United States tested the world’s first atomic bomb in what was called the Trinity test. Following the test, images
Zarrin [17]

Answer:

r=K A^{1/5} \rho^{-1/5} t^{2/5}

A= \frac{r^5 \rho}{t^2}

A=1.033x10^{21} ergs *\frac{Kg TNT}{4x10^{10} erg}=2.58x10^{10} Kg TNT

Explanation:

Notation

In order to do the dimensional analysis we need to take in count that we need to conditions:

a) The energy A is released in a small place

b) The shock follows a spherical pattern

We can assume that the size of the explosion r is a function of the time t, and depends of A (energy), the time (t) and the density of the air is constant \rho_{air}.

And now we can solve the dimensional problem. We assume that L is for the distance T for the time and M for the mass.

[r]=L with r representing the radius

[A]= \frac{ML^2}{T^2} A represent the energy and is defined as the mass times the velocity square, and the velocity is defined as \frac{L}{T}

[t]=T represent the time

[\rho]=\frac{M}{L^3} represent the density.

Solution to the problem 

And if we analyze the function for r we got this:

[r]=L=[A]^x [\rho]^y [t]^z

And if we replpace the formulas for each on we got:

[r]=L =(\frac{ML^2}{T^2})^x (\frac{M}{L^3})^y (T)^z

And using algebra properties we can express this like that:

[r]=L=M^{x+y} L^{2x-3y} T^{-2x+z}

And on this case we can use the exponents to solve the values of x, y and z. We have the following system.

x+y =0 , 2x-3y=1, -2x+z=0

We can solve for x like this x=-y and replacing into quation 2 we got:

2(-y)-3y = 1

-5y = 1

y= -\frac{1}{5}

And then we can solve for x and we got:

x = -y = -(-\frac{1}{5})=\frac{1}{5}

And if we solve for z we got:

z=2x =2 \frac{1}{5}=\frac{2}{5}

And now we can express the radius in terms of the dimensional analysis like this:

r=K A^{1/5} \rho^{-1/5} t^{2/5}

And K represent a constant in order to make the porportional relation and equality.

The problem says that we can assume the constant K=1.

And if we solve for the energy we got:

A^{1/5}=\frac{r}{t^{2/5} \rho^{-1/5}}

A= \frac{r^5 \rho}{t^2}

And now we can replace the values given. On this case t =0.025 s, the radius r =140 m, and the density is a constant assumed \rho =1.2 kg/m^2, and replacing we got:

A=\frac{140^5 1.2 kg/m^3}{(0.025 s)^2}=1.033x10^{14} \frac{kg m^2}{s^2}

And we can convert this into ergs we got:

A= 1.033x10^{14} \frac{kgm^2}{s^2} * \frac{1 x10^7 egrs}{1 \frac{kgm^2}{s^2}}=1.033x10^{21} ergs

And then we know that 1 g of TNT have 4x10^4 erg

And we got:

A=1.033x10^{21} ergs *\frac{Kg TNT}{4x10^{10} erg}=2.58x10^{10} Kg TNT

3 0
3 years ago
Did you know whales have hip leg and shin bones? well now you do
storchak [24]

Answer:

No, I did not. Thank you for educating me!

Explanation:

Have a great day!

6 0
2 years ago
Other questions:
  • A circular section of material is tested. The original specimen is 200 mm long and has a diameter of 13 mm. When loaded to its p
    11·2 answers
  • A fuel cell vehicle draws 50 kW of power at 70 mph and is 40% efficient at rated power. You are asked to size the fuel cell syst
    15·1 answer
  • What is the mechanical advantage of a pulley with 3 support ropes?
    6·1 answer
  • Is EPA is the organization that was formed to ensure safe and health working conditions for workers by setting and enforcing sta
    15·1 answer
  • Which of these credit building options do you personally think is the easiest method that you can see yourself doing? Explain yo
    8·1 answer
  • is released from under a vertical gate into a 2-mwide lined rectangular channel. The gate opening is 50 cm, and the flow rate in
    15·1 answer
  • Assuming the transition to turbulence for flow over a flat plate happens at a Reynolds number of 5x105, determine the following
    11·1 answer
  • The yellow rectangle area is 25% (or 1/4) the area of the blue rhombus. The height (H) of the yellow rectangle is twice as long
    5·1 answer
  • Hi I don't know of yall remeber me, but I'm Jadin aka J. I am looking for my friend group, that I have missed but can't find cau
    6·1 answer
  • Explain race condition..<br><br>don't spam..​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!