# What are algorithms?

Discussion in 'Computer Science | IT | Networking' started by Aadit Kapoor, Oct 18, 2013.

Engineering Discipline:
Computer Science
Can any one tell what are algorithms?

#1
2. ### Alok mishra Rookie

Engineering Discipline:
Computer Science
Algorithm are means of representing step by step procedure of doing any task. One can write steps in the form of simple English like sentences ,though pseudocodes are also used to write computational Algorithms.
one can understand pseudocodes as representation of information not completely in English like sentences and also not completely in programing way,as follows,
step 1. do i = 1 to 100
set print_number to true
if i is divisible by 3
print "Fizz"
set print_number to false

#2
3. ### Vinodhini.V Apprentice

Engineering Discipline:
Computer Science
Algorithm are the Finite steps of instruction for solving problems,and it is the user understandable form of the entire code

• Agree x 1
#3
4. ### Sanyam Khurana Star

Engineering Discipline:
Computer Science
Algorithms or Algos are just "Steps" to solve a given problem.

It's " Series of Sequential Steps " to find solution of a problem.

Always remember, that in an algo, you can execute each step in finite no of times, and then after execution of the algo, you must reach the solution of the problem.

They are highly used by programmers, actually they first form algos (or steps) on how to solve a given problem and then that algo can be expressed as a flow chart (mainly to represent the idea of problem solving more graphically) , DFD (Data Flow Diagrams) and last but not the least, Programs (can be in any language)

Eg.

if you need to find even no and print it on the screen from 1 to say the number 10.

Then your algo would be something like this

1) Execute till step 3 till i <=10

2) if ( i % 2 == 0) { basically check if the number when divided by 2 leaves remainder as 0 ie it's even }

3) Print i

4) END

So, this is an algo, which can be represented as a program in any language.

I hope It's clear.

For more details, go to http://en.wikipedia.org/wiki/Algorithm

#4

Engineering Discipline:
Computer Science
Thanks guys!
Helped alot

#5

Engineering Discipline:
Electronics & Communications
Yes i agree that tbe algirithms are the fine steps for the task procedures but what about the pseudocodes pls explain.

#6
7. ### Alok mishra Rookie

Engineering Discipline:
Computer Science
pseudocodes are nothing but representation of information in a different but understandable form . Like i have given an example in my previous reply ,that is in pseudocode .you also can write that in the form of a sentence , but pseudocodes are prefered and also considered an effective way of writing algorithms.
(a+b)^n ,this is in pseudocode ,you can also covey it as 'multiply (a+b) n times' .

#7
8. ### Vinodhini.V Apprentice

Engineering Discipline:
Computer Science
Pseudo means False, its a False code rather than the actual code, designed for sketching out the structure of the program before the actual coding takes place.It omits unnecessary steps and includes only the action to be executed.

#8