NUMBER OF SYMBOL COMPARISONS IN QUICKSORT AND QUICKSELECT

Size: px
Start display at page:

Download "NUMBER OF SYMBOL COMPARISONS IN QUICKSORT AND QUICKSELECT"

Transcription

1 NUMBER OF SYMBOL COMPARISONS IN QUICKSORT AND QUICKSELECT Brigitte Vallée (CNRS and Université de Caen, France) Joint work with Julien Clément, Jim Fill and Philippe Flajolet

2 Plan of the talk. Presentation of the study Statement of the results The general model of source The main steps of the method Sketch of the proof. What is a tamed source?

3 Plan of the talk. Presentation of the study Statement of the results The general model of source The main steps of the method Sketch of the proof What is a tamed source?

4 The classical framework for sorting. The main sorting algorithms or searching algorithms e.g., QuickSort, BST-Search, InsertionSort,... deal with n (distinct) keys U 1, U 2,..., U n of the same ordered set Ω. They perform comparisons and exchanges between keys. The unit cost is the key comparison.

5 The classical framework for sorting. The main sorting algorithms or searching algorithms e.g., QuickSort, BST-Search, InsertionSort,... deal with n (distinct) keys U 1, U 2,..., U n of the same ordered set Ω. They perform comparisons and exchanges between keys. The unit cost is the key comparison. The behaviour of the algorithm (wrt to key comparisons) only depends on the relative order between the keys. It is sufficient to restrict to the case when Ω = [1..n]. The input set is then S n, with uniform probability.

6 The classical framework for sorting. The main sorting algorithms or searching algorithms e.g., QuickSort, BST-Search, InsertionSort,... deal with n (distinct) keys U 1, U 2,..., U n of the same ordered set Ω. They perform comparisons and exchanges between keys. The unit cost is the key comparison. The behaviour of the algorithm (wrt to key comparisons) only depends on the relative order between the keys. It is sufficient to restrict to the case when Ω = [1..n]. The input set is then S n, with uniform probability. Then, the analysis of all these algorithms is very well known, with respect to the number of key comparisons performed in the worst-case, or in the average case.

7 Here, realistic analysis of the two algorithms QuickSort and QuickSelect QuickSort (n, A): sorts the array A Choose a pivot; (k, A, A + ) := Partition(A); QuickSort (k 1, A ); QuickSort (n k, A + ).

8 Here, realistic analysis of the two algorithms QuickSort and QuickSelect QuickSort (n, A): sorts the array A Choose a pivot; (k, A, A + ) := Partition(A); QuickSort (k 1, A ); QuickSort (n k, A + ). QuickSelect (n, m, A): returns the value of the element of rank k in A. Choose a pivot; (k, A, A + ) := Partition(A); If m = k then QuickSelect := pivot else if m < k then QuickSelect (k 1, m, A ) else QuickSelect (n k, m k, A + );

9 Mean number K n of key comparisons Classical results for various algorithms of the class QuickMin(n) := QuickSelect(1, n) finds the minimum QuickMax(n) := QuickSelect (n, n) finds the maximum. QuickQuant α (n) := QuickSelect ( αn, n) finds the α quantile QuickMed(n) := QuickSelect ( n/2, n) finds the median QuickRand(n) := QuickSelect (m, n) for a rank m [1..n] R

10 Mean number K n of key comparisons Classical results for various algorithms of the class QuickMin(n) := QuickSelect(1, n) finds the minimum QuickMax(n) := QuickSelect (n, n) finds the maximum. QuickQuant α (n) := QuickSelect ( αn, n) finds the α quantile QuickMed(n) := QuickSelect ( n/2, n) finds the median QuickRand(n) := QuickSelect (m, n) for a rank m [1..n] R QuickSort(n) QuickMin(n) QuickMax(n) QuickRand(n) K n 2n log n K n 2n K n 2n K n 3n QuickQuant α (n) K n 2 [1 + H α ] n QuickMed(n) K n 2(1 + log 2)n H α = the entropy function = α log α + (1 α) log(1 α)

11 A more realistic framework for sorting. Keys are viewed as words. The domain Ω of keys is a subset of Σ, Σ = {the infinite words on some ordered alphabet Σ}. The words are compared [wrt the lexicographic order]. The realistic unit cost is now the symbol comparison.

12 A more realistic framework for sorting. Keys are viewed as words. The domain Ω of keys is a subset of Σ, Σ = {the infinite words on some ordered alphabet Σ}. The words are compared [wrt the lexicographic order]. The realistic unit cost is now the symbol comparison. The realistic cost of the comparison between two words A and B, A = a 1 a 2 a 3... a i... and B = b 1 b 2 b 3... b i... equals k + 1, where k is the length of their largest common prefix k := max{i; j i, a j = b j }= the coincidence

13 We are interested in this new cost for each algorithm: the number of symbol comparisons...and its mean value S n ( for n words)

14 We are interested in this new cost for each algorithm: the number of symbol comparisons...and its mean value S n ( for n words) How is S n compared to K n? That is the question... An initial question asked by Sedgewick in In order to also compare with text algorithms based on tries.

15 We are interested in this new cost for each algorithm: the number of symbol comparisons...and its mean value S n ( for n words) How is S n compared to K n? That is the question... An initial question asked by Sedgewick in In order to also compare with text algorithms based on tries. An example. Sixteen words drawn from the memoryless source p(a) = 1/3, p(b) = 2/3. We keep the prefixes of length 12. A = abbbbbaaabab B = abbbbbbaabaa C = baabbbabbbba D = bbbababbbaab E = bbabbaababbb F = abbbbbbbbabb G = bbaabbabbaba H = ababbbabbbab I = bbbaabbbbbbb J = abaabbbbaabb K = bbbabbbbbbaa L = aaaabbabaaba M = bbbaaabbbbbb N = abbbbbbabbaa O = abbabababbbb P = bbabbbaaaabb

16 A = abbbbbaaabab B = abbbbbbaabaa C = baabbbabbbba D =bbbababbbaab E = bbabbaababbb F = abbbbbbbbabb G = bbaabbabbaba H = ababbbabbbab I = bbbaabbbbbbb J = abaabbbbaabb K = bbbabbbbbbaa L = aaaabbabaaba M = bbbaaabbbbbb N = abbbbbbabbaa O = abbabababbbb P = bbabbbaaaabb

17

18

19

20

21

22

23

24

25

26

27 Plan of the talk. Presentation of the study Statement of the results The general model of source The main steps of the method Sketch of the proof What is a tamed source?

28 What is already known about the mean number of symbol-comparisons? For QuickSort(n), a first answer given by Janson and Fill ( 06), only for the classical binary source. For QuickSelect(n), this was studied by Fill and Nakama ( 07), only in the case of the binary source, only for QuickMin, QuickMax, QuickRand A quite involved form for the constants of the analysis. More than twenty pages of computation...

29 What is already known about the mean number of symbol-comparisons? For QuickSort(n), a first answer given by Janson and Fill ( 06), only for the classical binary source. For QuickSelect(n), this was studied by Fill and Nakama ( 07), only in the case of the binary source, only for QuickMin, QuickMax, QuickRand A quite involved form for the constants of the analysis. More than twenty pages of computation... Our work. We answer all these questions, in the case of a general source and a general algorihm of the class. There are precise restrictive hypotheses on the source, and we provide sufficient conditions under which these hypotheses hold. We provide a closed form for the constants of the analysis, for any source of the previous type. We use different methods, with (almost) no computation...

30 Case of QuickSort(n)[CFFV 08] Theorem 1. For any tamed source, the mean number S n of symbol comparisons used by QuickSort(n) satisfies S n 1 h S n log 2 n. and involves the entropy h S of the source S, defined as h S := lim 1 p w log p w, k k w Σ k where p w is the probability that a word begins with prefix w.

31 Case of QuickSort(n)[CFFV 08] Theorem 1. For any tamed source, the mean number S n of symbol comparisons used by QuickSort(n) satisfies S n 1 h S n log 2 n. and involves the entropy h S of the source S, defined as h S := lim 1 p w log p w, k k w Σ k where p w is the probability that a word begins with prefix w. Compared to K n 2n log n, there is an extra factor equal to 1/(2h S ) log n Compared to T n (1/h S ) n log n, there is an extra factor of log n.

