Algorithm

Getting Started with AlgorithmWhat is an Algorithm?

Characteristics of Algorithm1 Topic

Analysis Framework

Performance Analysis3 Topics

Mathematical Analysis2 Topics

Sorting AlgorithmSorting Algorithm10 Topics

Searching Algorithm6 Topics

Fundamental of Data StructuresStacks

Queues

Graphs

Trees

Sets

Dictionaries

Divide and ConquerGeneral Method

Binary Search

Recurrence Equation for Divide and Conquer

Finding the Maximum and Minimum

Merge Sort

Quick Sort

Stassen’s Matrix Multiplication

Advantages and Disadvantages of Divide and Conquer

Decrease and ConquerInsertion Sort

Topological Sort

Greedy MethodGeneral Method

Coin Change Problem

Knapsack Problem

Job Sequencing with Deadlines

Minimum Cost Spanning Trees2 Topics

Single Source Shortest Paths1 Topic

Optimal Tree Problem1 Topic

Transform and Conquer Approach1 Topic

Dynamic ProgrammingGeneral Method with Examples

Multistage Graphs

Transitive Closure1 Topic

All Pairs Shortest Paths6 Topics

BacktrackingGeneral Method

NQueens Problem

Sum of Subsets problem

Graph Coloring

Hamiltonian Cycles

Branch and Bound2 Topics

0/1 Knapsack problem2 Topics

NPComplete and NPHard Problems1 Topic
Participants2253
An Algorithm is a sequence of steps designed for programming a computer to solve a specific problem normally by using the machine.
In simple terms – An algorithm is a finite set of instructions that, if followed, accomplishes a particular task.
The reference to “instructions” in the definition implies that there is something or someone capable of understanding and following the instructions given.
We call this a “computer,” keeping in mind that before the electronic computer was invented, the word “computer” meant a human being involved in performing numeric calculations. Nowadays, of course, “computers” are those ubiquitous electronic devices that have become indispensable in almost everything we do.
Note, however, that although the majority of algorithms are indeed intended for eventual computer implementation, the notion of algorithm does not depend on such an assumption.
As examples illustrating the notion of the algorithm, we consider in this section three methods for solving the same problem: computing the greatest common divisor of two integers. These examples will help us to illustrate several important points:
 The nonambiguity requirement for each step of an algorithm cannot be compromised.
 The range of inputs for which an algorithm works has to be specified carefully.
 The same algorithm can be represented in several different ways.
 There may exist several algorithms for solving the same problem
 Algorithms for the same problem can be based on very different ideas and can solve the problem with dramatically different speeds.
Next you have to learn what are the steps involved in designing an Algorithm ?
These are steps involved in designing a Algorithm :
STEP 1 – Defining the goal that has to be accomplished.
STEP 2 – Figure out the steps using which the goal has to be accomplished and list down the steps clearly
If the above two steps are orderly performed, there it is …. An Algorithm is Designed !
Complicated ?? Lets simplify it using an Example,
Say supposing we have a dozen mango’s and we have to find the biggest amongst them.
Now, lets design an algorithm for achieving the same using the steps involved in designing an algorithm .
STEP 1 –
Finding the biggest mango (goal that has to be accomplished)
STEP 2 –
Step a) consider 3 baskets say, basketA, basketB, basketC.
Step b) Let basketA contain all the mangoes , let basketB and basket C be empty.
Step c) pick a mango from basketA
Step d) if it is first time that the mango is picked then place it in basketC
Step e) if it is not the first pick, then compare the picked mango with the one which is placed in basketC
Step f) if it weighs less than the one in basketC, then put it into the basketB
Step g) if it weighs high, then place it in basketC and place the one which you have already placed in basketC into basketB
Step h) if there are mangoes still remaining in basketA then repeat from step c. else check the basketC you have a biggest one.
Go grab it and eat it, and I call this as mango Eating Algorithm.
Is it simple ?
Then you have to definitely learn the
CRITERIA THAT ANY ALGORITHM SHOULD SATISFY.
We can specify the algorithm in TWO ways :
1.NATURAL LANGUAGE
NATURAL LANGUAGE as in English like statements but, if we use this representation we must make sure that the resulting instructions are specific
2. PSEUDO CODE
PSEUDOCODE LANGUAGE is a combination of both natural language and programming language . A pseudo code is usually more precise than natural language.