[an error occurred while processing this directive]
Ω: lower bound. A function g is in Ω (f) iff there are positive constants c and n0 such that g(n) ≥ cf(n) for all n ≥ n0.
Θ: tight bound. A function g is in Θ (f) iff g is in O(f) and g is in Ω(f).
(define (sort lst cf) (if (null? lst) lst (let ((best (find-best lst cf))) (cons best (sort (delete lst best) cf))))) (define (find-best lst cf) (if (= 1 (length lst)) (car lst) (pick-better cf (car lst) (find-best (cdr lst) cf))))
(define (insertsort cf lst) (if (null? lst) null (insertone cf (car lst) (insertsort cf (cdr lst))))) (define (insertone cf el lst) (if (null? lst) (list el) (if (cf el (car lst)) (cons el lst) (cons (car lst) (insertone cf el (cdr lst))))))What is the asymptotic running time of the sort procedures?
Which sort procedure is faster?
Why are these operators useful for understanding the cost of evaluating
procedures?
What can one do with transistors made from semiconductors?
We consider simple machine operations, such as addition, to take Θ(1) time. This is sometimes called constant time. [an error occurred while processing this directive]