SlideShare a Scribd company logo
ALGORITHM
NAME : MD AKRAM
ROLL NO. : 16500221002
REG NO. : 211650100210012
SUBJECT : DATA STRUCTURE & ALGORITHMS
SUBJECT CODE : PCC-CS301
WHAT IS AN ALGORITHM ?
• AN ALGORITHM IS A PROCEDURE USED FOR SOLVING A PROBLEM OR PERFORMING
A COMPUTATION.
• ALGORITHMS ACT AS AN EXACT LIST OF INSTRUCTIONS THAT CONDUCT SPECIFIED
ACTIONS STEP BY STEP IN EITHER HARDWARE - OR SOFTWARE-BASED ROUTINES.
• ALGORITHMS ARE ALSO USED AS SPECIFICATIONS FOR PERFORMING DATA
PROCESSING AND PLAY A MAJOR ROLE IN AUTOMATED SYSTEMS.
• AN ALGORITHM COULD BE USED FOR SORTING SETS OF NUMBERS OR FOR
MORE COMPLICATED TASKS. ALGORITHMS TYPICALLY START WITH INITIAL
INPUT AND INSTRUCTIONS THAT DESCRIBE A SPECIFIC COMPUTATION. WHEN
THE COMPUTATION IS EXECUTED, THE PROCESS PRODUCES AN OUTPUT.
PROPERTIES OF
ALGORITHM
→IT SHOULD TERMINATE AFTER A FINITE TIME.
→IT SHOULD PRODUCE AT LEAST ONE OUTPUT.
→IT SHOULD TAKE ZERO OR MORE INPUT.
→IT SHOULD BE DETERMINISTIC MEANS GIVING THE SAME OUTPUT
FOR THE SAME INPUT CASE.
→EVERY STEP IN THE ALGORITHM MUST BE EFFECTIVE I.E. EVERY
STEP SHOULD DO SOME WORK.
 The term algorithm derives from the
name of Muhammad ibn Mūsā
al'Khwārizmī, a ninth-century
Persian mathematician.
 His latinized name, Algoritmi, meant
“the decimal number system” and
was used in this meaning for
centuries.
ADVANTAGES OF
ALGORITHMS
It is easy to understand.
An algorithm is a step-wise representation of a
solution to a given problem.
In Algorithm the problem is broken down into smaller
pieces or steps hence, it is easier for the programmer
to convert it into an actual program.
DISADVANTAGES OF
ALGORITHMS
Writing an algorithm takes a lot of time so it is time
consuming.
Understanding complex logic through algorithm can
be very difficult.
Branching and looping statements are difficult to
show in algorithms.
Step 1: Start.
Step 2: Read a number to N.
Step 3: Divide the number by 2 and store the
remainder in R.
Step 4: If R = OThen go to Step 6.
Step 5: Print “N is odd” go to step 7.
Step 6: Print “N is even”
Step 7: Stop.
Example :
Most important type of Algorithms:
Brute ForceAlgorithm:
This is the most basic and simplest type of algorithm. A Brute Force Algorithm is the straightforward approach to a problem i.e., the first approach that comes to our
mind on seeing the problem. More technically it is just like iterating every possibility available to solve that problem
For Example: If there is a lock of 4-digit PIN.The digits to be chosen from 0-9 then the brute force will be trying all possible combinations one by one like 0001, 0002,
0003, 0004, and so on until we get the right PIN. In the worst case, it will take 10,000 tries to find the right combination
RandomizedAlgorithm :
In the randomized algorithm, we use a random number.it helps to decide the expected outcome.The decision to choose the random number so it gives the
immediate benefits
HashingAlgorithm
Hashing algorithms work the same as the Searching algorithm but they contain an index with a key ID. In hashing, we assign a key to specific data.
Example: Some common problems that can be solved through the Hashing Algorithm in password verification.
The searching algorithm is the algorithm that is used for searching the specific key in particular sorted or unsorted data. Some common problems that can be solved
through the Searching Algorithm are Binary search or linear search is one example of a Searching algorithm
The sorting algorithm is used to sort data in maybe ascending or descending order. Its also used for arranging data in an efficient and useful manner.
THANK YOU
!!