32 Case of QuickMin(n), QuickMax(n), [CFFV 08] Theorem 2. For any weakly tamed source, the mean numbers of symbol comparisons used by QuickMin(n) and QuickMax(n) T ( ) n involve the constants c (ɛ) S c (ɛ) S c ( ) (+) S n and T n c (+) S n, which depend on probabilities pw and p(ɛ) w, (ɛ = ±) := X "!# 1 p(ɛ) w log 1 + pw. p w p (ɛ) w w Σ p w Here p ( ) w, p (+) w, p w are the probabilities that a word begins with a prefix w, with w = w and w < w or w > w or w = w.

33 Case of QuickRand(n) [CFFV 08] Theorem 3. For any weakly tamed source, the mean number of symbol comparisons used by QuickRand(n) (randomized wrt rank), satisfies T n c S n, with c S = X " X "!! 2!## log 1 + p(ɛ) w p(ɛ) w log 1 + pw, p w p w p w ɛ=± p (ɛ) w w Σ p 2 w Here p ( ) w, p ( ) w, p w are the probabilities that a word begins with a prefix w, with w = w and w < w or w > w or w = w.

34 Case of QuickQuant α (n) [CFFV 09] Work yet in progress Theorem 4. For any weakly tamed source, the mean number of symbol comparisons used by QuickQuant α (n) satisfies q n (α) ρ S (α) n with ρ S(α) = 2 X p w + p w log p w p (α,+) w log p (α,+) w p (α, ) w log p (α, ) w w S(α)!!# + 2 X w R(α) + 2 X w L(α) p w " 1 + p(α, ) w 1 p w "! p w 1 + p(α,+) w 1 p w log 1 pw p w (α, ) log 1 pw p (α,+) w Three parts depending on the position of probabilities p (ɛ) w wrt α: w L(α) iff p (+) w 1 α, w R(α) iff p ( ) w α w S(α) iff p ( ) w < α < 1 p (+) w, p (α, ) w = 1 α p (+) w, p (α, ) w = α p ( ) w!#.

35 The constants of the analysis for the binary source. c (ɛ) B = l 0 h B = log 2, c (+) B 1 2 l + 2 l l = c( ) B 2 l 1 k=1 = c(ɛ) B [ ( 1 k log )] k

36 The constants of the analysis for the binary source. c (ɛ) B = l 0 c B = l=0 h B = log 2, c (+) B 1 2 2l 1 2 l + 2 l 0 2 l 1 k=1 1 2 l = c( ) B 2 l 1 k=1 = c(ɛ) B [ ( 1 k log )] k [ ( k log(k + 1) k 2 log )] k

37 The constants of the analysis for the binary source. c (ɛ) B = l 0 c B = Numerically, l=0 h B = log 2, c (+) B 1 2 2l 1 2 l + 2 l 0 2 l 1 k=1 1 2 l = c( ) B 2 l 1 k=1 = c(ɛ) B [ ( 1 k log )] k [ ( k log(k + 1) k 2 log )] k c (ɛ) B = c B = To be compared to the constants of the number of key comparisons κ = 2 or κ = 3

38 Plan of the talk. Presentation of the study Statement of the results The general model of source The main steps of the method Sketch of the proof What is a tamed source?

