Research Proposal: A data structure to support the simulation of - - PowerPoint PPT Presentation

research proposal a data structure to support the
SMART_READER_LITE
LIVE PREVIEW

Research Proposal: A data structure to support the simulation of - - PowerPoint PPT Presentation

Research Proposal: A data structure to support the simulation of random events Hubert Chan December 19, 2005 p. 1 Outline the random object selection problem reaction-diffusion equation (motivation) problem description related problems:


slide-1
SLIDE 1

Research Proposal: A data structure to support the simulation of random events

Hubert Chan

December 19, 2005 – p. 1

slide-2
SLIDE 2

Outline

the random object selection problem reaction-diffusion equation (motivation) problem description related problems: selectable partial sums

  • ptimal search trees/coding systems

research goals and approaches

December 19, 2005 – p. 2

slide-3
SLIDE 3

Random object selection problem

Given:

n objects

relative probabilities p1, . . . , pn (n

i=1 pi = 1)

Goal: select an object at random the probability of selecting object k is pk Static solution: precompute σk = k

i=1 pi

generate uniform-[0, 1) random variable x binary search for k s.t. σk−1 ≤ x < σk

.2 .1 .3 .2 .2 1 σk: 0 .2 .3 .6 .8 1

December 19, 2005 – p. 3

slide-4
SLIDE 4

Random object selection problem

limitations: probabilities cannot change set of objects cannot change all objects treated equally

December 19, 2005 – p. 4

slide-5
SLIDE 5

Reaction-diffusion equation

describes how a chemical (or other contaminant) behaves in a fluid chemical movement (e.g. diffusion, fluid flow) increases/decreases in concentration (e.g. reactions, births/deaths)

December 19, 2005 – p. 5

slide-6
SLIDE 6

Simulating

divide fluid into cells concentration → discrete number of particles movement of chemical → movement of particles between adjacent cells increases/decreases in concentration → particle “births” and “deaths”

December 19, 2005 – p. 6

slide-7
SLIDE 7

Simulating

state: collection of all the particle counts event: e, a particle movement, birth, or death modeled as Markov process time of next occurrence: exponential random variable with rate λe function of particle counts, spatial location

December 19, 2005 – p. 7

slide-8
SLIDE 8

Straightforward simulation

generate n exponential random variables (time of events) find random variable. with smallest value (select event) simulate event update rates re-generate random variables as needed, due to changed rates

December 19, 2005 – p. 8

slide-9
SLIDE 9

More efficient simulation

let λE =

e∈E λe, sum of all rates

generate one λE-exponential r.v. (time of events) select event randomly s.t. event e has probability

pe = λe/λE

simulate event update rates

December 19, 2005 – p. 9

slide-10
SLIDE 10

Splitting and merging

some areas are of greater interest e.g. modeling pollution in a lake → more interested in areas close to shore grid may be non-uniform

December 19, 2005 – p. 10

slide-11
SLIDE 11

Splitting and merging

some areas are of greater interest e.g. modeling pollution in a lake → more interested in areas close to shore grid may be non-uniform grid may change dynamically e.g. more interested in areas of high concentration split/merge cells

December 19, 2005 – p. 10

slide-12
SLIDE 12

Splitting and merging

some areas are of greater interest e.g. modeling pollution in a lake → more interested in areas close to shore grid may be non-uniform grid may change dynamically e.g. more interested in areas of high concentration split/merge cells

December 19, 2005 – p. 10

slide-13
SLIDE 13

Splitting and merging

some areas are of greater interest e.g. modeling pollution in a lake → more interested in areas close to shore grid may be non-uniform grid may change dynamically e.g. more interested in areas of high concentration split/merge cells

December 19, 2005 – p. 10

slide-14
SLIDE 14

Splitting and merging

some areas are of greater interest e.g. modeling pollution in a lake → more interested in areas close to shore grid may be non-uniform grid may change dynamically e.g. more interested in areas of high concentration split/merge cells

December 19, 2005 – p. 10

slide-15
SLIDE 15

Problem description

create a data structure Given: set of pairs: events and their rates

(e1, λ1), . . . , (en, λn)

support these operations: random select: select an event at random, with probability λe/λE update: set the rate of an event to a new value split: split one event → a number of events, distribute rate evenly merge: merge a number of events → one event with rate equal to sum

December 19, 2005 – p. 11

slide-16
SLIDE 16

Problem description

create a data structure Given: set of pairs: events and their rates

(e1, λ1), . . . , (en, λn)

support these operations: random select: select an event at random, with probability λe/λE update: set the rate of an event to a new value split: split one event → a number of events, distribute rate evenly merge: merge a number of events → one event with rate equal to sum insert: add a new event along with its rate delete: remove an event along with its rate

