Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

G1 Algorithm Development

An algorithm is a finite set of well-defined instructions for a computer to perform tasks or solve problems, distinct from the complete program or code. The document outlines the steps in algorithm development, including defining, analyzing, designing, testing, and refining algorithms, emphasizing their importance in various fields such as computer science and engineering. It also provides examples of algorithms in both computer applications and real-life situations, along with methods for representation like pseudocode and flowcharts.

Uploaded by

wabe.pauljames33
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

G1 Algorithm Development

An algorithm is a finite set of well-defined instructions for a computer to perform tasks or solve problems, distinct from the complete program or code. The document outlines the steps in algorithm development, including defining, analyzing, designing, testing, and refining algorithms, emphasizing their importance in various fields such as computer science and engineering. It also provides examples of algorithms in both computer applications and real-life situations, along with methods for representation like pseudocode and flowcharts.

Uploaded by

wabe.pauljames33
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

ALGORITHM

DEVELOPMENT
Group 1
DEFINITION
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.
SET OF STEPS TO
INPUT ACCOMPLISH A TASK OR OUTPUT
SOLVE A PROBLEM

ALGORITHM
WELL-DEFINED WELL-DEFINED
INPUTS OUTPUTS

CLEAR AND CHARACTERISTICS FINITE-NESS


UNAMBIGUOUS OF ALGORITHMS

LANGUAGE
INDEPENDENT FEASIBLE
EXAMPLES
OF
ALGORITHM
EXAMPLES: USING COMPUTER

1. CALCULATOR (ADDING NUMBERS) 2. SEARCHING ON GOOGLE 3. PLAYING A VIDEO

Input: You type 5 + 3 and Input: You type "cute Input: You click "Play" on
press = cats" in Google a YouTube video
Algorithm: The computer Algorithm: Google looks Algorithm: The
adds 5 and 3 for websites with "cute computer loads the
cats" video
Output: It shows 8 on the
screen Output: You see a list of Output: The video starts
websites with pictures playing
and information about
cats
EXAMPLES: IN REAL- LIFE SITUATION

1. MAKING A SANDWICH 2. WASHING YOUR HANDS 3. GETTING READY FOR SCHOOL

Input: Bread, peanut Input: Dirty hands, soap, Input: You wake up in the
butter, and jam and water morning

Algorithm (Steps): Algorithm (Steps): Algorithm (Steps):


1. Take two slices of bread 1. Turn on the water 1. Get out of bed
2. Spread peanut butter 2. Put soap on your hands 2. Brush your teeth
on one slice 3. Rub your hands 3. Get dressed
3. Spread jam on the together for 20 seconds 4. Eat breakfast
other slice 4. Rinse with water 5. Pack your school bag
4. Put them together 5. Dry your hands 6. Go to school

Output: A peanut butter Output: Clean hands Output: You are ready for
and jam sandwich school
IMPORTANCE
It is important to keep in mind that
an algorithm is not the same as a
program or code. It is the logic or
plan for solving a problem
represented as a simple step-by-
step description.
ALGORITHM
DEVELOPMENT
Algorithm development is the
process of creating a step-by-
step solution to solve a specific
problem.

Used in computer science,


engineering, and real-life
applications.
ALGORITHM DEVELOPMENT ALGORITHM

Process of designing, testing, A set of instructions for


and improving an algorithm solving a problem
before implementation.

Focuses on efficiency, Focuses on execution and


accuracy, and structure before achieving results.
coding.

Involves refining and testing Can be directly implemented


different approaches to in a program as code or
optimize performance. pseudocode.

Ensures the best possible Simply follows predefined


method is used to solve a steps to produce an output.
problem.
•‎ Improves efficiency, accuracy,

IMPORTANCE OF
problem-solving, and
optimization in programming.

ALGORITHM
•‎ Makes programs run faster and
use fewer resources.

DEVELOPMENT
•‎ Ensures correct results,
preventing errors in critical
applications.

•‎ Helps solve complex problems


with structured logic.

•‎ Removes unnecessary steps,


improving performance.
Engineering & Gaming &
Finance & Economics
Robotics Entertainment

