Class 2
Class 2
DESIGN
Lekha A
Computer Applications
ALGORITHMS – ANALYSIS AND
DESIGN
Lekha A
Computer Applications
ALGORITHMS – ANALYSIS AND DESIGN
Recap
needs.
element matrix .
smallest element.
ALGORITHMS – ANALYSIS AND DESIGN
Measuring an input
• b = [log 2 n] + 1.
ALGORITHMS – ANALYSIS AND DESIGN
Units of measuring running time
depends on the
algorithm)
of the algorithm.
• Example
• n : Input size
• The count C(n) does not contain any info about operations
input difference.
ALGORITHMS – ANALYSIS AND DESIGN
Orders of Growth
n log2 n n n log2 n n2 n3 2n n!
10 3.3 101 3.3 *101 102 103 103 3.6 * 106
• 102 6.6 102 6.6 * 102 104 106 1.3 * 1030 9.3 * 10157
103 10 103 1.0 * 104 106 109
104 13 104 1.3 * 105 108 1012
105 17 105 1.7 * 106 1010 1015
106 20 106 2.0 * 107 1012 1018
ALGORITHMS – ANALYSIS AND DESIGN
Orders of Growth
logarithmic function.
grows fast.
ALGORITHMS – ANALYSIS AND DESIGN
Recap
• Analysis Framework
• Measuring an Input
• Orders of Growth
Thank you
Lekha A
Computer Applications