CSPC24 Chapter 1 - Introduction to Algorithms
CSPC24 Chapter 1 - Introduction to Algorithms
Algorithm and
Complexity
Introduction to Algorithms
Objectives
• Define and understand the meaning of algorithm.
• Let's say that you have a friend arriving at the airport, and
your friend needs to get from the airport to your house.
Fundamentals Of Algorithmic Problem
Solving
• Understanding the problem
• Ascertain the capabilities of the computational device
• Exact /approximate solution
• Decide on the appropriate data structure
• Algorithm design techniques
• Methods of specifying an algorithm
• Proving an algorithms correctness
• Analyzing an algorithm
Understanding The Problem
• An input to an algorithm specifies an instance of the
problem the algorithm solves.
• Greedy algorithms
• Divide and conquer
• Dynamic Programming
• Randomized Algorithms
• Backtracking Algorithms
Methods Of Specifying an Algorithm
These are the two options that are most widely used
nowadays for specifying algorithms.
1. Pseudocode
2. Flowchart
Proving An Algorithms Correctness