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
DochEvi [55]
3 years ago
12

Suppose we are managing a consulting team of expert computer hackers, and each week we have to choose a job for them to undertak

e. The set of possible jobs is divided into low-stress and high-stress jobs. If we select a low-stress job for the team in week i, then we get a revenue of li > 0 dollars; if we select a high-stress job, we get a revenue of hi > 0 dollars. The catch, is that in order for the team to take a high-stress job in week i, it is required that they do no job (of either type) in week i − 1; they need a full week of prep time to get ready for the crushing stress level. On the other hand, it is okay for them to take a low-stress job in week i even if they have done a job (of either type) in week i − 1. Given a sequence of n weeks, a plan is specified by a choice of "low-stress", "high-stress", or "none" for each of the n weeks, with the property that if "high-stress" is chosen for week i > 1, then none has to be chosen for week i − 1. (It is okay to choose a high-stress job in week 1.) The value of the plan is determined in the natural way: for each i, we add li to the value if we choose "low-stress" in week i, and we add hi to the value if we choose "high stress" in week i. (We add 0 if we choose "none" in week i.) Give an efficient algorithm that takes values for l1, l2, . . . , n and h1, h2, . . . , hn and returns the value of an optimal plan.
Engineering
1 answer:
lina2011 [118]3 years ago
7 0

Answer:

if number == 1

  then

  tempSolution= max(l[number],h[number])

else if number == 2 then

  tempSolution= max(optimalPlan(1, l, h)+ l[2], h[2])

else

  tempSolution= max(optimalPlan(number − 1, l, h) + l[number], optimalPlan(number − 2, l, h) + h[number])

end if

return Value

FindOptimalValue(number, l, h)

for itterator = 1 ! number do

  tempSolution[itterator] = 0

end for

for itterator = 1 ! number do

  if itterator == 1 then

      tempSolution[itterator] max(l[itterator], h[itterator])

  else if itterator == 2 then

      tempSolution[itterator] max(tempSolution[1] + l[2], h[2])

  else

      tempSolution[itterator] max(tempSolution[itterator − 1] + l[itterator], tempSolution[itterator − 2] + h[itterator])

  end if

end for

return Value[number]

OPtimalPlan(number, l, h, Value)

for itterator = 1 ! number do

  WeekVal[itterator]

end for

if tempSolution[number] − l[number] = tempSolution[number − 1] then

  WeekVal[number] ”Low stress”

  OPtimalPlan(number-1, l, h, Value)

else

  WeekVal[number] ”High stress”

  OPtimalPlan(number-2, l, h, Value)

end if

return WeekVal

You might be interested in
A gear train has two gears. The driver gear has 8 teeth and a diametral pitch of 6 teeth/inch. the follower gear has 24 teeth. W
Sliva [168]

Answer:

18 teeth/inch

Explanation:

Given that: i. driver gear has 8 teeth and diametral pitch of 6 teeth/inch.

                  ii. follower gear has 24 teeth.

Let the followers diametral pitch be represented by x.

Then,

8 teeth ⇒  6 teeth/inch

24 teeth ⇒ x teeth/inch

So that;

x = \frac{24 x 6}{8}

   = \frac{144}{8}

   = 18 teeth/inch

The diametral is 18 teeth/inch

3 0
3 years ago
Firefighters are holding a nozzle at the end of a hose while trying to extinguish a fire. The nozzle exit diameter is 8 cm, and
ivanzaharov [21]

Question

Determine the average water exit velocity

Answer:

53.05 m/s

Explanation:

Given information

Volume flow rate, Q=16 m^{3}/min

Diameter d= 8cm= 0.08 m

Assumptions

  • The flow is jet flow hence momentum-flux correction factor is unity
  • Gravitational force is not considered
  • The flow is steady, frictionless and incompressible
  • Water is discharged to the atmosphere hence pressure is ignored

We know that Q=AV and making v the subject then

V=\frac {Q}{A} where V is the exit velocity and A is area

Area, A=\frac {\pi d^{2}{4} where d is the diameter

By substitution

V=\frac {16\times 4}{\pi 0.08^{2}}=3183.098862 m/min

To convert v to m/s from m/s, we simply divide it by 60 hence

V=\frac {3183.098862  m/min}{60 s}=53.0516477 m/s\approx 53.05 m/s

3 0
3 years ago
QUESTION:
pentagon [3]
74 cycles it’s what u need
7 0
3 years ago
The high electrical conductivity of copper is an important design factor that helps improve the energy efficiency of electric mo
ludmilkaskok [199]

Answer:

B

Explanation:

This is a two sample t-test and not a matched pair t-test

null hypothesis(H0) will be that mean energy consumed by copper rotor motors is greater than or equal to mean energy consumed by aluminium rotor motors

alternate hypothesis(H1) will be that mean energy consumed by copper rotor motors is less than or equal to mean energy consumed by aluminium rotor motors.

So, option D is rejected

The hypothesis will not compare mean of differences of values of energy consumed by copper rotor motor and aluminium rotor motor.

Option A and C are also rejected

5 0
3 years ago
What is the purpose of gears?
Brrunno [24]

Answer:

To help wheels move in a circle

Explanation:

6 0
3 years ago
Other questions:
  • Write SQL queries to answer the following questions: What are the names of the course(s) that student Altvater took during the s
    13·1 answer
  • If the bar assembly is made of a material having a yield stress of σY = 45 ksi , determine the minimum required dimensions h1 an
    7·1 answer
  • Motion is defined as a change in an object's position when compared to other objects around it. Mary Ann was watching a slug cra
    10·1 answer
  • Identify the advantages of using 6 tube passes instead of just 2 of the same diameter in shell-and-tube heat exchanger.What are
    10·1 answer
  • Find the inductive reactance per mile of a single-phase overhead transmission line operating at 60 Hz, given the conductors to b
    6·1 answer
  • Air expands through an ideal turbine from 1 MPa, 900 K to 0.1 MPa, 500K. The inlet velocity is small compared to the exit veloci
    10·1 answer
  • The beam is supported by a pin at A and a roller at B which has negligible weight and a radius of 15 mm. If the coefficient of s
    7·1 answer
  • How did engineers help to create a ceiling fan
    8·1 answer
  • The term _______________refers to the science of using fluids to perform work.
    9·2 answers
  • GMA MIG weiding is a
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!