December 19, 2005 – p. 11

slide-17
SLIDE 17

Selectable partial sums

related to simple random object selection problem given non-negative keys a1, . . . , an support these operations: update: set the value of a key to a new value sum: given k, calculate σk = k

i=1 ai

select: given target t, find k such that σk−1 ≤ t < σk to solve random object selection problem: probabilities pi ↔ ai uniform-[0, 1) random variable x ↔ t

December 19, 2005 – p. 12

slide-18
SLIDE 18

Binary trees and selectable partial sums

simplest sub-linear data structure

71 35 36 15 20 20 16 6 11 11 9 10 10 4 12 1 5 3 8 2 9 4 5 7 3 8 2 1 3 5 7

December 19, 2005 – p. 13

slide-19
SLIDE 19

Previous work on selectable partial sums

Pˇ atras ¸cu and Demaine: Θ(1 + lg n/ lg(b/δ)) on b-bit machine, δ-bit additive changes (upper and lower bounds) Raman, Raman, Rao: succinct data structure kn + o(kn) space, O(lg n/ lg lg n) time Hon, Sadakane, Sung: keys up to O(lg lg n) bits, trade off between update and queries Moffat: O(log(1 + k)) time to update, sum, or select kth key

ak

Hampapuram and Fredman: updates and sums have different probabilities, but does not support selections

December 19, 2005 – p. 14

slide-20
SLIDE 20

Optimal search trees/coding systems

use a tree to solve selectable partial sums consider different access probabilities

  • ptimal search trees: minimize expected cost for a

search entropy H = n

i=1 pi log 1/pi

expected search time: between H − log H − log e + 1 and H + 2 some coding systems (e.g. Huffman): correspondence with trees also tries to minimize expected access cost

December 19, 2005 – p. 15

slide-21
SLIDE 21

Previous work on coding

Faller, Gallager, Knuth: dynamic Huffman coding Vitter: improved FGK algorithm Gagie: dynamic Shannon coding

December 19, 2005 – p. 16

slide-22
SLIDE 22

Research goals

support the operations with the following running times: select: O(log 1/p) update: O(log 1/p), or maybe O(f(∆λ) log 1/p) split: ? merge: ? insert: O(log 1/p) delete: O(log 1/p)

December 19, 2005 – p. 17

slide-23
SLIDE 23

Splitting

under a standard tree: trivial

8

December 19, 2005 – p. 18

slide-24
SLIDE 24

Splitting

under a standard tree: trivial

2 2 2 2

December 19, 2005 – p. 18

slide-25
SLIDE 25

Splitting

under a standard tree: trivial harder if tree is stored in special structure (e.g. Vitter),

  • r data structure has other constraints

December 19, 2005 – p. 18

slide-26
SLIDE 26

Merging

harder than splitting if nodes to be merged have common parent → easy

3 5

December 19, 2005 – p. 19

slide-27
SLIDE 27

Merging

harder than splitting if nodes to be merged have common parent → easy

8

December 19, 2005 – p. 19

slide-28
SLIDE 28

Merging

harder than splitting if nodes to be merged have common parent → easy

  • therwise, need to remove old nodes, insert new node

→ minimize time

December 19, 2005 – p. 19

slide-29
SLIDE 29

Merging

if events on same level:

a e1 e2

December 19, 2005 – p. 20

slide-30
SLIDE 30

Merging

if events on same level:

a e1 e2

December 19, 2005 – p. 20

slide-31
SLIDE 31

Merging

if events on same level:

a

December 19, 2005 – p. 20

slide-32
SLIDE 32

Approaches

try to adapt previous work Hampapuram and Fredman: consider different probabilities, but do not support needed operations coding systems support updating weights, but only increment/decrement by one → O(∆λ log 1/p) also can support insert/delete, but too slow

December 19, 2005 – p. 21

slide-33
SLIDE 33

Approaches

group nodes according to rate put each group in a balanced tree

(22, 23] 5 7 6 7 8 7 5 6 51 (21, 22] 3 3 6 [20, 21] 1 1 2 4

December 19, 2005 – p. 22

slide-34
SLIDE 34

Approaches

B-tree-like structure elements in each node are within a range of rates

25 20 25 20 5 6 8 6 8 5 7 3 3 4 4 4 3 2 2 1 2

December 19, 2005 – p. 23

slide-35
SLIDE 35

Approaches

divide space into cells similar to quad trees need further research

December 19, 2005 – p. 24

slide-36
SLIDE 36

Summary

random object selection problem with split and merge speed up simulation of reaction-diffusion equation related to partial sums, optimal search trees, coding systems starting point in our research

  • ther approaches based on

grouping nodes by rates B-trees quad trees

December 19, 2005 – p. 25