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
Many companies are combining their online business activities with an existing physical presence. In about 100 words, explain wh
Daniel [21]

Answer:

Companies are combining their online business activities with their existing physical presence in order to lower costs of their operations. When both these things are combined labor costs are reduced because with online presence the company has to have limited number of branches, inventory costs are reduced because additional inventories for every physical outlet is not required and delivery costs are reduced because now company don't have to supply the things to all the outlets on regular basis.

Trust of the people is also improved because mostly people are reluctant to order from the brands that only have their online store and donot have any physical presence. Value added services are provided by a company who have both online and offline presence like home delivery and customized offerings.

 

3 0
3 years ago
How do you extablish a chain of dimensions​
kap26 [50]

Answer:

Certamente você conhece três dimensões: comprimento, largura e profundidade. Além disso, quando se pensa um pouco fora da caixa também seria possível adicionar a dimensão do tempo.

Provavelmente, algumas pessoas viajam na maionese quando toca-se nesse assunto. Vem em suas mentes universos paralelos e até mesmo realidades alternativas. Mas também não se trata disso.

Explanation:

Basicamente as dimensões são as facetas do que nós percebemos a ser realidade. Existem muitos debates sobre dimensões na física. Um dos que mais chamam a atenção se chama Teoria das Cordas.

r

5 0
3 years ago
An escalator in a shopping center is designed to move 50 people, 75 kg each, at a constant speed of 0.6 m/s at 450 slope. Determ
REY [17]

Answer:

Power required to drive the escalator shall be equal to the rate at which the energies of the persons is increased.

Energy=n\times mass\times g\times h\\\\\therefore Power=n\times mass\times g\times \frac{dh}{dt}\\\\Power=50\times 75\times 9.81\times 0.6sin(45)\\\\Power=15.607kW

As we infer from the above equation If the velocity of the escalator is doubled then the Power required will also be doubled and become 31.215kW

3 0
4 years ago
Our rule-of-thumb for presenting final results is to round to three significant digits or four if the first digit is a one. By t
olga_2 [115]

Answer:

To four significant digits = 2097 psi

Explanation:

<u>Applying the rule of thumb </u>

σ = Mc/I  ---- ( 1 )

M = 1835 Ibf in ,  I/c = 0.875 in^3

∴ c/l = 1 / 0.875 = 1.1429

back to equation 1

σ = 1835 * 1.1429 = 2097.2215 psi

To four significant digits = 2097 psi

4 0
3 years ago
An oil reservoir has a average porosity of 20%, an area of 100 acres, and a av- erage thickness of 10 feet. The connate water sa
hram777 [196]

Answer:a) recovery factor = 53.3% ,bi) volume of oil per acre-ft = 11090.64bbl/acre-ft

bii) bulk volume of the reservoir in acre-ft = 1000 acre-ft

c) 62214.74 cubic feet

Explanation: a) recovery factor is the percentage amount of oil that can recovered from a reservoir, it is the oil produced divided by oil initially in place

Recovery factor= 1 - (Soi/1-Swi)

= 1 - (0.35/1-0.25)

= 0.533 × 100%

= 53.3%

bi) volume of oil which may be recovered per acre-ft = 7758.porosity.(1- Swi-Soi)

= 7758 x 0.2 x (1-0.25-0.35)

= 620.64 bbl/acre-ft

bii) bulk volume of the reservoir in acre-ft= Area x thickness

= 100 acres x 10 ft

= 1000 acre-ft

c) total volume of oil in cubic feet

since we have gotten volume as 1000 acre-ft we simply multiply it by the volume of oil gotten in answer bi)

= 1000 acre-ft x 620.64 bbl/ acre-ft

= 620640bbl

So we convert from barrel(bbl) to cubic feet, and 1 barrel is equal to 5.609 cubic feet, so to convert the answer from barrel to cubic feet we multiply the answer 620640 bbl by 5.609

= 620640 bbl x 5.609

= 3481580.711 cubic feet

4 0
3 years ago
Other questions:
  • Diesel engines do not use spark plugs to ignite the fuel-air mixture. Instead, they rely on the compression stroke to raise the
    12·1 answer
  • . Steam is to be condensed from saturated vapor to saturated liquid in the condenser of a steam power plant at a temperature of
    5·1 answer
  • Show that a chirped Gaussian pulse is compressed initially inside a single-mode fiber when ftC &lt; 0. Derive expressions for th
    12·1 answer
  • 5. What are the 3 basic types of electrical circuits?
    12·1 answer
  • Reserve Problem 4.006 Tutorial SI
    14·1 answer
  • what is the expected life 1 inch diameter bar machined from AISI 1020 CD Steel is subjected to alternating bending stress betwee
    9·1 answer
  • If it takes a planet 0.8 years to orbit the sun how long in years will it take the planet to go all the way around our sky once
    5·1 answer
  • Fresh ideas or title to be researched for civil engineering individual final project for diploma students also can extend the to
    9·1 answer
  • Economics is the study of how individuals and societies make choices under the condition of
    10·1 answer
  • The A/C compressor will not engage when the A/C is turned on. The static refrigerant pressure is 75 psi and the outside temperat
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!