Click to like/follow us on:
problem solving and algorithm developmentIn this post you will:
> Know the meaning of problem solving.
> Understand the technical Activities in problem solving
> Learn the Standard methods in solving a problem.
> Know the meaning of algorithm
> Learn the Classification/Types of algorithm
> Understand Algorithm development.
> Learn how to write an algorithm.
Problem solving is the thought processes involved in solving a problem while Algorithm is a precise rule/step (or set of rules or sequence of steps) specifying how to solve some problem.

Algorithm: In computing (Computer science and Information Technology) algorithm is a statement(s) outlining the operation of a computer program, written in something similar to computer language but in a more understandable format. In other to be able to solve a particular problem one must know the steps or routes to the solution of that problem.

Problem Solving consists of the following technical Activities:
1. Algorithm development,
2. Flowcharting or Pseudocoding,
3. Coding in a particular programming language.

Algorithm development is the act of designing the steps that solve a particular problem for a computer or any other device to follow not excluding human being, but in this case computers only and computer like devices.
Algorithm development steps
Steps in development of Algorithms
1. Problem definition
2. Development of a model
3. Specification of Algorithm
4. Designing an Algorithm
5. Checking the correctness of Algorithm
6. Analysis of Algorithm
7. Implementation of Algorithm
8. Program testing
9. Documentation Preparation



However some steps may be combined as shown the in the diagram above.  According to the diagram steps 1, 2, 3 and 4 are group as Design, 5, 8 are grouped as experiment, 7 as implement and 6 and 9 as analyze.

Algorithm Representation
An Algorithm can be expressed, developed, written, or represented in one of the following languages or forms:

1. Narrative
2. Flowchart
3. Pseudo code

A flowchart is a diagram of the sequence of operations in a computer program or an accounting system.

A pseudo code is a statements outlining the operation of a computer program, written in something similar to computer language but in a more understandable format.
Instance one:
Problem.
A problem may be on how to tell a computer to determine the highest score in an n scores.
Solution:
In a narrative form:
1. read the list of the scores starting from the first,
2. call the first score hiscore, and proceed to the next score,
3. if the next (second) score is greater than hiscore,
therefore the next score should become the new hiscore.
4. keep doing this until you exhaust the scores.
5. show us the hiscore.

To see the above instance in a pseudo code form check this example <example number>
In a flowchart form:
FlowchartMaximumScore


Instance two:

1. Add 3 and 7 call the result sum
2. multiply 2 and sum the result product
3. if product is greater than 200, then
4. goto 2
5. Print Product
6. End



The above process will continue until product is is greater than 200. That is if product is less than 200 the computer will go back to step 2 until product is greater than 200.
Note: At instance one above, one can decide to erase: keep doing this until you exhaust the scores, and replace it with: goto step 1. But it is better written this way: goto step 1 until you exhaust the scores. So that computer will know when to stop.
And now this is for you:
If number 2 (i.e line two (2)) is changed to be:
if product is less than 200
What will you do if you are the one executing this actions?
Make sure you do it yourself, don't copy from your friend, but you are free to ask him/her questions.

When the algorithm has being developed using any of the above languages or method, the algorithm can now be expressed/code in any of the standard languages; C, C++, Java, etc. The act of expressing an algorithm in any of the standard language is called programming/coding.

Standard Methods in solving a Problem
A problem can either be solve using any or both of these methods viz:
  1.    Top Down Method
  2.    Bottom Top Method

The Top Down Method starts to solve a problem at the most general level and works toward details or specifics. it is also an approach to a problem that begins at the highest conceptual level and works down to the details. While
The Bottom Top method is an approach to a problem that begins with details and works up to the highest conceptual level.

Qualities/Features/Properties of a Good Algorithm
For a particular algorithm to be regarded as a good algorithm that solve a particular problem it must meet the following criteria:

1. Simplicity/Effectiveness: The algorithm must be simple and not complex to follow in solving a particular problem. The operations perform by an algorithm should be simple so that they can be done exactly and in a finite length of time by some using pencil and paper. Check out the test in the example five, study what is contained in the table. The author of the algorithm actually did that using pencil and paper before it was published.

2. Clarity/Definiteness: The algorithm should be clear and easy to read and understand. In other words the algorithm must be precisely defined and unambiguous. If Mr. X performs the actions in an algorithm, Mr. Y should be a able to perform the same action in same condition and obtain the same result.

3. Thoroughness: A thorough algorithm is one that considers all the possible cases and situations that may arise in that particular problem. This can be achieved by making use of variables in storing input. e.g. If you are developing algorithm that a banker will be using in their daily transactions; deposit, and withdraw, and your algorithm did not consider alerting/sending the account owner, the balance that remain in the account at each time the any of the transaction is made, then we can say that your algorithm is not thorough in whatever transaction made in the account, except if the alert is not required.

4. Correctness: The algorithm being developed must be correct. This means that the algorithm must produce the correct result/solution of the problem. However if the result is not correct, then the algorithm should be modified. If however the algorithm could not produce the correct result/solution then we will say that the algorithm did not solve the problem or that the algorithm is wrong.

5. Efficiency: This is the most important of all. This means that the algorithm should be the best in time consumed to solve the particular problem. The amount of computer resources that requires to solve the problem should be considered when developing an algorithm. An algorithm that requires small memory space and less time to reach the solution of a particular problem is better considered/Taking.
This now follows that if the total numbers of your class members are 1000 and where given the same problem to develop algorithm that will solve the problem. If all the students algorithms are both correct, believe me that all the steps in the individual algorithms will be unique. The uniqueness start from the use of variables. How? I may use x to represent 2 (i.e x = 2), another person may use c to represent the same 2 (i.e c = 2), still another may like to phrase or even his name to represent the same value 2.

6. Finiteness: The actual steps executed when an algorithm is run should be of a reasonable size. This means that a execution time of algorithm should be of reasonable length. The algorithm must be finite. If an old computer could not boot before the user dies, then the computer is useless.

7. Input: An algorithm may have some input(s), from a specified device. This input(s) may be from an external device (like Hard disc, Flash drive) or within the computer (e.g. keyboard, RAM). The commonest input in an algorithm includes Numbers – the integers numbers, real numbers, character etc.

8. Output: An algorithm must have output(s). The output is always but not limited to the result of the algorithm. The output may be displayed in the visual displaying unit (VDU) or stored in the computer memory for other programme/algorithm to use.
And that is it! The algorithm that posses all these qualities should be chosen from millions of equivalent algorithms that solve the same problem.

Classification/Types of Algorithm
Algorithm are classify according to how they approach a particular problem, how ever they are many classification of of algorithm but the classification listed below is base on control structure:

1.    Linear Control Structure Algorithm
2.    Selective Control Structure Algorithm
3.    Repetitive Control Structure Algorithm

Linear Control Structure Algorithm: Is a kind of control structure algorithm that solve a problem problem in a linear/sequential manner.
Selective Control Structure Algorithm: Is a kind of control structure algorithm that is selective in nature. This means that It select between alternative(s).
Repetitive Control Structure Algorithm: this combine Linear and Selective algorithm. In some part of the algorithm it may be linear, selective or combination of the two.

Here will be writing/developing algorithms that solve problems using pseudocodes. Algorithm can be written for anything. Someone may ask you to state the steps involve in preparing a particular soup. The same person can also ask you to state another steps involve in preparing any soup. To you these are problems which you need to solve by stating the steps that are involve in preparing “any” or a “particular” soup.
What if the question tells that you should state/write the steps involve in solving quadratic equation using Completing the Square Method.
So when you are doing any of these we say that you are developing an algorithm that solves a problem or simply that you are writing an algorithm.

I will be make use of systematic algorithm development to solve problems. The systematic algorithm development break a problem into major parts and further break the major parts into smaller parts that finally solve the problem, this is called stepwise refinement.
Study the figures below.
algorithm
This is the problem.
If this is a problem, it will be too bulky to work on at a time in a whole. The owner of this problem may decide to break/split the problem into parts and employ people that will work on it as shown below:

algorithm
The problem is broken into 3 parts.
Let Mr. X, Y and Z be the people that will work on this problems. So that
Mr. X will focus on the first part of the problem, Mr. Y on the second and Mr. Z on the third part. To further ease the work Mr. X, Y and Z will also like to employ more other workers, so that the problem can be split into simpler (refine) problems as shown below.

algorithm
The problem further broken/refine into more small parts.

You are advised to study the basic computer operations as it will help you to understand algorithm writing (development) very well.

Before you proceed decide if you will: check those basic operations that an algorithm, programme or computer can perform or you will jump direct to: how to write a simple algorithm using pseudo codes.

SHARE THIS POST WITH YOUR FRIENDS...::

0 comments:

Leave a Reply

All Posts

Access all posts here!

Categories

Unordered List

Sample Text

Lists of Jobs in the United States

List of Courses & Outlines For UNN Students

Popular Posts

Like us on Facebook

Recent Posts

    Text Widget