Design and Analysis of Algorithms
An algorithm is a set of sequential steps written in ordinary English to solve a problem. Every algorithm must possess 5 properties. they are:
UNIT - I [Download]
- Definiteness
- Finiteness
- Effectiveness
- Input and Output
- Generality
Types of algorithms
- Simple
- Divide and conquer
- Backtracking.
- Dynamic programming.
- Branch and bound.
- Greedy.
- Brute force.
- Randomised.
- A Simple recursive algorithm solves the problem by dividing into subproblems.
- A divide-and-conquer algorithm divides the problem into no. of smaller sub-problems and solve all these sub-problems recursively then combine the solutions of the all the sub-problems, finally get the solution to the original problem.
- A backtracking algorithm is based on a depth-first recursive search.
- Dynamic programming is generally used for optimization. A dynamic programming algorithm solves the problem by remembering past results and uses them to find new results.
- Branch and bound uses the tree structure to solve the problem. The problem can be considered as root. As the algorithm progresses, a tree of sub-problems is formed. There are also used for optimization.
- A greedy algorithm works in stages. You choose the best a local optimal at each step, you will end up at a global optimal.
- A brute force algorithm simply follows trial and error methodology until a satisfactory solution is found by checking all possibilities.
- A randomized algorithm works faster. Used to solve large and complex problems.
1 Comments
nice material please upload DS materials thank you...
ReplyDelete