SlideShare une entreprise Scribd logo
1  sur  1
Lecture Note-1: Algorithm and Its Properties 18 Jan 2016
By Rajesh K Shukla, HOD, Department of CSE, SIRTE Bhopal
Downloaded from www.RajeshkShukla.com
Definition of algorithms
An algorithm is a tool for solving any computational problem. It may be defined as a sequence of finite,
precise and unambiguous instructions which are applied either to perform a computation or to solve a
computational problem. These instructions are applied on some raw data called the input, and the
solution of the problem produced is called the output. It is shown in the diagram given below
It was named after 9th century (780-850) Persian mathematician Abu Ja ’far Muhammad ibn-i Musa al-
Khwarizmi and these were originally used in mathematical calculations but they are now widely used in
computer programs.
Properties of algorithms
Algorithms generally share a set of properties
 Input
An algorithm must be supplied with zero or some finite input values externally from a specified set
in order to solve the computational problem and generate some output. The input data is
transformed during the computation in order to produce the output
 Output
The algorithm produces some finite set of outputs after applying some operations on the given set
of input values. The output values are the solution. The output can be anything from data returned
to the calling algorithm, displaying the message, printing the calculation etc. It is possible to have
no output.
 Finiteness
The algorithm must be terminated after executing the finite number of steps so an algorithm must
be a well-defined, ordered set of instructions.
 Definiteness
Each step of an algorithm must be clear and unambiguous so that the actions can be carried out
without any ambiguity. For Example same symbol should not be used to mean multiplication as
well as division in two different places in the algorithm.
 Effectiveness
The algorithm must perform each step correctly and in a finite amount of time therefore time tends
to be more important in calculating the effectiveness of an algorithm. The space and other resources
taken up by algorithm also plays vital role in effectiveness of an algorithm. Effectiveness is precisely
measured after translating the algorithm into a computer program.
 Correctness.
An algorithm must produce the correct output values for all legal input instances of the problem
 Generality
The algorithm should be applicable to all problems of a similar form
 Multiple view
Same algorithm may be represented in different ways
 Multiple Availability
Several algorithms for solving the same problem may exist - with different properties

Contenu connexe

Tendances

Semantic nets in artificial intelligence
Semantic nets in artificial intelligenceSemantic nets in artificial intelligence
Semantic nets in artificial intelligenceharshita virwani
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in javaTech_MX
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structureAbrish06
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSGayathri Gaayu
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back trackingTech_MX
 
Decision properties of reular languages
Decision properties of reular languagesDecision properties of reular languages
Decision properties of reular languagesSOMNATHMORE2
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithmMohd Arif
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?Angela DeHart
 
Python Exception Handling
Python Exception HandlingPython Exception Handling
Python Exception HandlingMegha V
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingIqra khalil
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsackAmin Omi
 

Tendances (20)

Semantic nets in artificial intelligence
Semantic nets in artificial intelligenceSemantic nets in artificial intelligence
Semantic nets in artificial intelligence
 
Knapsack Problem
Knapsack ProblemKnapsack Problem
Knapsack Problem
 
Code generation
Code generationCode generation
Code generation
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structure
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
 
Time complexity
Time complexityTime complexity
Time complexity
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
Sorting
SortingSorting
Sorting
 
Compilers
CompilersCompilers
Compilers
 
Introduction to Algorithm
Introduction to AlgorithmIntroduction to Algorithm
Introduction to Algorithm
 
Decision properties of reular languages
Decision properties of reular languagesDecision properties of reular languages
Decision properties of reular languages
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
 
Python Exception Handling
Python Exception HandlingPython Exception Handling
Python Exception Handling
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsack
 

Similaire à Lecture Note-1: Algorithm and Its Properties

What is algorithm
What is algorithmWhat is algorithm
What is algorithmlilyMalar1
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structureA. S. M. Shafi
 
Data structures algorithms basics
Data structures   algorithms basicsData structures   algorithms basics
Data structures algorithms basicsayeshasafdar8
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Dr. Pankaj Agarwal
 
Algorithm - Introduction
Algorithm - IntroductionAlgorithm - Introduction
Algorithm - IntroductionMadhu Bala
 
Design and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit oneDesign and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit onessuserb7c8b8
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdfNayanChandak1
 
2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdf2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdfishan743441
 
11 Unit 1 Problem Solving Techniques
11  Unit 1 Problem Solving Techniques11  Unit 1 Problem Solving Techniques
11 Unit 1 Problem Solving TechniquesPraveen M Jigajinni
 
AOA Week 01.ppt
AOA Week 01.pptAOA Week 01.ppt
AOA Week 01.pptINAM352782
 
1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithm1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithmMohammed khaja Jamaluddin
 
DA lecture 3.pptx
DA lecture 3.pptxDA lecture 3.pptx
DA lecture 3.pptxSayanSen36
 
Algorithms notes 2 tutorials duniya
Algorithms notes 2   tutorials duniyaAlgorithms notes 2   tutorials duniya
Algorithms notes 2 tutorials duniyaTutorialsDuniya.com
 
01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptxssuser586772
 
Introduction To Algorithms
Introduction To AlgorithmsIntroduction To Algorithms
Introduction To AlgorithmsKM Bappi
 