More Related Content

PPTX
Algorithm in data structure bca .pptx
PPT
AOA Week 01.ppt
PDF
Lecture 2 role of algorithms in computing
DOCX
Algorithm - A set of rules for solving operations
PPT
Problem Solving Techniques notes for Unit 1
PPT
PPTX
Modile-1-PPT-1-BCAC0207-AlgorithmDesign.pptx
PDF
Chapter-1-Introduction-to-Aglorithms.pdf
Algorithm in data structure bca .pptx
AOA Week 01.ppt
Lecture 2 role of algorithms in computing
Algorithm - A set of rules for solving operations
Problem Solving Techniques notes for Unit 1
Modile-1-PPT-1-BCAC0207-AlgorithmDesign.pptx
Chapter-1-Introduction-to-Aglorithms.pdf

Similar to ALGORITHM.pptx (20)

PPTX
Design and Analysis of Algorithm ppt for unit one
PPTX
Lecture-3-Computer-programming for BS InfoTech
PPTX
problem solving and algorithm development
PPTX
Binary to hexadecimal algorithmic old.pptx
PDF
DAA INTRO.pdf of design analysis algorithms
PPTX
GLOBAL INSTITUTE OF MANAGEMENT AND TECHNOLOGY.pptx
PDF
Introduction to Algorithms Complexity Analysis
PPTX
Segment_1_New computer algorithm for cse.pptx
PPT
Systems in the small - Introduction to Algorithms
PPTX
Unit 2 algorithm
PDF
Data structures and algorithms Module-1.pdf
PPTX
1. Solving a Problem With a Computer.pptx
PPT
UNIT 1- Design Analysis of algorithms and its working
PPT
UNIT-1-PPTS-DAA INTRO WITH DIVIDE AND CONQUER
PPT
UNIT-1-PPTS-DAA_INTRODUCTION_TO_DAA_GH.ppt
PPTX
CubeIT Tech - Algorithms
PPT
Introduction to Design Algorithm And Analysis.ppt
PPT
UNIT-1-PPTS-DAA.ppt
PPT
UNIT-1-PPTS-DAA.ppt
PDF
DATAND ALGORITHMSI (DSA010)_LESSON 1.pdf
Design and Analysis of Algorithm ppt for unit one
Lecture-3-Computer-programming for BS InfoTech
problem solving and algorithm development
Binary to hexadecimal algorithmic old.pptx
DAA INTRO.pdf of design analysis algorithms
GLOBAL INSTITUTE OF MANAGEMENT AND TECHNOLOGY.pptx
Introduction to Algorithms Complexity Analysis
Segment_1_New computer algorithm for cse.pptx
Systems in the small - Introduction to Algorithms
Unit 2 algorithm
Data structures and algorithms Module-1.pdf
1. Solving a Problem With a Computer.pptx
UNIT 1- Design Analysis of algorithms and its working
UNIT-1-PPTS-DAA INTRO WITH DIVIDE AND CONQUER
UNIT-1-PPTS-DAA_INTRODUCTION_TO_DAA_GH.ppt
CubeIT Tech - Algorithms
Introduction to Design Algorithm And Analysis.ppt
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
DATAND ALGORITHMSI (DSA010)_LESSON 1.pdf
Ad

Recently uploaded (20)

PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PDF
86236642-Electric-Loco-Shed.pdf jfkduklg
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PPT
Total quality management ppt for engineering students
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
communication and presentation skills 01
PDF
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PPT
introduction to datamining and warehousing
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PDF
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
PPTX
Fundamentals of Mechanical Engineering.pptx
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PDF
Visual Aids for Exploratory Data Analysis.pdf
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
737-MAX_SRG.pdf student reference guides
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
86236642-Electric-Loco-Shed.pdf jfkduklg
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
Total quality management ppt for engineering students
Soil Improvement Techniques Note - Rabbi
communication and presentation skills 01
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
introduction to datamining and warehousing
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
Fundamentals of Mechanical Engineering.pptx
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
III.4.1.2_The_Space_Environment.p pdffdf
Visual Aids for Exploratory Data Analysis.pdf
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
Automation-in-Manufacturing-Chapter-Introduction.pdf
Safety Seminar civil to be ensured for safe working.
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
737-MAX_SRG.pdf student reference guides
Ad

