There is a thief enters a house for robbing purpose. The thief can carry a maximal weight of 60 kg into his backpack. There are 5 items in the house with the following weights and values as shown in Table 1. Table 1: Item with Weight and Value Item Weight Value А 5 30 B 10 40 C 15 45 D 22 77 E 25 90 Using 0/1 Knapsack Problem dynamic programming approach, calculate what is the maximum value of items should the thief take and determine the selected item. Show the calculation process.
Q: 2) Consider an ordered linked list with n entries in ascending order. Each entry has 2 components: a...
A: Ordered linked list is a singly sorted linked list.
Q: In what format does a password manager store encrypted passwords? Is it local, online, clod, or usb?
A: Introduction: Passwords managers allow one to generate strong and unique passwords and store them in...
Q: CSM Tech has a sizable web presence, with multiple publicly accessible web and application servers. ...
A: Introduction: The public DNS servers are doing recursive searches for both internal and external cli...
Q: 0 x(mm) 30 3.870833333 60 14.0625 90 27.08333333 120 39.0625 150 47.17083333 180 50 210 47.17083333 ...
A: I have answer this question in step 2.
Q: Create a stack-based application to convert infinix to postfix.
A: Introduction: An expression can be written in Infix, Postfix, and Prefix Notation. In Infix Notation...
Q: mC to Veri
A: System C SystemC is a bunch of C++ classes and macros which give an occasion driven recreation inter...
Q: Test it in the main function Create e musicplayer with 3 songs. Play the current song. Play the next...
A: Solution: #include<iostream>#include<string.h>#include<stdlib.h>#include<std...
Q: 1- convert the following decimal numbers to 32-bit two's complement numbers а. +17, -17 b. +35,-35 с...
A: Note - Since you have posted a question with multiple sub-parts, we will solve first three subparts ...
Q: ^^111^11111^^^ = ^^^11^1^^^ What wo
A: Sum : user will add three numbers bu using sum operator'+' subtract : user will subtract by using '-...
Q: Given that x=2 and y=- 6, what is the output of this code If (x>1 && y<x-5) { If (x || y) x = ...
A: - We have to get the output of the provided code with explanation as to how we reach it.
Q: probability that merge sort for array of length 8 makes exactly 12 comparisions
A: Answer is given below
Q: Write a java program to reverse a user entered array in groups. Take the size of group from the user...
A: Hi Dear!! Please Upvote!! Your positive feedback will be more valuable!! ---------------------------...
Q: ii) Write a JAVA program to prompt the user to enter a secret message in the form of a string. If th...
A: Code: import java.util.Scanner; class Main{ public static void main(String args[]){ Scanner m...
Q: Consider the LFSR represented by the polynomial x^4+x^3+1 What are the tap bits of the LFSR? Please ...
A: The bits in the LFSR state that influence the input are called taps.
Q: Why CyberSecurity is Important? Explain
A: Cybersecurity is very important because it protect your all sensitive data from threats and damage. ...
Q: For nodes 0000 and 1111, there exists four node-disjoint paths of length 4 (which happens to be the ...
A: I have answer this question in step 2.
Q: Problem 4: Assuming that the numbers below are signed 2's complement numbers with the leftmost bit r...
A: In computers, we can only store numbers in fixed number of bits. An overflow occurs if the result we...
Q: Develop flowchart for this algorithm, The algorithm takes as input a search key and an array, output...
A: According to our guidelines we solve first one: ================================== Here i make simpl...
Q: Consider the following multithreaded algorithm for performing pairwise multiplication on n-element a...
A: Algorithm: SUM-ARRAYS'(A, B, C) n = A. Length grain-size = ? // to be determined r = ...
Q: Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples bel...
A: As per the requirement program is completed. Algorithm: Step 1: Write the main() method Step 2: Ask ...
Q: Write a technical document (2 pages max) that describes the process of assembling a new desktop comp...
A: following are the steps to assemble a new desktop 1.purchase parts necessary parts are a.processor b...
Q: What influence does the blockchain have on "Systems Analysis and Design
A: Introduction: System Analysis and Design is assessing a company issue to improve it via the use of m...
Q: Computer Science - Describe two information systems/technology concerns that you believe organisatio...
A: Introduction: Data Backup IssuesA backup copy of the data is something every business should do, eac...
Q: gren Website? Include the principles and ele
A: What can you say about the Arngren Website? Include the principles and elements of design used in th...
Q: Create a C program that do exactly the same as the sample below
A: #include <stdio.h>#include <string.h>// horizontal linechar dline[] = "=================...
Q: Give a recursive definition for an (where n=1,2,3,...) if an=2n+5
A: Below is the recursive definition for an=2n+5: a1=7,a2=9........an=2n+5 Now from above we get : lang...
Q: Let M(n) be the minimum number of comparisons needed to sort an array A with exactly n elements. For...
A: Given: M(1)=0 M(2)=1 M(4)=4 Given expression: M(n)=2M(n/2)+n/2
Q: Question 7: Turing Machines (a) Draw the state diagram of a Turing Machine, that converts every 'a' ...
A: Below is the answer to above question. I hope this will be helpful for you....
Q: 4. Write definitions for the following two functions: sumN (n) returns the sum of the first n natura...
A: I give the required code in Python along with output and code screenshot
Q: Most retail establishments use barcode scanners to get product names and pricing in order to expedit...
A: Introduction: This kind of input is referred to as bar-code scanning, and it is conducted using bar-...
Q: Controls and Methods What controls are possible as parameters for fade, hide, and toggle?
A: The above methods which are in the question are from jQuery(which is basically a javascript library)...
Q: This kind of data transmission allows data to be delivered in both directions on a signal carrier at...
A: Introduction: Full-Duplex data transmission is the mode of data transmission in which data can trave...
Q: d final state
A: This is highly recommended reading. The entire Python community does its best to adhere to the guide...
Q: Martha created a list of 10 elements but forgot to insert one element into the list. Write a Python ...
A: Write a Python program to input the index and the value of the element missed by Martha and add that...
Q: Is it correct to say that stub isn't a network topology? explain?
A:
Q: Develop a program that 1- Would read an input from the keyboard. The input should be a whole positiv...
A: while True: #1- Would read an input from the keyboard. The input should be a whole positive numbe...
Q: Write a in C++ Using take while loop from your entered will that पन्ीिनति in string anay input and u...
A: the c++ code is an given below :
Q: Why is it important to establish a relation between a UI prototype (or even UI sketches) and use-cas...
A: use case is a formal or simple way to represent how an information system interact with the environm...
Q: rest a social netw
A: Pinterest a social network?
Q: What is the role of XLST in the development of a Web application?
A: Introduction: This aids in the implementation of machine learning models on websites. The route that...
Q: The infix string require to store in linked List using following structure typedef enum TokenType {...
A: Let's see the solution in the next steps
Q: Compare interrupt-based and DMA-based IO in terms of performance and program complexity.
A: Data transfer: Data can be sent between the central computer and I/O devices in a variety of ways. A...
Q: What role do individuals play in a computer system?
A: Introduction: Information System Information systems (IS) refers to the combination of hardware and...
Q: Implement a method with signature transfer(S, T) that transfers all elements from stack S onto stack...
A: Here,Implement a method with signature transfer(S, T) that transfers all elements fromstack S onto s...
Q: Computers manipulate information and carry out binary instructions. What exactly is binary's purpose...
A: Binary is the most efficient way to control logic circuits.
Q: w it works: • First, it is randomly determined if the user starts the game or the computer and this...
A: Python implementation of Tic Tac Toe game :- import random class TicTacToe: def __init__(self): ...
Q: Is it correct to say that stub isn't a network topology? explain
A: Introduction: A stub network, or pocket network, is a colloquial term that refers to a computer netw...
Q: 11. Write code that reproduces the output shown below. 1]: # Code Here 2]: # DON'T WRITE HERE 2]: ar...
A: Explanation: This is the array that transforms sequences of sequences into two-dimensional arrays. S...
Q: 3. What are examples of organizations that have equipped to comply with regulatory requirements in ...
A:
Q: Android Studio project Using Java language to Design a game to find the difference between images in...
A: CompareTwoImages.java import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.Buf...
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- knapsack problem: given the first table: c beeing value and w beeing weight, W max weight. I got table 2 as a solution to: 2 Solve the Knapsack problem with dynamic programming. To do this, enter the numbers Opt[k,V ] for k = 1,...,5 and V = 1,...,9 in a table. Here Opt[k, V ] is the partial solution obtained for the first k items with maximum weight V. " Can somebody explain me the values of the table? How do they get calculated? Also how do i solve the followup-task: Using the values in the table, determine a solution OPTSOL(I)=(β1,β2,β3,β4), starting with β4. (Use backtracing to do this)It has been observed by management that some faculty members at theuniversity demonstrate a lackadaisical attitude toward teaching. They seldom go to class yet at the end of each month they receive full salary. Management has decided that GHs 200, 300, 400, and 500 will be deducted from a faculty’s salary if he/she offends once, twice, third time and forth time respectively in a month. This means that if a faculty member offends once in a month GHs200 will be deducted, if a faculty member offends twice in a month, GHs 500 (i.e. 200+300) will be deducted, if a faculty member offends three times in a month GHs 900 (i.e. 200+300+400), will be deducted and if a faculty member offends four times in a month GHs 1,400 (i.e. 200+300+400+500). Assuming all faculty members are on a flat salary rate of GHs 2000.a. Write a program to request for the names of four faculty members and number times he/she has absented him/herself from class in a month.One of them should have absented him/herself…A person is looking to invest $100,000 in hopes of getting the highest return possible. There are 4 investment options available: bonds, mutual funds, stocks, or a saving account yielding interest. The bonds give a 3% annual return, mutual funds give an 8% return, stocks give a 10% return, and the savings account gives a 2% return (all investments subject to risk). To control for risk, several constraints are put into place: 1. No more than 15% of the total investment can be put into stocks. 2. At least 40% must be invested in mutual funds and/or the savings account. 3. The amount put in the savings account must be no more than the amount put into the other investments combined. 4. The ratio of money invested in bonds and mutual fund to the amount in stocks and the savings account should be at least 1.2 to 1. 5. All $100,000 must be invested and no shorting is allowed (It means there will be no “borrowed” money”) Formulate a linear programming model for this problem to get the highest…
- 4It has been observed by management that some faculty member at the university demonstratesa lackadaisical attitude toward teaching. They seldom go to class yet at the end of each month they receive full salary. Management hasdecided that GHs200, 300, 400, and 500 will be deducted from a faculty’s salary if he/she offends once, twice, third time and forth time respectively in a month. This means that if a faculty member offends once in a month GHs200 will be deducted, if a faculty member offends twice in a month,GHs500 (i.e. 200+300) will be deducted, if a faculty member offends three times in a month GHs900(i.e. 200+300+400), will be deducted and if a faculty member offends four times in a month GHs1,400 (i.e. 200+300+400+500). Assuming all faculty members are ona flat salary rate of GHs 2000.a.Write a program to request for the names of four faculty members and number times he/she has absented him/herself from class. One of them should have absented him/herself once, another twice,…IKEO is a furniture manufacturer which produces two sizes of wood blocks (type A and B) thatare used to make either a table or a chair. A table is made of a type A and a type B wood blocks,while a chair is made of a type A and two type B wood blocks.A table makes RM 3 profit, and a chair makes RM 5 profit. If M number of type A and Nnumber of type B wood blocks are produced, how many tables and chairs should themanufacturer make to obtain the greatest profit?For example, let M = 12 and N = 12.By making 4 tables (4 type A and 4 type B) and 4 chairs (4 type A and 8 type B), themanufacturer gain profit as follows,Profit = (RM 3) × 4 + (RM 5) × 4 = RM 32.If the manufacturer makes 2 more tables and 1 less chair, the profit will be increased as follows,Profit = (RM 3) × 6 + (RM 5) × 3 = RM 33.Is this the greatest profit?Write a complete C++ program to help the manufacturer determine the greatest profit obtainfrom making tables and chairs with a given number of M type A and N type B wood…How do these translate into c++? implicit noneinteger, parameter :: initial_bank=100integer :: num_games, games_won=0, games_lost=0integer :: i, payout, bankinteger, dimension(13,10) :: dicereal :: win_pct subroutine twentySix (payout)implicit noneinteger, dimension(13,10) :: diceinteger, intent(out) :: payoutinteger :: point, pnt_cntreal :: xinteger :: i, j ! determine pointcall random_number(x)point = int(x*6.0) + 1 ! roll dicepnt_cnt = 0 do i = 1, 13do j = 1, 10call random_number(x)dice(i,j) = int(x*6.0) + 1if (dice(i,j) == point) pnt_cnt = pnt_cnt + 1end doend do
- The Manhattan Tourist Problem (1) Given setting in Figure 6.4, calculate exact number of different paths by dynamic programming. (2) For a general setting, i.e., from source(0,0) to sink (n, m), how many different paths by dynamic programming?1 4 3 3 4 1 0 4 3 N 5 1It has been observed by management that some faculty member at the university demonstrates a lackadaisical attitude toward work. They seldom go to class yet at the end of each month they receive full salary. Management has decided that GHs 200, 300, 400, and 500 will be deducted from a faculty’s salary if he/she offends once, twice, third time and forth time respectively in a month. This means that if a faculty member offends once in a month GHs 200 will be deducted, if a faculty member offends twice in a month, GHs 500 (i.e. 200+300) will be deducted, if a faculty member offends three times in a month GHs 900 (i.e. 200+300+400), will be deducted and if a faculty member offends four times in a month GHs 1,400 (i.e. 200+300+400+500). Assuming all faculty members are on a flat salary rate of GHs 2500.a. Write a program to request for the names of four faculty members and number times he/she has absented him/herself from class. One of them should have absented him/herself once, another…It has been observed by management that some faculty member at the university demonstrates a lackadaisical attitude toward work. They seldom go to class yet at the end of each month they receive full salary. Management has decided that GHs 200, 300, 400, and 500 will be deducted from a faculty’s salary if he/she offends once, twice, third time and forth time respectively in a month. This means that if a faculty member offends once in a month GHs 200 will be deducted, if a faculty member offends twice in a month, GHs 500 (i.e. 200+300) will be deducted, if a faculty member offends three times in a month GHs 900 (i.e. 200+300+400), will be deducted and if a faculty member offends four times in a month GHs 1,400 (i.e. 200+300+400+500). Assuming all faculty members are on a flat salary rate of GHs 2500.a. Write a program to request for the names of four faculty members and number times he/she has absented him/herself from class. One of them should have absented him/herself once, another…
- An FSM Moore Vending machine sells chocolate bars for £1 each. System’s options: 1)entering no money 2) insert 50cents followed by another 50cents => get a chocolate bar 3) insert 50cents followed by $1 => receive change => get a chocolate bar 4) insert 50cents followed by $2 => receive change => then get a chocolate bar 5) insert $1 => get a can 6) insert $2 => receive change => then get a chocolate From the above translate these options into a state diagram, (Moore machime)It clarifies dynamic programming optimality?2. A safe has 5 locks v, w, y and z; all of which must be unlocked for the safe to open. The keys to the locks are distributed among five executives in the following manner.Mr. A has keys for locks v and x. Mr. B has keys for locks v and y. Mr. C has keys for locks w and y. Mr. D has keys for locks x and z. Mr. E has keys for locks v and z.a) Determine the minimal number of executives required to open the safe.b) Find all the combinations of executives that can open the safe; write and expression f(A, B, C, D, E) which specifies when the safe can be opened as a function of what executives are present.c) Who is the essential executive?