The following scenario gives us basic idea Algorithm meaning and complexity Algorithm. All details related to the Algorithm and how Complexity of an algorithm is defined are explained in the following description.
Algorithm meaning:
Why algorithm?
- To find and understand the basic idea of the problem.
- To find a way to solve any problem.
- Best method of explanation of problem without describing the implementation detail.
- It gives a clear description of requirements and goal of the problem.
- To understand the flow of the problem.
- To measure the performance of the methods in all cases (best, worst and average cases)
- With the help of algorithm, we can convert any idea into map.
- To understand the principle of designing.
What is algorithm?
When you are studying and reading information about computer programming, you will surely come across the word algorithm.
Because algorithm is the foundation of computer program. Before writing any program, an algorithm is created for it which gives us step by step information about that program.
It is called as step by step solution of a given problem in descriptive manner.
You can also call it as rough plan or whole procedure from start to end in sequential manner.
These instructions are written in plain English language.
Properties of an Algorithm:
- Write steps in sequential manner.
- Use of easy and simple English language.
- Use clear meaning words.
- Give proper input which gives desirable result in executable manner.
- Steps written in algorithm must be finite.
Understanding Algorithm:
Let us consider some real life examples then you will get over all idea about an algorithm:
First basic example is about Making a Tea. Do you know the procedure for Tea Preparation. We can write all the steps in sequential manner which makes an algorithm.
1. Write an algorithm for making a tea
Procedure:
Step 1: Take a tea pot and add some water in it.
Step 2: Switch on the gas burner and place pot on it.
Step 3: Add sugar, tea powder and milk in it.
Step 4: Wait for some time till boiling.
Step 5: Your tea is ready
Step 6: Serve the tea for drink.
When you are going to purchase a pen from store that procedure also makes an algorithm in following manner.
2. Write an algorithm for purchasing a pen.
Procedure:
Step 1: Start that you want to purchase a pen.
Step 2: Check for the money, if you have in the pocket.
Step 3: If you don’t have money then take it from the parents.
Step 4: Go to the shop by walk or bike.
Step 5: Ask shopkeeper about your choice pen.
Step 6: If available, take pen, give money and go back to home.
Step 7: If not available, select another pen from stock, give money and go back to home.
You can also make various algorithm about Planning a Birthday Party, Planning a trip.
In daily life you are making some arithmetic calculations about your expenses for that you can write an algorithms.
3. Write an algorithm to make addition of two numbers.
Procedure:
Step 1: Start.
Step 2: Accept values of two numbers for which you want to make addition.
Step 3: Add first number into second which gives desired result.
Step 4: Check out the calculated total.
Step 5: We got final result as a total
Step 6: Stop.
Complexity of an algorithm:
Analysis of algorithm:
When we learn about algorithm, which is the sequential steps of any process to solve a given problem. Then how we understand this task can be completed in good manner means within a time or in efficient manner that is good for everyone.
For that purpose we have to do analysis of that algorithm. It can be measured by two factors:
Space and Time.
- Space Complexity: It is the storage space required to store that program or algorithm steps into memory.
- Time Complexity: It is the total time required to complete task of that algorithm.
We can measure that complexity by three steps:
1. Best case complexity: If our task will complete with minimum number of steps, then we can say it as best case complexity.
2. Average case complexity: If our task will complete with average number of steps, then we can say it as average case complexity.
3. Worst case complexity: If our task will complete with maximum number of steps, then we can say it as worst case complexity.
For writing any algorithm or program we should try to make it as a best case.
Related Articles:
- Basic Accounting Concepts Part 1
algorithm and flowchartalgorithm meaning in englishalgorithm meaning in hindicomplexity meaningdefine algorithm in computerinsertion sort time complexitytime and space complexity
Algorithm meaning| Complexity meaning
2022-11-12
Computer Basics
No Comments
Admin
The following scenario gives us basic idea Algorithm meaning and complexity Algorithm. All details related to the Algorithm and how Complexity of an algorithm is defined are explained in the following description.
Algorithm meaning:
Why algorithm?
What is algorithm?
When you are studying and reading information about computer programming, you will surely come across the word algorithm.
Because algorithm is the foundation of computer program. Before writing any program, an algorithm is created for it which gives us step by step information about that program.
It is called as step by step solution of a given problem in descriptive manner.
You can also call it as rough plan or whole procedure from start to end in sequential manner.
These instructions are written in plain English language.
Properties of an Algorithm:
Understanding Algorithm:
Let us consider some real life examples then you will get over all idea about an algorithm:
First basic example is about Making a Tea. Do you know the procedure for Tea Preparation. We can write all the steps in sequential manner which makes an algorithm.
1. Write an algorithm for making a tea
Procedure:
Step 1: Take a tea pot and add some water in it.
Step 2: Switch on the gas burner and place pot on it.
Step 3: Add sugar, tea powder and milk in it.
Step 4: Wait for some time till boiling.
Step 5: Your tea is ready
Step 6: Serve the tea for drink.
When you are going to purchase a pen from store that procedure also makes an algorithm in following manner.
2. Write an algorithm for purchasing a pen.
Procedure:
Step 1: Start that you want to purchase a pen.
Step 2: Check for the money, if you have in the pocket.
Step 3: If you don’t have money then take it from the parents.
Step 4: Go to the shop by walk or bike.
Step 5: Ask shopkeeper about your choice pen.
Step 6: If available, take pen, give money and go back to home.
Step 7: If not available, select another pen from stock, give money and go back to home.
You can also make various algorithm about Planning a Birthday Party, Planning a trip.
In daily life you are making some arithmetic calculations about your expenses for that you can write an algorithms.
3. Write an algorithm to make addition of two numbers.
Procedure:
Step 1: Start.
Step 2: Accept values of two numbers for which you want to make addition.
Step 3: Add first number into second which gives desired result.
Step 4: Check out the calculated total.
Step 5: We got final result as a total
Step 6: Stop.
Complexity of an algorithm:
Analysis of algorithm:
When we learn about algorithm, which is the sequential steps of any process to solve a given problem. Then how we understand this task can be completed in good manner means within a time or in efficient manner that is good for everyone.
For that purpose we have to do analysis of that algorithm. It can be measured by two factors:
Space and Time.
We can measure that complexity by three steps:
1. Best case complexity: If our task will complete with minimum number of steps, then we can say it as best case complexity.
2. Average case complexity: If our task will complete with average number of steps, then we can say it as average case complexity.
3. Worst case complexity: If our task will complete with maximum number of steps, then we can say it as worst case complexity.
For writing any algorithm or program we should try to make it as a best case.
Related Articles:
Some More: DBMS/ WT/ DMDW
algorithm and flowchartalgorithm meaning in englishalgorithm meaning in hindicomplexity meaningdefine algorithm in computerinsertion sort time complexitytime and space complexity