Module - 5 - Python - Algorithm Development
Module - 5 - Python - Algorithm Development
PROGRAMMING
ALGORITHM DEVELOPMENT
follow not excluding human being, but in this case computers only
When determining the ending point, we need to describe the characteristics of a solution. In other
words, how will we know when we're done? Asking the following questions often helps to determine the
ending point.
• What new facts will we have?
• What items will have changed?
• What changes will have been made to those items?
• What things will no longer exist?
High-level algorithm:
Go to a store that sells greeting cards
Select a card
Purchase a card
Mail the card
This algorithm is satisfactory for daily use, but it lacks details that
would have to be added were a computer to carry out the solution.
These details include answers to questions such as the following.
"How will I get there: walk, drive, ride my bicycle, take the bus?"
A high-level algorithm shows the major steps that need to be followed to solve
a problem. Now we need to add details to these steps, but how much detail
should we add? Unfortunately, the answer to this question depends on the
situation. We have to consider who (or what) is going to implement the algorithm
and how much that person (or thing) already knows how to do. If someone is
going to purchase Mark's birthday card on my behalf, my instructions have to be
adapted to whether or not that person is familiar with the stores in the community
and how well the purchaser known my brother's taste in greeting cards.
The final step is to review the algorithm. What are we looking for? First, we
need to work through the algorithm step by step to determine whether or not it
will solve the original problem. Once we are satisfied that the algorithm does
provide a solution to the problem, we start to look for other things. The following
questions are typical of ones that should be asked whenever we review an
algorithm. Asking these questions and seeking their answers is a good way to
develop skills that can be applied to the next problem.
Diagnose the situation so that your focus is on the problem, not just its
symptoms. Helpful problem-solving techniques include using flowcharts to
identify the expected steps of a process and cause-and-effect diagrams to
define and analyze root causes.
• Oval
• Rectangle
• Arrow
• Diamond
OVAL
An End or Beginning While Creating a Flowchart.
The oval, or terminator, is used to represent the start and end of a process. Use the Gliffy
flowchart tool to drag and drop a terminator symbol and you've got yourself the beginning
of a flowchart and remember to use the same symbol again to show that your flowchart is
complete.
RECTANGLE
A Step in the Flowcharting Process
ARROW
Indicate Directional Flow
The arrow is used to guide the viewer along their flowcharting path. And
while there are many different types of arrow tips to choose from, we
recommend sticking with one or two for your entire flowchart. This keeps your
diagram looking clean, but also allows you to emphasize certain steps in your
process.
DIAMOND
Indicate a Decision
DOCUMENT SYMBOLS
paperwork.”
DATA SYMBOLS
Data symbols clarify where the data your flowchart references is being
stored. (You probably won’t use the paper tape symbol, but it definitely came in
handy back in the day.)
Input and output symbols show where and how data is coming in and out
throughout your process.
SYMBOLS
The above are a few additional symbols that prove your flowcharting
prowess when put to good use.
FLOWCHART EXAMPLE
Any questions?
Nothing is impossible. The word itself says ‘I’m possible!'
— Audrey Hepburn
REFERENCES:
https://asq.org/quality-resources/problem-solving
https://www.computersciencedegreehub.com/faq/what-is-algorithm-
design/
http://entangle-pair.blogspot.com/2014/10/problem-solving-and-
algorithm.html#:~:text=Algorithm%20development%20is%20the%20act,o
nly%20and%20computer%20like%20devices
https://www.gliffy.com/blog/guide-to-flowchart-symbols
http://sofia.cs.vt.edu/cs1114-ebooklet/chapter4.html
http://sofia.cs.vt.edu/cs1114-ebooklet/chapter4.html