1. Write programs for the following exercises in Java, Python, C#, or C++. Each file should...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Write programs for the following exercises in Java, Python, C#, or C++. Each file should have your name at the top in comment, with short description of the implemented class and for files with main method the problem it is solving. Make sure your files have appropriate names. Note 1: If a program is not in approved programming language (or in different language than previous assignment) or has any syntax error, no points will be awarded for that exercise Note 2: Submitting wrong files or in the wrong format or corrupted files will not be accepted nor will any re-submission be allowed for any such mistake. a) BackKnapsack: Implement the backtracking algorithm for Knapsack problem from your textbook (Algorithm 5.7) and modify to output the max profit and the item numbers that give the solution. Code the below problem instance in your main method. Document the solution. W=12 i 1 20 2 2 30 5 3 35 7 4 12 3 5 3 1 b) BoundKnapsack: Implement the Branch-And-Bound algorithm using best-first search traversal for Knapsack problem from your textbook (Algorithm 6.2) and modify to output the max profit and the item numbers that give the solution. Code the same problem instance as previous problem (a) in your main method. Document the solution. c) CompareKnapsack: Modify and run (a) and (b) algorithms using a large instance of the problem (15-20 items) and compare performance (based on the number of nodes examined). Document the instance used, solution (list of items), number of nodes examined, and discussion of the performance differences and conclusions. 2. Record a video 10-12min long explaining the implementation and output of each of the above programs 3. Submission instructions: Submit one zip file with all the programs; second zip file with documented solutions for the first three programs (a-c), and solution and analysis for the last one (d); and third zip file with the video 1. Write programs for the following exercises in Java, Python, C#, or C++. Each file should have your name at the top in comment, with short description of the implemented class and for files with main method the problem it is solving. Make sure your files have appropriate names. Note 1: If a program is not in approved programming language (or in different language than previous assignment) or has any syntax error, no points will be awarded for that exercise Note 2: Submitting wrong files or in the wrong format or corrupted files will not be accepted nor will any re-submission be allowed for any such mistake. a) BackKnapsack: Implement the backtracking algorithm for Knapsack problem from your textbook (Algorithm 5.7) and modify to output the max profit and the item numbers that give the solution. Code the below problem instance in your main method. Document the solution. W=12 i 1 20 2 2 30 5 3 35 7 4 12 3 5 3 1 b) BoundKnapsack: Implement the Branch-And-Bound algorithm using best-first search traversal for Knapsack problem from your textbook (Algorithm 6.2) and modify to output the max profit and the item numbers that give the solution. Code the same problem instance as previous problem (a) in your main method. Document the solution. c) CompareKnapsack: Modify and run (a) and (b) algorithms using a large instance of the problem (15-20 items) and compare performance (based on the number of nodes examined). Document the instance used, solution (list of items), number of nodes examined, and discussion of the performance differences and conclusions. 2. Record a video 10-12min long explaining the implementation and output of each of the above programs 3. Submission instructions: Submit one zip file with all the programs; second zip file with documented solutions for the first three programs (a-c), and solution and analysis for the last one (d); and third zip file with the video
Expert Answer:
Answer rating: 100% (QA)
Commenting Commenting involves placing Descriptions inside of computer programs detailing what the C... View the full answer
Related Book For
Posted Date:
Students also viewed these accounting questions
-
Write the IUPAC name of each of the following compounds. a. b. c d. CH CHCH CHO CH3CH2
-
For each graph, write a description like those in Exercise 1. a. b. c.
-
Write a short description of a real object for which Figure P1.59 would be a realistic position-versus-time graph. Figure P1.59 x (m) 40+ 30- 20- 10- 0- -1 (s) 30 20 10
-
Pick a method of accounting for bad debt. What do you like about it and why? give an example of a company where it makes sense to use that method? Why does it make sense? Also give an example of a...
-
Plan a ten-minute presentation on a topic about which you are knowledgeablea hobby, a task, a vacation trip, a part-time job, directions to complete a task, or other topic. In planning the...
-
Calculating the Number of Periods youre trying to save to buy a new $170,000 Ferrari. You have $40,000 today that can be invested at your bank. The bank pays 6.2 percent annual interest on its...
-
What are the different types of schemes associated with complex frauds?
-
Climate-Control, Inc., manufactures a variety of heating and air-conditioning units. The company is currently manufacturing all of its own component parts. An outside supplier has offered to sell a...
-
Simplify the expression to a form in which 2 is raised to a single integer power. (25)32-7 2-6
-
Which histograms are skewed to the left? Refer to histograms A through H in Figure 2.12. 2.0 -50 0.0 1.0 3 150 5 15 25 D -1 -3 8 14 -7 -4 -1 G Figure 2.12 Eight histograms LO 09 007 01 08 01 250 09...
-
In the presence of background noise of 85 dB level, the sound measurements of the operation of three machines independently provided values as 88 dB, 90 dB, 92dB. Determine the overall SPL and...
-
One of the biggest barriers for firms entering into alliances with foreign partners, and even domestic ones, are issues of trust. Does a well-crafted legal agreement prevent breaches of ethics by...
-
What is the industry life cycle?
-
What are the implications of dynamic strategies for strategy formulation and implementation?
-
Evaluate the following statement. If a firm is facing internal diseconomies of scale, it must be in an industry which is experiencing external diseconomies.
-
How easy or difficult is it to achieve the alternative types of synergies?
-
Generate a report to display staff full names (combination of first and last names), jobs and department names. Rename the column headings to "Full Name", "Job Title", and "Department Name". Order...
-
Charles owns an office building and land that are used in his trade or business. The office building and land were acquired in 1978 for $800,000 and $100,000, respectively. During the current year,...
-
The following are properties of substances. Decide whether each is a physical property or a chemical property. a. Chlorine gas liquefies at 35oC under normal pressure. b. Hydrogen burns in chlorine...
-
Describe the hybrid orbitals used by each carbon atom in the following molecules: a. b. C-C-C-OH
-
Write Lewis symbols for the following: a. P b. P3 c. Ga d. Ga3+
-
Are there any activities in a family that you believe should be allocated by a market? What characteristics do those activities have?
-
What is the difference between socialism in theory and socialism in practice?
-
Into what three sectors are market economies generally broken up?
Study smarter with the SolutionInn App