Chapter 1: Basic Concepts: Design and Analysis of Algorithm (CS 302)
Chapter 1: Basic Concepts: Design and Analysis of Algorithm (CS 302)
Chapter 1: Basic Concepts: Design and Analysis of Algorithm (CS 302)
• Greedy Approach
– Locally optimal decisions, cannot change once
made. Efficient, easy to implement, the solution is
expected to be optimal. Every problem may not
have greedy solution.
Problem Solving Process
• Problem
• Algorithm
– Input
– Output
– Steps
• Analysis
– Correctness
– Time and space complexity
– Optimality
• Implementation
• Verification
Models of Computation Assumptions
• Model of computation is in fact a set of assumptions where we
define under which assumptions we will design and analyze our
algorithms.
• Designing Assumptions
– Level of abstraction which meets our requirement.
– It should be neither more nor less, for example [0, 1] infinite continuous
interval.
• Analysis Assumptions
– Analysis Independent of the variations in:
• Machines
• Operating systems
• Programming languages
• Compilers etc.
Models of Computation Assumptions (cont.)