Dynamic Programming Tutorial Elaine Chew QMUL: ELE021/ELED021/ELEM021 26 March 2012.

Slides:



Advertisements
Similar presentations
Traffic assignment.
Advertisements

ITS THE FINAL LECTURE! (SING IT, YOU KNOW YOU WANT TO) Operations Research.
WOOD 492 MODELLING FOR DECISION SUPPORT Lecture 20 Network Problems.
Decoding of Convolutional Codes  Let C m be the set of allowable code sequences of length m.  Not all sequences in {0,1}m are allowable code sequences!
Outline LP formulation of minimal cost flow problem
ECE Longest Path dual 1 ECE 665 Spring 2005 ECE 665 Spring 2005 Computer Algorithms with Applications to VLSI CAD Linear Programming Duality – Longest.
Network Flows. 2 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Table of Contents Chapter 6 (Network Optimization Problems) Minimum-Cost.
Chapter 11 To accompany Quantitative Analysis for Management, Eleventh Edition, Global Edition by Render, Stair, and Hanna Power Point slides created by.
Discrete Math for Computer Science. Mathematical Model Real-world Problem Computerized Solution Abstract Model Transformed Model picture of the real worldpicture.
Chapter 7: Transportation Models Skip Ship Routing & Scheduling (pp ) Service Selection Shortest Path Transportation Problem Vehicle Routing &
Chapter 5: Transportation, Assignment and Network Models © 2007 Pearson Education.
Management Science 461 Lecture 2b – Shortest Paths September 16, 2008.
Network Optimization Models: Maximum Flow Problems
The Out of Kilter Algorithm in Introduction The out of kilter algorithm is an example of a primal-dual algorithm. It works on both the primal.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Network Optimization Problems: Models and Algorithms This handout: Minimum Spanning Tree Problem.
Math443/543 Mathematical Modeling and Optimization
Network Optimization Models: Maximum Flow Problems In this handout: The problem statement Solving by linear programming Augmenting path algorithm.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Chapter 7 Network Flow Models.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
© 2008 Prentice-Hall, Inc. Chapter 12 To accompany Quantitative Analysis for Management, Tenth Edition, by Render, Stair, and Hanna Power Point slides.
Stevenson and Ozgur First Edition Introduction to Management Science with Spreadsheets McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
1 1 Slide © 2000 South-Western College Publishing/ITP Slides Prepared by JOHN LOUCKS.
NetworkModel-1 Network Optimization Models. NetworkModel-2 Network Terminology A network consists of a set of nodes and arcs. The arcs may have some flow.
Computational Methods for Management and Economics Carla Gomes
1 Shortest Path Calculations in Graphs Prof. S. M. Lee Department of Computer Science.
More Dynamic Programming Floyd-Warshall Algorithm.
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Operations Research Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD4207 University of Palestine.
Networks and the Shortest Path Problem.  Physical Networks  Road Networks  Railway Networks  Airline traffic Networks  Electrical networks, e.g.,
Network Optimization Models
Network Models (2) Tran Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology Tran Van Hoai.
Distance. Euclidean Distance Minimum distance from a source (Value NoData) Input grid must have at least one source cell with the rest of the grid.
Shortest Path Problem Weight of the graph –Nonnegative real number assigned to the edges connecting to vertices Weighted graphs –When a graph.
1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.
Review for E&CE Find the minimal cost spanning tree for the graph below (where Values on edges represent the costs). 3 Ans. 18.
On Graphs Supporting Greedy Forwarding for Directional Wireless Networks W. Si, B. Scholz, G. Mao, R. Boreli, et al. University of Western Sydney National.
GLOBAL ROUTING Anita Antony PR11EC1011. Approaches for Global Routing Sequential Approach: – Route the nets one at a time. Concurrent Approach: – Consider.
Shortest Path in Weighted Graph : Dijkstra’s Algorithm.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
CS223 Advanced Data Structures and Algorithms 1 Maximum Flow Neil Tang 3/30/2010.
Efficient Resource Allocation for Wireless Multicast De-Nian Yang, Member, IEEE Ming-Syan Chen, Fellow, IEEE IEEE Transactions on Mobile Computing, April.
Welcome Unit 6 Seminar MM305 Wednesday 8:00 PM ET Quantitative Analysis for Management Delfina Isaac.
Chapter 5: Transportation, Assignment and Network Models © 2007 Pearson Education.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or.
Review for E&CE Find the minimal cost spanning tree for the graph below (where Values on edges represent the costs). 3 Ans. 18.
Example Apply hierarchical clustering with d min to below data where c=3. Nearest neighbor clustering d min d max will form elongated clusters!
Network Problems A D O B T E C
Spanning Trees Dijkstra (Unit 10) SOL: DM.2 Classwork worksheet Homework (day 70) Worksheet Quiz next block.
Network Analyst. Network A network is a system of linear features that has the appropriate attributes for the flow of objects. A network is typically.
Network Flows Based on the book: Introduction to Management Science. Hillier & Hillier. McGraw-Hill.
SHORTEST ROUTE PROBLEM A Networking Model Report for DPA 702 QUANTITATIVE METHODS OF RESEARCH By: ALONA M. SALVA Cebu Technological University.
1 1 Slide © 2005 Thomson/South-Western Chapter 9 Network Models n Shortest-Route Problem n Minimal Spanning Tree Problem n Maximal Flow Problem.
Network Models Chapter 12
St. Edward’s University
MATCH A Music Alignment Tool Chest
Shortest Path from G to C Using Dijkstra’s Algorithm
Network Models Chapter 12
Chapter 12 Network Models 12-1
Party-by-Night Problem
Graphs Chapter 11 Objectives Upon completion you will be able to:
Shortest Path.
Introduction Basic formulations Applications
Network Models 7-1.
Chapter 5 Transportation, Assignment, and Transshipment Problems
Network Models Chapter 12
Chapter 6 Network Flow Models.
Shortest Path Solutions
Presentation transcript:

