Suppose you open a small shop and can't pay electronically. There are only four kinds of coins in the cashbox: 25 cents, 10 cents, 5 cents and 1 cent. If you are a salesperson and want to change 41 cents for customers, how can you arrange to give customers the right amount of money and the least number of coins? The idea:Take the coin with largest denomination without exceeding the remaining amount of cents, make the locally best choice at each step.
Q: Question 9 Write in Python! Write a function word count that will take a sentence (string) and…
A: Code is attached in step 2 along with screenshot
Q: Why can't assembly language be used for creating multipurpose programmes? In what circumstances…
A: Due to the following drawbacks, assembly language is not employed in the development of…
Q: Take into consideration the significance of wireless networks in developing countries. Why are some…
A: According to the question, WiFi networks provide greater commercial advantages than wireless…
Q: Question 4 expain in brief What is the role of AWS in the field of Artificial intelligence?…
A: Introduction Artificial intelligence (AI) is indeed the area of computer science that focuses on…
Q: When a process gets interrupted (by the OS) ... the necessary process control blocks are updated its…
A: A computer programme or a device connected to a computer can send out a signal known as an…
Q: Explain organization of the Pentium Pro, 2, and 3 pipeline
A: The Pentium Pro, Pentium 2, and Pentium 3 processors use a pipeline architecture to improve…
Q: Explain how software may be used to evaluate sequence files.
A: The information in sequence files is saved in binary format, which means that the data is…
Q: 2- Plot Sinc function, where Sinc (x) = sin(x)/x, and -2≤x≤ 2π 3- Plot sin(x) and cos(x) on the same…
A: The solution is given below for the above-given question:
Q: 1. Write a Java code to illustrate the concept of Set, List and deque. Generate the correct output.…
A: Your java program is given below as you required with an output.
Q: Why would you, as a network administrator, ever want to utilise a static route configuration?
A: Justification: When no other alternatives are available or necessary, static routing may be used to…
Q: . It made the boy sad to see the old
A: Dear Student, The source code, implementation and expected output of your asked program is given…
Q: To what resource may one go to learn the meaning of words like these? What is the significance of…
A: Your answer is given below.
Q: Which one of Cook and Campbell's (1979) four big validities best addresses random selection? a)…
A: Introduction ; According to cook and Campbell's four big validities best addresses whether a study…
Q: The CAP theorem is defined for NoSQL databases. Where do C and A come in, and why aren't they all…
A: Distributed System: This network of several nodes duplicates data to store it in various nodes…
Q: Write a regular expression in python that checks if a string in python has a length of exactly seven…
A: Your Python program is given below as you required with an output.
Q: under 1KB in size it is a symmetric key algorithm
A: Dear Student, The answer to each of your questions with explanation is given below -
Q: Consider PKCS-2.1 with n = 512 bit and SHA-1. Assuming L and PS is empty string, then describe in…
A: According to the information given:-We have to follow the instruction in order to describe in…
Q: Investigating how people in developing nations use wireless networks is important. In certain areas,…
A: Introduction: Wi-Fi connects computers, tablets, smartphones, and other devices to the internet.…
Q: Examine the BST below, and recall that a tree is just an acyclic (and, in this case, undirected)…
A: The binary search tree is a sorted binary tree. A binary search tree always follows the following…
Q: There has to be a comprehensive inventory of all potential threats, ranked by frequency of…
A: all known threat types and order threats with URL evidence from more commonly encountered to least…
Q: Question 9 (5 pts): Consider the random variables A, B, and C. Identify all of the following…
A: 1) P(A, B) = P(A)P(B) The equality P(A, B) = P(A)P(B) is not always true. This equality holds only…
Q: Imagine an airline's database as an example. A non-serializable method may be acceptable if it helps…
A: A database is a compiled set of organized data, or data, which is usually stored electronically in a…
Q: Assume a web browser at a client host (212.13.14.16) wants to send a message to a web server…
A: According to the information given:- We have to follow the instruction in order to define the actual…
Q: In what sense are header-based vulnerabilities a security risk? Name three examples that spring to…
A: The solution to the given question is: Header-based vulnerabilities are a security risk because they…
Q: Can you tell me about the most cutting-edge methods for defending your database against intrusion?
A: Introduction: Intrusion is any type of activity that attempts to access data or resources without…
Q: Is there a list of the many types of malicious software that have a global influence, and what leads…
A: Please list the many virus varieties that affect the world and why. Simply put, malicious software…
Q: Compared to wired networks, wireless ones provide faster throughput, but they still lag behind the…
A: Given: In terms of throughput speed, wireless networks are faster than wired networks, but they are…
Q: When talking about the cloud, what does the phrase "virtualization" relate to?
A: Virtualization: The given question asks for an illustration of the virtualization idea in cloud…
Q: Do you think that each of the threads of the virtual machines utilises the same method area of a…
A: JVM for JavaME: Runs Java code on JVM. Java is converted into machine language. Java bytecode…
Q: book, having sation, playing game. aying a video game" is an example of experiential cognition? Exp
A: The answer is
Q: When discussing computers, architecture and computer-based organisation are two separate but related…
A: structural layoutArchitecture design describes the way a computer system's hardware is put…
Q: A number is generated randomly using the following statement number=rand()%13-7; what are the…
A: Algorithm for the code: 1. Start 2. Initialize the int variable "number" to 0. 3. Seed the random…
Q: In an RSA system, the public key of a given user is e = 65, n = 2881. What is the private key of…
A: According to the information given:- We have to follow the instruction in order to find out the…
Q: Firewall software and hardware is another crucial approach for controlling and protecting the…
A: Firewalls fall into two main categories: They have the following characteristics: Network firewalls,…
Q: Recognize some of the most widely used messaging apps now available. Does it operate like SMS?
A: Apps for texting: A software application used to send and receive messages is known as a messaging…
Q: A database used by airlines that uses a technique called "snapshot isolation" might serve as an…
A: A non-serialized schedule that cannot be serialized is called a non-serializable schedule.
Q: True or False: HIPAA does not provide for specific circumstances in which law enforcement officers…
A: Dear Student, The answer to your question is given below -
Q: As a network administrator, in what sorts of circumstances would you find it necessary to make use…
A: INTRODUCTION: This is known as static routing when a router utilizes a manually specified routing…
Q: If you want to convince others of the benefits of dynamic programming, you should utilize real-world…
A: Introduction: After we have determined the appropriate response, we must next proceed to prepare…
Q: When it comes to the amount of data that can be sent across a network in a given amount of time,…
A: Wireless networking saves homes, telecommunications networks, and business installations from costly…
Q: Question 47 What is the output? names = ['Python', 'C++', ' ''.join(names)
A: Dear Student, The answer to your question is given below -
Q: Explain PHP and write a program using fwrite(),fclose(),and fopen() file function.
A: PHP which refers to the one it is a general-purpose scripting language geared toward web…
Q: using the "Triad" of the Central Intelligence Agency. Give an example in which I am more vital than…
A: INTRODUCTION: The term "information security" refers to the methods and resources companies use to…
Q: A PRNG will always eventually repeat itself - this is called A method of creating PRNG for parallel…
A: “Since you have posted a question with multiple sub parts, we will provide the solution only to the…
Q: Ma1. 1) On a Bank Reconciliation, if our check was written for $492.83 and was processed as such by…
A: 1 True 2 fixed item 5 a C- item As per bartleby guidelines i can't solve this many que in one time ,…
Q: what you mean by "absolute security"?
A: The study of secure communication techniques that allow only the sender and intended recipient of a…
Q: How does information security differ when viewed from a top-down vs a bottom-up perspective? The…
A: Top-down strategy: The top-down technique involves breaking down a system into smaller units in…
Q: Does each step of the Compiler accomplish a specific goal? An illustration of each stage in action…
A: The solution to the given question is: Yes , each step of the compiler accomplishes a specific goal.…
Q: Why did batch processing predominate before time sharing occurred?
A: The answer to the following question:-
Q: What's the deal with top-down vs bottom-up methods to data protection? Just because a top-down…
A: From the top down, approach: To adequately collect data, the top-down approach separates a system…
Suppose you open a small shop and can't pay electronically. There are only four kinds of coins in the cashbox: 25 cents, 10 cents, 5 cents and 1 cent. If you are a salesperson and want to change 41 cents for customers, how can you arrange to give customers the right amount of money and the least number of coins?
The idea:Take the coin with largest denomination without exceeding the remaining amount of cents, make the locally best choice at each step.
Step by step
Solved in 4 steps with 2 images
- You and your friends decided to hold a “Secret Santa” gift exchange, where each person buys a gift for someone else. To see how this whole thing works, let’s consider the following example. Suppose there are 7 people A, B, C, D, E, F, and G. We denote x → y to mean “x gives a gift to y.” If the gift exchange starts with person A, then they give a gift to E. Then E gives a gift to B. And it is entirely possible that B gives a gift to A; in such a case we have completed a “cycle.” In case a cycle occurs, the gift exchange resumes with another person that hasn’t given their gift yet. If the gift exchange resumes with person D, then they give a gift to G. Then G gives a gift to F. Then F gives a gift to C. Then finally C gives a gift to D, which completes another cycle. Since all of the people have given their gifts, the giftexchange is done, otherwise the gift exchange resumes again with another person. All in all, there are two cycles that occurred during the gift exchange: A → E → B → A…Suppose 2n people come to the game and every individual pays for their own "ticket" and that by the end of the evening there were exactly n with 50 Dhs notes and exactly n with 100 Dhs notes. We want to think about different the implications of them arriving in different orders. For example, if all the people with 100s arrived first then we would need to issue 50 IOUs(I Own You). Draw a flow chart and answer by logic and math.[Medium] Suppose, you have been given a non-negative integer which is the height of a ‘house of cards’. To build such a house you at-least require 8 cards. To increase the level (or height) of that house, you would require four sides and a base for each level. Therefore, for the top level, you would require 8 cards and for each of the rest of the levels below you would require 5 extra cards. If you were asked to build level one only, you would require just 8 cards. Of course, the input can be zero; in that case, you do not build a house at all. Complete the recursive method below to calculate the number of cards required to build a ‘house of cards’ of specific height given by the parameter. public int hocBuilder (int height){ // TO DO } OR def hocBuilder(height):
- Suppose, you are working in a company ‘X’ where your job is to calculate the profit based on their investment.If the company invests 100,000 USD or less, their profit will be based on 75,000 USD as first 25,000 USD goes to set up the business in the first place. For the first 100,000 USD, the profit margin is low: 4.5%. Therefore, for every 100 dollar they spend, they get a profitof 4.5 dollar.For an investment greater than 100,000 USD, for the first 100,000 USD (actually on 75,000 USD as 25,000 is the setup cost), the profit margin is 4.5% where for the rest, it goes up to 8%. For example, if they invest 250,000 USD, they will get an 8% profit for the 150,000 USD. In addition, from the rest 100,000 USD, 25,000 is the setup cost and there will be a 4.5% profit on the rest 75,000. Investment will always be greater or equal to 25,000 and multiple of 100.Complete the RECURSIVE methods below that take an array of integers (investments)and an iterator (always sets to ZERO(‘0’) when the…Suppose, you are working in a company ‘X’ where your job is to calculate the profit based on their investment. If the company invests 100,000 USD or less, their profit will be based on 75,000 USD as first 25,000 USD goes to set up the business in the first place. For the first 100,000 USD, the profit margin is low: 4.5%. Therefore, for every 100 dollar they spend, they get a profit of 4.5 dollar. For an investment greater than 100,000 USD, for the first 100,000 USD (actually on 75,000 USD as 25,000 is the setup cost), the profit margin is 4.5% where for the rest, it goes up to 8%. For example, if they invest 250,000 USD, they will get an 8% profit for the 150,000 USD. In addition, from the rest 100,000 USD, 25,000 is the setup cost and there will be a 4.5% profit on the rest 75,000. Investment will always be greater or equal to 25,000 and multiple of 100. Complete the RECURSIVE methods below that take an array of integers (investments) and an iterator (always sets to…Suppose, you are working in a company ‘X’ where your job is to calculate the profit based on their investment. If the company invests 100,000 USD or less, their profit will be based on 75,000 USD as first 25,000 USD goes to set up the business in the first place. For the first 100,000 USD, the profit margin is low: 4.5%. Therefore, for every 100 dollar they spend, they get a profit of 4.5 dollar. For an investment greater than 100,000 USD, for the first 100,000 USD (actually on 75,000 USD as 25,000 is the setup cost), the profit margin is 4.5% whereas for the rest, it goes up to 8%. For example, if they invest 250,000 USD, they will get an 8% profit for the 150,000 USD. In addition, from the rest 100,000 USD, 25,000 is the setup cost and there will be a 4.5% profit on the rest 75,000. The investment will always be greater or equal to 25,000 and multiple of 100. Complete the RECURSIVE methods below that take an array of integers (investments) and an iterator (always sets to…
- You own a fruit shop. You buy fruit from suppliers by weight (cost per kg), and then you sell it either loose or pre-packaged for a fixed price. For example, a typical sale could be: 1. Apples Pink Lady 1.360kg x $3.50/kg = $4.76 2. Pears Golden 3.400kg x $1.75/kg = $5.95 3. Apples Green Smith 2.180kg x $2.50/kg = $5.45 4. Breakfast package 2x $5/pk = $10 5. Mandarins package 1x $3/pk = $3 -- Total $29.16 Where "Breakfast package" might consist of: a. Bananas Cavandish 500g b. Apples Green Smith 500g c. Mandarin Imperial 500g And "Mandarins package" is: a. Mandarins Imperial 600g b. Mandarins Queens 400g Question ----------- How can I create a relational database schema to record stock and sales? MYSQLYou work for a company that has warehouses of items. The items are all packaged in boxes that are roughly the same size. Each warehouse has some shelves in it. The shelves all hold the same number of boxes. To keep things from getting confusing, a shelf will only contain one kind of item on it, and a warehouse will have at most one shelf storing a given kind of item. (If the shelf is full, that item would go to a different warehouse to make sure that items are evenly distributed, but your code won’t track multiple warehouses.) You will create a Warehouse class to simulate a warehouse according to the above description. If you would like to make use of another class of your design, declare it inside the Warehouse class (this is called an inner class). It is possible to create an efficient solution without having to do this. You can imagine each shelf sitting in a long line; what kind of data structure have we seen that can take advantage of this? If each shelf has multiple properties,…You work for a company that has warehouses of items. The items are all packaged in boxes that are roughly the same size. Each warehouse has some shelves in it. The shelves all hold the same number of boxes. To keep things from getting confusing, a shelf will only contain one kind of item on it, and a warehouse will have at most one shelf storing a given kind of item. (If the shelf is full, that item would go to a different warehouse to make sure that items are evenly distributed, but your code won’t track multiple warehouses.) You will create a Warehouse class to simulate a warehouse according to the above description. If you would like to make use of another class of your design, declare it inside the Warehouse class (this is called an inner class). It is possible to create an efficient solution without having to do this. You can imagine each shelf sitting in a long line; what kind of data structure have we seen that can take advantage of this? If each shelf has multiple properties,…
- Suppose, you have been given a non-negative integer which is the height of a ‘house of cards’. To build such a house you at-least require 8 cards. To increase the level (or height) of that house, you would require four sides and a base for each level. Therefore, for the top level, you would require 8 cards and for each of the rest of the levels below you would require 5 extra cards. If you were asked to build level one only, you would require just 8 cards. Of course, the input can be zero; in that case, you do not build a house at all. Complete the recursive method below to calculate the number of cards required to build a ‘house of cards’ of specific height given by the parameter. there is a picture given in that section. public int hocBuilder (int height){ // TO DO } OR def hocBuilder(height): #TO DOSuppose, you have been given a non-negative integer which is the height of a ‘house of cards’. To build such a house you at-least require 8 cards. To increase the level (or height) of that house, you would require four sides and a base for each level. Therefore, for the top level, you would require 8 cards and for each of the rest of the levels below you would require 5 extra cards. If you were asked to build level one only, you would require just 8 cards. Of course, the input can be zero; in that case, you do not build a house at all. Complete the recursive method below to calculate the number of cards required to build a ‘house of cards’ of specific height given by the parameter. public int hocBuilder (int height){ // TO DO } OR def hocBuilder(height):You have opened up a new chain of car washes, with t locations spaced in the city. There are n people registered to come on opening day, and they are all living around the city. You want to tell everyone which location to go to such that: Each person doesn’t drive more than 30 minutes to get to their assigned location. You can assume that you can calculate the transit time. The people are distributed evenly such that each location has n/t people attending on opening day. You can assume n divides equally into t. a) Describe an algorithm that checks if this is possible. Clearly describe what you are checking for to see if this is possible. b) Please briefly justify how you’ve handled the constraints and why your approach is correct. c) If possible, describe how to choose where to send each of the n people.