A linear lower bound for incrementing a space-optimal integer - - PowerPoint PPT Presentation

a linear lower bound for incrementing a space optimal
SMART_READER_LITE
LIVE PREVIEW

A linear lower bound for incrementing a space-optimal integer - - PowerPoint PPT Presentation

. . . . . . . . . . . . . . . A linear lower bound for incrementing a space-optimal integer representation in the bit-probe model Michael Raskin, raskin@mccme.ru LaBRI, Universit de Bordeaux July 13, 2017 Michael Raskin,


slide-1
SLIDE 1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A linear lower bound for incrementing a space-optimal integer representation in the bit-probe model

Michael Raskin, raskin@mccme.ru

LaBRI, Université de Bordeaux

July 13, 2017

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 1 / 18

slide-2
SLIDE 2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A linear lower bound for incrementing a space-optimal integer representation in the bit-probe model

Michael Raskin, raskin@mccme.ru

LaBRI, Université de Bordeaux This work was mostly done in Aarhus University

July 13, 2017

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 1 / 18

slide-3
SLIDE 3

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

How to count from 0 to 2n − 1 using n bits?

000, 001, 010, … Worst case (1111→0000): n reads, n writes

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 2 / 18

slide-4
SLIDE 4

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

How to count from 0 to 2n − 1 using n bits?

[Gray1953] Frank Gray. Pulse code communication Worst case: n reads, 1 write

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 3 / 18

slide-5
SLIDE 5

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

How to count from 0 to 2n − 1 using n bits?

[BGPS2014] Gerth Stølting Brodal, Mark Greve, Vineet Pandey, Srinivasa Rao Satti. Integer Representations towards Effjcient Counting in the Bit Probe Model Worst case: n − 1 reads, 3 writes

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 4 / 18

slide-6
SLIDE 6

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

How to count from 0 to 2n − 1 using n bits?

[Gray1953] n reads, 1 write [BGPS2014] n − 1 reads, 3 writes Can we do even better?

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 5 / 18

slide-7
SLIDE 7

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Redundant case

[RM2010] M. Ziaur Rahman, J. Ian Munro. Integer Representation and Counting in the Bit Probe Model. One extra bit for representation, worst case: log2 n + O(1) reads, O(1) writes (one possible idea: increment n-bit normal binary counter over n steps with Gray-coded pointer and carry bit)

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 6 / 18

slide-8
SLIDE 8

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previous lower bound

[FMS1997] Gudmund Skovbjerg Frandsen and Peter Bro Miltersen and Sven Skyum Dynamic word problems Cannot write unread bits Every bit needs to be written at some point Reading at most k bits → reading 2k − 1 distinct bits in total Lower bound log2 n upper bound n − 1

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 7 / 18

slide-9
SLIDE 9

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The main claim

Lower bound log2 n, upper bound n − 1 Redundant case: log2 n + O(1) This talk: non-redundant counter needs to read at least ⌊ n

2⌋ bits

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 8 / 18

slide-10
SLIDE 10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The main claim

Lower bound log2 n, upper bound n − 1 Redundant case: log2 n + O(1) This talk: non-redundant counter needs to read at least ⌊ n

2⌋ bits

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 8 / 18

slide-11
SLIDE 11

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming

Code: a vertex of the n-dimensional hypercube Fixing some bits: a block (a hypercube of lower dimension) Changing fjxed bits: parallel translation

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 9 / 18

slide-12
SLIDE 12

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The [BGPS2014] example

Initial representation: a decision tree

x0 x1 x2 x3 x3 x1 x3 x0 ← 1; x1 ← 1; x0 ← 1; x3 ← 0; x0 ← 0, x2 ← 1; x0 ← 0, x1 ← 0; x3 ← 1; x2 ← 0;

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 10 / 18

slide-13
SLIDE 13

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-14
SLIDE 14

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-15
SLIDE 15

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-16
SLIDE 16

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-17
SLIDE 17

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-18
SLIDE 18

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-19
SLIDE 19

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-20
SLIDE 20

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-21
SLIDE 21

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-22
SLIDE 22

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-23
SLIDE 23

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-24
SLIDE 24

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-25
SLIDE 25

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-26
SLIDE 26

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-27
SLIDE 27

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-28
SLIDE 28

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-29
SLIDE 29

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-30
SLIDE 30

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-31
SLIDE 31

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-32
SLIDE 32

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-33
SLIDE 33

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-34
SLIDE 34

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-35
SLIDE 35

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-36
SLIDE 36

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming and [BGPS2014]

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 11 / 18

slide-37
SLIDE 37

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube shuffming as a permutation

Increment is a function 0 → 1 → … → 2n − 1 → 0 Permutation inc on codes; a cycle of length 2n Lexicographical order of codes (fjrst bit is least signifjcant bit) Inversion: x < y, σ(x) > σ(y) Permutation sign: parity of total number of inversions Permutation inc on codes; a cycle of length 2n; and odd permutation Enough to prove: shifting ⌈ n

2⌉ + 1-dimensional blocks is even permutation

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 12 / 18

slide-38
SLIDE 38

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube enumeration

Leaves of decision tree — blocks in hypercube, a partition Two partitions: before and after the translations Enumerating hypercube vertices: lexicographically; block-by-block, lexicographically inside block Blocks can be before or after shift

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 13 / 18

slide-39
SLIDE 39

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hypercube enumeration

Before(k): code of k-th vertex in enumeration block-by-block before translations After(k): code of k-th vertex in enumeration block-by-block after translations inc : Before(k) → After(k). Needed: inc = After ◦ Before−1 is even unless ⌊ n

2⌋ bits read in the worst

case. Enough to show Before and After are even when we read fewer than ⌊ n

2⌋

bits

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 14 / 18

slide-40
SLIDE 40

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Blocks and the inversions

Inside the same block: monotonous enumeration, no inversions Difgerent blocks A, B: need parity of number of pairs (x, y) : x > y, x ∈ A, y ∈ B Total number is even → block order is irrelevant Two blocks have < ⌊ n

2⌋ fjxed coordinates each?

They share ⩾ 2 free coordinates

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 15 / 18

slide-41
SLIDE 41

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Inversions in similar pairs of codes

At least 2 common free positions. p: most signifjcant common free position Compare codes in the pair; classify by most signifjcant position where codes difger Case 1. More signifjcant than p, involution: fmip both at p Case 2. Less signifjcant than p, equality at p, involution: fmip both at p Case 3. Exactly p, involution: fmip at less signifjcant free position

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 16 / 18

slide-42
SLIDE 42

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Putting things together

For each block there are no inversions inside the block. For each two blocks, there is an even number of inversions between the two blocks. Therefore, the total number of inversions is even, and the permutation (Before or After) is even. Therefore inc = After ◦ Before−1 is an even permutation, particularly, not a cycle of length 2n. Therefore we need to read at least ⌊ n

2⌋ bits in the worst case.

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 17 / 18

slide-43
SLIDE 43

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Thanks for your attention. Questions?

Michael Raskin, raskin@mccme.ru (LaBRI) Linear lower bound for increment July 13, 2017 18 / 18