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
Svetllana [295]
3 years ago
12

Explain the four criteria for proving the correctness of a logical pretest loop construct of the form "while B do S end". And pr

ove the correctness of the following:
while B do S end
Engineering
1 answer:
evablogger [386]3 years ago
6 0

Answer:

Check the explanation

Explanation:

The loop invariant has to satisfy some amount of requirements to be of good use. Another complex factor as to why a loop is the question of loop termination. A loop that doesn’t terminate can’t invariably be correct, and in fact the computation in whatever form amounts to nothing. The total axiomatic description of a while construct will have to involve all of the following to be true, in which I is the loop invariant:

P => I

{I and B} S {I}

(I and (not B)) => Q

Then the loop terminates

You might be interested in
Suppose we are managing a consulting team of expert computer hackers, and each week we have to choose a job for them to undertak
lina2011 [118]

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

7 0
3 years ago
A design that is found to have flaws and must be redesigned and retested is an example of what
Aleksandr [31]

Answer:

A. prototype

Explanation:

7 0
4 years ago
In a company, a new process is put in place that uses flash cards to make manufacturing more effective. What type of waste is th
Digiron [165]

D. Workforce

You are correct

5 0
3 years ago
What unit of measurment would be used to measure current?
Alex_Xolod [135]

Answer:

The S. I unit of current is Amphere

5 0
4 years ago
.provide feedback to the controller about the robot's environment, a limited sense of sight and sound
anyanavicka [17]

Answer:

go to settings and u may figure out

6 0
4 years ago
Read 2 more answers
Other questions:
  • Problem 1: Experts on hypothermia tell us that heat loss from the body is much greater in 10°C water than in air at the same tem
    9·1 answer
  • Technician A says that the first step in diagnosing engine condition is to perform a thorough visual inspection. Technician B sa
    8·1 answer
  • Guys i need help and some ones please help me
    12·1 answer
  • What is the purpose of a presentation model? to fabricate a prototype to test the efficiency of the manufacturing process to tes
    15·1 answer
  • If you get a flat in the front of your car, your car will:
    11·1 answer
  • What affect results when there is an impact between earth and is astroids check all that apply.
    12·1 answer
  • While rowing across a lake, John does 3960 ft-lbs of work over 120 ft. How much force is John using?
    13·1 answer
  • Help i will give u 20 points
    10·1 answer
  • What is the definition of a struck by injury
    5·1 answer
  • If a resistor only has three color bands, it has a tolerance of 20 percent. What would this mean for a resistor specified at 10,
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!