UH ID: You are given a sequence of n integers and an integer k such that 1


assuming ID is 1542553


UH ID:<br>You are given a sequence of n integers and an integer k such that 1< k<n. The goal<br>is to partition the sequence into k contiguous subsequences such that the largest sum of<br>the numbers in any subsequence is minimized. Design a dynamic programming algorithm<br>to find this minimum sum value as well as the partition that produces this minimum<br>value. An example is given below.<br>1. Consider your 7 digit UH ID as a sequence of 7 integers. For example, if your UH<br>ID is 3255967, then the sequence is 3, 2, 5, 5, 9, 6, 7. Let the given value of k be 3.<br>Then, the best way to partition this particular sequence into 3 subsequences so that<br>the largest subsequence sum is minimized is:<br>{3,2, 5}{5,9}{6, 7}<br>Note that the largest sum value is 5+ 9 = 14, attained by the second subsequence.<br>Any other partition will increase the largest subsequence sum.<br>What is the best way to partition your 7 digit UH ID sequence assuming k = 3?<br>2. Define the subproblems for your DP solution on a general instance of the problem<br>where the sequence is of length n. Note that k is a fixed integer given as part of the<br>input.<br>3. Give a recursive formulation, including the base cases, to solve this problem.<br>4. What is the running time of your solution?<br>5. Write a DP algorithm (give pseudocode) that outputs the minimum sum value.<br>6. Describe an algorithm to output the partition that corresponds to the minimum<br>value.<br>

Extracted text: UH ID: You are given a sequence of n integers and an integer k such that 1<>

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here