Definitionintro
Polylogarithmic time
Also called polylog time.
Running time bounded by a polynomial in log n.
An algorithm runs in polylogarithmic time when its worst-case time is for some constant , where is the input size. The class contains constant time and logarithmic time, which are the cases and . It is a subclass of sublinear time: a power of a logarithm grows more slowly than each power with . It appears in the query time of data structures and in the parallel time of the class NC.
Definition
Let be a function from the natural numbers to the non-negative reals. The function is polylogarithmic when there are constants , and such that
In words, for some constant . The threshold keeps positive. An algorithm runs in polylogarithmic time when its worst-case time in a stated model is a polylogarithmic function of the input size.
A polylogarithmic-time algorithm reads only a tiny part of its input, so the model must give random access to the input, for example the random-access machine or a Turing machine with random access. A machine with a sequential tape needs steps just to reach the end of its input. For a data structure, is the number of stored items: the query time is polylogarithmic in after a preprocessing that reads all items.
The class is the union over of the classes , and each class is contained in the next one, since for . A real gives the same union as an integer , because .
The base does not matter. For bases , , so , which differs from by a constant factor. So , and the base needs no mention inside . See logarithms.
Notation. The expression means , the -th power of the logarithm. It does not mean that the logarithm is applied times. That function is the iterated logarithm with the number in parentheses, see iterated logarithm. Also is , and it is not . For we have , and . The function is polylogarithmic, since for .
Order. For each constant and , , see asymptotic notation. To see this, put . Then , and this tends to 0 as , because an exponential function beats each power of . The class is strictly inside , because . So a polylogarithmic function is for every , and it is sublinear.
The soft-O notation hides polylogarithmic factors: means for some constant . For example, an time is .
Examples and non-examples
- Binary search in a sorted array takes at most comparisons. This is , so . For it is 20. See binary search.
- Search trees and heaps. A search, an insertion or a deletion in a balanced search tree such as an AVL tree takes time, and the insertion in a binary heap takes time, where is the number of stored items.
- Range queries. A segment tree or a Fenwick tree answers a range-sum query and takes a point update in time, after a preprocessing of time, where is the number of stored items.
- A power of the logarithm. A structure with query time is polylogarithmic with . Some structures for range queries in the plane have a query time of this form, where is the number of stored points.
- Parallel time. The sum of numbers takes rounds when each round adds the numbers in pairs, in parallel, with processors in the first round. The parallel time is while the work is .
- Non-example: , or for a constant . These are sublinear and not polylogarithmic.
- Non-example: is sublinear. It is not polylogarithmic, because it is not bounded by for any .
- Non-example: grows faster than each , since for the ratio is at least , which grows without bound. It is quasi-polynomial, see quasi-polynomial time.
- Non-example: is not polylogarithmic. Its logarithm is , and the logarithm of is , which grows more slowly.
- Non-example: a time that is in the value of the input is linear in the length of the input. The input size of an integer is bits, so a time of steps is and not polylogarithmic in . Fast exponentiation takes multiplications for the exponent , which is linear in the number of bits of .
A polylogarithm is not small for a small input
Constants and exponents matter for the input sizes of practice. At , . Let . Then , and the logarithm of this ratio increases when . The ratio is 1 at , so for each . For the values are , , and , so is still larger than . Asymptotic notation says nothing about a fixed .
Related definitions
- Constant time is , the case . Logarithmic time is , the case .
- Sublinear time is and contains polylogarithmic time. Polynomial time is and contains it too.
- The class is the set of problems that are solvable in polylogarithmic parallel time with polynomially many processors, in the following circuit form. For , is the class of decision problems that uniform families of Boolean circuits decide, with fan-in 2, size polynomial in and depth . The class is the union of over . It is contained in P. It is open whether the two are equal. See NC and the class P in polynomial time.
- Common growth rates places the polylogarithmic functions between the constants and the powers of .
References
- https://en.wikipedia.org/wiki/Time_complexity, section Polylogarithmic time
- Cormen, Leiserson, Rivest and Stein, Introduction to Algorithms, fourth edition, Chapter 3 (standard notations, polylogarithmically bounded functions)
- Donald E. Knuth, The Art of Computer Programming, Volume 1, third edition, Section 1.2.11.1
- Arora and Barak, Computational Complexity, A Modern Approach, Chapter 6 (the class NC)
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 40MSAP Edit this page History Report an error Markdown JSON