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
Is it more beneficial to have many folders or is it better to " nest subfolders? Explain your response
riadik2000 [5.3K]
I think it's better to have multiple folders because for say you have 6 school subjects but only have 1 folder how are you going to keep track with all 6 subjects in one folder ? You could use each folder for each subject which would save you a lot of time when it comes to getting out your complete work .You can have one folder such as "Workspace" and have multiple different sub-folders that relate that to "Workspace". Also if you store pictures in a folder, it might be a good idea to separate them into different sub-folders.
3 0
3 years ago
You work in a classified environment where Bell LaPadula MLS (Multilevel Security) model is employed. Your clearance is "SECRET"
kumpel [21]

Answer:

The answer is by using a covert channel like shared memory objects such as files, directories,messages, etc since both  the user and the sender of the document are on same network of the company.

Explanation:

The Bell LaPadula MultiLevel Security model was a security policy developed by Bell and LaPadula in 1973 in response to a security issue raised by the US Air Force regarding file-sharing mainframe computers . Actually, many people with networked systems have realized by early 1970s that the protection purportedly offered by many commercial operating systems was poor, and wa not getting better any time soon. This was observed when it was noticed that as one operating system error was fixed, some other vulnerability would be discovered. There was also the constant worry that various unskilled users would discover loopholes in the operating system during usage and use them to their own advantage.

 Information release may take place via shared memory objects such as files, directories, messages, and so on. Thus, a Trojan Horse acting on behalf of a user could release user-private information using legitimate operating system requests. Although developers can build various mechanisms within an operating system to restrict the activity of programs (and Trojan Horses) operating on behalf of a user  , there is no general way, short of implementing nondiscretionary policy models, to restrict the activity of such programs. Thus, given that discretionary models cannot prevent the release of sensitive information through legitimate program activity, it is not meaningful to consider how these programs might release information illicitly by using covert channels.

For example, for someone with higher integrity level (SECRET) to send an accounts payable application to a user, if the untrusted accounts payable application contains a Trojan Horse, the Trojan Horse program could send a (legal) message to the said user process running at a lower integrity level (CONFIDENTIAL), thereby initiating the use of a covert channel. In this covert channel, the Trojan Horse is the receiver of (illegal) lower integrity-level input and the user process is the sender of this input.

7 0
3 years ago
Will mark Brainliest, need help ASAP!
Whitepunk [10]

Answer:

What Sherman needs to configure is:

RIPv2 class D of 240.

Explanation:

Multicast messages are usually dispatched to a select group of hosts on a network and require acknowledgement of the recipients. RIPv2 is a router-based internet protocol for exchanging routing information to the IP address 224.0. 0.9 on a network. It determine the most efficient way to route data on a network and to prevent routing loops.

3 0
2 years ago
What is Computer categories
MA_775_DIABLO [31]
Computer Categories are like

Supercomputers, mainframe computers, microcomputers, mobile computers, minicomputers.

I hope that this is the type of answer that you were looking for.
5 0
3 years ago
How could you insert a new row between rows 20 and 21?
podryga [215]
Highlight the row(20), then click on the insert cells button under the home ribbon.
3 0
3 years ago
Read 2 more answers
Other questions:
  • What is a technology that exists inside another device called
    11·1 answer
  • Instructions: Type the correct answer in the box. Spell the word correctly.
    5·2 answers
  • Which kind of software allows users to draw pictures, shapes, and other graphical images with various on-screen tools such as a
    14·1 answer
  • How do I connect my CSS file and HTML page together? it's just not wanting to work for me. I have 3 other HTML pages that have t
    12·1 answer
  • PLZZZ HELP 30 POINTS!!
    14·1 answer
  • How is DATA sent across a Network?
    7·1 answer
  • Can I change my username?
    6·1 answer
  • Explain what happens if you try to open a file for reading that does not exist.
    10·1 answer
  • Y'+2y = 5-e^(-4x), y(0)=-11
    9·1 answer
  • a) consider the binary number 11010010. what is the base-4 representation of (11010010)2? (there is a way to do this without con
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!