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
Ainat [17]
2 years ago
14

Suppose we need to make change for n cents, and we want to use the least number of coins of denominations 1, 10, and 25 cents. C

onsider the following greedy strategy: suppose the amount left to change is m. Take the largest coin that is no more than m, subtract this coin’s value from m, and repeat. Prove that this algorithm is optimal, or give a counterexample if it is not.
Mathematics
1 answer:
frutty [35]2 years ago
8 0

Answer:

Explained

Step-by-step explanation:

This algorithm does not always give the optimal solution.  There is an alternate method as well.

Consider we have to make change for 30 cents, using the least number of coins of denominations 1,10 and 25 cents.According to the given strategy, we first take a 25 cents coin and subtract it from 30 cents. Now, we have to make 5 cents which we can make only from 5 one-cent coins. So, the total number of coins required is 6 according to the given greedy strategy.

But we can simply use 3 ten-cent coins to make change of 30 cents. So, this example proves that the given strategy is not an optimal one.

You might be interested in
The length of a rectangular room is 6 feet longer than twice the width. If the room perimeter is 168 feet, what are the room's d
liberstina [14]
Length = 2 breadth +6
perimeter= 4(length+ breadth)
168=4(2breadth +6+breadth
42={3breadth+6)
14=breadth +2
breadth =12
length=30
hope u like the answer if yes mark !e brainlist
3 0
3 years ago
Read 2 more answers
F(x)= x squared -3x + 2 divided by 3x squared + 9 x -12
VashaNatasha [74]

Answer:

=(x-2)/3(x+4)

Step-by-step explanation:

F(x)=x²-3x+2/3x²+9x-12

Using mid term break formula

=x²-2x-x+2/3(x²+3x-4)

=x(x-2)-1(x-2)/3(x²+4x-x-4)

=(x-2)(x-1)/3{x(x+4)-1(x+4)}

=(x-2)(x-1)/3(x-1)(x+4)

Cancelling (x-1)

We get

=(x-2)/3(x+4)

Hope it helps :)

6 0
3 years ago
PLEASE ANSWER IN ONE MINUTE WILL MARK BRAINLIST
PSYCHO15rus [73]

Answer:

x=3

Step-by-step explanation:

3 0
2 years ago
2(3x + 4) + 6 + 7x<br> What is the answer
Colt1911 [192]

Answer:

13x+14

Step-by-step explanation:

2(3x+4)+6+7x

Distribute:

=(2)(3x)+(2)(4)+6+7x

=6x+8+6+7x

Combine Like Terms:

=6x+8+6+7x

=(6x+7x)+(8+6)

=13x+14

3 0
3 years ago
Read 2 more answers
Major league baseball salaries averaged $3.26 million with a standard deviation of $1.2 million in a the past year. Suppose a sa
strojnjashka [21]

Answer:

0.015 is the approximate probability that the mean salary of the 100 players was less than $3.0 million

Step-by-step explanation:

We are given the following information in the question:

Mean, μ =$3.26 million

Standard Deviation, σ = $1.2 million 100

We assume that the distribution of salaries is a bell shaped distribution that is a normal distribution.

Formula:

z_{score} = \displaystyle\frac{x-\mu}{\sigma}

Standard error due to sampling =

\displaystyle\frac{\sigma}{\sqrt{n}} = \frac{1.2}{\sqrt{100}} = 0.12

P(mean salary of the 100 players was less than $3.0 million)

P(x < 3) = P(z < \displaystyle\frac{3-3.26}{0.12}) = P(z < -2.167)

Calculating the value from the standard normal table we have,

P(Z < -2.167) = 0.015 \\P( x < 3) = 1.5\%

0.015 is the approximate probability that the mean salary of the 100 players was less than $3.0 million

6 0
3 years ago
Other questions:
  • 25 points of apple juice are poured into 1/2-pint bottles.How much bottles can be filled with apple juice?
    7·1 answer
  • A= 1/2bh if b=3 in. And h= 8 in., what is the area of the triangle?
    6·1 answer
  • Solve for y then plug in (-12) for x. Show work please.<br><br> x = 24 + xy
    9·1 answer
  • Which problems will have two decimal places in the product?mark all that apply.
    13·2 answers
  • Solve the system y = -x + 7 and y = -0.5(x - 3)2 + 8
    12·2 answers
  • The differential equation dy dx equals the quotient of the quantity x minus 2 and y minus 2.
    5·1 answer
  • Plsssss helppp meeeeee
    12·2 answers
  • Donald plays with his wood cubes and decides to make a pyramid
    8·1 answer
  • Can someone help me?​
    11·2 answers
  • 022 A. Find the unit vector in the direction of F 2+3j+4k B. Find the distance between F1 = 3i+2j+ 5k and F2 = 3i +4j +5k C Find
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!