Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 The Pebble Game Geri Grolinger York University

2 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

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

4 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

5 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

6 30 70 60 50 40 2010 7 moves and 7 pebbles Example 1

7 30 70 60 50 40 2010 11 moves and 3 pebbles Example 2

8 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 ~ # REGISERS Use as few pebbles as possible ~ # REGISERS ~ TIME Use as few moves as possible ~ TIME input nodes nodes output nodes

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

10 Pyramid graph P k :

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

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

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

14 Arbitrary graph with restricted in-degree (d =2): Fact 2: Number of pebbles needed to pebble a graph of in-degree 2 is O(n/log n) (n = # nodes in the graph).

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

16 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

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


Download ppt "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."

Similar presentations


Ads by Google