Assignment: Algorithms & Problem Solving Principles 1.
Algorithm: The Role of Algorithms in
Computing What are Algorithms? Algorithms are finite, step-by-step procedures to solve a problem.
They must be definite, effective, and must terminate. Algorithms as Technology Algorithms are core
technologies used in modern computing—such as search engines, social media feeds, encryption,
and navigation systems. Evolution of Algorithms Early mathematical algorithms → structured
algorithms (1950s–90s) → modern AI, big data, and quantum algorithms. Design of Algorithms
Steps: understand problem, choose strategy, design logic, test, and analyze. Techniques include
Divide & Conquer, Greedy, Dynamic Programming, Backtracking, Brute Force, and Randomized
algorithms. Need of Correctness Correct algorithms ensure accuracy, avoid system failure, and
maintain reliability in critical applications. Confirming Correctness Two methods: dry run/testing and
mathematical proof (loop invariants, induction). Iterative Algorithm Issues Common issues: infinite
loops, wrong conditions, poor initialization, off-by-one errors, and large time complexity. 2. Problem
Solving Principles Classification of Problems Decision, search, optimization, numerical,
string/pattern, and graph problems. Problem Solving Strategies Understanding the problem,
breaking it down, selecting an approach, designing a solution, and testing. 3. Classification of Time
Complexities O(1), O(log n), O(n), O(n log n), O(n²), O(2■), O(n!). Increasing order of growth: O(1)
→ O(log n) → O(n) → O(n log n) → O(n²) → O(2■) → O(n!).