Question

Suppox that We inputs toe , 29, 30, ч):.tornpute auaag e も10 CAK ヒ
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Initial value of variable i must 1(not 0).
Consider all cases of triples (x1,x2,x3) :-
1.) (10,20,30) : (t=0) < 50(true)
t=t+x1=0+10=10 (1 add)
i=i+1=1+1=2 (1 add)
(t=10) < 50(true)
t=t+x2=10+20=30 (1 add)
i=i+1=2+1=3 (1 add)
(t=30) < 50(true)
t=t+x3=30+30=60 (1 add)
i=i+1=3+1=4 (1 add)
(t=60) < 50 (false)
Total no. of additions in this case = 6

2.) (10,20,40) : (t=0) < 50(true)
t=t+x1=0+10=10 (1 add)
i=i+1=1+1=2 (1 add)
(t=10) < 50(true)
t=t+x2=10+20=30 (1 add)
i=i+1=2+1=3 (1 add)
(t=30) < 50(true)
t=t+x3=30+40=70 (1 add)
i=i+1=3+1=4 (1 add)
(t=70) < 50 (false)
Total no. of additions in this case = 6

3.) (10,30,40) : (t=0) < 50(true)
t=t+x1=0+10=10 (1 add)
i=i+1=1+1=2 (1 add)
(t=10) < 50(true)
t=t+x2=10+30=40 (1 add)
i=i+1=2+1=3 (1 add)
(t=40) < 50(true)
t=t+x3=30+40=70 (1 add)
i=i+1=3+1=4 (1 add)
(t=70) < 50 (false)
Total no. of additions in this case = 6

4.) (20,30,40) : (t=0) < 50(true)
t=t+x1=0+20=20 (1 add)
i=i+1=1+1=2 (1 add)
(t=20) < 50(true)
t=t+x2=20+30=50 (1 add)
i=i+1=2+1=3 (1 add)
(t=50) < 50(false)
Total no. of additions in this case = 4


Total no. of additions in all cases = 6 + 6 + 6 + 4 = 22
Total no. of cases = 4
Average no. of additions = Total no. of additions/Total no. of cases = 22/4 = 5.5

COMMENT DOWN FOR ANY QUERIES AND,

LEAVE A THUMBS UP IF THIS ANSWER HELPS YOU.

Add a comment
Know the answer?
Add Answer to:
Suppox that We inputs toe , 29, 30, ч):.tornpute auaag e も10 CAK ヒ Suppox that We inputs toe , 29, 30, ч):.t...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Given two inputs, E and F, two strings of bits are received. We wish to design...

    Given two inputs, E and F, two strings of bits are received. We wish to design a synchronous sequential system that detects when the information received by these inputs is equal to the one received on the previous instant, giving an output Z=1 when they're identical and Z=0 if they're not. Find the Mealy machine associated with this circuit and, using T flip-flops activated by a rising signal, find the functions of the flip-flops.

  • or g) Consider the following state diagram with three inputs e-amd eleck) and two outputs We...

    or g) Consider the following state diagram with three inputs e-amd eleck) and two outputs We propose to design the following sequential circuit using D flip lops. Sequential Circuit idle r1 gnti We propose the following state coding: rira t2 State Name State Code idle ent LEnt2 01 gnt2 (2 marks) 1) Complete the following state table. r2 Present state I Output Input Next state 0 0 0 0 0 0 0 0 1 10 0 0 0

  • w-3kif t-26206 int E#29 x 102 psi L 30 ft FIND: Deflection at center of beam.

    w-3kif t-26206 int E#29 x 102 psi L 30 ft FIND: Deflection at center of beam.

  • Utilizing $10 dollars of inputs Spain could produce $20 worth of wine or $30 worth of...

    Utilizing $10 dollars of inputs Spain could produce $20 worth of wine or $30 worth of Beer. Utilizing $10 dollars of inputs France could produce $50 worth of wine or $50 worth of Beer. Spain has comparative advantage in both beer and wine France has comparative advantage in both beer and wind France has absolute advantage and comparative advantage in beer France has absolute advantage and comparative advantage in wine

  • Given a steel railroad track which was installed at 30 F. Let E = 29 x...

    Given a steel railroad track which was installed at 30 F. Let E = 29 x 10^6 psi and α = 6.5 x 10^-6 / F If the temperature reaches 125 F, a) Find the normal stress in the rails which are welded together to form a continuous track. b) Find the normal stress in the rails assuming the rails are 39 ft. long with 1/4" gap between them 3a fr オ Given: A steel railroad track which was installed...

  • y to record them e of 2000 sharofs par vale ordinary $10 per includes A. Credit...

    y to record them e of 2000 sharofs par vale ordinary $10 per includes A. Credit to Ordinary shes for 20 000 B. Debito Onder deres for S2 Paldin Capitalismo PV-Oiary for D. De Pads Capital is of Pu Weny RS Part II Problems Analysis (20+10+8+12+10+10=70 Marks) 1. Adjusting date of CAK Internet at June 30, 2018 med service reventioned, 5300. Head rent still in force, $2,100 . Supplies used during the month, epreciation for the month $400 And salary...

  • 7:30 Suppose that e, az and , are estimators of We know that E(e)-E(6) ed, E(a-e...

    7:30 Suppose that e, az and , are estimators of We know that E(e)-E(6) ed, E(a-e v(61) -14, V(62)-12 and E(63 -0) 8. (a) Which do you prefer between the first two estimators? b) Compare these three estimators. Which do you prefer? Why?

  • 29. Taking the dipole moment of HCl to be 3.43 x 10-30 - Cóm, the internuclear...

    29. Taking the dipole moment of HCl to be 3.43 x 10-30 - Cóm, the internuclear distance in HCl to be 0.127 nm, and the charge of the electron to be 1.60 x 10-19 C, estimate the percent ionic character in the H-Cl bond. Follow the text discussion for HF.

  • QUESTION 29 QUESTION 30 QUESTION 31 QUESTION 33 UBER had revenue of over $10 billion in...

    QUESTION 29 QUESTION 30 QUESTION 31 QUESTION 33 UBER had revenue of over $10 billion in fiscal year 2018. This is what makes UBER a valuable company and enabled it to sell shares to the public. e True O False Click Save and Submit to save and submit. Click Save All Answers to save all answers. Save and Sitbrnt Save and Submit Close Window

  • 2. 2n' =-10n-2 -5+29 -5+21 a) 5+29 b) -10 + 21 2 d) -52-21 e) 2...

    2. 2n' =-10n-2 -5+29 -5+21 a) 5+29 b) -10 + 21 2 d) -52-21 e) 2 2 2

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT