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
vesna_86 [32]
4 years ago
9

Describe an algorithm that produces the maximum, me- dian, mean, and minimum of a set of three integers. (The median of a set of

integers is the middle element in the list when these integers are listed in order of increasing size. The mean of a set of integers is the sum of the integers divided by the number of integers in the set.)
Mathematics
1 answer:
zheka24 [161]4 years ago
5 0

Answer

The mean of three numbers x1,x2,x3 can be obtained by a calculus. The first step of the algorithm is

1) mean(x1,x2,x3) = \frac{x1+x2+x3}{3}

In order to obtain the median, maximun and minumun of x1, x2 and x3, we can compare x1 and x2. The smaller of those numbers will be compared to x3 and, if x3 is even smaller, then x3 is the minimun, the other small number is the median, and the remaining number is the maximun. Otherwise, we compare x3 with the bigger number to find median and maximun. To summarize:

2) compare x1 with x2. The bigger of the two numbers will be called '<em>s</em>' (for  small) and the smaller will be called '<em>b</em>' (from big).

3) compare x3 with <em>s</em>. The smaller of this subset will be the minimun of the entire set of 3 elements.

4) Check if x3 is the minimun, in that case, <em>s </em>is the median, because <em>s</em> is between x3 and <em>b. </em>We also conclude that <em>b</em> is the maximun

5) if x3 in not the minimun, then compare it with <em>b.</em> The bigger element between the two of them will be the maximun of the set, and the smaller one will be the median.

I hope it helps you!

You might be interested in
suppose the solution x = 6 increases to x = 9, and the left side of the equation stays the same. How would the right side need t
PilotLPTM [1.2K]
X = 9 - 3, does this help?
7 0
4 years ago
Read 2 more answers
A 51 foot piece of wire is cut into 3 sections so that the first section is three times as long as the second section and the se
kirill [66]

Answer:

The length of the longest section x = 36 ft

Step-by-step explanation:

Total length of the wire = 51 ft

Let first section of wire = x

Second section of wire = y

Third section of wire = z

According to given data

x = 3 y & y = 4 z

Total length of the wire = x + y + z = 51

y + 3 y + \frac{y}{4} = 51

\frac{17}{4} y = 51

y = 12

x = 3 × 12 = 36

z = \frac{y}{4} = \frac{12}{4} = 3

Therefore the length of the longest section x = 36 ft

8 0
3 years ago
Read 2 more answers
The coordinates of the vertices of / are G(–2, 3), H(–1, 2), and I(–3, 1). If / is reflected across the x-axis to create /, find
valkas [14]

Answer:

A. (–2, –3)

that is the answer

3 0
4 years ago
What is the slope-intercept from equation of the line that passes through (5,7)and(8,22)?
elena55 [62]

y=5X+32

I hope this helps!

6 0
3 years ago
Report Error Suppose $P(x)$ is a polynomial of smallest possible degree such that: $\bullet$ $P(x)$ has rational coefficients $\
motikmotik

Answer:

We want a polynomial of smallest degree with rational coefficients with zeros in \sqrt{7}, 1 - \sqrt{6} and -3. The last root gives us the factor (x+3). Hence, our polynomial is

P(x) =(x+3)q(x)

where q is a polynomial with rational coefficients and roots \sqrt{7} and 1 - \sqrt{6}. The root \sqrt{7} gives us a factor x-\sqrt{7}, but in order to obtain rational coefficients we must consider the factor x^2-7.

An analogue idea works with 1 - \sqrt{6}. For convenience write  x - 1 + \sqrt{6} = ( x - 1) + \sqrt{6}. This gives the factor (x-1)^2-6. Hence,

P(x) = (x+3)(x^2-7)((x-1)^2-6)=x^5+x^4-18x^3-22x^2+77x+105

Notice that P(-1)=24. So, in order to satisfy the last condition we divide by 3 the whole polynomial, without altering its roots. Finally, the wanted polynomial is

P(x) =(1/3)x^5+(1/3)x^4-6x^3-(22/3)x^2+(77/3)x+35

Step-by-step explanation:

We must have present that any polynomial it's determined by its roots up to a constant factor. But here we have irrational ones, in order to eliminate the irrational coefficients that a factor of the type x-\sqrt7 will introduce in the expression, we need to multiply by its conjugate x+\sqrt7. Hence, we will obtain x^2-7 that have rational coefficients. Finally, the last condition is given with the intention to fix the constant factor. Usually it is enough to evaluate in the point and obtain the necessary factor.

4 0
3 years ago
Other questions:
  • 0.9 as a percentage
    13·1 answer
  • What is the significance of the mean of a probability​ distribution?
    12·1 answer
  • A car dealership had $114,000 in average monthly sales. If you made 30% of all the sales, what is your total sales?
    7·1 answer
  • A marching band is performing in a rectangular arrangement, with a width of $w$ people. The length consists of seven less people
    6·1 answer
  • Write an equation of a line in slope-intercept form that passes through the point (8, 9) and has a slope of 3.
    13·1 answer
  • Marc throws a ball out of a second story window The path of the ball is shown on the graph
    5·1 answer
  • Solve for x:<br> Solve for x:
    10·2 answers
  • If the width of the cereal box was 4 instead of 2, what would be the surface area?
    11·2 answers
  • Put the question -3/5+1/3 in simplest form
    10·1 answer
  • (24 ÷ 3 - 2) × 4 [points n brainliest]
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!