•‎ AI-based NPC behavior in ‎• Algorithmic trading


•‎ Pathfinding algorithms for
autonomous vehicles video games
•‎ Risk assessment and fraud
•‎ Procedural content detection
‎• Signal processing
generation
‎• Portfolio optimization
‎• Image and video processing
•‎ Physics simulation and
animation rendering
STEPS IN
ALGORITHM
DEVELOPMENT
STEP 1
DEFINE THE PROBLEM
Objective: Clearly understand
what needs to be solved.
Key Questions to Ask:
What is the problem statement?
What should be the expected
result?
Are there any specific conditions
or rules to follow?
STEP 2
ANALYZE THE PROBLEM
Objective: Identify Inputs and Outputs
- Inputs: The data provided to the
algorithm. - Outputs: The expected
results.

Consider Constraints:
- Size of the input
- Execution time
- Memory usage
STEP 3
DESIGN THE ALGORITHM
Objective: Break the Solution into
Logical Steps:
- Define step-by-step operations to
solve the problem.
- Use a structured approach like
pseudocode or flowcharts.
STEP 4
TEST THE ALGORITHM
Objectives: To verify that it
functions correctly:

- Ensures correctness and reliability.


-Identifies errors and unexpected
behavior to determine the mistake
on the algorithm
STEP 5
REFINE THE ALGORITHM
Objective: Use Optimization
Techniques:

- Reduce the number of operations


- Use efficient data structures.
- Minimize memory usage
ALGORITHM
REPRESENTATION
Different Methods to
Represent an Algorithm
Pseudocode
Pseudocode is a simple way to write the
steps of a program using easy to
understand words.
A text based representation of an
algorithm
Uses structured English like statements
Different Methods to
Represent an Algorithm
Flowcharts
A visual diagram of an algorithm using
symbols
Helps visualize decision making and
processes
Uses shapes and arrows to show the flow
of execution
Basic Flowchart Symbols

ELLIPSE

RECTANGLE

PARALLELOGRAM
Basic Flowchart Symbols

HEXAGON

DIAMOND
Example Practice Problems

“Create a Program that will display the sum of 2


numbers inputted by the user”
Example Practice Problems

“Create a Program that will display the average


of 2 numbers inputted by the user”
Example: Basic Humidity and Temp
Monitoring device
THANK YOU!
QUIZ TIME!
QUIZ Q1

What shape represents beginning and


end point of interruption and delay?

A. Diamond
B. Hexagon
C. Ellipse
D. Rectangle
QUIZ Q2

What Step in Algorithm Development breaks


the solution into logical steps:?

A. Design the Algorithm


B. Refine the Algorithm
C. Define the the Problem
D. Analyze the Problem
QUIZ Q3

It is a set of commands that must be followed


for a computer to perform calculations or
other problem-solving operations.

A. Algorithm Development
B. Algorithm
C. Pseudocode
D. Flow Chart
QUIZ Q4

It is a visual diagram of an algorithm using


symbols

A. Pseudocode
B. Flow Chart
C. Inputs
D. Outputs
QUIZ Q5

It is a simple way to write the steps of a


program using easy to understand words.

A. Pseudocode
B. Flow Chart
C. Inputs
D. Outputs
QUIZ Q6

It is the process of creating a step-by-step


solution to solve a specific problem.

A. Pseudocode
B. Algorithm
C. Algorithm Representation
D. Algorithm Development
QUIZ Q7

What is Step 1 in algorithm development?

A. Design the Algorithm


B. Refine the Algorithm
C. Define the the Problem
D. Analyze the Problem
QUIZ Q8

What shape represents a decision or


determines the path to follow?

A. Diamond
B. Hexagon
C. Ellipse
D. Rectangle
QUIZ Q9

What is not a characterisitic of an


algorithm?

A. Well-defined inputs
B. Feasible
C. Language Independent
D. Ambiguous
QUIZ Q10

What is the Flow Line symbol


represented by?

A. Hexagon
B. Arrow
C. Parallelogram
D. Circle
ANSWERS:
1. C
2. A
3. B
4. B
5. A
6. D
7. C
8. A
9. D
10. B

You might also like