Question

Problem 6 (20% total).  Show your work step by step to receive full credit. Q1) (5%) Suppose...

Problem 6 (20% total).  Show your work step by step to receive full credit.

Q1) (5%) Suppose {Z > Y} is the post-condition of the assignment statement

        shown below.   Compute the weakest precondition for this statement:   

                       Z = X - 2*Y -10;

Q2) (7%) Compute the weakest precondition for the following sequence

        of assignment statements and its post-condition:

p = q - 3;           
k = p * 3 + 6;  
{Q: k <= 12}

Q3) (8%) Compute the weakest precondition for the following selection

       construct and its post-condition

        if  (x < y)  y = 2 *  x - 4;        
        else  y = 2 * x + 4;                  
        {Q: y <  10} 

Homework Answers

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Please show all work A researcher was interested in examining a relationship between hours of exercise...
Please show all work A researcher was interested in examining a relationship between hours of exercise and concentration level among BYC students. Also, he was interested in examining whether hours of exercise would predict the concentration level. Answer following questions based on the given data. Exercise (X)                     Concentration level (Y) 0                                                      4 2                                                      1 8                                                      10 6                                                       9 4                                                       6 x̅=4                                               Y=6 SSx = 40                                        SSy=54 Q1: What is the regression line? Y hat = __________ Q2: Compute SS residual....
A point charge q1 = 4.80×10−6 C located at the point (0,   0.45  m, 0), has a velocity...
A point charge q1 = 4.80×10−6 C located at the point (0,   0.45  m, 0), has a velocity v⃗ 1= − 6×105 m/sι^+ 3×105 m/s k^ . Point charge q2 = −2.00×10−6 Clocated at the point (0.5  m, 0, 0) has a velocity  v⃗ 2=  5.6×105 m/s j^ − 5.25×105 m/s k^ . At this instant, what is the magnetic force that q1 exerts on q2? Enter the x, y, and z components of the force separated by commas. Fx, Fy, Fz = ___, ___,...
There are three charges at the three vertices of equilateral triangles as it is show in...
There are three charges at the three vertices of equilateral triangles as it is show in the figure below. The purpose of this problem is to find the Net force acting on Q 3 by Q 1 and Q 2 . Q 1 = - 10 nC 1 nC = 10 – 9 C Q 2 = + 2.0 nC Q 3 = + 3.0 nC The length of each side of the triangle is : r = 4.0 Cm...
Problem 4: Two point charges, Q1 and Q2, are located on the x axis as follows....
Problem 4: Two point charges, Q1 and Q2, are located on the x axis as follows. Q1 is at the origin and has a value of +24 µC. The charge Q2 is at x = 4 meters and its magnitude and sign are unknown. It is known that the net electric field due to these two charges is zero at the coordinate x = 8 meters. (k = 1/4πεo = 9 x 109 Nt x m2/C2) a. Find the magnitude...
Write a C++ program to demonstrate thread synchronization. Your main function should first create a file...
Write a C++ program to demonstrate thread synchronization. Your main function should first create a file called synch.txt. Then it will create two separate threads, Thread-A and Thread-B. Both threads will open synch.txt and write to it. Thread-A will write the numbers 1 - 26 twenty times in nested for loops then exit. In other words, print 1 - 26 over and over again on separate lines for at least 20 times. Thread-B will write the letters A - Z...
Q1 Ch1 (20%) a. Supply: Suppose the following information is known about a market: 1. Sellers...
Q1 Ch1 (20%) a. Supply: Suppose the following information is known about a market: 1. Sellers will not sell at all below a price of $2. 2. At a price of $10, any given seller will sell 10 units. 3. There are 100 identical sellers in the market. Assuming a linear supply curve, use this information to derive the market supply curve. b. Demand: Suppose the demand for a particular product can be expressed as Q = 100/p. Calculate the...
MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 6)...
MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 6) Consider the following dataset: ID V W X Y Z 1 10 2 8 Group 1 A 2 2 8 3 Group 1 A 3 2 8 5 Group 2 A 4 2 10 2 Group 2 A 5 5 2 5 Group 2 A 6 5 5 3 Group 1 B 7 10 7 1 Group 2 B 8 2 9 10 Group...
PUBH 6033—Week 5 Assignment: Steps to Hypotheses Testing Instructions For this Assignment, review this week’s Learning...
PUBH 6033—Week 5 Assignment: Steps to Hypotheses Testing Instructions For this Assignment, review this week’s Learning Resources, including the 5 step approach to hypothesis testing document. Read the research scenario, below, and then answer the questions related to the steps that must be followed to make the appropriate decision as to reject or fail to reject the null hypothesis. Submit this Application Assignment by Day 7. --------------------------------------------------------------------------------------------------------------------- Research Scenario Hemoglobin levels (g/dL) from the general population of adult men form...
Show work . Ask the question.2. Select the modeling approach.3. Formulate the model.4. Solve the model.5....
Show work . Ask the question.2. Select the modeling approach.3. Formulate the model.4. Solve the model.5. Answer the question.Answer the following exercise:n the whale problem of Example 4.2, we used a logistic model of population growth where the growth rate of population, P, in the absence of interspecies competition is:g(P) = rP(1 - P / K)andg(P) = rP (P - c / P + c) ( 1 - P / K )in which the parameter c represents a minimum viable...
Q1 Expected cash dividends are $2.00, the dividend yield is 8%, flotation costs are 6% of...
Q1 Expected cash dividends are $2.00, the dividend yield is 8%, flotation costs are 6% of price, and the growth rate is 2%. Compute the approximate cost of new common stock. (Do not round intermediate calculations. Round your answer to 2 decimal places.) Q2 The coupon rate on a debt issue is 9%. If the yield to maturity on the debt is 9%, what is the after-tax cost of debt in the weighted average cost of capital if the firm's...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT