Algorithms and Flowcharts

 

Welcome to Class !!

We are eager to have you join us !!

In today’s Computer Science class, We will be learning about Algorithm and FLowCharts. We hope you enjoy the class!

algorithms csc classnotesng

Algorithm and Flowchart are the two basic terms which aid the development of a software package conveniently.

Algorithm: Is a stepwise set of finite instructions written to solve a problem, it will be easier to code a program after writing a well-prepared algorithm. An algorithm is an effective method that can be expressed within a finite amount of space and time and in a well-defined formal language for calculating a function. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing “output” and terminating at a final ending state. An algorithm is written in simple language and must be efficient and limited to several steps. An algorithm is a well-defined procedure that allows a computer to solve a problem. Another way to describe an algorithm is a sequence of unambiguous instructions. The use of the term ‘unambiguous’ indicates that there is no room for subjective interpretation. Every time you ask your computer to carry out the same algorithm, it will do it in the same manner with the same result.

Flow chart: Is the diagrammatic representation of an algorithm with the help of symbols carrying certain meanings. Using a flowchart, we can easily understand a program. A flowchart is a type of diagram that represents an algorithm, workflow or process, showing the steps as boxes of various kinds, and their order by connecting them with arrows. This diagrammatic representation illustrates a solution model to a given problem. Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields. A flow chart is not language-specific. The designing of a flow chart is not simple and it is time-consuming.

Flowcharts are used in designing and documenting simple processes or programs. Like other types of diagrams, they help visualize what is going on and thereby help understand a process, and perhaps also find flaws, bottlenecks, and other less-obvious features within it. There are many different types of flowcharts, and each type has its own repertoire of boxes and notational conventions. The two most common types of boxes in a flowchart are:

  • a processing step, usually called activity and denoted as a rectangular box
  • a decision usually denoted as a diamond.

Functions of Algorithms

y=2x

In this example, the relationship of y to x is that y is twice as much as the value assigned to x, most math equations are not simple. This is why math functions are referred to as expressions while computer functions are often called procedures or subroutines. Computer functions are similar to maths functions in that they may reference parameters which are inputted into this function.  If the example above was written as a computer function, ‘x’ would be the resulting output value. It might look like this – function double (x), y=2*x, return y. The above example is a very basic function.

An algorithm must be:

  1. Precise – the steps are precisely stated(defined).
  2. Uniqueness – results of each step are uniquely defined and only depend on the input and the result of the preceding steps.
  3. Finite – the algorithm stops after a finite number of instructions are executed.
  4. Input – the algorithm receives input.
  5. Output – the algorithm produces output.
  6. Generality – the algorithm applies to a set of inputs
  7. Lucid, and unambiguous
  8. Give the correct solution in all cases
  9. An effectively computable operation
  10. Well ordered and arranged.
General evaluation
  1. What is an algorithm?
  2. What is a flow chart?
  3. What are the properties of an algorithm?

 

We have come to the end of this class. We do hope you enjoyed the class?

Should you have any further question, feel free to ask in the comment section below and trust us to respond as soon as possible.

In our next class, we will be learning about Flowcharts. We are very much eager to meet you there.

 

Ready to make school management and growth easy? Book your free onboarding session now

Get more class notes, videos, homework help, exam practice on Android [DOWNLOAD]

Get more class notes, videos, homework help, exam practice on iPhone [DOWNLOAD]

1 thought on “Algorithms and Flowcharts”

Leave a Reply

Your email address will not be published. Required fields are marked *

Don`t copy text!