A-level Computing/AQA/Paper 1/Theory of computation/Order of complexity

PAPER 1 - ⇑ Theory of computation ⇑

Maths for big-O notation Order of complexity Limits of computation
Category:Book:A-level Computing#AQA/Paper%201/Theory%20of%20computation/Order%20of%20complexity


Order of Complexity

NotationNameExample
constantDetermining if a number is even or odd; using a constant-size lookup table
logarithmicFinding an item in a sorted array with a binary search or a balanced search tree as well as all operations in a Binomial heap.
linearFinding an item in an unsorted list or a malformed tree (worst case) or in an unsorted array; Adding two n-bit integers by ripple carry.
linearithmic, loglinear, or quasilinearPerforming a Fast Fourier transform; heapsort, quicksort (best and average case), or merge sort
quadraticMultiplying two n-digit numbers by a simple algorithm; bubble sort (worst case or naive implementation), Shell sort, quicksort (worst case), selection sort or insertion sort
polynomial or algebraicTree-adjoining grammar parsing; maximum matching for bipartite graphs
exponentialFinding the (exact) solution to the travelling salesman problem using dynamic programming; determining if two logical statements are equivalent using brute-force search
factorialSolving the travelling salesman problem via brute-force search; generating all unrestricted permutations of a poset; finding the determinant with expansion by minors.
Category:Book:A-level Computing#AQA/Paper%201/Theory%20of%20computation/Order%20of%20complexity%20
Category:Book:A-level Computing