Research Work
Research Work
WRITTEN BY
AROWOLO TOFUNMI EMMANUEL
OCTOBER 2024
1
CERTIFICATION
This is to certify that this research work was written by Arowolo Tofunmi
Student HOD
Date: Date:
Signature: Signature:
2
DEDICATION
The earth is the Lord’s and fullness thereof. This project work is dedicated to
God the father, the son and the Holy Spirit, for his wonderful support and
grace always made available in and out of season. His majesty and holiness
reign forever. I also dedicate this project to my parents Mr & Mrs Arowolo for
their encouragement and moral, financial support for seeing me through the
program. May almighty God continue to bless them for me and enlarge their
Finally, I dedicate this project work to my HOD (Engr Oladipo E.O) for his
fatherly care, support and love toward all students, Almighty God will continue
to strengthen you, his grace over your life will not diminish in Jesus name. And
also to my colleagues.
3
ACKNOWLEDGEMENT
First and foremost, I would like to acknowledge and thank God almighty
for giving me the grace to be alive till the moment and the strength to fully
accomplish my course. He was my comfort and guidance, it was like this day
will never come but finally a bright light after a light tunnel for the vision is yet
for the appointed time, but at the end, it shall speak and not tell lie, though it
tarries, wait for it, because it will surely come. All thanks to God almighty for
and made all provision needed during the pursuit of excellence, Almighty God
over my life and over my study. May the Lord grant you more wisdom,
Finally glory to be to God in the highest Hallelujah. I thank God for the
4
TABLE OF CONTENT
CERTIFICATION 2
DEDICATION 3
ACKNOWLEDGEMENT 4
TABLE OF CONTENT 5
DEFINITION OF ALGORITHM 6
TYPES OF ALGORITHM 6
TYPES OF ALGORITHMS STUDENTS ARE TO LEARN 7
EXAMPLES OF ALGORITHM IN EVERYDAY LIFE 7
ALGORITHM EXAMPEL FOR STUDENTS 8
PROPERTIES OF ALGORITHM 8
HOW TO WRITE AN ALGORITHM AND PSEUDOCODE 9
TO WRITE EFFECTIVE PSEUDOCODE 9
STEPS USED FOR CALCULATING ALGORITHMS 9
ALGORITHM 13
DEFINITION OF FLOWCHART 15
TYPES OF FLOWCHART 16
BASIC SYMBOLS OF FLOWCHART 16
OTHER SYMBOLS OF FLOWCHART 16
FLOW CHART SYMBOLS 17
FLOW CHART AND ALGORITHM 18
HOW ARE FLOW CHARTS USED TO SHOW ALGORITHMS 18
WHAT IS FLOWCHART AND ALGORITHMS P D F 18
WHAT IS AN ALGORITHM AND FLOWCHART WITH AN EXAMPLE 18
ARE SOURCE CODE AND ALGORITHM THE SAME 19
WHAT IS THE FULL EXPLANATION OF FLOW CHART 19
DIFFERENCES BETWEEN FLOW CHART AND ALGORITHM 19
WHAT IS THE DIFFERENCE BETWEEN THE ALGORITHM AND THE CODE 19
DIFFERENCES BETWEEN FLOW CHART AND ALGORITHM IN TABULAR FORM 20
CONCLUSION 20
5
DEFINITION OF ALGORITHM
An Algorithm is a procedure used for solving a problem or performing a
computation
Algorithms act as an existing list of instructions that conduct specified
actions step-by-step in either hardware or software based routines.
Algorithms are widely used throughout all area of IT
An algorithm is a set of defined steps designed to perform a specific
objective. This can be simple process such as recipe to bake a cake e.t.c
Algorithm is a procedure for solving a mathematical problem (as of
finding the greatest common division) in a finite number
An algorithm is a set of step by step instruction to accomplish a task or
solve a problem, often used in computer science.
An algorithm is a set of commands that must be followed for a computer
to perform calculations or other problem solving operations.
Algorithm is a finite sequence of mathematically rigorous instruction,
typically used to solve a class of specific problems or to perform a
computation.
An algorithm is a set of instruction in plain English or communicated
through flow chats or mathematical notations
An algorithm is a set of instructions implemented by software engineers
and data scientist to transform input data into output data
TYPES OF ALGORITHM
1. Brute Force Algorithm: This is the most basic and simplest type of
algorithm. A Brute force algorithm is the straight forward approach to a
problem
2. Recursive algorithm
6
3. Randomized algorithm
4. Sorting Algorithm
5. Searching Algorithm
6. Hashing Algorithm
7. Linear Algorithm
8. Data base Algorithm
9. Distributed Systems Algorithms
10. Memory allocation and de-allocation Algorithms
11. Networking Algorithms
12. Operating systems algorithms
13. Encryption
7
5. Standard addition algorithms
6. Standard subtraction
7. The sieve of Eratosthenes
PROPERTIES OF ALGORITHM
1. It should terminate after a finite time
2. It should produce at least one output
3. It should take zero or more input
4. It should be deterministic meaning giving the same input cast
5. Every step in the algorithm must be effective I.e. every step should do
some work.
6. All steps of the algorithm must be precisely defined
7. They most have space complexity
8. Computing best case and average case
8
9. Computing order of growth of an algorithm
10. Measuring input range
11. Measuring run time
12. Well defined inputs
13. Well defined output
14. Signature
15. Finiteness language
16. Independence and feasibility
Example
We want to add six numbers 26, 49, 98, 87, 62, 75
Step 1: Read the number 26, 49, 98, 87, 62, 75
Step 2: Add numbers
26 + 49 + 98 + 87 + 62 + 75
9
Step 3: Store result in Variable A
Step 4: Print the Value of A
Step 5: Stop
SOLUTION
Step 1: Start
Step 2: Sum = 0
Step 3: Get the first value
Step 4: Add the first value to sum
Step 5: Get the second value
Step 6: Add the second value to sum
Step 7: Get the third value
Step 8: Add to sum
Step 9: Get the fourth value
Step 10: Add to sum
Step 11: Get the fifth value
Step 12: Add to sum
Step 13: Get the sixth value
Step 14: Add to sum
Step 15: Print/Output sum
Step 16: Stop!!!!!!!
10
START
Sum = 0
Get 1St Value Get 2nd Value Get 3rd Value Get 4th Value Get 5th Value Get 6th Value
Add to Sum Add to Sum Add to Sum Add to Sum Add to Sum Add to Sum
STOP
Example 2:
Write an algorithm to determine a student final grade and indicate whether
Pass or Fail. The final grade is calculated as the average of 4 marks
Step 1: Start
Step 2: sum=0
Step 3: Enter first score
Step 4: Add the first score to the sum
Step 5: Enter second place
Step 6: Add to sum
Step 7: Enter third score
Step 8: Add to sum
Step 9: Enter fourth score
Step 10: Add to sum
Step 11: Print Sum
Step 12: Divide sum by average
Step 13: Print Pass or Fail
Step 14: Stop!!!!!!!!
11
START
Sum = 0
Get 1St Value Get 2nd Value Get 3rd Value Get 4th Value
Print result
Average
50
STOP
12
ALGORITHM
Set of sequential step written in ordinary language in solving problem. It is also
a well-defined sequence of steps to solve problem.
Steps in algorithm development
1. Identify Input
2. Identify Output
3. Identify processing Opera
4. Algorithm must be definite
5. Finiteness i.e there must be an open end
6. Effective
Solution
1. Let the number be a, b and c
2. Let the sum of the number be a+b+c
3. Divide the sum by 3 i.e a+b+c/3
4. Let the result of a+b+c/3 = D
5. Print D
6. End
Solution
1. Read the value P, N, R
2. Get the product P, N, R
3. Divide the product by 100
13
4. Let the result of division = I
5. Print I
6. End
Solution
1. Read the value b,c
2. Get the product of ‘b’ and ‘c’
3. Divide the product by 2 i.e bc/2 or ½ bc
4. Let the result of division be H
5. Print H
6. End
14
DEFINITION OF FLOWCHART
A flowchart is a type of diagram that represents a workflow or process
A flowchart can be defined as a diagrammatic representation of an
algorithm, a step by step approach to solving a task.
A simple flowchart representing a process for dealing with a non-
functioning lamp
A flowchart is a picture of the separate steps of a process is sequential
order. It is a generic tool that can be adapted for a wide variety of
purpose
A flowchart is a graphical or symbolic representation of a process. Each
step in the process is presented by a different symbol and contain in
short steps.
A flowchart is a diagram that illustrates the steps. Sequences, and
decisions of a process or work flow
Flow chart is a diagram that shows step by step progression through a
procedure or system especially using connecting lines and a set of
symbols
A flowchart is a diagram that depicts a process, system or computer
algorithm. They are widely used I multiple fields to document study plan
and improve flow-work
A flowchart is a type of diagram that usually explains a process or
workflow. By using standardized symbol and definition.
15
4. Swinlane flowchart
5. Use case flowchart
6. EPC flowchart
TYPES OF FLOWCHART
1. Process flowchart
2. Swinlane flowchart
3. Workflow diagram
4. Data flow diagram
16
5. Decision flowchart
6. Communication flowchart
FLOW CHART SYMBOLS
1.
Represent Start/Stop
2.
4.
START
SUM = 0
GET 1ST
17
The oval, rectangle, diamond, parallelogram and arrow are the basic process
flowchart symbol. The oval represents start and end
18
19
ARE SOURCE CODE AND ALGORITHM THE SAME
Source is the set of instruction that a programmer write’s a software. Every
instruction (also known as an algorithm) is written in a specific programming
language, such as python, html, css and java script.
20
DIFFERENCES BETWEEN FLOW CHART AND ALGORITHM IN TABULAR FORM
CONCLUSION
Algorithm are the rules and sequence made to understand things. Flow chart is
the diagrammatic of symbols.
21