SLIDE 1 Limit laws of anticipated rejection and related algorithms
Axel Bacher Coauthors: Olivier Bodini, Alice Jacquot, Andrea Sportiello
Université Paris Nord
October 9th, 2017
SLIDE 2 Outline
1
Anticipated rejection
2
“Recovering” algorithms
3
Density of the limit laws
4
Perspectives
SLIDE 3
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 4
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 5
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 6
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 7
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 8
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 9
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 10
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 11
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 12
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 13
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 14
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 15
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 16
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 17
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 18
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 19
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 20
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 21
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 22
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 23
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
SLIDE 24
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
Complexity: O(√n) tries,
SLIDE 25
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
Complexity: O(√n) tries, cost O(√n) per try
SLIDE 26
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
Complexity: O(√n) tries, cost O(√n) per try ⇒ O(n).
SLIDE 27
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
Complexity: O(√n) tries, cost O(√n) per try ⇒ O(n). Limit law analysis [Louchard 1999].
SLIDE 28
Florentine algorithm
[Barcucci, Pinzani, Sprugnoli 1994]
Complexity: O(√n) tries, cost O(√n) per try ⇒ O(n). Limit law analysis [Louchard 1999]. Motivation: directed animal random generation.
SLIDE 29
Florentine algorithms in the quarter-plane
Numer of tries O(n3/4). Cost of a try O(n1/4). Complexity O(n). Number of tries O(n2/3). Cost of a try O(n1/3). Complexity O(n).
SLIDE 30
Florentine algorithms in the quarter-plane
Numer of tries O(n3/4). Cost of a try O(n1/4). Complexity O(n). Number of tries O(n2/3). Cost of a try O(n1/3). Complexity O(n). Efficient random generation of a wider set of quarter-plane walks
[Lumbroso, Mishna, Ponty 2016].
Other families of walks: walks in a cone, d dimensions, etc.
SLIDE 31 Binary trees
− − − − →
grafting
− − − − − →
repointing
Random binary tree [B., Bodini, Jacquot 2013]
Start from a pointed leaf and repeat n times: graft a new leaf to the left or right (flip a coin) and point it; flip a coin; if tails, repoint; If repointing failed, delete the tree and start over.
SLIDE 32 Binary trees
− − − − →
grafting
− − − − − →
repointing
Random binary tree [B., Bodini, Jacquot 2013]
Start from a pointed leaf and repeat n times: graft a new leaf to the left or right (flip a coin) and point it; flip a coin; if tails, repoint; If repointing failed, delete the tree and start over. At each iteration, the tree is uniformly distributed.
SLIDE 33 Binary trees
− − − − →
grafting
− − − − − →
repointing
Random binary tree [B., Bodini, Jacquot 2013]
Start from a pointed leaf and repeat n times: graft a new leaf to the left or right (flip a coin) and point it; flip a coin; if tails, repoint; If repointing failed, delete the tree and start over. At each iteration, the tree is uniformly distributed. Complexity in random bits: O(√n) × O(√n) = O(n).
SLIDE 34 Binary trees
− − − − →
grafting
− − − − − →
repointing
Random binary tree [B., Bodini, Jacquot 2013]
Start from a pointed leaf and repeat n times: graft a new leaf to the left or right (flip a coin) and point it; flip a coin; if tails, repoint; If repointing failed, delete the tree and start over. At each iteration, the tree is uniformly distributed. Complexity in random bits: O(√n) × O(√n) = O(n). This is a variant of Rémy’s algorithm, which has complexity O(n log n).
SLIDE 35 Limit law of anticipated rejection
Let (Xi)i≥0 be i.i.d. positive random variables such that, for x > 0: P[X ≥ xt] P[X ≥ t] − − − →
t→∞ x−α,
0 < α < 1. Let for t > 0: i(t) = min{i | Xi ≥ t} and S(t) = X0 + · · · + Xi(t)−1.
SLIDE 36 Limit law of anticipated rejection
Let (Xi)i≥0 be i.i.d. positive random variables such that, for x > 0: P[X ≥ xt] P[X ≥ t] − − − →
t→∞ x−α,
0 < α < 1. Let for t > 0: i(t) = min{i | Xi ≥ t} and S(t) = X0 + · · · + Xi(t)−1.
Theorem [B., Sportiello 2015]
The random variable S(t)/t tends in distribution to Dα, with: E
=
∞
α n − α zn n! −1 .
SLIDE 37 Limit law of anticipated rejection
Let (Xi)i≥0 be i.i.d. positive random variables such that, for x > 0: P[X ≥ xt] P[X ≥ t] − − − →
t→∞ x−α,
0 < α < 1. Let for t > 0: i(t) = min{i | Xi ≥ t} and S(t) = X0 + · · · + Xi(t)−1.
Theorem [B., Sportiello 2015]
The random variable S(t)/t tends in distribution to Dα, with: E
=
∞
α n − α zn n! −1 . If α ≥ 1, the scaling factor is superlinear and the limit law exponential.
SLIDE 38 Limit law of anticipated rejection
Let (Xi)i≥0 be i.i.d. positive random variables such that, for x > 0: P[X ≥ xt] P[X ≥ t] − − − →
t→∞ x−α,
0 < α < 1. Let for t > 0: i(t) = min{i | Xi ≥ t} and S(t) = X0 + · · · + Xi(t)−1.
Theorem [B., Sportiello 2015]
The random variable S(t)/t tends in distribution to Dα, with: E
=
∞
α n − α zn n! −1 . If α ≥ 1, the scaling factor is superlinear and the limit law exponential. The law Dα is the Darling-Mandelbrot law. [Darling 1952, Lew 1994]
SLIDE 39
Second round of rejection
A second round of rejection may occur when the size n is reached, with probability tending to p.
SLIDE 40 Second round of rejection
A second round of rejection may occur when the size n is reached, with probability tending to p. If p = β/(1 + β), the complexity has limit law Dα,β, with: E
=
∞
α + βn n − α zn n! −1 .
SLIDE 41 Recovering algorithm for binary trees
− − − − →
grafting
− − − − − →
repointing
Random binary tree [B., Bodini, Jacquot 2013]
Start from a pointed leaf and repeat n times: graft a new leaf to the left or right (flip a coin) and point it; flip a coin; if tails, repoint; If repointing failed, pick a new point uniformly at random.
SLIDE 42 Recovering algorithm for binary trees
− − − − →
grafting
− − − − − →
repointing
Random binary tree [B., Bodini, Jacquot 2013]
Start from a pointed leaf and repeat n times: graft a new leaf to the left or right (flip a coin) and point it; flip a coin; if tails, repoint; If repointing failed, pick a new point uniformly at random. Average cost in random bits: 2n + O(log2 n) (entropic algorithm).
SLIDE 43 Recovering algorithm for binary trees
− − − − →
grafting
− − − − − →
repointing
Random binary tree [B., Bodini, Jacquot 2013]
Start from a pointed leaf and repeat n times: graft a new leaf to the left or right (flip a coin) and point it; flip a coin; if tails, repoint; If repointing failed, pick a new point uniformly at random. Average cost in random bits: 2n + O(log2 n) (entropic algorithm). Does not work on unary-binary trees (uniformity is lost).
SLIDE 44 Recovering algorithm for Dyck prefixes
− − − − − →
unfolding
Random Dyck prefix [B. 2016]
Start from the empty path and repeat n times: Add a random step to P. If P is not a Dyck prefix, pick a point uniformly at random and unfold.
SLIDE 45 Recovering algorithm for Dyck prefixes
− − − − − →
unfolding
Random Dyck prefix [B. 2016]
Start from the empty path and repeat n times: Add a random step to P. If P is not a Dyck prefix, pick a point uniformly at random and unfold. At each iteration, the path is uniformly distributed.
SLIDE 46 Recovering algorithm for Dyck prefixes
− − − − − →
unfolding
Random Dyck prefix [B. 2016]
Start from the empty path and repeat n times: Add a random step to P. If P is not a Dyck prefix, pick a point uniformly at random and unfold. At each iteration, the path is uniformly distributed. Cost: n + O(log2 n) random bits, O(n) time.
SLIDE 47 Recovering algorithm for Dyck prefixes
− − − − − →
unfolding
Random Dyck prefix [B. 2016]
Start from the empty path and repeat n times: Add a random step to P. If P is not a Dyck prefix, pick a point uniformly at random and unfold. At each iteration, the path is uniformly distributed. Cost: n + O(log2 n) random bits, O(n) time. Possible extension to m-Dyck paths (+1/−m), entropic if we have an entropic source of Bernoulli
1+m
SLIDE 48 Recovering algorithm for Dyck prefixes
− − − − − →
unfolding
Random Dyck prefix [B. 2016]
Start from the empty path and repeat n times: Add a random step to P. If P is not a Dyck prefix, pick a point uniformly at random and unfold. At each iteration, the path is uniformly distributed. Cost: n + O(log2 n) random bits, O(n) time. Possible extension to m-Dyck paths (+1/−m), entropic if we have an entropic source of Bernoulli
1+m
Does not work on Motzkin or Schröder paths.
SLIDE 49 Limit laws
Let Bn and Mn be the cost in random bits and memory accesses
- f the “recoveries” in the Dyck prefix algorithm.
Theorem
The variable Bn tends to a Gaussian law, with: E[Bn] ∼ log2 n 4 log 2, V[Bn] ∼ log3 n 6 log2 2. The variable Mn/n tends to L1/2, where the law Lα is defined by: Lα =
x
Unif[0, x] E
= exp ∞
α n(n + 1) zn n!
SLIDE 50 Density of the law Dα
E
=
∞
α n − α zn n! −1
1 2 3 0,5 D1/2
SLIDE 51 Density of the law Dα
E
=
∞
α n − α zn n! −1
1 2 3 0,5 D1/2
The Laplace transform of Dα takes the form: A(z) = z−α Γ(1 − α) E
= A(z) 1 − B(z), B(z) =
∞
z
e−yy−1−α Γ(−α) dy.
SLIDE 52 Density of the law Dα
E
=
∞
α n − α zn n! −1
1 2 3 0,5 D1/2
The Laplace transform of Dα takes the form: A(z) = z−α Γ(1 − α) E
= A(z) 1 − B(z), B(z) =
∞
z
e−yy−1−α Γ(−α) dy. Its density is therefore: a(x) = sin(απ) π xα−1 f(x) =
∞
a ∗ b∗k(x), b(x) = −sin(απ) π (x − 1)α x 1x>1
SLIDE 53 Density of the law Dα
E
=
∞
α n − α zn n! −1
1 2 3 0,5 D1/2
The Laplace transform of Dα takes the form: A(z) = z−α Γ(1 − α) E
= A(z) 1 − B(z), B(z) =
∞
z
e−yy−1−α Γ(−α) dy. Its density is therefore: a(x) = sin(απ) π xα−1 f(x) =
∞
a ∗ b∗k(x), b(x) = −sin(απ) π (x − 1)α x 1x>1 and satisfies: xf ′(x) + (1 − α)f(x) = −αf ∗ f(x − 1).
SLIDE 54 Density of the law L1/2
E
= exp ∞
1 2n(n + 1) zn n!
2 3 0,5 L1/2
SLIDE 55 Density of the law L1/2
E
= exp ∞
1 2n(n + 1) zn n!
2 3 0,5 L1/2
The Laplace transform of L1/2 takes the form: A(z) = e
1−γ 2 e − 1 2z z−1/2
E
= A(z) exp
B(z) =
∞
z
e−y 2y2 dy.
SLIDE 56 Density of the law L1/2
E
= exp ∞
1 2n(n + 1) zn n!
2 3 0,5 L1/2
The Laplace transform of L1/2 takes the form: A(z) = e
1−γ 2 e − 1 2z z−1/2
E
= A(z) exp
B(z) =
∞
z
e−y 2y2 dy. Its density f(x) is therefore: a(x) = e
1−γ 2
cos √ 2x √πx f(x) =
∞
a ∗ b∗k(x) k! , b(x) = x − 1 2x 1x>1
SLIDE 57 Density of the law L1/2
E
= exp ∞
1 2n(n + 1) zn n!
2 3 0,5 L1/2
The Laplace transform of L1/2 takes the form: A(z) = e
1−γ 2 e − 1 2z z−1/2
E
= A(z) exp
B(z) =
∞
z
e−y 2y2 dy. Its density f(x) is therefore: a(x) = e
1−γ 2
cos √ 2x √πx f(x) =
∞
a ∗ b∗k(x) k! , b(x) = x − 1 2x 1x>1 and satisfies: 2xf ′′(x) + 3f ′(x) + f(x) = f(x − 1).
SLIDE 58 Distribution tails
1 2 3 0,5 D1/4 1 2 3 0,5 D1/2 1 2 3 0,5 D3/4 1 2 3 0,5 L1/2 1 2 3 0,5 L1
The tails of Dα and Lα are of the form: [Lew 1994] P[Dα ≥ x] = e−a0 α e−a0x + O(e−a1x) P[Lα ≥ x] =
x log2 x x eo(x).
SLIDE 59 Perspectives
1 2 3 0,5 D1/2 1 2 3 0,5 L1/2
Can we make the “recovery” idea work with other walks or trees? (Motzkin, Schröder, +a/−b, etc.) Are there other interesting distributions with similar properties? (ex: Dickman function in number theory)