subject

Following the idea in 2.1.3 of L06, write an algorithm to solve the segmented least square problem using dynamic programming. The output of your algorithm should be a record consisting two fields: one is the partition and the other is the penalty of the partition. Your algorithm format should follow the ones in lecture notes. 2.1.3 Design an algorithm following the DP methodology o Problem decomposition from an optimal solution Given a set P of points P1: (21,41), , Pr : (nyn), consider an optimal solution {S,..., Sk} • Decomposition: Sk and the rest {S1,.,Sk-1} We do not know Sk! But Sk can be only one of the following cases: case 1: Sk = {pn}. Decomposition:{S..., Sk-1} is an optimal solution of points P1.**.Pn-1 case 2: Sk = {Pn-1, Pn} case n: Sk = {P1 ...,Pn-1, Pn} Let opt(n) be the penalty of a minimal partition of P, i. e. input of opt function is n and output of opt is the penalty of minimal partition of P. case 1: opt(n) = opt(n-1) + C + error(Pn) o case 2: ?? case n: ??... Hence, opt(n) is a minimal value of the cases above: opt(n) = minisisn lopt(i - 1) + C + error({Pi, Pi+2, ..., Pn})) Now you can write the algorithm (using problem decomposition) for the idea above Iterative design: • M[O]: 0 -- accumulation of penalty starts from o • M[1] = min_{1<=i<=1}(opt(i-1) + C + error({p_İ, ...,P_1}) o M[n] = min_{1<=i<=n}(M[i-1] + C + error({p_İ, ..., P_n}) Algorithm 1: Input output side effect: plan end

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
Write a program that prints the day number of the year, given the date in the form month-day-year. for example, if the input is 1-1-2006, the day number is 1; if the input is 12-25-2006, the day number is 359. the program should check for a leap year. a year is a leap year if it is divisible by 4, but not divisible by 100. for example, 1992 and 2008 are divisible by 4, but not by 100. a year that is divisible by 100 is a leap year if it is also divisible by 400. for example, 1600 and 2000 are divisible by 400. however, 1800 is not a leap year because 1800 is not divisible by 400.
Answers: 3
question
Computers and Technology, 24.06.2019 00:30
The best definition of an idiom is a. a word or phrase that describes a noun b. a word or phrase describing a verb c. a phrase containing figurative language in which the word expresses a different idea from its exact meaning d. a phrase that compares two unlike objects or ideas
Answers: 2
You know the right answer?
Following the idea in 2.1.3 of L06, write an algorithm to solve the segmented least square problem u...
Questions
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
English, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
English, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Health, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
question
Mathematics, 11.09.2020 04:01
Questions on the website: 13722367