0% found this document useful (0 votes)
3 views14 pages

Algorithm Analysis

An algorithm is a clear, effective, and finite set of instructions that processes input to produce output. It can be described using natural language, graphical representation, or pseudo-code, which serves as a simplified version of programming code. Understanding algorithms is essential for developing problem-solving skills and structured thinking in various fields.

Uploaded by

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

Algorithm Analysis

An algorithm is a clear, effective, and finite set of instructions that processes input to produce output. It can be described using natural language, graphical representation, or pseudo-code, which serves as a simplified version of programming code. Understanding algorithms is essential for developing problem-solving skills and structured thinking in various fields.

Uploaded by

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

INTRODUCTION

WHAT IS ALGORITHM

+Data structure =
Program
-> Each instruction is clear and unambiguous
Add 5 or 6 to x is an ambiguous instruction
->Effectiveness: Every instruction must be very basic so that it can be carried
out.,
-> Finiteness : If we trace out the instructions of an algorithm , then for all
cases, the algorithm terminates after a finite no. of steps .
->i/p= 0 or more quantities are externally supplied
-> o/p= At least one quantity is prodiced
ALGORITHM DESIGN AND ANALYSIS
PROCESS
Testing: Different input
Analysis: Time and Space complexity
ALGORITHM SPECIFICATION

Algorithm can be describe in 3 ways

1. Natural Language like English


Start

2. Graphical representation
Input M1, M2, M3, M4

Average
=(M1+M2+M3+M4)/4

no Is yes
Averag
e <50

Print “Pass” Print


“Fail”

Stop
3. Pseudo-code Method : In this method , we should typically describe
algorithms as program , which resembles language like C.

Pseudo-code convention:
1. Algorithm MAX(A,n)
2. // A is an array of size n
3. {
4. Result:=A[1];
5. For i:=2 to n do
6. If A[i]> Result them
7. Result:=A[i];
8. Return Result;
9. }
DIFFERENCE BETWEEN ALGORITHM
AND PSEUDO-CODE

Algorithm : Systematic logical approach which


is a well-defined, step-by-step procedure that
allows a computer to solve a problem.
Pseudocode : It is a simpler version of a
programming code in plain English which uses
short phrases to write code for a program before it
is implemented in a specific programming
language.
Program : It is exact code written for problem
following all the rules of the programming
language.
WHY ARE ALGORITHM IMPORTANT

Algorithmic thinking, or the ability to define clear steps to solve a problem,


is crucial in many different fields. Even if we’re not conscious of it, we use
algorithms and algorithmic thinking all the time. Algorithmic thinking
allows students to break down problems and conceptualize solutions in
terms of discrete steps. Being able to understand and implement an
algorithm requires students to practice structured thinking and reasoning
abilities.
WHAT KINDS OF PROBLEMS ARE
SOLVED BY ALGORITHM

FROM BOOK

You might also like