Meaning of lg * N in Algorithmic Analysis

前端 未结 6 1912
暖寄归人
暖寄归人 2021-02-05 05:23

I\'m currently reading about algorithmic analysis and I read that a certain algorithm (weighted quick union with path compression) is of order N + M lg * N. Apparently though th

6条回答
  •  庸人自扰
    2021-02-05 06:00

    The recursive definition of lg*n by Jason is equivalent to lg*n = m when 2 II m <= n < 2 II (m+1) where
    2 II m = 2^2^...^2 (repeated exponentiation, m copies of 2)
    is Knuth's double up arrow notation. Thus
    lg*2= 1, lg*2^2= 2, lg*2^{2^2}= 3, lg*2^{2^{2^2}} = 4, lg*2^{2^{2^{2^2}}} = 5.
    Hence lg*n=4 for 2^{16} <= n < 2^{65536}. The function lg*n approaches infinity extremely slowly. (Faster than an inverse of the Ackermann function A(n,n) which involves n-2 up arrows.)

    Stephen

提交回复
热议问题