0% found this document useful (0 votes)
8 views3 pages

Chapter 1

Uploaded by

anushreeanil604
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

Chapter 1

Uploaded by

anushreeanil604
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

UNIT-1 CHAPTER 1

INTRODUCTION TO ALGORITHMS
To Make a computer do anything, we have to write a computer program.to write a
computer program, we have to tell the computer, step by step, exactly what we
want to do. The computer then “executes “the program, following each step
mechanically, to accomplish the end goal.

WHAT IS ALGORITHM?
An algorithm can be defined as a step by step-by-step procedure for
accompolishing a task.OR a sequence finite number of steps to solve a particular
problem,its has threebasic parts-input,logic,output.
Eg:write an algorithm to find the average of three subjects.
Step1:start
Step2:read the three numbers a,b,c.
Step3:compute
Avg=(a+b+c)/3
Step4:print the average of three numbers.
Step5:end.
Optional:

A SEQUENCE OF COMPUTATIONAL

INPUT
STEPS THAT TRANSFORM THE OUTPUT
INPUT INTO THE OUTPUT.

VARIOUS DEFINITIONS OF ALGORITHM


 An Algorithm is a sequence of unambiguous instructions for solving a
problem.
 An Algorithm is a well-structured computational procedure that takes some
values as input and produces some values as output.
 An Algorithm is a set of well-defined instructions to solve a particular
problem. It takes a set of input and produces a desired output.

CHARACTERISTICS OF ALGORITHM:
1. INPUT:An Algorithm has zero or more “inputs”quantities that are given to
it initially before the algorithm begins,or dynamically as the algorithm runs.
2. OUTPUT: An Algorithm has one or more “output”quantities that have a
specified relation to the inputs.An Algorithm produces at least one or more
outputs.
3. UNAMGIGIOUS:An Algorithm should be clear and error-free.
4. FINITENESS: An Algorithm should always terminate after a number of
steps.If we trace out the instructions of an algorithm,then for all cases,the
algorithm terminates after a finite number of steps.
5. EFFECTIVENESS:Each Operation should be effective i.e,the operation
must be able to carryout in finite amount of time.
6. LANGUAGE INDEPENDENT:An Algorithm should be independent
of any programming language.

ROLE OF ALGORITHM IN COMPUTING:


WHAT IS AN INSTANCE OF A PROBLEM?
In general,an instance of a problem consists of the input(satisfying whatever
constranits are imposed in the problem statement)needed to compute a
solution to the problem.

How to decide which algorithm is best suited ?


 It depends on how efficient the algorithm when higher value of input
is given.
 The possible restrictions or constraints on the input values.
 The architecture of the computer and the kind of storage devices to be
used.
 The correctness of the algorithm.
WHAT IS THE CORRECTNESS OF THE ALGORITHM?
An Algorithm is said to be correct if, for every instance ,it halts with
the correct output.
PRACTICAL APPLICATIONS OF ALGORITHMS:
1. INTERNET: Searching Algorithms
2. THE HUMAN GENOME PROJECT:Identification Of The
100000 Genesin Human Dna.
3. E-COMMERCE:Numerical Algorithms And Number Theory
4. PAGERANK:Google’search Engine
5. WEATHER FORECASTING:To Model Weather Patterns
And Make Predictions
6. LINEAR PROGRAMMING:Internet Service Provider Decide
To Extend Their Services.
7. SHORTEST PATH ALGORITHMS:Shortest Path To The
Algorithm.
8. OTHER IMPORTANT APPLICATIONS OF
ALGORITHMS:
 Speech recognition
 Image processing
 Facebook friend suggestion algorithm
 Product recommendation in e-commerce
 Machine learning algorithms.
ALGORITHM AS A TECHNOLOGY:

You might also like