Dynamic programming tutorial
This presentation is the property of its rightful owner.
Sponsored Links
1 / 33

Dynamic Programming Tutorial PowerPoint PPT Presentation


  • 129 Views
  • Uploaded on
  • Presentation posted in: General

Dynamic Programming Tutorial. Elaine Chew QMUL: ELE021/ELED021/ELEM021 26 March 2012. Sources. Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7 th , 8 th , 9 th editions, McGraw-Hill.

Download Presentation

Dynamic Programming Tutorial

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Dynamic programming tutorial

Dynamic Programming Tutorial

Elaine Chew

QMUL: ELE021/ELED021/ELEM021

26 March 2012


Sources

Sources

  • Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7th, 8th, 9th editions, McGraw-Hill.

  • Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6thIntl Conf on Music Information Retrieval, London, UK, 492-497.

  • Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA, 577-584.


Sources1

Sources

  • Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7th, 8th, 9th editions, McGraw-Hill.

  • Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6thIntl Conf on Music Information Retrieval, London, UK, 492-497.

  • Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA, 577-584.


Shortest path problem

Shortest Path Problem

  • V = set of vertices (or nodes)

  • E = set of edges (or arcs), including s (source) and t (sink)

  • C = [cij] = set of arc costs

  • X = indicator variable for whether arc ij is used

  • Linear Programming Problem Formulation:

    Min Σijcijxij

    s.t.Σixij= 1

    Σjxij= 1

    0 ≤ xij≤ 1


Hogwarts shortest path example

Gringott’s

Wizarding Bank

Exit to

Charing Cross Road

Quality

Quidditch

Supplies

Entrance to Wizarding World

7

C

M

R

Q

E

O

G

2

2

5

Ollivander’s

5

4

3

4

1

1

7

4

Magical Menagerie

The Leaky Cauldron

Hogwarts (Shortest Path) Example

  • Determine which route from entrance to exit has the shortest distance


Algorithm

Algorithm

  • At iteration i

    • Objective: find the i-th nearest node to the origin

    • Input: i-1 nearest node to the origin, shortest path and distance

    • Candidates for i-th nearest node: nearest unsolved node to one solved

    • Calculation for i-th nearest node: for each new candidate, add new edge to previously found shortest path to thei-1-th nearest node. Among the new candidates, the node with shortest distance becomes the i-th nearest node.


Implementation

Implementation


Hogwarts shortest path example1

7

C

R

Q

E

O

G

M

2

2

5

5

4

3

4

1

1

7

4

Hogwarts (Shortest Path) Example

0


Implementation1

Implementation


Hogwarts shortest path example2

7

M

Q

E

O

G

C

R

0

2

2

5

5

5

4

3

4

1

1

7

4

Hogwarts (Shortest Path) Example


Implementation2

Implementation


Hogwarts shortest path example3

7

C

R

Q

E

O

G

M

2

2

5

5

4

3

4

1

1

7

4

Hogwarts (Shortest Path) Example

0

5

6


Implementation3

Implementation


Hogwarts shortest path example4

7

C

R

Q

E

O

G

M

2

2

5

5

4

3

4

1

1

7

4

Hogwarts (Shortest Path) Example

0

5

9

6


Implementation4

Implementation


Hogwarts shortest path example5

7

G

R

Q

E

O

M

C

2

2

5

5

4

3

4

1

1

7

4

Hogwarts (Shortest Path) Example

0

5

9

10

6


Implementation5

Implementation


Hogwarts shortest path example6

7

G

R

Q

E

O

M

C

2

2

5

5

4

3

4

1

1

7

4

Hogwarts (Shortest Path) Example

11

0

5

9

10

6


Implementation6

Implementation


Implementation7

Implementation


Hogwarts shortest path example7

7

O

R

Q

E

G

M

C

2

2

5

5

4

3

4

1

1

7

4

Hogwarts (Shortest Path) Example

11

0

5

9

13

10

6


Sources2

Sources

  • Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7th, 8th, 9th editions, McGraw-Hill.

  • Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6thIntl Conf on Music Information Retrieval, London, UK, 492-497.

  • Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA, 577-584.


Dynamic time warping

Dynamic Time Warping


Euclidean distance

Euclidean Distance


Sources3

Sources

  • Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7th, 8th, 9th editions, McGraw-Hill.

  • Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6thIntl Conf on Music Information Retrieval, London, UK, 492-497.

  • Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA, 577-584.


Tatum segmentation

Tatum Segmentation

  • Tatum = smallest perceptual time unit in music


Example results

140

Coarse Manual

Segmentation

bepthq3

120

son08_3

100

Tatum

80

60

40

0

100

200

300

400

Beats

Example Results


Segmentation

Segmentation

  • Example of tatum selection

  • Input:

    • Note onset times, O(1,n) = {O1, O2,…, On}

  • Output:

    • Segmentation points, S = {S1, S2,…,Sm}

    • Optimal tatum in each segment


Remainder squared error

Remainder Squared Error

p

o(1) … o(j)

1 … j j+1

p


Dynamic programming tutorial

ERR(.)

The error incurred by a tatum assignment, p, for onsets O(i+ 1,k) is given by the remainder squared error (RSE) function:

where oj (= Oj+1 – Oj) is the inter onset interval (IOI) between onsets j and j+1.


Optimal segmentation

Optimal Segmentation

  • Define OPT(k) to be the best segmentation (cost) for a given set of onsets O(1,k):

    where ERR(.) returns the error incurred by the best tatum assignment for the set of onsets O(i+1,k).

k

i i+1 …

1 …


  • Login