Hey Everyone!! I’m Sneha sharing with you all ; some interesting facts about algorithm which will give you a rocket to be a Algorithmic .
Introduction to Algorithms:
The word algorithm comes from the name of a Persian author, Abu Ja’far Mohammed ibn Musa al Khowarizmi (c. 780 – c. 850), where Al Khowarizmi rendered as Algoritmi in Latin, led to the term “algorithm”. Al Khowarizmi was the Persian scholar whose contribution was mainly in mathematics, astronomy, and geography.
“Algorithm” word is most effectively used in computer science for programming logic. Computer uses the algorithm to find out the solution of specific problems with in finite amount of time and with efficient use of computer resources such as memory.
That’s why algorithm is different from words like process, technique, or method.
What is Algorithm?
Algorithm is a set of instructions that are written and executed step by step for solving problems. It is mostly written in pseudo code (i. e human readable rather than machine).
Role of algorithm in programming language:
Any software design process has two phases.
- Problem solving phase: In problem solving phase we create algorithm in pseudo code.
- Implementation phase: In implementation phase we translate the pseudo code algorithm into programming language.
Any algorithm that we write must have the following five characteristics:
- Input: Algorithm must have zero or more number of inputs.
- Output: Algorithm must produce one or more number of outputs with respective to the input.
- Definiteness: Each step of algorithm must be stated clearly and should be able to jump to the next step with fixed output, if it is the last step then algorithm should get terminated with correct and desired output.
- Finiteness: Algorithm should have finite number of steps with end statement and execution time of algorithm should be measurable.
- Effectiveness: Each step in algorithm must be easily convertible to programming language.
To become algorithmic, following four points must be considered.
- How to devise the algorithm:
Creating an algorithm is an art which is understandable to resolve a problem.
- How to validate algorithm:
Once the algorithm is designed, it is a compulsion to prove that it works correctly and gives the correct and desired output.
- How to analyze algorithm:
After execution of algorithm, it uses the central part of a computer that is CPU (central processing unit)to perform operations and its memory to hold the data. This field includes the task of determining how much computing time and storage required for the given algorithm.
This is one of the challenging fields which includes all mathematical calculations.
- How to test a program:
Testing of program consists of two parts :
i. Debugging: Debugging is the task in which the faulty result (error) is encountered and then correct them; but the debugging can only encounter the faulty result or errors which are present in the program.So to verify the correctness of the output we use next part of testing i.e. profiling.
ii. Profiling: Profiling is nothing but the performance measurement. Profiling is the process of executing a correct program on data sets and measuring the time and space it takes to compute the program.
What are the types algorithm?
There are many types of algorithm but the following five are the most fundamental types of algorithm are:
- Recursive algorithms:
A recursive is a function that is defined in terms of itself; similarly, an algorithm is said to be recursive if the same algorithm is invoked in the body.
2.Randomized algorithms:
Randomized algorithm is categorized into two classes:
A. Las Vegas algorithms: It gives the same output(correct).
B. Monte Carlo algorithms: This may give result differ from run to run.
3. Backtracking algorithm:
Many problems which deal with searching for a set of solution or which ask for an optimal solution satisfying some constraints can be solved using the Backtracking Formulation.
4.Divide and conquer algorithm:
Divide and conquer is a strategy in which it suggests to split the input into distinct sub problems, which have compulsion of same type as the original problem,and must be found to combine sub-solution into one whole solution.
5.Greedy algorithm:
The greedy algorithms are the straightforward design technique. In this algorithm we must find a feasible solution that either maximize or minimize a given objective function.
It includes some problems as given below:
a. Knapsack problem.
b. Job Sequencing problem with deadline.
C. Minimum-cost Spanning trees.
This problem can be solved with prim’s algorithm or Kruskal’s algorithm
The next blog will give you brief Knowledge about the Types of Algorithms.So please share your views in comment box. Thank you and stay connected . . .
Valuable information
LikeLiked by 1 person
Nice website
LikeLiked by 1 person
Nice
LikeLiked by 1 person
This information is very good.
LikeLiked by 1 person
Helpful information 👌
LikeLiked by 1 person
Achha h…👍
LikeLiked by 1 person
Thanks for sharing this information. Waiting for your next blog…
LikeLiked by 1 person