ALGORITHM.pptx

  • 1. ALGORITHM NAME : MD AKRAM ROLL NO. : 16500221002 REG NO. : 211650100210012 SUBJECT : DATA STRUCTURE & ALGORITHMS SUBJECT CODE : PCC-CS301
  • 2. WHAT IS AN ALGORITHM ? • AN ALGORITHM IS A PROCEDURE USED FOR SOLVING A PROBLEM OR PERFORMING A COMPUTATION. • ALGORITHMS ACT AS AN EXACT LIST OF INSTRUCTIONS THAT CONDUCT SPECIFIED ACTIONS STEP BY STEP IN EITHER HARDWARE - OR SOFTWARE-BASED ROUTINES. • ALGORITHMS ARE ALSO USED AS SPECIFICATIONS FOR PERFORMING DATA PROCESSING AND PLAY A MAJOR ROLE IN AUTOMATED SYSTEMS. • AN ALGORITHM COULD BE USED FOR SORTING SETS OF NUMBERS OR FOR MORE COMPLICATED TASKS. ALGORITHMS TYPICALLY START WITH INITIAL INPUT AND INSTRUCTIONS THAT DESCRIBE A SPECIFIC COMPUTATION. WHEN THE COMPUTATION IS EXECUTED, THE PROCESS PRODUCES AN OUTPUT.
  • 3. PROPERTIES OF ALGORITHM →IT SHOULD TERMINATE AFTER A FINITE TIME. →IT SHOULD PRODUCE AT LEAST ONE OUTPUT. →IT SHOULD TAKE ZERO OR MORE INPUT. →IT SHOULD BE DETERMINISTIC MEANS GIVING THE SAME OUTPUT FOR THE SAME INPUT CASE. →EVERY STEP IN THE ALGORITHM MUST BE EFFECTIVE I.E. EVERY STEP SHOULD DO SOME WORK.
  • 4.  The term algorithm derives from the name of Muhammad ibn Mūsā al'Khwārizmī, a ninth-century Persian mathematician.  His latinized name, Algoritmi, meant “the decimal number system” and was used in this meaning for centuries.
  • 5. ADVANTAGES OF ALGORITHMS It is easy to understand. An algorithm is a step-wise representation of a solution to a given problem. In Algorithm the problem is broken down into smaller pieces or steps hence, it is easier for the programmer to convert it into an actual program.
  • 6. DISADVANTAGES OF ALGORITHMS Writing an algorithm takes a lot of time so it is time consuming. Understanding complex logic through algorithm can be very difficult. Branching and looping statements are difficult to show in algorithms.
  • 7. Step 1: Start. Step 2: Read a number to N. Step 3: Divide the number by 2 and store the remainder in R. Step 4: If R = OThen go to Step 6. Step 5: Print “N is odd” go to step 7. Step 6: Print “N is even” Step 7: Stop. Example :
  • 8. Most important type of Algorithms: Brute ForceAlgorithm: This is the most basic and simplest type of algorithm. A Brute Force Algorithm is the straightforward approach to a problem i.e., the first approach that comes to our mind on seeing the problem. More technically it is just like iterating every possibility available to solve that problem For Example: If there is a lock of 4-digit PIN.The digits to be chosen from 0-9 then the brute force will be trying all possible combinations one by one like 0001, 0002, 0003, 0004, and so on until we get the right PIN. In the worst case, it will take 10,000 tries to find the right combination RandomizedAlgorithm : In the randomized algorithm, we use a random number.it helps to decide the expected outcome.The decision to choose the random number so it gives the immediate benefits HashingAlgorithm Hashing algorithms work the same as the Searching algorithm but they contain an index with a key ID. In hashing, we assign a key to specific data. Example: Some common problems that can be solved through the Hashing Algorithm in password verification. The searching algorithm is the algorithm that is used for searching the specific key in particular sorted or unsorted data. Some common problems that can be solved through the Searching Algorithm are Binary search or linear search is one example of a Searching algorithm The sorting algorithm is used to sort data in maybe ascending or descending order. Its also used for arranging data in an efficient and useful manner.