Advanced Algorithm Design and Analysis Student: Gertruda Grolinger Supervisor: Prof. Jeff Edmonds CSE 4080 Computer Science Project.

Slides:



Advertisements
Similar presentations
Algorithms (and Datastructures) Lecture 3 MAS 714 part 2 Hartmut Klauck.
Advertisements

Algorithm Design Methods (I) Fall 2003 CSE, POSTECH.
Algorithm Design Methods Spring 2007 CSE, POSTECH.
Introduction to Algorithms NP-Complete
Communication Lower Bound for the Fast Fourier Transform Michael Anderson Communication-Avoiding Algorithms (CS294) Fall 2011.
Optical networks: Basics of WDM
CSC411Artificial Intelligence 1 Chapter 3 Structures and Strategies For Space State Search Contents Graph Theory Strategies for Space State Search Using.
Greedy Algorithms.
Based on: Petri Nets and Industrial Applications: A Tutorial
Dynamic Programming Nithya Tarek. Dynamic Programming Dynamic programming solves problems by combining the solutions to sub problems. Paradigms: Divide.
COMP 553: Algorithmic Game Theory Fall 2014 Yang Cai Lecture 21.
Anany Levitin ACM SIGCSE 1999SIG. Outline Introduction Four General Design Techniques A Test of Generality Further Refinements Conclusion.
Optimal Instruction Scheduling for Multi-Issue Processors using Constraint Programming Abid M. Malik and Peter van Beek David R. Cheriton School of Computer.
1 Searching in a Graph Jeff Edmonds York University COSC 3101 Lecture 5 Generic Search Breadth First Search Dijkstra's Shortest Paths Algorithm Depth First.
Deterministic Selection and Sorting Prepared by John Reif, Ph.D. Analysis of Algorithms.
AE1APS Algorithmic Problem Solving John Drake..  Previously we introduced matchstick games, using one pile of matches  It is possible to have more than.
Lectures on Network Flows
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Improving code generation. Better code generation requires greater context Over expressions: optimal ordering of subtrees Over basic blocks: Common subexpression.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Review Lecture Tuesday, 12/10/02.
High Performance Computing 1 Parallelization Strategies and Load Balancing Some material borrowed from lectures of J. Demmel, UC Berkeley.
Pertemuan 23 : Penerapan Dinamik Programming (DP) Mata kuliah : K0164-Pemrograman vers 01.
Improving Code Generation Honors Compilers April 16 th 2002.
View from 30,000 feet and Introduction to Graph Problems Lecture 19 CS 312.
Computational aspects of stability in weighted voting games Edith Elkind (NTU, Singapore) Based on joint work with Leslie Ann Goldberg, Paul W. Goldberg,
Dynamic Programming Introduction to Algorithms Dynamic Programming CSE 680 Prof. Roger Crawfis.
1 Summary of lectures 1.Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture SlidesLecture Slides 2.Recurrence and Master Theorem (Chapter.
Hamed Pirsiavash, Deva Ramanan, Charless Fowlkes
Instructor: Dr. Sahar Shabanah Fall Lectures ST, 9:30 pm-11:00 pm Text book: M. T. Goodrich and R. Tamassia, “Data Structures and Algorithms in.
Nattee Niparnan Dept. of Computer Engineering, Chulalongkorn University.
CSE 3101E Design and Analysis of Algorithms Prof. J. Elder.
HOW TO SOLVE IT? Algorithms. An Algorithm An algorithm is any well-defined (computational) procedure that takes some value, or set of values, as input.
Jeff Edmonds room: 3044 Many Topics in Theory & Mathematics Scheduling Algorithms –scheduling some shared resource –to a steady stream.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 28, 2014.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 9, 2014.
Paths and Trails in Edge Colored Graphs Latin-American on Theoretical Informatics Symposium LATIN 2008 Abouelaoualim, K. Das, L. Faria, Y. Manoussakis,
Complexity of Functions with Cartesian GP and Recursion. John Woodward. School of Computer Science, The University of Birmingham, United Kingdom. 1 OVERVIEW.
1 BIM304: Algorithm Design Time: Friday 9-12am Location: B4 Instructor: Cuneyt Akinlar Grading –2 Midterms – 20% and 30% respectively –Final – 30% –Projects.
Gene expression & Clustering. Determining gene function Sequence comparison tells us if a gene is similar to another gene, e.g., in a new species –Dynamic.
Advanced Compiler Techniques LIU Xianhua School of EECS, Peking University Loops.
Speeding Up Enumeration Algorithms with Amortized Analysis Takeaki Uno (National Institute of Informatics, JAPAN)
Chapter 6 Questions Quick Quiz
1 Dynamic Programming Topic 07 Asst. Prof. Dr. Bunyarit Uyyanonvara IT Program, Image and Vision Computing Lab. School of Information and Computer Technology.
Design and Analysis of Algorithms (09 Credits / 5 hours per week) Sixth Semester: Computer Science & Engineering M.B.Chandak
The Pebble Game Geri Grolinger York University. The Pebble Game Used for studying time-space trade-off Used for studying time-space trade-off One player.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Review Lecture Tuesday, 12/11/01.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
TU/e Algorithms (2IL15) – Lecture 13 1 Wrap-up lecture.
1 GRAPHS – Definitions A graph G = (V, E) consists of –a set of vertices, V, and –a set of edges, E, where each edge is a pair (v,w) s.t. v,w  V Vertices.
Jeff Edmonds room: 3044
Lecture 2 Algorithm Analysis
New Characterizations in Turnstile Streams with Applications
Finding a Path With Largest Smallest Edge
Summary of lectures Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture Slides Recurrence and Master Theorem (Chapter 4). Lecture Slides.
Seminar on Dynamic Programming.
Design and Analysis of Algorithms (07 Credits / 4 hours per week)
More Graph Algorithms.
Analysis and design of algorithm
Dynamic Programming.
Objective of This Course
COSC 320 Advanced Data Structures and Algorithm Analysis
Richard Anderson Lecture 30 NP-Completeness
Major Design Strategies
Fast Min-Register Retiming Through Binary Max-Flow
INTRODUCTION TO ALOGORITHM DESIGN STRATEGIES
Design and Analysis of Algorithms (04 Credits / 4 hours per week)
Major Design Strategies
Seminar on Dynamic Programming.
Presentation transcript:

Advanced Algorithm Design and Analysis Student: Gertruda Grolinger Supervisor: Prof. Jeff Edmonds CSE 4080 Computer Science Project

 Linear Programming: “What to put in a hotdog?”  Approximation Algorithms: Knapsack  NP-completeness: Reductions  Classifying problems  Network Flow: Steepest Assent, Edmonds-Karp, Matching Matching  Dynamic Programming: Parsing CFG  Greedy Algorithms: Matroids  Recursion: Parsing  Divide and Conquer: Fast Fourier Transformations Topics:

The Pebble Game

Used for studying time-space trade-off Used for studying time-space trade-off One player game, played on a DAG One player game, played on a DAG

Output nodes Nodes Input nodes Formalization: Directed acyclic graph Directed acyclic graph Bounded in-degree Bounded in-degree

Three main rules: 2. A pebble can be placed on a node v if all predecessors of the node v are marked with pebbles 3. A pebble can be removed from a node at any time Note: a pebble removed from the graph can be ‘reused’ 1. A pebble can be placed on any input node on any input node

Strategy: sequence of legal moves which ends in pebbling the distinguished node f The Goal: to place a pebble on some previously distinguished node f while minimizing the number of pebbles used A move: placing or removing one of the pebbles according to the three given rules f

moves and 7 pebbles Example 1

moves and 3 pebbles Example 2

Interpretation: 1. A pebble can be placed on any input node ~ LOAD on any input node ~ LOAD 2. A pebble can be placed on a node v if all predecessors of the node a node v if all predecessors of the node v are marked with pebbles ~ COMPUTE v are marked with pebbles ~ COMPUTE 3. A pebble can be removed form a node at any time ~ DELETE ~ # REGISTERS Use as few pebbles as possible ~ # REGISTERS ~ TIME Use as few moves as possible ~ TIME input nodes nodes output nodes

In general: How many pebbles are required to pebble a graph with n nodes? with n nodes?

Pyramid graph P k :

Fact 1: Every pebbling strategy for P k (k > 1) must use AT LEAST k + 1 pebbles. That is Ω ( ) pebbles expressed in number of edges n. n √

Pyramid graph P k : k = 5 We need at least: k + 1 = 6

Pyramid graph P k : Let’s consider having k = 5 pebbles

Arbitrary graph with restricted in-degree (d =2): Fact 2: Every graph of in-degree 2 can be pebbled with O(n/log n) pebbles (n = # nodes in the graph).

Arbitrary graph with restricted in-degree (d =2): Proof : Recursive pebbling strategy Cases Recursions for each case Solutions: P(n) = O(n/log n) O(n/log n)

A Pebble problem Pebble a DAG that has a rectangle of nodes that is w wide and h high (h <<w). h w The goal is to put a pebble on any single node on the top row. For each node v (not on the bottom row), there will be d nodes In(v) = {u 1, u 2,…u d } on the previous row with edges to v. v u1u1 u2u2 udud …

Dynamic Programming 1.Algorithm that uses as many pebbles (memory) as needed, but does not redo any work 2.Loop invariant 3.How much time and how many pebbles?

Dynamic Programming algorithm  Place a pebble on each of the nodes on the bottom row  After the i th iteration: there is a pebble on each node of the i th row from the bottom  Next iteration: place a pebble on each node on the (i +1) st row and remove pebbles from the i th row so they can be reused  Exit when i =h Loop Invariant Progress made, LI maintained

Time and pebbles (space) needed  Time = O(h *w)  Pebbles = 2 *w = O(w)

Recursive Backtracking  Task: to place a pebble on some node v which is r rows from the bottom  Algorithm (recursive) to accomplish this task that re-does work but uses as few pebbles as possible  Time(r ) and Pebbles(r) are time and pebbles used to place a pebble on one node r rows from the bottom

Recursive Backtracking algorithm  My task is to place a pebble on some node v which is r rows from the bottom  I ask a friend, for each of the d nodes u i  In(v) to place a pebble on u i  Once there is a pebble on all nodes u i  In(v), I place a pebble on node v

Time(r ) and Pebbles(r)  Time(r) = d * Time(r-1) + 1 ≈ d * Time(r-1) = = d (r-1)  Pebbles(r ) = Pebbles(r-1) + (d – 1) = = (d - 1) * (r – 1) + 1

Conclusion : time-space trade-off  Time comparison DP:  (h * w) RB:  (d (h-1) )  Space comparison DP:  (w) RB:  (d * h) where h << w

References: 1.Gems of theoretical computer science U. Schöning, R. J. Pruim 2. Asymptotically Tight Bounds on Time-Space Trade-offs in a Pebble Game T. Lengauer, R. E. Tarjan 3. Theoretical Models 2002/03 P. van Emde Boas

Thank you for your attention Thank you for your attention Questions ?