Const-time Search & Linear-time Sorting
This paper explores the possibilities of achieving constant-time search and linear-time sorting algorithms within computational complexity constraints. It addresses existing methods in search and sorting, analyzes their limitations, and investigates a range of algorithms including radix sort, quick sort, and improved versions of Dijkstra's algorithm. We emphasize the challenges of maintaining efficient data structures with operations like insertion, deletion, and traversal, while ensuring an optimal performance without increasing time complexity. Applications span various fields, including complexity theory, computational geometry, and AI.
Const-time Search & Linear-time Sorting
E N D
Presentation Transcript
Const-time Search & Linear-time Sorting Shi-qing Xin & Guo-jin Wang 2006.10.25
Problem Description • At most n numbers, with each formatted as K=k1k2…kw (0110…) • Two dimensions to describe complexity • Max(a1,a2), Max(a1,a2,…an) • Linear-time sorting? • Maintain a priority queue without increasing time complexity?
Previous Methods • Previous search algorithms • Previous sorting algorithms • Stable sorting, comparison sorting • Is O(nlogn) the lower bound? • Radix sorting: from end; euqal word length; extra space; repeated copy; array-based and not dynamic; higher average time complexity; • Quick sorting and red-black tree
Dijkstra’s algorithm • Dijkstra’s algorithm on graphs • Time complexity O(ElogE) • advantages
An Ugly Method • An O(n2) method based on building a binary tree.
Contradiction • An O(E+nlogn) improved version • However, the improved algorithm isn’t essential. For example, Let wij += fij(min(di, dj)) for each edge, where fij(۰) is a non-decreasing function. • The definition is correct. • The improved version doesn’t work. • Another improved version by Tarjan;
Other Counter-intuitive Examples • Our work on 3d shortest path problem • What is the best sorting algorithm? • No one denies the possibility of const-time search and linear-time sorting; • Unreasonable array & hash table; • Unreasonable binary search & Fibonacci search; • How do we percept?
Goal of Our Algorithm • No empty position, linear space • A limited depth indepent of n • Dynamic search, deletion, insertion can be done in const time. • Extract the min/max element in const time. • Linear-time traversal • Visit k-th elem in const time • Reflect inherent similarity
Operations on RBT • Search an elem • Insert an elem • Delete a given elem • Extract the min/max element; • Read the k-th element • Traversal • Extract a group of similar elements
Applications • Complexity theory, graphs, computational geometry; for example, shortest path problem in 2D or 3D. • Design efficient algorithms • Computer design • Database & data structure & language • AI • And so on
Criticisms • Array, hash table, B- tree & B+ tree, balanced tree, huffman tree, read-black tree, suffix array sorting, binary search, k-ary heap, Fibonacci heap, etc. • Computer design: excessively digitized;