Similaire à Lecture Note-1: Algorithm and Its Properties (20)

What is algorithm
What is algorithmWhat is algorithm
What is algorithm
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
 
Data structures algorithms basics
Data structures   algorithms basicsData structures   algorithms basics
Data structures algorithms basics
 
Daa chapter 1
Daa chapter 1Daa chapter 1
Daa chapter 1
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis
 
Algorithm - Introduction
Algorithm - IntroductionAlgorithm - Introduction
Algorithm - Introduction
 
Design and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit oneDesign and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit one
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdf
 
2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdf2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdf
 
11 Unit 1 Problem Solving Techniques
11  Unit 1 Problem Solving Techniques11  Unit 1 Problem Solving Techniques
11 Unit 1 Problem Solving Techniques
 
AOA Week 01.ppt
AOA Week 01.pptAOA Week 01.ppt
AOA Week 01.ppt
 
GE8151 notes pdf.pdf
GE8151 notes pdf.pdfGE8151 notes pdf.pdf
GE8151 notes pdf.pdf
 
1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithm1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithm
 
DA lecture 3.pptx
DA lecture 3.pptxDA lecture 3.pptx
DA lecture 3.pptx
 
chapter 1
chapter 1chapter 1
chapter 1
 
Algorithms notes 2 tutorials duniya
Algorithms notes 2   tutorials duniyaAlgorithms notes 2   tutorials duniya
Algorithms notes 2 tutorials duniya
 
01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx
 
Unit 2 algorithm
Unit   2 algorithmUnit   2 algorithm
Unit 2 algorithm
 
Introduction To Algorithms
Introduction To AlgorithmsIntroduction To Algorithms
Introduction To Algorithms
 

Plus de Rajesh K Shukla

Plus de Rajesh K Shukla (9)

Quiz 2
Quiz 2Quiz 2
Quiz 2
 
Quiz 1
Quiz 1Quiz 1
Quiz 1
 
Pop operation
Pop operationPop operation
Pop operation
 
Stack: Recursion and Iteration
Stack: Recursion and IterationStack: Recursion and Iteration
Stack: Recursion and Iteration
 
Little o and little omega
Little o and little omegaLittle o and little omega
Little o and little omega
 
Theta notation
Theta notationTheta notation
Theta notation
 
The bog oh notation
The bog oh notationThe bog oh notation
The bog oh notation
 
Big omega
Big omegaBig omega
Big omega
 
Lecture Note-2: Performance analysis of Algorithms
Lecture Note-2: Performance analysis of AlgorithmsLecture Note-2: Performance analysis of Algorithms
Lecture Note-2: Performance analysis of Algorithms
 

Dernier

Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptNarmatha D
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
Risk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectRisk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectErbil Polytechnic University
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
Crushers to screens in aggregate production
Crushers to screens in aggregate productionCrushers to screens in aggregate production
Crushers to screens in aggregate productionChinnuNinan
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
BSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxBSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxNiranjanYadav41
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 

Dernier (20)

Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.ppt
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
Risk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectRisk Management in Engineering Construction Project
Risk Management in Engineering Construction Project
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
Crushers to screens in aggregate production
Crushers to screens in aggregate productionCrushers to screens in aggregate production
Crushers to screens in aggregate production
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
BSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxBSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptx
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 

Lecture Note-1: Algorithm and Its Properties

  • 1. Lecture Note-1: Algorithm and Its Properties 18 Jan 2016 By Rajesh K Shukla, HOD, Department of CSE, SIRTE Bhopal Downloaded from www.RajeshkShukla.com Definition of algorithms An algorithm is a tool for solving any computational problem. It may be defined as a sequence of finite, precise and unambiguous instructions which are applied either to perform a computation or to solve a computational problem. These instructions are applied on some raw data called the input, and the solution of the problem produced is called the output. It is shown in the diagram given below It was named after 9th century (780-850) Persian mathematician Abu Ja ’far Muhammad ibn-i Musa al- Khwarizmi and these were originally used in mathematical calculations but they are now widely used in computer programs. Properties of algorithms Algorithms generally share a set of properties  Input An algorithm must be supplied with zero or some finite input values externally from a specified set in order to solve the computational problem and generate some output. The input data is transformed during the computation in order to produce the output  Output The algorithm produces some finite set of outputs after applying some operations on the given set of input values. The output values are the solution. The output can be anything from data returned to the calling algorithm, displaying the message, printing the calculation etc. It is possible to have no output.  Finiteness The algorithm must be terminated after executing the finite number of steps so an algorithm must be a well-defined, ordered set of instructions.  Definiteness Each step of an algorithm must be clear and unambiguous so that the actions can be carried out without any ambiguity. For Example same symbol should not be used to mean multiplication as well as division in two different places in the algorithm.  Effectiveness The algorithm must perform each step correctly and in a finite amount of time therefore time tends to be more important in calculating the effectiveness of an algorithm. The space and other resources taken up by algorithm also plays vital role in effectiveness of an algorithm. Effectiveness is precisely measured after translating the algorithm into a computer program.  Correctness. An algorithm must produce the correct output values for all legal input instances of the problem  Generality The algorithm should be applicable to all problems of a similar form  Multiple view Same algorithm may be represented in different ways  Multiple Availability Several algorithms for solving the same problem may exist - with different properties