Encrypting your link and protect the link from viruses, malware, thief, etc! Made your link safe to visit.

Question:

download



 


Answer:


The Greedy Algorithm help us address the minimum number of coins/currency denominations required to make up a given amount. 

The best apporach in this is to take the maximum number of the largest denomination available, within the specified amount, subtract it, then take the next largest denomination available and subtract, etc, till we get the specified amount. This will help us arrive at the least number of coins required to make up the amount. 

Now, answering the questions

a) In US currency,

Quarters - 25 cents
Dimes - 10 cents
Nickels - 5 cents
Pennies - 1 cent

Amount required - 93 cents

Largest denomination available = Quarters (25 cents)

We can have three quarters = 3*25 = 75 cents

Remaining amount = 93 - 75 = 18 cents

In 18 cents, we can have 1 dime (10 cents)

Remaining amount = 18 - 10 = 8 cents

In 8 cents, we can have 1 nickel (5 cents)

Remaining amount = 8 - 5 = 3 cents

In 3 cents, we can have 3 pennies (1 cent)

Remaining amount = 3 - 3 = 0 cents.

Now we have found the solution to our problem. 

93 cents = 3 Quarters + 1 dime + 1 nickel + 3 pennies

Therefore, total number of coins = 3 + 1 + 1 + 3 = 8 coins.

The algorithm output for 93 cents is 8.

 

b) In a country there are below denominations coins

20 cents, 10 cents, 5 cents and 1 cent

Amount required = 57 cents

Following same algorithm steps as above.

57 cents can contain 2 * 20 cents

Remaining amount = 57 - 40 = 17 cents

17 cents can contain 1 * 10 cents 

Remaining amount = 17 - 10 = 7 cents

7 cents can contain 1 * 5 cents

Remaining amount = 7 - 5 = 2 cents

2 cents can contain 2 * 1 cent

Remaining amount = 2 - 2 = 0 cents.

Now we have found the solution to our problem. 

57 cents = 2 * 20 cents + 1 * 10 cents + 1 * 5 cents + 2 * 1 cent

Therefore, total number of coins = 2 + 1 + 1 + 2 = 6 coins

The algorithm output for 57 cents is 6.

ST

Search This Blog

Labels

Report Abuse

QUESTION 6 (a) The bar shown in Figure Q2(a) is subjected to tensile load of 150 Kn. If the stress in the middle portions is limited to 160 N/mm², determine the diameter of the middle portion. Find also the length of the middle portion if the total elongation of the bar is to be 0.25 mm. E E = 2.0 + 105N/mm². (12 marks) 150 KN 10 cm DIA 10 cm DIA 150 KN 45 cm Figure Q6(a) (b) A brass bar, having cross-section area of 900 mm², is subjected to axial forces as shown in Figure Q2(b), in which AB = 0.6 m, BC = 0.8 m, and CD = 1.0 m. Find the total elongation of the bar. E = 1.0 + 105N/mm2 . (8 marks) Page 4 of 5 B D 40 KN 70 KN 20 KN 10 KN Figure Q6(b) (TOTAL = 20 MARKS)

  Question: Show transcribed image text Answer:

Question: A 250-V, 4-pole, wave-wound d.c. series motor has 782 conductors on itsarmature. It has armature and series field resistance of 0.75 ohm. The motor takesa current of 40 A. Estimate its speed and gross torque developed if it has a flux per pole of 25 mWb Answer: Step 1 Mechanical Engineering homework question answer, step 1, image 1 Mechanical Engineering homework question answer, step 1, image 2 Step 2 Mechanical Engineering homework question answer, step 2, image 1 Step 3 Mechanical Engineering homework question answer, step 3, image 1

Question: A 250-V, 4-pole, wave-wound d.c. series motor has 782 conductors on itsarmature. It has armature and series field resistance of 0.75 ohm. The motor takesa current of 40 A. Estimate its speed and gross torque developed if it has a flux per pole of 25 mWb Answer: Step 1 Step 2 Step 3

Contributors