MCS-211 · Block 1 Unit 2

Some Pre-requisites and Asymptotic Bounds

8 sections

Block 1 · Unit 2Some Pre-requisites and Asymptotic Bounds88 min · 8 sections

Unit 2Some Pre-requisites and Asymptotic Bounds

Follows IGNOU MCS-211, Block 1 Unit 2

To analyse an algorithm you need two kinds of tools: a little mathematics (sums, logarithms, remainders, expected values and proof by induction) and a precise language for growth rates. This unit gives you both. The first half collects the mathematical facts that appear again and again in running-time calculations; the second half defines Big-O, Big-Omega and Big-Theta formally and shows how to prove or disprove statements such as 4n2+7n+12=O(n2)4n^2 + 7n + 12 = O(n^2). Everything in later units — analysing loops, solving recurrences, comparing algorithms — is written in this language.

In this unit you will learn to

  • use summation and product notation and the standard sum formulas;
  • work with functions, floor and ceiling, logarithm rules and the mod function;
  • compute a mathematical expectation (expected value);
  • write a proof by mathematical induction;
  • explain how the efficiency of an algorithm is measured and what asymptotic analysis ignores;
  • define O, Ω and Θ formally and find the constants cc and n0n_0;
  • prove or disprove asymptotic statements and apply the polynomial theorems.

Sections in this unit

  1. 2.1Sums, Products and FunctionsSigma and product notation, the standard sum formulas, functions, and the floor and ceiling functions with examples.7 min
  2. 2.2Logarithms and the Mod FunctionLogarithm rules (with corrected versions), change of base and why log bases don't matter in O, and the mod function for negative numbers.8 min
  3. 2.3Proof Vocabulary and Mathematical ExpectationStatements, propositions, theorems, lemmas and corollaries, then the expected value of a random quantity with worked examples.9 min
  4. 2.4Mathematical InductionThe principle of mathematical induction—base case, hypothesis, inductive step—with full proofs of the sum formulas and 2^0+…+2^n.17 min
  5. 2.5Efficiency and Asymptotic AnalysisInput size, counting basic steps, machine independence, worst vs average case, and the strengths and limits of asymptotic analysis.11 min
  6. 2.6Big-O Notation: Upper BoundsThe formal definition of Big-O, how to find c and n₀, how to prove a function is not O(g), and Check Your Progress 2 worked answers.12 min
  7. 2.7Big-Omega and Big-ThetaFormal definitions of Ω (lower bound) and Θ (tight bound), the Θ = O + Ω theorem, and the remaining Check Your Progress 2 answers.13 min
  8. 2.8Useful Theorems for O, Ω and ΘPolynomial theorems for O, Ω and Θ with correct conditions and proofs, plus rules for sums, products and transitivity.11 min
↑ ↓ move↵ openTab switch type