0% found this document useful (0 votes)
13 views32 pages

2024 Adalgo-01

The document discusses algorithms and their properties. It defines what an algorithm is, its key characteristics like being well-defined, finite, and effective. It also discusses analyzing algorithm performance and some major contributors to the field of algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views32 pages

2024 Adalgo-01

The document discusses algorithms and their properties. It defines what an algorithm is, its key characteristics like being well-defined, finite, and effective. It also discusses analyzing algorithm performance and some major contributors to the field of algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Analysis and Design

Computer Science Program


Department of Computer Studies
UNO - Recoletos
Algorithm Defined
▪ An algorithm is a procedure to accomplish a
specific task.
▪ It is a well-defined computational procedure
that takes some value, or set of values, as input
and produces some value, or set of values, as
output.
▪ It is a sequence of computational steps that
transform the input into an output.
▪ It is the idea behind any computer program.
▪ To be interesting, an algorithm has to solve a
general, well-specified problem.
Algorithm Defined

▪ An algorithmic problem is specified by


describing the complete set of instances it
must work on and what properties the output
must have as a result of running on one of these
instances.
▪ An algorithm can also be viewed as a tool for
solving a well-specified computational
problem. It describes a specific computational
procedure for achieving the input/output
relationship.
Algorithm Defined
▪ It can also be described using a computer
language. However, when that is done, only
those instructions permitted in a language can
be used. This often leads to a description of
the algorithm that is complicated and
difficult to understand. Since many
programming languages are in use, it would be
undesirable to choose one particular language.
Instead of using a particular computer language
to specify algorithms, pseudocodes are used.
Guide Question #01

▪ How are algorithms related


to data structures?
▪ What are some of the data
structures that you learned?
Pseudocode and FlowchartDefined

▪ Pseudocodes provide intermediate steps


between an English language description of an
algorithm and an implementation of this
algorithm in a programming language.

▪ Flowchart depicts the graphical representation


of the idea/solution to a problem.
Algorithms Area of Study

▪ machines for executing algorithms


▪ languages for describing algorithms –
languages design and translation
▪ foundation of algorithms – abstract models
of computations (automata theory)
▪ analysis of algorithms – on performance
profile, time and space complexity
Guide Question #02

▪ What are properties of


algorithms?
Properties of Algorithms
▪ Input – an algorithm has input values from a
specified set.
▪ Output – from each set of input values an
algorithm produces output values from a
specified set.
▪ Definiteness – the steps of an algorithm
must be defined precisely.
▪ Correctness – it should produce the correct
output values for each set of input values.
Properties of Algorithms (cont’d)
▪ Finiteness – it should produce the desired
output after a limited number of steps.
▪ Effectiveness – it should perform the steps
exactly in a finite amount of time.
▪ Generality – it should be applicable for all
problems of the desired form, not just for a
particular set of input values.
Three Basic Criteria

▪ List of instructions must be finite and short


enough that they can be carried out.
▪ Each instruction must be executable; one
must be able to perform those actions of
operations name.
▪ The algorithm must enable execution to
end at some point.
The theoretical study of computer-program
performance and resource usage.
What’s more important than performance?
•modularity •user-friendliness
•correctness •programmer time
•maintainability •simplicity
•functionality •extensibility
•robustness •reliability
Why study algorithms and
performance?
▪ Algorithms help us to understand scalability.
▪ Performance often draws the line between
what is feasible and what is impossible.
▪ Algorithmic mathematics provides a language
(for talking about program behavior)
▪ Performance is the currency of computing.
▪ The lessons of program performance
generalize to other computing resources.
▪ Speed is fun!
Running Time
“ As soon as an Analytic Engine exists, it will necessarily
guide the future course of the science. Whenever any
result is sought by its aid, the question will arise—By what
course of calculation can these results be arrived at by the
machine in the shortest time? ” — Charles Babbage (1864)

How many times


do you have to
turn the crank?

Analytic Engine
1
6
Cast of Characters
Programmer needs to
develop a working solution.

Student might play


Client wants to solve any or all of these
problem efficiently. roles someday.

Theoretician wants
to understand.

1
7
Reasons to Analyze Algorithms
Predict performance.

Compare algorithms. Algorithm and Complexity

Provide guarantees.

Understand theoretical Theory of Algorithms


basis.

Primary practical reason: Avoid performance bugs.

client gets poor performance because


programmer did not understand
performance characteristics
Historical Perspective
▪ Examples of algorithms can be found throughout
history, going back to at least as far as Ancient
Babylonia.
▪ The word algorithm derives from the name of the
9th century Persian mathematician
Mohammed Al-Khowarizmi. He formulated
the steps for adding, subtracting, multiplying, and
dividing ordinary decimal numbers.
▪ Another early work in algorithms is the
formulation of the greatest common divisor or
the Euclidean Algorithm attributed to one of the
greatest mathematicians, Euclid.
Major Contributors

▪ ALAN TURING
▪ Father of Artificial
Intelligence - Automata
Theory
Major Contributors

▪ ANDREI MARKOV
▪ Text Processing
Major Contributors

▪ KURT GODEL
▪ Incompleteness Theorem
Major Contributors

▪ ALONZO CHURCH
▪ C/T Thesis - Computability
Theory - Lambda Calculus
Major Contributors

▪ STEPHEN KLEENE
▪ Recursive
Function/Algorithm
Major Contributors

▪ EDSGER DIJKSTRA
▪ Structured Programming
Sorting Algorithms Assignment
Sorting Algorithms
▪ Bubble Sort
▪ Heapsort
▪ Insertion Sort
▪ Mergesort
▪ Quicksort
▪ Radix/Bucket Sort
▪ Selection Sort
▪ Shellsort
Presentation Guidelines
▪ Presentation Sections
▪ General Description of the Algorithms
▪ Pseudocode/Flowchart
▪ Sample Run
▪ Mechanics
▪ Time Limit : 10 – 15 minutes
▪ Presentation, questions and answers be done in
English
Presentation Guidelines
▪ Criteria for Presenter
▪ Mastery of the Topic 15 points
▪ Ability to concisely answer questions 15 points
▪ Ability to use the English language 10 points
▪ Completeness of the presentation 10 points
▪ Criteria for Interpellator
▪ Quality of Questions 10 points
▪ Quantity of Question 10 points
▪ Ability to use the English language 10 points

You might also like