You are on page 1of 9

PRESENTATION

• NAME: AYESHA NOREEN


• ROLL NO: 23
• TOPIC: ALGORITHM
• SUBJECT: DATA STRUCTURES & ALGORITHMS
HISTORY

The concept of algorithms has a long history, dating back to ancient


civilizations. The word "algorithm" can be traced back to the 9th
century when it was coined by the Persian mathematician Abdullah
Muhammad bin Musa al-Khwarizmi, who is often referred to as
"The Father of Algebra."
WHAT IS AN ALGORITHM?
 An algorithm is a set of commands that must
be followed for a computer to perform
calculations or other problem-solving
operations . According to its formal definition.

 An algorithm is a finite set of instructions


carried out in a specific order to perform a
particular task.

 It is not the entire program or code; it is


simple logic to a problem represented as an
informal description in the form of a flowchart
or pseudocode.
CHARACTERISTICS
• Unambiguous − Algorithm should be clear and unambiguous.
Each of its steps (or phases), and their inputs/outputs should be
clear and must lead to only one meaning.

• Input − An algorithm should have 0 or more well-defined inputs.

• Output − An algorithm should have 1 or more well-defined


outputs, and should match the desired output.

• Finiteness − Algorithms must terminate after a finite number of


steps.

• Feasibility − Should be feasible with the available resources.

• Independent − An algorithm should have step-by-step directions,


which should be independent of any programming code.
PSEUDOCODE
DEFINITION: PSEUDOCODE IS A HIGH-LEVEL, INFORMAL WAY OF
REPRESENTING THE ALGORITHMIC STRUCTURE OF A COMPUTER
PROGRAM OR AN ALGORITHM. IT USES A COMBINATION OF NATURAL
LANGUAGE AND BASIC PROGRAMMING STRUCTURES, ALLOWING
DEVELOPERS TO PLAN AND EXPRESS THE LOGIC OF A SOLUTION
WITHOUT GETTING BOGGED DOWN IN THE DETAILS OF A SPECIFIC
PROGRAMMING LANGUAGE'S SYNTAX.
CATEGORIES OF ALGORITHMS

From the data structure point of view, following are some important categories of
algorithms .
• Search − Algorithm to search an item in a data structure.
• Sort − Algorithm to sort items in a certain order.
• Insert − Algorithm to insert item in a data structure.
• Update − Algorithm to update an existing item in a data structure.
• Delete − Algorithm to delete an existing item from a data structure.
Problem − Design an algorithm to add two
Algorithms tell the programmers how to code the
numbers and display the result.
program. Alternatively, the algorithm can be written as −

Step 1 − START Step 1 − START ADD


Step 2 − get values of a & b
Step 2 − declare three integers a, b & c Step 3 − c ← a + b
Step 3 − define values of a & b Step 4 − display c
Step 4 − add values of a & b
Step 5 − STOP

Step 5 − store output of step 4 to c


Step 6 − print c
Step 7 − STOP

IN DESIGN AND ANALYSIS OF ALGORITHMS, USUALLY THE SECOND METHOD IS


USED TO DESCRIBE AN ALGORITHM. IT MAKES IT EASY FOR THE ANALYST TO
ANALYZE THE ALGORITHM IGNORING ALL UNWANTED DEFINITIONS.
Advantages of Algorithms: Disdvantages of Algorithms:
1. It is a step-wise representation of a solution to a 1. Alogorithms is Time consuming.
given problem, which makes it easy to understand.
2. Difficult to show Branching and Looping in
2. An algorithm uses a definite procedure. Algorithms.

3. It is not dependent on any programming 3. Big tasks are difficult to put in Algorithms.
language, so it is easy to understand for anyone
even without programming knowledge.

4. By using algorithm, the problem is broken down


into smaller pieces or steps hence, it is easier for
programmer to convert it into an actual program.
THANKYOU

You might also like