ENGLISH
general_suggestion

# general_suggestion - General suggestions to solve dynamic...

• Notes
• 1

This preview shows page 1. Sign up to view the full content.

General suggestions to solve dynamic programming (DP) problem: 1. Modify the known solution to solve your new problem. For example, we can make use the solution of 0-1 knapsack problem to solve the minimum number of coins problem. (Example: Question 2b in tutorial 8) 2. Usually, we can write down your global optimal (goal) solution first. Then, try to generalize it into a general form, which cover all possible cases. For example, in our matrix chain multipication problem, we write the goal optimal as M [1 , N ], then generalize it to M [ i, j ]. (Example: Question 2a/b in tutorial 8) 3. Derive the boundary conditions (Example: Question 2a/b in tutorial 8 OR lecture sketches)
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 4. When you are writing the recurrence, you may ﬁnd it is diﬃcult to ﬁll it some parameters. Recall that you are often able to consider all possible cases on some parameters by brute force. (Example: Question 2a in tutorial 8) 5. Doing the running time analysis is simple. In general, you just need to consider how many time is spent on each entry. Then you count how many entries you have been ﬁlled. Multiplying them together gives you the total running time. (Example: Question 2a in tutorial 8) c ± 2006 Chung Kai Lun Peter. Comments are welcomed. Email: [email protected] 1...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern