Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

What is algorithm and how to write easily

maybe you don’t know What is Algorithm And if you do not know this, then you will not even know how to write the algorithm. But today I will try to answer both your questions as well as give some more information which will be related to Algorithm. So that all your questions can be answered, that too in Hindi.

To get some work done from the computer, Computer Program are written. Now in computer program we write many steps. The steps which the computer executes and finishes the work. The word, Algorithm means those ‘Series of Steps‘ means, who are responsible for completing or executing a particular computation or task.

When you tell the computer some work, then you must also be thinking that how the computer does these tasks. For this we use Computer Algorithm. So let’s know from bed what is algorithm,

What is Algorithm

Algorithm (Al-go-rith-um) It is a step by step process or it is a formula. Which solves a problem. This is a procedure that has limited rules, which are also called instructions.

The rules which are written one after the other and each step shows some operation. Solution of the problem emerges through these rules.

Definition of ‘algorithm’

In other words, Algorithm is a step by step process to find a solution to any problem or problem. Now let’s understand in a little simpler language, there are some steps in the algorithm, in which each step represents an operation.

A step starts and at the end there is a step which ends and in between these two steps there are many more steps which perform different tasks.

Like making rice this is your problem. To finish this work, let’s write some steps. First the rice has to be washed then, heat the water and after heating the water rice has to be put in it and wait for the rice to boil.

Rice buns are ready in 10-15 minutes. Now here each step performs some operation or the other. Like washing rice means washing raw rice by adding water to it. Similarly, there are different operations in each of these steps. See, here we have divided the problem into small steps, this is what you had to understand.

Algorithm is used a lot in programming. So let us know in detail how and where they are used.

Who is the founder of Algorithm?

It has a long history, but the actual word “algorithm” was first introduced in the 9th century. The Persian mathematician of the time, Abu Abdullah Muhammad ibn Musa Al-Khwarizmi is considered its founder. He is also known as The Father of Algebra.

Use/Importance of Algorithm

The use of Algorithm is everywhere, as you can also find answers to your everyday problems through this Step by Step Process. Technically, if we said, it is used more in IT Industry, Business Model, Programming. So let’s know about its uses one by one.

  • Computer Programming Algorithm is written before writing the program. If you are a Computer Sc, IT, BCA and MCA student then you have to write a program.
  • Like Check Whether the Number is Prime and Not ?
  • If you start writing this program without thinking, then you can probably see many errors in the program. You can reduce these errors if you make the algorithm first.
  • Algorithm is written before making a flowchart. Otherwise the chances of making mistakes increase.
  • Computer Scientist and Software Engineer use it. Because its use reduces their time and effort. Like a software company has to develop an app for SBI. Now this is a problem for software engineer, it will be solved by writing step by step. If there is any problem or mistake then the solution is found there. Which is easy to develop the application.
  • Search Engine, Like in Facebook, Google Map Shortest Path, Rating, Searching etc all work through these algorithms.
  • It would have been used to solve a mathematical problem, as let’s take a small example. You have to find out whether a number is –ve or +ve?. The answer must have come to your mind immediately that you can tell by looking at the + and – signs. But you will understand this but how will the computer understand.
  • For this you have to write an algorithm. If a number is greater than 0 then it is +ve number and if less than 0 then that number is –ve number.
  • It is also needed to write Pseudo Code or else Pseudocode has to be rewritten.
  • You can also solve the problems of personal life. Like I have to wake up early tomorrow morning.
  • How will you write its steps first?
  • 1. I want to sleep early.
  • 2. Alarm is to be kept a little far.
  • 3. Now go to sleep
  • 4. Wake up in the morning and turn off the alarm
  • 5. Go hugging.
  • These 5 work-finishing steps are also an algorithm. (This example is taken to explain) AI, space research, robotics are used a lot in all these fields.

The question that was asked, why do we need Algorithm, this question was like this, why do we work. It is very important to have a process to finish every work in a precise manner.

Characteristics Of Algorithm in hindi

you know it Algorithm is a Step by Step Procedure. Which makes it clear in what order the steps will be executed so that we can get Desired (Aspirational) Output. Algorithm is analyzed through two factors. Like Time and Space.

