Assignment3 - D.P Flashcards

1
Q

Weighted activities problem with initial cost

Describe the problem

Note: description of a problem contains:

  • An instance
  • A legal solution
  • An optimal solution(what we shall find)
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Weighted activities problem with initial cost

describe:

  • A typical sub problem
  • The corresponding set of solutions
  • Define corresponding OPT value

NOTE:

we should first think of the subsets which construct the set of solutions. Then define a subproblem. “which solutions for sub problems can help you find the solution for opt quite immidietly?”

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Weighted activities problem with initial cost

divide the set of solutions into subsets and construct the formula

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Weighted activities problem with initial cost

what is the proof for the formula construct?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Weighted activities problem with initial cost

describe the iterative algorithm

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Weighted activities problem with initial cost

what is the run-time of the iterative algorithm?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Weighted activities problem with initial cost

describe the reconstruction algorithm

Always remember the base case!

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Weighted activities problem with initial cost

  • what is the assumption used in the proof of the reconstruction algorithm. Recall, we always proof relying on the assumption.*
  • what is the correctness theorem?*
  • what is the helping theorem?*
A
  • The assumption:*
  • The value contained in M[i] is OPT(i)*
  • Correctness theorem:*

Based on the assumption, the algorithm returns an optimal solution for the problem.

  • Helping theorem:*
  • Based on the assumption, for every k([0,n]) the recover(k) call returns a solution I in Sol(k) with the value M[k].*
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Weighted activities problem with initial cost

how is the main theorem and helping theorem proved, in the reconstruction algorithm?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The thrifty traveler

recall the formal definition

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The thrifty traveler

define Sol and OPT

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The thrifty traveler

describe the subsets of the solution set

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The thrifty traveler

what is the construction formula?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The thrifty traveler

describe the proof for the construction formula

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The thrifty traveler

describe the algorithm and the construction algorithm

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly