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]
3 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]3 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
Please help i am confused
stiv31 [10]

Answer: 18x + 12

Step-by-step explanation:

Step #1: Determine the length of each side.

The polygon is regular, so all the sides are equal. Thus, all sides measure 3x+2.

Step #2: Determine the number of sides in the polygon.

This polygon is identified as a hexagon meaning it consists of 6 sides.

Step #3: Set up an expression and distribute.

       (Number of sides) x (Length of each side)

       (6)(3x+2)

  • 6 times 3x equals positive 18x
  • 6 times 2 equals positive 12

So, the answer is 18x + 12.

8 0
2 years ago
Read 2 more answers
O is the center of the circle. Assume that lines that appear to be tangent are tangent. What is the value of x? 23 78.5 337 314
GaryK [48]
I would have to say the answer is 23.
4 0
3 years ago
For f(x)=0.01(2)power of x, find the average rate of change from x=3 to x=8
sineoko [7]
\bf slope = {{ m}}= \cfrac{rise}{run} \implies 
\cfrac{{{ f(x_2)}}-{{ f(x_1)}}}{{{ x_2}}-{{ x_1}}}\impliedby 
\begin{array}{llll}
average\ rate\\
of\ change
\end{array}\\\\
-------------------------------\\\\
f(x)= 0.01(2)^x  \qquad 
\begin{cases}
x_1=3\\
x_2=8
\end{cases}\implies \cfrac{f(8)-f(3)}{8-3}
\\\\\\
\cfrac{0.01(2)^8-0.01(2)^3}{8-3}
4 0
3 years ago
Question 7 of 22
Daniel [21]

Answer:

C

Step-by-step explanation:

x + 11 = 24

x = 13

6 0
2 years ago
If sin A = 3/8, find the value of cosec A - sec A.​
alexira [117]

Answer:

\csc A - \sec A = \dfrac 83 + \dfrac{8}{\sqrt{55}}\\\\\csc A - \sec A = \dfrac 83 - \dfrac{8}{\sqrt{55}}

Step by step explanation:

\text{Given that,}\\\\~~~~~~\sin A = \dfrac 38 \\\\\implies \sin^2 A = \dfrac 9{64}\\\\\implies  1 - \cos^2 A = \dfrac{9}{64}\\\\\implies \cos ^2 A = 1 - \dfrac 9{64}\\\\\implies \cos^2 A = \dfrac{55}{64}\\\\\implies \cos A =\pm\sqrt{\dfrac{55}{64}}\\ \\\implies \cos A = \pm\dfrac{\sqrt{55}}8\\\\

\implies \dfrac 1{\cos A} = \pm\dfrac{8}{\sqrt{55}}

\text{Now,}\\\\\csc A - \sec A\\\\=\dfrac{1}{\sin A}- \dfrac{1}{\cos A}\\\\=\dfrac 83 -\left(\pm \dfrac 8{\sqrt {55}} \right)\\ \\\text{Hence,}\\\\\csc A - \sec A = \dfrac 83 + \dfrac{8}{\sqrt{55}}\\\\\csc A - \sec A = \dfrac 83 - \dfrac{8}{\sqrt{55}}

6 0
2 years ago
Other questions:
  • 1. Imagine you’re planning to estimate the price of the average book at your college bookstore. The bookstore carries 13,000 tit
    12·1 answer
  • What is five and nine tenths in expanded form?
    12·2 answers
  • the top x shareholders in a corporation each own y shares of a certain stock. the corporations ownership is represented by a tot
    10·2 answers
  • My number has a tens digit which is 8 more than 1
    11·2 answers
  • Find the area of the shaded region.
    10·1 answer
  • Six friends share 3 oatmeal squares equally. How much of an oatmeal square does each friend get?
    10·2 answers
  • 1. 1/2 x 4/7 =
    7·2 answers
  • If l=3, w= 3, and h= 5, what is the volume of this box​
    7·2 answers
  • 10y−50=−20 <br><br> i need help with this math question plsss
    12·1 answer
  • Brandon enters bike races. He bikes 8 1/2 miles every 1/2hour. Complete the
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!