Time tells how long it will take to write the algorithm and Space tells us how much time we can write. Now let’s talk about its Characteristics.

Unambiguous

Whatever algorithm you write, it is very important to be clear and precise. Every step or line should have some meaning.

Finiteness

Each algorithm must be completed within a few limited steps. And every step should be Finite i.e. Repaet limited times. Execution of steps should also be for limited time. Every step should have some meaning.

Input

Every algorithm should have more precise steps than O or O.

Output

Just like every algorithm has an Input Step, similarly there should be an Output Step of the Algorithm. The output should also come the same for which we have written.

effectiveness

Effectiveness is estimated from Time and Space. If the algorithm is written in less time and space. Or it is executed in less time and runs in less space, this is called Effectiveness.

According to the data structure, all these important categories should be there.

  • SearchSearch the -item in the DATA Structure to be able to easily search.
  • sort-Can order or sort a list.
  • Insert– Can insert the algorithm in the data structure.
  • Update– Ability to update the item through AlGORITHM.
  • Delete– There should be no inconvenience in deleting the item which is in the data structure from the algorithm.

Complexity of the Algorithm

The complexity of the algorithm has been classified keeping two factors in mind. One is Time Complexity and the other is Space Complexity.

Time Complextiy,

The amount of time it takes for the program to run.

Space Complexity,

The amount of space needed for the program to be executed inside the computer is called Space Complexity.

How to Write Algorithm

It is very easy to write this, you do not need to learn anything more. You must have known that in the beginning there was an example where an ex-was how to make tea.

In the same way you have to write Step by Step. Algorithm is more needed in programming. You can also write Direct or you can also write using some rules.

Rules like Start, Input, Output, Read, Variable, Display, Stop, Take a look at the example given below, which will be easy for you to understand.

Example: 1

Q1. Enter two numbers and find the sum of both numbers?

  1. In each algorithm, write Start at the beginning and Stop/End at the end as written below.
  2. After this see how many variables are needed or what to input. For example, to sum the two numbers below, 3 variables are needed. Num1 for the first number, Num2 for the second number and for storing the sum variable Num1+num2. So you have to think about these variables and start writing.
  3. Now some steps will be such where we have to do Arithmetic Operation like +, -, ×, and some Logical Operation like Comparision Operation, True False, whose output is O (false) and 1 (True). You already know Arithmetic (+, -, ×, ) and an example of Logical like you want to know. “Largest Number among 2 Number” So here you will compare both the numbers. By using these symbols “>, =,
  4. Now the result that comes in the end, you can display it by writing Display and write Stop or End in the end step. Now understand this example carefully.

Step 1: Start // step started

Step 2: Declare variables num1, num2 and sum. //num1, Num2, create Sum variable where any number will store

Step 3: Read values ​​num1 and num2. // When the number is entered from the keyboard, it will be read here

Step 4: Add num1 and num2 and assign the result to sum.
Sum=num1+num2 // Addition of two numbers will be stored in Sum

Step 5: Display sum //display the sum

Step 6: Stop //End

Now try to understand by looking at some more examples.

Example: 2

Step 1, Start
Step 2, Read the number n
Step 3, [Initialize] i=1, fact=1
Step 4, Repeat step 4 through 6 until i=n
Step 5, fact=fact*i
Step 6, i=i+1
Step 7, print fact
Step 8, Stop

what did you learn today

It has always been my endeavor that you get correct and precise and complete information. I hope you understand What is Algorithm,

Perhaps the next time you write, remember these few things – how many variables do you need in the program and what to compute. From which corner the operation has to be done. Which will be easy to write. Those who try never give up.

It is hoped that you must have liked this article, how did you feel, you must tell below. If you want to ask any question now, then definitely write in the comment box below. If you want to give any suggestion or advice, then definitely give it which is very useful for us.



This post first appeared on Govt Jobs In India, please read the originial post: here

Share the post

What is algorithm and how to write easily

×

Subscribe to Govt Jobs In India

Get updates delivered right to your inbox!

Thank you for your subscription

×