Dynamic Programming Tutorial Elaine Chew QMUL: ELE021/ELED021/ELEM 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. Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6 th Intl Conf on Music Information Retrieval, London, UK, Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1 st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA,

Sources Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7 th, 8 th, 9 th editions, McGraw-Hill. Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6 th Intl Conf on Music Information Retrieval, London, UK, Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1 st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA,

Shortest Path Problem V = set of vertices (or nodes) E = set of edges (or arcs), including s (source) and t (sink) C = [c ij ] = set of arc costs X = indicator variable for whether arc ij is used Linear Programming Problem Formulation: Min Σ ij c ij x ij s.t.Σ i x ij = 1 Σ j x ij = 1 0 ≤ x ij ≤ 1

Hogwarts (Shortest Path) Example Determine which route from entrance to exit has the shortest distance G O EQ R MC 3 Gringott’s Wizarding Bank Entrance to Wizarding World Quality Quidditch Supplies Ollivander’s Exit to Charing Cross Road The Leaky Cauldron Magical Menagerie

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 the i-1-th nearest node. Among the new candidates, the node with shortest distance becomes the i-th nearest node.

Implementation Iteration, iSolved nodes connected to unsolved Closest connected unsolved node Total distance involved i-th nearest node Minimum distance Last connection

Hogwarts (Shortest Path) Example G O EQ R MC 3 0

Implementation Iteration, iSolved nodes connected to unsolved Closest connected unsolved node Total distance involved i-th nearest node Minimum distance Last connection 1RQ5Q5Q

Hogwarts (Shortest Path) Example G O EQ R MC 3 5 0

Implementation Iteration, iSolved nodes connected to unsolved Closest connected unsolved node Total distance involved i-th nearest node Minimum distance Last connection 1RQ5Q5R 2QRQR CCCC 6767 C6Q

Hogwarts (Shortest Path) Example G O EQ R MC

Implementation Iteration, iSolved nodes connected to unsolved Closest connected unsolved node Total distance involved i-th nearest node Minimum distance Last connection 1RQ5Q5R 2QRQR CCCC 6767 C6Q 3QCQC OOOO 9999 O9QCQC

Hogwarts (Shortest Path) Example G O EQ R MC

Implementation Iteration, iSolved nodes connected to unsolved Closest connected unsolved node Total distance involved i-th nearest node Minimum distance Last connection 1RQ5Q5R 2QRQR CCCC 6767 C6Q 3QCQC OOOO 9999 O9QCQC 4QCOQCO GMMGMM M COCO

Hogwarts (Shortest Path) Example G O EQ R MC

Implementation Iteration, iSolved nodes connected to unsolved Closest connected unsolved node Total distance involved i-th nearest node Minimum distance Last connection 1RQ5Q5R 2QRQR CCCC 6767 C6Q 3QCQC OOOO 9999 O9QCQC 4QCOQCO GMMGMM M COCO 5QOMQOM GGEGGE G11O

Hogwarts (Shortest Path) Example G O EQ R MC

Implementation Iteration, iSolved nodes connected to unsolved Closest connected unsolved node Total distance involved i-th nearest node Minimum distance Last connection 1RQ5Q5R 2QRQR CCCC 6767 C6Q 3QCQC OOOO 9999 O9QCQC 4QCOQCO GMMGMM M COCO 5QOMQOM GGEGGE G11O

Implementation Iteration, iSolved nodes connected to unsolved Closest connected unsolved node Total distance involved i-th nearest node Minimum distance Last connection 5QOMQOM GGEGGE G11O 6OMGOMG EEEEEE E G

Hogwarts (Shortest Path) Example G O EQ R MC

Sources Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7 th, 8 th, 9 th editions, McGraw-Hill. Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6 th Intl Conf on Music Information Retrieval, London, UK, Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1 st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA,

Dynamic Time Warping

Euclidean Distance

(i,j )

Sources Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7 th, 8 th, 9 th editions, McGraw-Hill. Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6 th Intl Conf on Music Information Retrieval, London, UK, Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1 st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA,

Tatum Segmentation Tatum = smallest perceptual time unit in music

Example Results

Segmentation Example of tatum selection Input: – Note onset times, O(1,n) = {O 1, O 2,…, O n } Output: – Segmentation points, S = {S 1, S 2,…,S m } – Optimal tatum in each segment

Remainder Squared Error o(1) … o(j) p 1 … j j+1 p

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 o j (= O j+1 – O j ) is the inter onset interval (IOI) between onsets j and j+1.

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 …