G1 Algorithm Development
G1 Algorithm Development
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.
ALGORITHM
WELL-DEFINED WELL-DEFINED
INPUTS OUTPUTS
LANGUAGE
INDEPENDENT FEASIBLE
EXAMPLES
OF
ALGORITHM
EXAMPLES: USING COMPUTER
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
Input: Bread, peanut Input: Dirty hands, soap, Input: You wake up in the
butter, and jam and water morning
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.
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.
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:
ELLIPSE
RECTANGLE
PARALLELOGRAM
Basic Flowchart Symbols
HEXAGON
DIAMOND
Example Practice Problems
A. Diamond
B. Hexagon
C. Ellipse
D. Rectangle
QUIZ Q2
A. Algorithm Development
B. Algorithm
C. Pseudocode
D. Flow Chart
QUIZ Q4
A. Pseudocode
B. Flow Chart
C. Inputs
D. Outputs
QUIZ Q5
A. Pseudocode
B. Flow Chart
C. Inputs
D. Outputs
QUIZ Q6
A. Pseudocode
B. Algorithm
C. Algorithm Representation
D. Algorithm Development
QUIZ Q7
A. Diamond
B. Hexagon
C. Ellipse
D. Rectangle
QUIZ Q9
A. Well-defined inputs
B. Feasible
C. Language Independent
D. Ambiguous
QUIZ Q10
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