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
A rigid, sealed cylinder initially contains 100 lbm of water at 70 °F and atmospheric pressure. Determine: a) the volume of the
soldier1979 [14.2K]

Answer:

Determine A) The Volume Of The Tank (ft^3) Later A Pump Is Used To Extract ... A rigid, sealed cylinder initially contains 100 lbm of water at 70 degrees F and atmospheric pressure. ... Later a pump is used to extract 10 lbm of water from the cylinder. The water remaining in the cylinder eventually reaches thermal equilibrium ...

3 0
3 years ago
:) 1. Outline two differences between a moving coil -coil and a moving-iron instrument.​
GalinKa [24]

Answer:

I do this for fun

Explanation:

hahahahhahaahhahahaa

ahahahhaahahhahaahhaha

6 0
3 years ago
6. Question
valkas [14]

Answer:

Check  the 2nd, 3rd and 4th statements.

Explanation:

4 0
3 years ago
A ramp from an expressway with a design speed of 30 mi/h connects with a local road, forming a T intersection. An additional lan
hram777 [196]

Answer:

the width of the turning roadway = 15 ft

Explanation:

Given that:

A ramp from an expressway with a design speed(u) =  30 mi/h connects with a local road

Using 0.08 for superelevation(e)

The minimum radius of the curve on the road can be determined by using the expression:

R = \dfrac{u^2}{15(e+f_s)}

where;

R= radius

f_s = coefficient of friction

From the tables of coefficient of friction for a design speed at 30 mi/h ;

f_s = 0.20

So;

R = \dfrac{30^2}{15(0.08+0.20)}

R = \dfrac{900}{15(0.28)}

R = \dfrac{900}{4.2}

R = 214.29 ft

R ≅ 215 ft

However; given that :

The turning roadway has stabilized shoulders on both sides and will provide for a onelane, one-way operation with no provision for passing a stalled vehicle.

From the tables of "Design widths of pavement for turning roads"

For a One-way operation with no provision for passing a stalled vehicle; this criteria falls under Case 1 operation

Similarly; we are told that the design vehicle is a single-unit truck; so therefore , it falls under traffic condition B.

As such in Case 1 operation that falls under traffic condition B  in accordance with the Design widths of pavement for turning roads;

If the radius = 215 ft; the value for the width of the turning roadway for this conditions = 15ft

Hence; the width of the turning roadway = 15 ft

5 0
3 years ago
Consider a piston-cylinder device with a piston surface area of 0.1 m^2 initially filled with 0.05 m^3 of saturated water vapor
miv72 [106K]

The friction force f = 10000 N

The heat transfer Q = 1.7936 KJ

<u>Explanation:</u>

Given data:

Surface area of Piston = 1 m^{2}

Volume of saturated water vapor = 100 K Pa

Steam volume = 0.05 m^{3}

Using the table of steam at 100 K pa

Steam density = 0.590 Kg/m^{3}

Specific heat C_{p} = 2.0267 KJ/Kg K

Mass of vapor = S × V

m = 0.590 × 0.05

m = 0.0295 Kg

Solution:

a) The friction force is calculated

Friction force = In the given situation, the force need to stuck the piston.

= pressure inside the cylinder × piston area

= 100 × 10^{3}  × 0.1

f = 10000 N

b)  To calculate heat transfer.

Heat transfer = Heat needs drop temperatures 30°C.

Q=m c_{p} \ DT

Q = 0.0295 × 2.0267 × 10^{3} × 30

Q = 1.7936 KJ

3 0
4 years ago
Other questions:
  • Consider a magnetic disk consisting of 16 heads and 400 cylinders. This disk has four 100-cylinder zones with the cylinders in d
    7·1 answer
  • Consider an experiment in which the number of pumps in use at each of two seven-pump gas stations was determined. Call the two g
    10·1 answer
  • If a motorist moves with a speed of 30 km/hr, and covers the distance from place A to place B
    13·1 answer
  • What are the three basic types of positive displacement pumps.
    5·1 answer
  • How is varnished timber shaped and cut?
    11·1 answer
  • two students were talking student a was examining the lettuce leaves in a salad he was eating . he said, did you know im eating
    12·1 answer
  • there are 17 toinspect in a commercial building. Each inspection takes 40 min. How many will the full inspection take
    9·1 answer
  • When the same type of arc is used in more than one place, what note is included with the dimension?
    15·1 answer
  • An electric circuit has a total resistance of 5ohms.If a current of 3A flows through the circuit,calculate the potential differe
    14·2 answers
  • How far away must a pwc stay from anyone being towed behind another vessel?.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!