You are on page 1of 11

Algorithm Techniques :

Approaches or designs
for solving a problem

By : Salam Abdulla
Outline
• Divide and Conquer Algorithms
• Dynamic Programming
• Greedy Approach
• Brand and Branch
• Backtracking
Algorithm Charachteristics
• Input
• Output
• Difnitness
• Finitenesss
• Effectivness
• Even if we would like to find God there must
be look for an effective algorithm
Brute Force
• You need to try out all possible solution and
then pick up the desired solution
Divide and Conquer
• Binary Search
Dynamic Programming
• We are solving optimization problem
• Fibunacci
Backtracking
• Is not used for optimization problem
• Its used when you have multiple solutions and you need
all of them.Therefore it takes brute force approach
• But there are some constraints
• We usually use state state tree
• We applied bounding function
• If no bounding function applied untill you reach at the last
level then you got a solution.
• It follows Depth first search while Branch and bound
follows Breadth first approach
How to analyze algorithms
• Time
• Space
• How much data transfer is done
• Power consumption
• CPU registers
Greedy Approach
• Greedy methods is Used for solving optimization
problem(Problem which demands either minimum or
maximum results)
• Three will be many different solutions on my way to destination
• Some times there will be opportunity if I found minimum or
maximum.(constraints)
• For constraints we have feasible solutions
• So there will be many solution and we only pick the ones that
stratifying constraints.
• Minimization or Maximization Problem
• We need to find only one optimal solution
Optimization Problems
• Greed Approach
• Dynamic Programming
• Branch and Bound for some problem can be
applied
• The approach is different

You might also like