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
IrinaK [193]
3 years ago
11

Given coins of denominations (value) 1 = v1 < v2< … < vn, we wish to make change for an amount A using as few coins as

possible. Assume that vi’s and A are integers. Since v1= 1 there will always be a solution. Solve the coin change using integer programming. For each the following denomination sets and amounts formulate the problem as an integer program with an objective function and constraints, determine the optimal solution.
What is the minimum number of coins used in each case and how many of each coin is used? Include a copy of your code.

a) V = [1, 5, 10, 25] and A = 202.
b) V = [1, 3, 7, 12, 27] and A = 293
Computers and Technology
1 answer:
astraxan [27]3 years ago
3 0

Answer:

Answer given below

Explanation:

a) 10 coins ( 25*8 + 1*2)

b) 14 coins (27*10 + 12*1 + 7*1 + 3*1 + 1*1)

<u></u>

<u>Source Code in C++: </u>

#include <iostream>

using namespace std;

//main function

int main()

{

int n,n1;

cout << "Enter the amount : "; //taking amount as input

cin >> n;

if(n<=0)

{

cout << "Fatal Error : Input Failure." << endl;

return 1;

}

cout << "Enter the number of denominations : "; //taking number of denominations as input

cin >> n1;

if(n1<=0)

{

cout << "Fatal Error : Input Failure." << endl;

return 1;

}

int a[n1],c[n1],sum=0; //array to keep count of each amount, and sum to store total coins

cout << "Enter the denominations in descending order : ";

for(int i=0;i<n1;i++)

{

cin >> a[i];

}

for(int i=0;i<n1;i++)

{

c[i]=n/a[i];

sum=sum+c[i];

n=n%a[i];

}

for(int i=0;i<5;i++)

{

cout << a[i] << " : " << c[i] << endl;

}

return 0;

}

You might be interested in
WHAT DOES THE TRANSPORT LAYER USE TO MAKE SURE THAT A MESSAGE IS REASSWMBLED CORRECTLY ON THE RECEIVING DEVICES?
mrs_skeptik [129]
The answer is  sequence  number
6 0
3 years ago
How to send an email to multiple recipients individually.
zheka24 [161]

Answer:

The BCC method

Explanation:

4 0
2 years ago
What type of software resides on a computer’s hard drive, and controls the CPU and all other activity between components?
myrzilka [38]
Operating System  (OS) is the answer.

An application runs in/on an OS.  It is not the OS itself. Like Word or Chrome are applications. 

Systems is too generic and not specific enough to mean anything in this context.  Throw away answer.

Network Operating System does not 'usually' run on a hard drive but on memory chips in things like routers, wireless access points and switches that move network traffic.


3 0
3 years ago
Select the correct answer from each drop-down menu.
xz_007 [3.2K]

Answer:

Maths operators

cell reference

5 0
3 years ago
Which one of the following is true about employer responsibility in providing fall protection to workers? not selected A. Employ
Luda [366]

Option B is the correct answer, Employers have flexibility in choosing a fall protection system they believe will work best in a situation selected. It is the primary duty of employer to provide safety to its workers. Employers must setup a suitable protection system at workplace from falling off from overhead platforms and from elevated workstations during construction for safety of its employees.  

Further Explanation:

⦁ Employer must ensure compliance to OSHA-Fall protection in construction.

⦁ Generally, fall protection must be ensured by deploying guardrail systems at the edge of construction sites, safety systems built by nets or personal fall arrest.

⦁ OSHA requires to built fall protection system irrespective of fall distance to make sure safety conditions for workers/ employees.

Answer details:

Grade: High School

Subject: Computer Science and Technology.

Learn More:

Fall protection and compliance to OSHA rules and regulations

brainly.com/question/8910167

Employer responsibility in providing fall protection

brainly.com/question/5872956

Key Words: Fall protection, OSHA, workplace safety, guardrail systems etc.

Image of guardrail as an example is attached.

5 0
3 years ago
Read 2 more answers
Other questions:
  • In controlling network traffic to minimize slow-downs, a technology called ________ is used to examine data files and sort low-p
    15·1 answer
  • If you want to copy text formatting from one area of your document to another area, _____.
    5·2 answers
  • By which method is heat transferred through a metal <br> spoon?
    9·2 answers
  • You may be guilty of plagiarism even if
    13·1 answer
  • An IP address in the form 197.169.100.1 is called a(n) ________. dotted quad encryption key random number sequential access numb
    7·1 answer
  • Pda bkhhksejc pnwjoynelp dwo xaaj ajykzaz ywj ukq zaykza ep???<br><br><br> The Key Value is 22
    12·1 answer
  • In which drawer can you set certain lights to light up on your micro:bit?
    12·2 answers
  • What is the purpose of the Zoom dialog box? to put the selected range in ascending order in a query to put the selected range in
    13·2 answers
  • Post back maintains view state by assigning the form values to a hidden form field named ____.
    12·2 answers
  • a web server will utilize a directory protocol to enable users to authenticate with domain credentials. a certificate will be is
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!