39 The (general) model of source (I) A general source S produces infinite words on an ordered alphabet Σ. For w Σ, p w := probability that a word begins with the prefix w. Define a w := p w b w := p w w, w = w w < w, p w 0 w, w = w w w, p w 0 Then: u [0, 1], k 1, w = M k (u) Σ k such that u [a w, b w [.

40 The (general) model of source (I) A general source S produces infinite words on an ordered alphabet Σ. For w Σ, p w := probability that a word begins with the prefix w. Define a w := p w b w := p w w, w = w w < w, p w 0 w, w = w w w, p w 0 Then: u [0, 1], k 1, w = M k (u) Σ k such that u [a w, b w [. Example p 0 = 1/3, p 1 = 2/3 M 1 (1/2) = 1, M 1 (1/4) = 0

41 The (general) model of source (I) A general source S produces infinite words on an ordered alphabet Σ. For w Σ, p w := probability that a word begins with the prefix w. Define a w := p w b w := p w w, w = w w < w, p w 0 w, w = w w w, p w 0 Then: u [0, 1], k 1, w = M k (u) Σ k such that u [a w, b w [. Example p 0 = 1/3, p 1 = 2/3 M 1 (1/2) = 1, M 1 (1/4) = 0 p 00 = 1/12, p 01 = 3/12, p 10 = 1/2, p 11 = 1/6 M 2 (1/2) = 10, M 2 (1/4) = 01

42 The (general) model of source (I) A general source S produces infinite words on an ordered alphabet Σ. For w Σ, p w := probability that a word begins with the prefix w. Define a w := p w b w := p w w, w = w w < w, p w 0 w, w = w w w, p w 0 Then: u [0, 1], k 1, w = M k (u) Σ k such that u [a w, b w [. Example p 0 = 1/3, p 1 = 2/3 M 1 (1/2) = 1, M 1 (1/4) = 0 p 00 = 1/12, p 01 = 3/12, p 10 = 1/2, p 11 = 1/6 M 2 (1/2) = 10, M 2 (1/4) = 01 If p w 0 for w, the sequences (a w ) and (b w ) are adjacent They define an infinite word M(u) := lim k M k (u). Then, the source is alternatively defined by a mapping M : [0, 1] Σ.

43 The (general) model of source (II) For a prefix w Σ, the interval I = [0, 1] is divided into three intervals.

44 The (general) model of source (II) For a prefix w Σ, the interval I = [0, 1] is divided into three intervals. I w ( ) := [0, a w ] {u, M(u) < w}, I w (+) := [b w, 1] {u, M(u) > w}, I w := [a w, b w ] {u, M(u) begins with w}. The interval I w is the fundamental interval relative to the prefix w.

45 The (general) model of source (II) For a prefix w Σ, the interval I = [0, 1] is divided into three intervals. I w ( ) := [0, a w ] {u, M(u) < w}, I w (+) := [b w, 1] {u, M(u) > w}, I w := [a w, b w ] {u, M(u) begins with w}. The interval I w is the fundamental interval relative to the prefix w. The measure of each interval denoted by p w or p (±) w is the probability that M(u) begins with a prefix w with w = w and w = w or w < w or w > w. Remark: p ( ) w = a w, p (+) w = 1 b w, p w = b w a w

46 Natural instances of sources: Dynamical sources With a shift map T : I I and an encoding map τ : I Σ, the emitted word is M(x) = (τx, τt x, τt 2 x,... τt k x,...) T 2 x T x x T 3 x

47 Natural instances of sources: Dynamical sources With a shift map T : I I and an encoding map τ : I Σ, the emitted word is M(x) = (τx, τt x, τt 2 x,... τt k x,...) T 2 x T x x T 3 x A dynamical system, with Σ = {a, b, c} and a word M(x) = (c, b, a, c...).

48 Memoryless sources or Markov chains. = Dynamical sources with affine branches x x

49 The dynamical framework leads to more general sources. The curvature of branches entails correlation between symbols

50 The dynamical framework leads to more general sources. The curvature of branches entails correlation between symbols Example : the Continued Fraction source

51 Fundamental intervals and fundamental triangles x x

52 Plan of the talk. Presentation of the study Statement of the results The general model of source The main steps of the method Sketch of the proof What is a tamed source?

53 Three main steps for the analysis of the mean number S n of symbol comparisons

54 Three main steps for the analysis of the mean number S n of symbol comparisons (A) The Poisson model P Z does not deal with a fixed number n of keys. The number N of keys is now a random variable which follows a Poisson law of parameter Z. We first obtain nice expressions for S Z...

55 Three main steps for the analysis of the mean number S n of symbol comparisons (A) The Poisson model P Z does not deal with a fixed number n of keys. The number N of keys is now a random variable which follows a Poisson law of parameter Z. We first obtain nice expressions for S Z... (B) It is now possible to returm to the model where the number of keys is fixed. We obtain a nice exact formula for S n... from which it is not easy to obtain the asymptotics...

56 Three main steps for the analysis of the mean number S n of symbol comparisons (A) The Poisson model P Z does not deal with a fixed number n of keys. The number N of keys is now a random variable which follows a Poisson law of parameter Z. We first obtain nice expressions for S Z... (B) It is now possible to returm to the model where the number of keys is fixed. We obtain a nice exact formula for S n... from which it is not easy to obtain the asymptotics... (C) Then, the Rice formula provides the asymptotics of S n ( n ), as soon as the source is tamed.

57 Plan of the talk. Presentation of the study Statement of the results The general model of source The main steps of the method Sketch of the proof What is a tamed source?

58 (A) Dealing with the Poisson Model. In the P Z model, the number N of keys follows the Poisson law Z Zn Pr[N = n] = e n!, the mean number S(Z) of symbol comparisons for QuickX is S(Z) = [γ(u, t) + 1] π(u, t) du dt T where T := {(u, t), 0 u t 1} is the unit triangle γ(u, t):= coincidence between M(u) and M(t) π(u, t) du dt := Mean number of key-comparisons between M(u ) and M(t ) with u [u, u + du] and t [t dt, t] performed by QuickX

59 First Step in the Poisson model : The coincidence γ(u, t) An (easy) alternative expression for S(Z) = [γ(u, t) + 1] π(u, t) du dt T = w Σ T w π(u, t) du dt It involves the fundamental triangles and separates the rôles of the source and the algorithm. It is then sufficient to study the key probability π(u, t) of the algorithm (the second step). take its integral on each fundamental triangle (the third step)

60 Fundamental intervals and fundamental triangles x x

61 Study of the key probability π(u, t) of the algorithm (I) π(u, t) du dt := Mean number of key-comparisons between M(u ) and M(t ) with u [u, u + du] and t [t dt, t].

62 Study of the key probability π(u, t) of the algorithm (I) π(u, t) du dt := Mean number of key-comparisons between M(u ) and M(t ) with u [u, u + du] and t [t dt, t]. Case of QuickSort. M(u) and M(t) are compared iff the first pivot chosen in {M(v), v [u, t]} is M(u) or M(t)

63 Study of the key probability π(u, t) of the algorithm (I) π(u, t) du dt := Mean number of key-comparisons between M(u ) and M(t ) with u [u, u + du] and t [t dt, t]. Case of QuickSort. M(u) and M(t) are compared iff the first pivot chosen in {M(v), v [u, t]} is M(u) or M(t) QuickSort (n, A): sorts the array A Choose a pivot; (k, A, A + ) := Partition(A); QuickSort (k 1, A ); QuickSort (n k, A + ).

64 Study of the key probability π(u, t) of the algorithm (II) Case of QuickSelect

65 Study of the key probability π(u, t) of the algorithm (II) Case of QuickSelect M(u) and M(t) are compared in QuickMin iff the first pivot chosen in {M(v), v [0, t]} is M(u) or M(t)

66 Study of the key probability π(u, t) of the algorithm (II) Case of QuickSelect M(u) and M(t) are compared in QuickMin iff the first pivot chosen in {M(v), v [0, t]} is M(u) or M(t) M(u) and M(t) are compared in QuickMax iff the first pivot chosen in {M(v), v [u, 1]} is M(u) or M(t)

67 Study of the key probability π(u, t) of the algorithm (II) Case of QuickSelect M(u) and M(t) are compared in QuickMin iff the first pivot chosen in {M(v), v [0, t]} is M(u) or M(t) M(u) and M(t) are compared in QuickMax iff the first pivot chosen in {M(v), v [u, 1]} is M(u) or M(t) And for QuickQuant α? The idea is to compare QuicSelect with a dual algorithm, the QuickVal algorithm.

68 Here, we introduce another algorithm, the QuickVal algorithm, the dual algorithm of QuickSelect, QuickVal (n, a, A). : returns the rank of the element a in B = A {a} B := A {a} QV (n, a, B); QV (n, a, B). Choose a pivot in B; (k, B, B + ) := Partition(B); If a = pivot then QV := k else if a < pivot then QV := QV (k 1, a, B ) else QV := k+ QV (n k, a, B + );

69 Study of the key probability π(u, t) of the algorithm (III) QuickVal α := the algorithm where the key of interest is the word M(α)

70 Study of the key probability π(u, t) of the algorithm (III) QuickVal α := the algorithm where the key of interest is the word M(α) There are three facts The QuickVal α algorithm and the QuickQuant α algorithm are dual Their probabilistic behaviours are close

71 Study of the key probability π(u, t) of the algorithm (III) QuickVal α := the algorithm where the key of interest is the word M(α) There are three facts The QuickVal α algorithm and the QuickQuant α algorithm are dual Their probabilistic behaviours are close The QuickVal α algorithm is easy to deal with since M(u) and M(t) are compared in QuickVal α iff the first pivot chosen in {M(v), v [x, y]} is M(u) or M(t) where the interval [x, y] is the smallest interval that contains u, t and α.

72 Study of the key probability π(u, t) of the algorithm (III) QuickVal α := the algorithm where the key of interest is the word M(α) There are three facts The QuickVal α algorithm and the QuickQuant α algorithm are dual Their probabilistic behaviours are close The QuickVal α algorithm is easy to deal with since M(u) and M(t) are compared in QuickVal α iff the first pivot chosen in {M(v), v [x, y]} is M(u) or M(t) where the interval [x, y] is the smallest interval that contains u, t and α. [α, t] if u > α (case I) QuickMin [x(u, t), y(u, t)] := [u, α] if t < α (case II) QuickMax [u, t] if u < α < t (case III) QuickSort

73 . The three domains for the definition of the interval [x, y] (1, 1) (III) (I) (α, α) (II) (0, 0) [α, t] if u > α (case I) [x(u, t), y(u, t)] := [u, α] if t < α (case II) [u, t] if u < α < t (case III)

74 Study of the key probability π(u, t) of the algorithm (IV) For each algorithm, QuickSort, QuickMin, QuickMax, QuickVal α, the key probability π(u, t) of the algorithm defined as π(u, t) du dt := Mean number of key-comparisons between M(u ) and M(t ) with u [u, u + du] and t [t dt, t] equals [ ] 2 π(u, t) du dt = Zdu Zdt E 2 + N [x(u,t),y(u,t)] Here, N [x,y] is the number of words M(v) with v [x, y], It follows a Poisson law of parameter Z(y x). Then: π(u, t) = 2 Z 2 f 1 (Z(y x)) with f 1 (θ) := θ 2 [e θ 1+θ] This ends the second step in the Poisson model

75 The final expression for the mean number of symbol comparisons for each algorithm, in the Poisson model P Z S(Z) = 2 Z 2 w Σ T w f 1 (Z(y x)) du dt (1, 1) (III) (I) (0, 0) (II) (α, α) a w b w

76 (B) Return to the model where n is fixed. With the expansion of f 1, S(Z) = ( 1) k ϖ( k) Zk k!, k=2 is expressed with a series ϖ(s) of Dirichlet type, which depends both on the algorithm and the source. ϖ(s) = 2 w Σ T w (y x) (s+2) du dt

77 (B) Return to the model where n is fixed. With the expansion of f 1, S(Z) = ( 1) k ϖ( k) Zk k!, k=2 is expressed with a series ϖ(s) of Dirichlet type, which depends both on the algorithm and the source. ϖ(s) = 2 w Σ T w (y x) (s+2) du dt Since S ( n n! = [Zn ] e Z S(Z) ), there is an exact formula for S n S n = 2 n ( ) n ( 1) k ϖ( k) k k=2

78 (C) Using Rice formula As soon as ϖ(s) is weakly tamed in R(s) < σ 0 with σ 0 > 2, the residue formula transforms the sum into an integral: S n = n ( ) n ( 1) k ϖ( k) = 1 k 2iπ k=2 with 2 < d < min( 1, σ 0 ). d+i d i n! ϖ(s) s(s + 1)... (s + n) ds,

79 (C) Using Rice formula As soon as ϖ(s) is weakly tamed in R(s) < σ 0 with σ 0 > 2, the residue formula transforms the sum into an integral: S n = n ( ) n ( 1) k ϖ( k) = 1 k 2iπ k=2 with 2 < d < min( 1, σ 0 ). where d+i d i n! ϖ(s) s(s + 1)... (s + n) ds, Where are the leftmost singularities for ϖ(s)? For QuickSort: ϖ(s) = 2 Λ(s) s(s + 1) Λ(s) := w has always a singularity at s = 1. w Σ p s For all the QuickSelect algorithms, ϖ(s) is weakly tamed in R(s) < σ 0 with σ 0 > 1

80 Plan of the talk. Presentation of the study Statement of the results The general model of source The main steps of the method Sketch of the proof What is a tamed source?

81 What can be expected about Λ(s)? For any source, Λ(s) has a singularity at s = 1.

82 What can be expected about Λ(s)? For any source, Λ(s) has a singularity at s = 1. For a tamed source S, the dominant singularity of Λ(s) is located at s = 1, this is a simple pôle, whose residue equals 1/h S.

83 What can be expected about Λ(s)? For any source, Λ(s) has a singularity at s = 1. For a tamed source S, the dominant singularity of Λ(s) is located at s = 1, this is a simple pôle, whose residue equals 1/h S. In this case, there is a triple pôle at s = 1 for ϖ(s) s + 1 = 2 Λ(s) s(s + 1) 2 and ϖ(s) s h S 1 (s + 1) 3 s 1

84 For shifting the integral to the right, past... d = 1, other properties of Λ(s) are needed on Rs 1, more subtle Different behaviours of Λ(s) for Rs 1 where one can past d = 1...

85 For shifting the integral to the right, past... d = 1, other properties of Λ(s) are needed on Rs 1, more subtle Different behaviours of Λ(s) for Rs 1 where one can past d = 1... In colored domains, Λ(s) is meromorphic and of polynomial growth for s.

86 For shifting the integral to the right, past... d = 1, other properties of Λ(s) are needed on Rs 1, more subtle Different behaviours of Λ(s) for Rs 1 where one can past d = 1... In colored domains, Λ(s) is meromorphic and of polynomial growth for s. For dynamical sources, we provide sufficient conditions (of geometric or arithmetic type), under which these behaviours hold. For a memoryless source, they depend on the approximability of ratios log p i/ log p j

87 Conclusions. If the source S is tamed, then S n 1 h S n log 2 n. We are done!

88 Conclusions. If the source S is tamed, then S n 1 h S n log 2 n. We are done! QuickSort must be compared to the algorithm which uses tries for sorting n words. We have studied its mean cost T n in For a tamed source, T n 1 h S n log n.

89 Conclusions. If the source S is tamed, then S n 1 h S n log 2 n. We are done! QuickSort must be compared to the algorithm which uses tries for sorting n words. We have studied its mean cost T n in For a tamed source, T n 1 h S n log n. Our methods apply to all the QuickSelect algorithms, and the hypotheses needed for the source are different (less strong). They are related to properties of Λ(s) for Rs < 1.

90 Conclusions. If the source S is tamed, then S n 1 h S n log 2 n. We are done! QuickSort must be compared to the algorithm which uses tries for sorting n words. We have studied its mean cost T n in For a tamed source, T n 1 h S n log n. Our methods apply to all the QuickSelect algorithms, and the hypotheses needed for the source are different (less strong). They are related to properties of Λ(s) for Rs < 1. It is easy to adapt our results to the intermittent sources, which emits long sequences of the same symbols. In this case, S n = Θ(n log 3 n), T n = Θ(n log 2 n).

91 Open problems. What about the distribution of the average search cost in a BST? Is it asymptotically normal? We know that is the case if one counts the number of key comparisons. We already know that, for a tamed source, the average depth of a trie is asymptotically normal (Cesaratto-V, 07).

92 Open problems. What about the distribution of the average search cost in a BST? Is it asymptotically normal? We know that is the case if one counts the number of key comparisons. We already know that, for a tamed source, the average depth of a trie is asymptotically normal (Cesaratto-V, 07). Long term research projects... Revisit the complexity results of the main classical algorithms, and take into account the number of symbol-comparisons... instead of the number of key-comparisons.

93 Open problems. What about the distribution of the average search cost in a BST? Is it asymptotically normal? We know that is the case if one counts the number of key comparisons. We already know that, for a tamed source, the average depth of a trie is asymptotically normal (Cesaratto-V, 07). Long term research projects... Revisit the complexity results of the main classical algorithms, and take into account the number of symbol-comparisons... instead of the number of key-comparisons. Provide a sharp analytic classification of sources: Transfer geometric properties of sources into analytical properties of Λ(s)

NUMBER OF SYMBOL COMPARISONS IN QUICKSORT

NUMBER OF SYMBOL COMPARISONS IN QUICKSORT NUMBER OF SYMBOL COMPARISONS IN QUICKSORT Brigitte Vallée (CNRS and Université de Caen, France) Joint work with Julien Clément, Jim Fill and Philippe Flajolet Plan of the talk. Presentation of the study

More information

Digital Trees and Memoryless Sources: from Arithmetics to Analysis

Digital Trees and Memoryless Sources: from Arithmetics to Analysis Digital Trees and Memoryless Sources: from Arithmetics to Analysis Philippe Flajolet, Mathieu Roux, Brigitte Vallée AofA 2010, Wien 1 What is a digital tree, aka TRIE? = a data structure for dynamic dictionaries

More information

Lattice Reduction Algorithms: EUCLID, GAUSS, LLL Description and Probabilistic Analysis

Lattice Reduction Algorithms: EUCLID, GAUSS, LLL Description and Probabilistic Analysis Lattice Reduction Algorithms: EUCLID, GAUSS, LLL Description and Probabilistic Analysis Brigitte Vallée (CNRS and Université de Caen, France) École de Printemps d Informatique Théorique, Autrans, Mars

More information

ANALYSIS of EUCLIDEAN ALGORITHMS. An Arithmetical Instance of Dynamical Analysis Dynamical Analysis := Analysis of Algorithms + Dynamical Systems

ANALYSIS of EUCLIDEAN ALGORITHMS. An Arithmetical Instance of Dynamical Analysis Dynamical Analysis := Analysis of Algorithms + Dynamical Systems ANALYSIS of EUCLIDEAN ALGORITHMS An Arithmetical Instance of Dynamical Analysis Dynamical Analysis := Analysis of Algorithms + Dynamical Systems Brigitte Vallée (CNRS and Université de Caen, France) Results

More information

Data selection. Lower complexity bound for sorting

Data selection. Lower complexity bound for sorting Data selection. Lower complexity bound for sorting Lecturer: Georgy Gimel farb COMPSCI 220 Algorithms and Data Structures 1 / 12 1 Data selection: Quickselect 2 Lower complexity bound for sorting 3 The

More information

On Partial Sorting. Conrado Martínez. Univ. Politècnica de Catalunya, Spain

On Partial Sorting. Conrado Martínez. Univ. Politècnica de Catalunya, Spain Univ. Politècnica de Catalunya, Spain 10th Seminar on the Analysis of Algorithms MSRI, Berkeley, U.S.A. June 2004 1 Introduction 2 3 Introduction Partial sorting: Given an array A of n elements and a value

More information

Asymptotic and Exact Poissonized Variance in the Analysis of Random Digital Trees (joint with Hsien-Kuei Hwang and Vytas Zacharovas)

Asymptotic and Exact Poissonized Variance in the Analysis of Random Digital Trees (joint with Hsien-Kuei Hwang and Vytas Zacharovas) Asymptotic and Exact Poissonized Variance in the Analysis of Random Digital Trees (joint with Hsien-Kuei Hwang and Vytas Zacharovas) Michael Fuchs Institute of Applied Mathematics National Chiao Tung University

More information

Multiple Choice Tries and Distributed Hash Tables

Multiple Choice Tries and Distributed Hash Tables Multiple Choice Tries and Distributed Hash Tables Luc Devroye and Gabor Lugosi and Gahyun Park and W. Szpankowski January 3, 2007 McGill University, Montreal, Canada U. Pompeu Fabra, Barcelona, Spain U.

More information

An instantaneous code (prefix code, tree code) with the codeword lengths l 1,..., l N exists if and only if. 2 l i. i=1

An instantaneous code (prefix code, tree code) with the codeword lengths l 1,..., l N exists if and only if. 2 l i. i=1 Kraft s inequality An instantaneous code (prefix code, tree code) with the codeword lengths l 1,..., l N exists if and only if N 2 l i 1 Proof: Suppose that we have a tree code. Let l max = max{l 1,...,

More information

String Complexity. Dedicated to Svante Janson for his 60 Birthday

String Complexity. Dedicated to Svante Janson for his 60 Birthday String Complexity Wojciech Szpankowski Purdue University W. Lafayette, IN 47907 June 1, 2015 Dedicated to Svante Janson for his 60 Birthday Outline 1. Working with Svante 2. String Complexity 3. Joint

More information

COMP 9024, Class notes, 11s2, Class 1

COMP 9024, Class notes, 11s2, Class 1 COMP 90, Class notes, 11s, Class 1 John Plaice Sun Jul 31 1::5 EST 011 In this course, you will need to know a bit of mathematics. We cover in today s lecture the basics. Some of this material is covered

More information

Algebraic Geometry Codes. Shelly Manber. Linear Codes. Algebraic Geometry Codes. Example: Hermitian. Shelly Manber. Codes. Decoding.

Algebraic Geometry Codes. Shelly Manber. Linear Codes. Algebraic Geometry Codes. Example: Hermitian. Shelly Manber. Codes. Decoding. Linear December 2, 2011 References Linear Main Source: Stichtenoth, Henning. Function Fields and. Springer, 2009. Other Sources: Høholdt, Lint and Pellikaan. geometry codes. Handbook of Coding Theory,

More information

Divide-and-conquer: Order Statistics. Curs: Fall 2017

Divide-and-conquer: Order Statistics. Curs: Fall 2017 Divide-and-conquer: Order Statistics Curs: Fall 2017 The divide-and-conquer strategy. 1. Break the problem into smaller subproblems, 2. recursively solve each problem, 3. appropriately combine their answers.

More information

On rational approximation of algebraic functions. Julius Borcea. Rikard Bøgvad & Boris Shapiro

On rational approximation of algebraic functions. Julius Borcea. Rikard Bøgvad & Boris Shapiro On rational approximation of algebraic functions http://arxiv.org/abs/math.ca/0409353 Julius Borcea joint work with Rikard Bøgvad & Boris Shapiro 1. Padé approximation: short overview 2. A scheme of rational

More information

10-704: Information Processing and Learning Fall Lecture 9: Sept 28

10-704: Information Processing and Learning Fall Lecture 9: Sept 28 10-704: Information Processing and Learning Fall 2016 Lecturer: Siheng Chen Lecture 9: Sept 28 Note: These notes are based on scribed notes from Spring15 offering of this course. LaTeX template courtesy

More information

Divide-and-conquer. Curs 2015

Divide-and-conquer. Curs 2015 Divide-and-conquer Curs 2015 The divide-and-conquer strategy. 1. Break the problem into smaller subproblems, 2. recursively solve each problem, 3. appropriately combine their answers. Known Examples: Binary

More information

Polynomials over finite fields. Algorithms and Randomness

Polynomials over finite fields. Algorithms and Randomness Polynomials over Finite Fields: Algorithms and Randomness School of Mathematics and Statistics Carleton University daniel@math.carleton.ca AofA 10, July 2010 Introduction Let q be a prime power. In this

More information

3F1 Information Theory, Lecture 3

3F1 Information Theory, Lecture 3 3F1 Information Theory, Lecture 3 Jossy Sayir Department of Engineering Michaelmas 2011, 28 November 2011 Memoryless Sources Arithmetic Coding Sources with Memory 2 / 19 Summary of last lecture Prefix-free

More information

CS161: Algorithm Design and Analysis Recitation Section 3 Stanford University Week of 29 January, Problem 3-1.

CS161: Algorithm Design and Analysis Recitation Section 3 Stanford University Week of 29 January, Problem 3-1. CS161: Algorithm Design and Analysis Recitation Section 3 Stanford University Week of 29 January, 2018 Problem 3-1. (Quicksort Median-of-3 Partition) One way to improve the randomized quicksort procedure

More information

Everything You Always Wanted to Know about Quicksort, but Were Afraid to Ask. Marianne Durand

Everything You Always Wanted to Know about Quicksort, but Were Afraid to Ask. Marianne Durand Algorithms Seminar 200 2002, F. Chyzak (ed., INRIA, (2003, pp. 57 62. Available online at the URL http://algo.inria.fr/seminars/. Everything You Always Wanted to Know about Quicksort, but Were Afraid to

More information

< k 2n. 2 1 (n 2). + (1 p) s) N (n < 1

< k 2n. 2 1 (n 2). + (1 p) s) N (n < 1 List of Problems jacques@ucsd.edu Those question with a star next to them are considered slightly more challenging. Problems 9, 11, and 19 from the book The probabilistic method, by Alon and Spencer. Question

More information

Notes by Zvi Rosen. Thanks to Alyssa Palfreyman for supplements.

Notes by Zvi Rosen. Thanks to Alyssa Palfreyman for supplements. Lecture: Hélène Barcelo Analytic Combinatorics ECCO 202, Bogotá Notes by Zvi Rosen. Thanks to Alyssa Palfreyman for supplements.. Tuesday, June 2, 202 Combinatorics is the study of finite structures that

More information

EECS 229A Spring 2007 * * (a) By stationarity and the chain rule for entropy, we have

EECS 229A Spring 2007 * * (a) By stationarity and the chain rule for entropy, we have EECS 229A Spring 2007 * * Solutions to Homework 3 1. Problem 4.11 on pg. 93 of the text. Stationary processes (a) By stationarity and the chain rule for entropy, we have H(X 0 ) + H(X n X 0 ) = H(X 0,

More information

COMP Analysis of Algorithms & Data Structures

COMP Analysis of Algorithms & Data Structures COMP 3170 - Analysis of Algorithms & Data Structures Shahin Kamali Lecture 5 - Jan. 12, 2018 CLRS 1.1, 1.2, 2.2, 3.1, 4.3, 4.5 University of Manitoba Picture is from the cover of the textbook CLRS. 1 /

More information

Data Structures and Algorithms

Data Structures and Algorithms Data Structures and Algorithms Spring 2017-2018 Outline 1 Sorting Algorithms (contd.) Outline Sorting Algorithms (contd.) 1 Sorting Algorithms (contd.) Analysis of Quicksort Time to sort array of length

More information

1 Computational Problems

1 Computational Problems Stanford University CS254: Computational Complexity Handout 2 Luca Trevisan March 31, 2010 Last revised 4/29/2010 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation

More information

3F1 Information Theory, Lecture 3

3F1 Information Theory, Lecture 3 3F1 Information Theory, Lecture 3 Jossy Sayir Department of Engineering Michaelmas 2013, 29 November 2013 Memoryless Sources Arithmetic Coding Sources with Memory Markov Example 2 / 21 Encoding the output

More information

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard

More information

1 Quick Sort LECTURE 7. OHSU/OGI (Winter 2009) ANALYSIS AND DESIGN OF ALGORITHMS

1 Quick Sort LECTURE 7. OHSU/OGI (Winter 2009) ANALYSIS AND DESIGN OF ALGORITHMS OHSU/OGI (Winter 2009) CS532 ANALYSIS AND DESIGN OF ALGORITHMS LECTURE 7 1 Quick Sort QuickSort 1 is a classic example of divide and conquer. The hard work is to rearrange the elements of the array A[1..n]

More information

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181. Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität

More information

Real numbers with bounded digit averages

Real numbers with bounded digit averages Real numbers with bounded digit averages Eda Cesaratto and Brigitte Vallée ABSTRACT. This paper considers numeration schemes, defined in terms of dynamical systems and studies the set of reals which obey

More information

Notes for Lecture Notes 2

Notes for Lecture Notes 2 Stanford University CS254: Computational Complexity Notes 2 Luca Trevisan January 11, 2012 Notes for Lecture Notes 2 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation

More information

An Analysis of the Height of Tries with Random Weights on the Edges

An Analysis of the Height of Tries with Random Weights on the Edges An Analysis of the Height of Tries with Random Weights on the Edges N. Broutin L. Devroye September 0, 2007 Abstract We analyze the weighted height of random tries built from independent strings of i.i.d.

More information

Algorithms, CSE, OSU Quicksort. Instructor: Anastasios Sidiropoulos

Algorithms, CSE, OSU Quicksort. Instructor: Anastasios Sidiropoulos 6331 - Algorithms, CSE, OSU Quicksort Instructor: Anastasios Sidiropoulos Sorting Given an array of integers A[1... n], rearrange its elements so that A[1] A[2]... A[n]. Quicksort Quicksort(A, p, r) if

More information

Week 5: Quicksort, Lower bound, Greedy

Week 5: Quicksort, Lower bound, Greedy Week 5: Quicksort, Lower bound, Greedy Agenda: Quicksort: Average case Lower bound for sorting Greedy method 1 Week 5: Quicksort Recall Quicksort: The ideas: Pick one key Compare to others: partition into

More information

Analysis of Algorithms [Reading: CLRS 2.2, 3] Laura Toma, csci2200, Bowdoin College

Analysis of Algorithms [Reading: CLRS 2.2, 3] Laura Toma, csci2200, Bowdoin College Analysis of Algorithms [Reading: CLRS 2.2, 3] Laura Toma, csci2200, Bowdoin College Why analysis? We want to predict how the algorithm will behave (e.g. running time) on arbitrary inputs, and how it will

More information

Philippe Flajolet & Analytic Combinatorics: Inherent Ambiguity of Context-Free Languages

Philippe Flajolet & Analytic Combinatorics: Inherent Ambiguity of Context-Free Languages Philippe Flajolet & Analytic Combinatorics: Inherent Ambiguity of Context-Free Languages Frédérique Bassino and Cyril Nicaud LIGM, Université Paris-Est & CNRS December 16, 2011 I first met Philippe in

More information

A Master Theorem for Discrete Divide and Conquer Recurrences. Dedicated to PHILIPPE FLAJOLET

A Master Theorem for Discrete Divide and Conquer Recurrences. Dedicated to PHILIPPE FLAJOLET A Master Theorem for Discrete Divide and Conquer Recurrences Wojciech Szpankowski Department of Computer Science Purdue University U.S.A. September 6, 2012 Uniwersytet Jagieloński, Kraków, 2012 Dedicated

More information

ON COMPOUND POISSON POPULATION MODELS

ON COMPOUND POISSON POPULATION MODELS ON COMPOUND POISSON POPULATION MODELS Martin Möhle, University of Tübingen (joint work with Thierry Huillet, Université de Cergy-Pontoise) Workshop on Probability, Population Genetics and Evolution Centre

More information

From the Discrete to the Continuous, and Back... Philippe Flajolet INRIA, France

From the Discrete to the Continuous, and Back... Philippe Flajolet INRIA, France From the Discrete to the Continuous, and Back... Philippe Flajolet INRIA, France 1 Discrete structures in... Combinatorial mathematics Computer science: data structures & algorithms Information and communication

More information

Data Structures and Algorithms CSE 465

Data Structures and Algorithms CSE 465 Data Structures and Algorithms CSE 465 LECTURE 8 Analyzing Quick Sort Sofya Raskhodnikova and Adam Smith Reminder: QuickSort Quicksort an n-element array: 1. Divide: Partition the array around a pivot

More information

COMP 250: Quicksort. Carlos G. Oliver. February 13, Carlos G. Oliver COMP 250: Quicksort February 13, / 21

COMP 250: Quicksort. Carlos G. Oliver. February 13, Carlos G. Oliver COMP 250: Quicksort February 13, / 21 COMP 250: Quicksort Carlos G. Oliver February 13, 2018 Carlos G. Oliver COMP 250: Quicksort February 13, 2018 1 / 21 1 1 https://xkcd.com/1667/ Carlos G. Oliver COMP 250: Quicksort February 13, 2018 2

More information

Analysis of Approximate Quickselect and Related Problems

Analysis of Approximate Quickselect and Related Problems Analysis of Approximate Quickselect and Related Problems Conrado Martínez Univ. Politècnica Catalunya Joint work with A. Panholzer and H. Prodinger LIP6, Paris, April 2009 Introduction Quickselect finds

More information

On the Complexity of Gröbner Basis Computation for Regular and Semi-Regular Systems

On the Complexity of Gröbner Basis Computation for Regular and Semi-Regular Systems On the Complexity of Gröbner Basis Computation for Regular and Semi-Regular Systems Bruno.Salvy@inria.fr Algorithms Project, Inria Joint work with Magali Bardet & Jean-Charles Faugère September 21st, 2006

More information

Uncertainity, Information, and Entropy

Uncertainity, Information, and Entropy Uncertainity, Information, and Entropy Probabilistic experiment involves the observation of the output emitted by a discrete source during every unit of time. The source output is modeled as a discrete

More information

4. Complex Analysis, Rational and Meromorphic Asymptotics

4. Complex Analysis, Rational and Meromorphic Asymptotics ANALYTIC COMBINATORICS P A R T T W O 4. Complex Analysis, Rational and Meromorphic Asymptotics http://ac.cs.princeton.edu ANALYTIC COMBINATORICS P A R T T W O Analytic Combinatorics Philippe Flajolet and

More information

Ramsey theory. Andrés Eduardo Caicedo. Graduate Student Seminar, October 19, Department of Mathematics Boise State University

Ramsey theory. Andrés Eduardo Caicedo. Graduate Student Seminar, October 19, Department of Mathematics Boise State University Andrés Eduardo Department of Mathematics Boise State University Graduate Student Seminar, October 19, 2011 Thanks to the NSF for partial support through grant DMS-0801189. My work is mostly in set theory,

More information

Algorithmic Tools for the Asymptotics of Diagonals

Algorithmic Tools for the Asymptotics of Diagonals Algorithmic Tools for the Asymptotics of Diagonals Bruno Salvy Inria & ENS de Lyon Lattice walks at the Interface of Algebra, Analysis and Combinatorics September 19, 2017 Asymptotics & Univariate Generating

More information

Chapter 14. Basics of The Differential Geometry of Surfaces. Introduction. Parameterized Surfaces. The First... Home Page. Title Page.

Chapter 14. Basics of The Differential Geometry of Surfaces. Introduction. Parameterized Surfaces. The First... Home Page. Title Page. Chapter 14 Basics of The Differential Geometry of Surfaces Page 649 of 681 14.1. Almost all of the material presented in this chapter is based on lectures given by Eugenio Calabi in an upper undergraduate

More information

Basic Principles of Lossless Coding. Universal Lossless coding. Lempel-Ziv Coding. 2. Exploit dependences between successive symbols.

Basic Principles of Lossless Coding. Universal Lossless coding. Lempel-Ziv Coding. 2. Exploit dependences between successive symbols. Universal Lossless coding Lempel-Ziv Coding Basic principles of lossless compression Historical review Variable-length-to-block coding Lempel-Ziv coding 1 Basic Principles of Lossless Coding 1. Exploit

More information

Review Of Topics. Review: Induction

Review Of Topics. Review: Induction Review Of Topics Asymptotic notation Solving recurrences Sorting algorithms Insertion sort Merge sort Heap sort Quick sort Counting sort Radix sort Medians/order statistics Randomized algorithm Worst-case

More information

Digital search trees JASS

Digital search trees JASS Digital search trees Analysis of different digital trees with Rice s integrals. JASS Nicolai v. Hoyningen-Huene 28.3.2004 28.3.2004 JASS 04 - Digital search trees 1 content Tree Digital search tree: Definition

More information

Model Counting for Logical Theories

Model Counting for Logical Theories Model Counting for Logical Theories Wednesday Dmitry Chistikov Rayna Dimitrova Department of Computer Science University of Oxford, UK Max Planck Institute for Software Systems (MPI-SWS) Kaiserslautern

More information

Applications of Discrete Mathematics to the Analysis of Algorithms

Applications of Discrete Mathematics to the Analysis of Algorithms Applications of Discrete Mathematics to the Analysis of Algorithms Conrado Martínez Univ. Politècnica de Catalunya, Spain May 2007 Goal Given some algorithm taking inputs from some set Á, we would like

More information

Analysis of Algorithms CMPSC 565

Analysis of Algorithms CMPSC 565 Analysis of Algorithms CMPSC 565 LECTURES 38-39 Randomized Algorithms II Quickselect Quicksort Running time Adam Smith L1.1 Types of randomized analysis Average-case analysis : Assume data is distributed

More information

Lecture 11: Continuous-valued signals and differential entropy

Lecture 11: Continuous-valued signals and differential entropy Lecture 11: Continuous-valued signals and differential entropy Biology 429 Carl Bergstrom September 20, 2008 Sources: Parts of today s lecture follow Chapter 8 from Cover and Thomas (2007). Some components

More information

7 Asymptotics for Meromorphic Functions

7 Asymptotics for Meromorphic Functions Lecture G jacques@ucsd.edu 7 Asymptotics for Meromorphic Functions Hadamard s Theorem gives a broad description of the exponential growth of coefficients in power series, but the notion of exponential

More information

CSCI 3110 Assignment 6 Solutions

CSCI 3110 Assignment 6 Solutions CSCI 3110 Assignment 6 Solutions December 5, 2012 2.4 (4 pts) Suppose you are choosing between the following three algorithms: 1. Algorithm A solves problems by dividing them into five subproblems of half

More information

Non-Standard Coding Theory

Non-Standard Coding Theory Non-Standard Coding Theory Steven T. Dougherty July 3, 2013 Rosenbloom-Tsfasman Metric Codes with the Rosenbloom-Tsfasman Metric Rosenbloom-Tsfasman Metric Mat n,s (F q ) denotes the linear space of all

More information

Analytic Pattern Matching: From DNA to Twitter. AxA Workshop, Venice, 2016 Dedicated to Alberto Apostolico

Analytic Pattern Matching: From DNA to Twitter. AxA Workshop, Venice, 2016 Dedicated to Alberto Apostolico Analytic Pattern Matching: From DNA to Twitter Wojciech Szpankowski Purdue University W. Lafayette, IN 47907 June 19, 2016 AxA Workshop, Venice, 2016 Dedicated to Alberto Apostolico Joint work with Philippe

More information

Homework Set #2 Data Compression, Huffman code and AEP

Homework Set #2 Data Compression, Huffman code and AEP Homework Set #2 Data Compression, Huffman code and AEP 1. Huffman coding. Consider the random variable ( x1 x X = 2 x 3 x 4 x 5 x 6 x 7 0.50 0.26 0.11 0.04 0.04 0.03 0.02 (a Find a binary Huffman code

More information

Lecture No 1 Introduction to Diffusion equations The heat equat

Lecture No 1 Introduction to Diffusion equations The heat equat Lecture No 1 Introduction to Diffusion equations The heat equation Columbia University IAS summer program June, 2009 Outline of the lectures We will discuss some basic models of diffusion equations and

More information

Analytic number theory for probabilists

Analytic number theory for probabilists Analytic number theory for probabilists E. Kowalski ETH Zürich 27 October 2008 Je crois que je l ai su tout de suite : je partirais sur le Zéta, ce serait mon navire Argo, celui qui me conduirait à la

More information

Uncommon Suffix Tries

Uncommon Suffix Tries Uncommon Suffix Tries Peggy Cénac Brigitte Chauvin 2 Frédéric Paccaut 3 Nicolas Pouyanne 4 January 6th 203 Abstract Common assumptions on the source producing the words inserted in a suffix trie with n

More information

Poisson Processes. Particles arriving over time at a particle detector. Several ways to describe most common model.

Poisson Processes. Particles arriving over time at a particle detector. Several ways to describe most common model. Poisson Processes Particles arriving over time at a particle detector. Several ways to describe most common model. Approach 1: a) numbers of particles arriving in an interval has Poisson distribution,

More information

Uncommon Suffix Tries

Uncommon Suffix Tries Uncommon Suffix Tries arxiv:2.43v2 [math.pr] 20 Dec 20 Abstract Peggy Cénac Brigitte Chauvin 2 Frédéric Paccaut 3 Nicolas Pouyanne 4 December 4th 20 Common assumptions on the source producing the words

More information

Divide & Conquer. Jordi Cortadella and Jordi Petit Department of Computer Science

Divide & Conquer. Jordi Cortadella and Jordi Petit Department of Computer Science Divide & Conquer Jordi Cortadella and Jordi Petit Department of Computer Science Divide-and-conquer algorithms Strategy: Divide the problem into smaller subproblems of the same type of problem Solve the

More information

The range of tree-indexed random walk

The range of tree-indexed random walk The range of tree-indexed random walk Jean-François Le Gall, Shen Lin Institut universitaire de France et Université Paris-Sud Orsay Erdös Centennial Conference July 2013 Jean-François Le Gall (Université

More information

CSCE 750 Final Exam Answer Key Wednesday December 7, 2005

CSCE 750 Final Exam Answer Key Wednesday December 7, 2005 CSCE 750 Final Exam Answer Key Wednesday December 7, 2005 Do all problems. Put your answers on blank paper or in a test booklet. There are 00 points total in the exam. You have 80 minutes. Please note

More information

Coding of memoryless sources 1/35

Coding of memoryless sources 1/35 Coding of memoryless sources 1/35 Outline 1. Morse coding ; 2. Definitions : encoding, encoding efficiency ; 3. fixed length codes, encoding integers ; 4. prefix condition ; 5. Kraft and Mac Millan theorems

More information

CS361 Homework #3 Solutions

CS361 Homework #3 Solutions CS6 Homework # Solutions. Suppose I have a hash table with 5 locations. I would like to know how many items I can store in it before it becomes fairly likely that I have a collision, i.e., that two items

More information

Introduction to information theory and coding

Introduction to information theory and coding Introduction to information theory and coding Louis WEHENKEL Set of slides No 4 Source modeling and source coding Stochastic processes and models for information sources First Shannon theorem : data compression

More information

Analysis of Algorithms. Randomizing Quicksort

Analysis of Algorithms. Randomizing Quicksort Analysis of Algorithms Randomizing Quicksort Randomizing Quicksort Randomly permute the elements of the input array before sorting OR... modify the PARTITION procedure At each step of the algorithm we

More information

The Central Limit Theorem: More of the Story

The Central Limit Theorem: More of the Story The Central Limit Theorem: More of the Story Steven Janke November 2015 Steven Janke (Seminar) The Central Limit Theorem:More of the Story November 2015 1 / 33 Central Limit Theorem Theorem (Central Limit

More information

Additive irreducibles in α-expansions

Additive irreducibles in α-expansions Publ. Math. Debrecen Manuscript Additive irreducibles in α-expansions By Peter J. Grabner and Helmut Prodinger * Abstract. The Bergman number system uses the base α = + 5 2, the digits 0 and, and the condition

More information

Math Review Sheet, Fall 2008

Math Review Sheet, Fall 2008 1 Descriptive Statistics Math 3070-5 Review Sheet, Fall 2008 First we need to know about the relationship among Population Samples Objects The distribution of the population can be given in one of the

More information

Quantitative Oppenheim theorem. Eigenvalue spacing for rectangular billiards. Pair correlation for higher degree diagonal forms

Quantitative Oppenheim theorem. Eigenvalue spacing for rectangular billiards. Pair correlation for higher degree diagonal forms QUANTITATIVE DISTRIBUTIONAL ASPECTS OF GENERIC DIAGONAL FORMS Quantitative Oppenheim theorem Eigenvalue spacing for rectangular billiards Pair correlation for higher degree diagonal forms EFFECTIVE ESTIMATES

More information

Exercises with solutions (Set B)

Exercises with solutions (Set B) Exercises with solutions (Set B) 3. A fair coin is tossed an infinite number of times. Let Y n be a random variable, with n Z, that describes the outcome of the n-th coin toss. If the outcome of the n-th

More information

Part IB. Further Analysis. Year

Part IB. Further Analysis. Year Year 2004 2003 2002 2001 10 2004 2/I/4E Let τ be the topology on N consisting of the empty set and all sets X N such that N \ X is finite. Let σ be the usual topology on R, and let ρ be the topology on

More information

How Philippe Flipped Coins to Count Data

How Philippe Flipped Coins to Count Data 1/18 How Philippe Flipped Coins to Count Data Jérémie Lumbroso LIP6 / INRIA Rocquencourt December 16th, 2011 0. DATA STREAMING ALGORITHMS Stream: a (very large) sequence S over (also very large) domain

More information

Sorting. Chapter 11. CSE 2011 Prof. J. Elder Last Updated: :11 AM

Sorting. Chapter 11. CSE 2011 Prof. J. Elder Last Updated: :11 AM Sorting Chapter 11-1 - Sorting Ø We have seen the advantage of sorted data representations for a number of applications q Sparse vectors q Maps q Dictionaries Ø Here we consider the problem of how to efficiently

More information

Asymptotic Analysis. Slides by Carl Kingsford. Jan. 27, AD Chapter 2

Asymptotic Analysis. Slides by Carl Kingsford. Jan. 27, AD Chapter 2 Asymptotic Analysis Slides by Carl Kingsford Jan. 27, 2014 AD Chapter 2 Independent Set Definition (Independent Set). Given a graph G = (V, E) an independent set is a set S V if no two nodes in S are joined

More information

Math 259: Introduction to Analytic Number Theory Functions of finite order: product formula and logarithmic derivative

Math 259: Introduction to Analytic Number Theory Functions of finite order: product formula and logarithmic derivative Math 259: Introduction to Analytic Number Theory Functions of finite order: product formula and logarithmic derivative This chapter is another review of standard material in complex analysis. See for instance

More information

Learning Objectives. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 1

Learning Objectives. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 1 Learning Objectives At the end of the class you should be able to: identify a supervised learning problem characterize how the prediction is a function of the error measure avoid mixing the training and

More information

Department of Mathematics, University of California, Berkeley. GRADUATE PRELIMINARY EXAMINATION, Part A Fall Semester 2014

Department of Mathematics, University of California, Berkeley. GRADUATE PRELIMINARY EXAMINATION, Part A Fall Semester 2014 Department of Mathematics, University of California, Berkeley YOUR 1 OR 2 DIGIT EXAM NUMBER GRADUATE PRELIMINARY EXAMINATION, Part A Fall Semester 2014 1. Please write your 1- or 2-digit exam number on

More information

Multimedia Communications. Mathematical Preliminaries for Lossless Compression

Multimedia Communications. Mathematical Preliminaries for Lossless Compression Multimedia Communications Mathematical Preliminaries for Lossless Compression What we will see in this chapter Definition of information and entropy Modeling a data source Definition of coding and when

More information

5. DIVIDE AND CONQUER I

5. DIVIDE AND CONQUER I 5. DIVIDE AND CONQUER I mergesort counting inversions closest pair of points randomized quicksort median and selection Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley http://www.cs.princeton.edu/~wayne/kleinberg-tardos

More information

MATH 452. SAMPLE 3 SOLUTIONS May 3, (10 pts) Let f(x + iy) = u(x, y) + iv(x, y) be an analytic function. Show that u(x, y) is harmonic.

MATH 452. SAMPLE 3 SOLUTIONS May 3, (10 pts) Let f(x + iy) = u(x, y) + iv(x, y) be an analytic function. Show that u(x, y) is harmonic. MATH 45 SAMPLE 3 SOLUTIONS May 3, 06. (0 pts) Let f(x + iy) = u(x, y) + iv(x, y) be an analytic function. Show that u(x, y) is harmonic. Because f is holomorphic, u and v satisfy the Cauchy-Riemann equations:

More information

Coding on Countably Infinite Alphabets

Coding on Countably Infinite Alphabets Coding on Countably Infinite Alphabets Non-parametric Information Theory Licence de droits d usage Outline Lossless Coding on infinite alphabets Source Coding Universal Coding Infinite Alphabets Enveloppe

More information

Lecture 5: Asymptotic Equipartition Property

Lecture 5: Asymptotic Equipartition Property Lecture 5: Asymptotic Equipartition Property Law of large number for product of random variables AEP and consequences Dr. Yao Xie, ECE587, Information Theory, Duke University Stock market Initial investment

More information

Multivariable Calculus Notes. Faraad Armwood. Fall: Chapter 1: Vectors, Dot Product, Cross Product, Planes, Cylindrical & Spherical Coordinates

Multivariable Calculus Notes. Faraad Armwood. Fall: Chapter 1: Vectors, Dot Product, Cross Product, Planes, Cylindrical & Spherical Coordinates Multivariable Calculus Notes Faraad Armwood Fall: 2017 Chapter 1: Vectors, Dot Product, Cross Product, Planes, Cylindrical & Spherical Coordinates Chapter 2: Vector-Valued Functions, Tangent Vectors, Arc

More information

Forty years of tree enumeration

Forty years of tree enumeration October 24, 206 Canada John Moon (Alberta) Counting labelled trees Canadian mathematical monographs What is our subject? Asymptotic enumeration or Probabilistic combinatorics? What is our subject? Asymptotic

More information

4 Uniform convergence

4 Uniform convergence 4 Uniform convergence In the last few sections we have seen several functions which have been defined via series or integrals. We now want to develop tools that will allow us to show that these functions

More information

Stat 710: Mathematical Statistics Lecture 40

Stat 710: Mathematical Statistics Lecture 40 Stat 710: Mathematical Statistics Lecture 40 Jun Shao Department of Statistics University of Wisconsin Madison, WI 53706, USA Jun Shao (UW-Madison) Stat 710, Lecture 40 May 6, 2009 1 / 11 Lecture 40: Simultaneous

More information

Riemann s Zeta Function and the Prime Number Theorem

Riemann s Zeta Function and the Prime Number Theorem Riemann s Zeta Function and the Prime Number Theorem Dan Nichols nichols@math.umass.edu University of Massachusetts Dec. 7, 2016 Let s begin with the Basel problem, first posed in 1644 by Mengoli. Find

More information

Pure Patterns and Ordinal Numbers

Pure Patterns and Ordinal Numbers Pure Patterns and Ordinal Numbers Gunnar Wilken Okinawa Institute of Science and Technology Graduate University Japan Sets and Computations Institute of the Mathematical Sciences National University of

More information

Lecture 1: Asymptotics, Recurrences, Elementary Sorting

Lecture 1: Asymptotics, Recurrences, Elementary Sorting Lecture 1: Asymptotics, Recurrences, Elementary Sorting Instructor: Outline 1 Introduction to Asymptotic Analysis Rate of growth of functions Comparing and bounding functions: O, Θ, Ω Specifying running

More information

Digital communication system. Shannon s separation principle

Digital communication system. Shannon s separation principle Digital communication system Representation of the source signal by a stream of (binary) symbols Adaptation to the properties of the transmission channel information source source coder channel coder modulation

More information

On the coinductive nature of centralizers

On the coinductive nature of centralizers On the coinductive nature of centralizers Charles Grellois INRIA & University of Bologna Séminaire du LIFO Jan 16, 2017 Charles Grellois (INRIA & Bologna) On the coinductive nature of centralizers Jan

More information

The zeta function, L-functions, and irreducible polynomials

The zeta function, L-functions, and irreducible polynomials The zeta function, L-functions, and irreducible polynomials Topics in Finite Fields Fall 203) Rutgers University Swastik Kopparty Last modified: Sunday 3 th October, 203 The zeta function and irreducible

More information