Assignment 3 CS 452/652/752 Advanced Algorithms and Applications Out: 19 October 2019, Due: 28 October 2019 Upload the following files, (a) a PDF (preferably, generated from latex) containing the answers for all programming questions. (b) Code for all programming problems. The code should contain compilation and execution instructions. Use concepts of Dynamic programming to solve these questions. CS452 solve any 6. The 6 questions you solve will be worth (100/6) points. The remaining two questions can be solved for cumulative extra credit of 10 points. CS652 and CS752 solve any 7. All questions worth (100/7) points. The remaining question can be solved for an extra credit of 10 points. Programming problems Question 1 FibDP of integer n is defined to be sum of FibDP of n – 1 added to FibDP of n – 2. The first two numbers of the FibDP series are 5 and 6. The first 5 terms are: 5, 6, 11, 17, 28, … Take into consideration the numbers in the FibDP series whose values are not more than 50000000000. What is the sum of the odd-valued terms? Question 2 Starting in the top left corner of a 2 × 2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner. How many such routes are there through a 21 × 21 grid? 1 Question 3 You are at the top of a triangle mountain made with numbers. While moving down, you can only move to adjacent numbers in the row below. There are many ways to reach the bottom from the top. Pick the path that maximizes the total. For example, for the number mountain below, the maximum total you can attain is 23. What is the maximum total you can achieve for the attached dataset [triangles.txt] ? Question 4 In India the currency is made up of Rupees (R), and Paise (P), and there are eight coins in general circulation: 5P, 10P, 25P, 50P, 1R (100P), 2R (200p), 5R (500P), and 10R (1000P) One way to make 2R is as follows: 1 × 1R + 1 × 50P + 2 × 25P How many different ways can you make 5R, given you have infinite supply of coins? Question 5 In the 5×5 matrix below, the minimal path sum from the top left to the bottom right, by only moving to the right and down, is indicated in bold red and is equal to 2427. For the attached 80 × 80 matrix [matrix.txt], find the minimal path sum. Question 6 You are given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum 2 product you can get. (Example Input: 10, Output: 36, Explanation: 10 = 3 3 4 = 36). What is your answer for n = 82. Question 7 Catalan numbers are recursively defined as follows: What is Catalan number 20. Question 8 A binomial coefficient C(n, k) gives the number of ways, disregarding order, that k objects can be chosen from among n objects. What is C(40, 5) ? 3 ~~~For this or similar assignment papers~~~