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
ankoles [38]
2 years ago
9

Consider an algorithm that uses only assignment statements that replaces the quadruple (w, x, y, z) with (x, y, z, w). What is t

he minimum number of assignment statements needed?
Mathematics
1 answer:
Likurg_2 [28]2 years ago
6 0

Answer:

The minimum number of assignment statements needed is 5

Step-by-step explanation:

To write the algorithm, we apply the strategy of interchanging the values of variables in the assignment statements.

Assume "tmp" is the new variable, let assign tmp to w

The algorithm is:

Procedure exchange (w,x,y,z: integers)

 tmp := w

    w := x

     x := y

     y := z

     z := tmp

    return (w,x,y,z)

end

From the algorithm, it is obvious that there will be a minimum of 5 assignment statements needed.

You might be interested in
A coin is tossed three times the probability of zero heads is 1/8 what is the probability that all three tosses result in the sa
Gnom [1K]
10 percent hope it helps
8 0
3 years ago
Finding angle measures between intersecting lines
Doss [256]

Answer:

x = 60°

Step-by-step explanation:

G= 90°

30 + 90 = 120

180 - 120 = 60

3 0
3 years ago
Read 2 more answers
An automobile manufacturer would like to know what proportion of its customers are not satisfied with the service provided by th
butalik [34]

Answer:

a) A sample size of 5615 is needed.

b) 0.012

Step-by-step explanation:

In a sample with a number n of people surveyed with a probability of a success of \pi, and a confidence level of 1-\alpha, we have the following confidence interval of proportions.

\pi \pm z\sqrt{\frac{\pi(1-\pi)}{n}}

In which

z is the zscore that has a pvalue of 1 - \frac{\alpha}{2}.

The margin of error is:

M = z\sqrt{\frac{\pi(1-\pi)}{n}}

99.5% confidence level

So \alpha = 0.005, z is the value of Z that has a pvalue of 1 - \frac{0.005}{2} = 0.9975, so Z = 2.81.

(a) Past studies suggest that this proportion will be about 0.2. Find the sample size needed if the margin of the error of the confidence interval is to be about 0.015.

This is n for which M = 0.015.

We have that \pi = 0.2

M = z\sqrt{\frac{\pi(1-\pi)}{n}}

0.015 = 2.81\sqrt{\frac{0.2*0.8}{n}}

0.015\sqrt{n} = 2.81\sqrt{0.2*0.8}

\sqrt{n} = \frac{2.81\sqrt{0.2*0.8}}{0.015}

(\sqrt{n})^{2} = (\frac{2.81\sqrt{0.2*0.8}}{0.015})^{2}

n = 5615

A sample size of 5615 is needed.

(b) Using the sample size above, when the sample is actually contacted, 12% of the sample say they are not satisfied. What is the margin of the error of the confidence interval?

Now \pi = 0.12, n = 5615.

We have to find M.

M = z\sqrt{\frac{\pi(1-\pi)}{n}}

M = 2.81\sqrt{\frac{0.12*0.88}{5615}}

M = 0.012

7 0
2 years ago
What is the least common denominator of the equation 2/9 and 2/3
inna [77]
The least common denominator would be 9, because

a. you can't take 3 out of two in 2/9

b. you can multiply 2/3 by 3 to make 6/9

so the LCD is 9
4 0
3 years ago
Find the degree of the polynomial
Marrrta [24]

Answer:

2

degree is highest exponent in equation and 2x² has 2 and is highest

5 0
2 years ago
Other questions:
  • Identify the height of the rectangle, in which A=200x2 m2.
    14·1 answer
  • Rammy has $9.60 to spend on some peaches and a gallon of milk. Peaches
    14·1 answer
  • HELPPPP MEEEEE URGENT DUE IN 1 HOUR!!!!!
    11·1 answer
  • Name four possible solutions to the inequality; X > -1
    7·1 answer
  • Find the angular displacement of 12.2 revolutions. Use π=3.14. Round the answer to the nearest tenth.
    8·1 answer
  • How did the code of Hammurabi benefit Hammurabi?
    15·1 answer
  • Plz help me thank you!!!!!!
    7·2 answers
  • Struct quadrilaterals for measurements given belo
    15·1 answer
  • -3 +<br> (- 1/6) what is ansewe help asap
    6·1 answer
  • Which of the following functions is graphed below?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!