COMPUTER ALGORITHMS ( MANAGEMENT INFORMATION SYSTEM )

23
WESTERN DELTA UNIVERSITY OGHARA, DELTA STATE, GROUP ASSIGNMENT COURSE: ACC 322 (MANAGEMENT INFORMATION SYSTEM) LEVEL: 300 TERM TOPIC: COMPUTER ALGORITHMS COMPILED BY: GROUP NAME MAT NO DEPARTMENT AGUDA OLAKUNLE MICHAEL CSM/11/12/709 ACCOUNTING OSASUYI OGIESOBA FESTUS CSM/10/11/514 ACCOUNTING

Transcript of COMPUTER ALGORITHMS ( MANAGEMENT INFORMATION SYSTEM )

WESTERN DELTA UNIVERSITY OGHARA, DELTA

STATE,

GROUP ASSIGNMENT

COURSE: ACC 322 (MANAGEMENT INFORMATIONSYSTEM)

LEVEL: 300

TERM TOPIC: COMPUTER ALGORITHMS

COMPILED BY:

GROUP NAME MAT NO

DEPARTMENT AGUDA OLAKUNLE MICHAEL CSM/11/12/709

ACCOUNTING

OSASUYI OGIESOBA FESTUS CSM/10/11/514

ACCOUNTING

SUBMITED TO: DR OLADIPUPO A. OLUGOKE

Table of Contents

1.0 A Brief History of Computer Algorithm

2.0 Introduction

3.0 Formulations

4.0 Algorithm Analysis

5.0 Legal Issues

6.0 Definition of Terms

7.0 Features of A Good Computer Algorithm

8.0 Types of Computer Algorithm

8.0.1 Pseudocode

8.0.2 Flowcharts

8.0.3 NASSI – Schneiderman Diagrams

8.0.4 Data Flow Statement

9.0 Conclusion

10.0 Reference

1.0 A Brief History of Computer AlgorithmThe word algorithm originated in ancient times to

identify discrete and distinguishable symbols in mathematicsand using them in arithmetic, based on a defined procedure.Eventually, unary numerical systems appeared during thetimes of the Romans and the abacus was introduced. GottfriedLiebniz contributed to development with his notion ofcalculus ratiocinator, which equated algebra with logic andclaimed that there is a method by which logical concepts canbe manipulated in the same way that mathematical conceptsare. Scholars believe that the Jacquard loom and telephoneswitching technologies where the first fundamentaldevelopments leading to the creation of the first computers.

Mathematically, the development of algorithms iscredited to the work of George Boole, Gottlob Frege, and

Giuseppe Peano. Between them, they were able to reducearithmetic to a collection of symbols manipulated by rules.Doing this however, resulted in a number of unsettlingparadoxes such as Russell's paradox and Godel's paradox ofthe liar.

Algorithms also faced an issue of'entscheidungsproblem', which is a problem of effectivecalculatablity. In this problem, an algorithm accepts as aninput, some description of a formal language and a statementin that language. The algorithm must then produce a 'true'or 'false' statement based on the statement being true orfalse. It is possible for the algorithm to decide onproblems for which there is no proof or disproof. It waslater shown by Emil Post and Alan Turning that theentscheidungsproblem was unsolvable. The next advancement inthe history of algorithms is Alan Turning's 'turningmachine' this anticipated the creation of computers. Thefirst computer was then created in the early twentiethcentury, with ongoing development to software and hardware,particularly with the advent of the silicone chip.

2.0 Introduction To make a computer do anything, you have to write

a computer program. To write a computer program, you have to

tell the computer, step by step, exactly what you want it to

do. The computer then "executes" the program, following each

step mechanically, to accomplish the end goal. When you are

telling the computer what to do, you also get to

choose how it's going to do it. That's where computer

algorithms come in.

Algorithms are set of order steps for solving a

problem, such as mathematical formula or the instruction in

program. The term algorithm and logic are synonymous. Both

are often referred to as the finite sequence of clearly

stated step by steps of solving a problem or finite step by

steps of providing a solution to a problem. However an

algorithm implies an expression that solves a complex

problem rather than overall input-process-output logic of

typical program (Lindsay 1997). Furthermore, for an

algorithm to work it must be precise, effective, and logical

and eventually terminate itself.

However, A computer algorithm is a precise

specification of a sequence of instructions to be carried

out by the computer in order to solve a given problem.

3.0 FormulationsAs was explained algorithms specify instructions for a

task that needs to be preformed, often times by computers.Typically, data is read from some input, then it is writtenas some output or it is stored in memory. Often algorithmsare not merely linear but the 'instructions' branch out toinclude a wide array of difference situations that mayarise, this is formally described as flow of control.Algorithms are expressed in a variety of ways, mostintuitively natural languages, which are spoken languages.The other way that they are commonly expressed is throughartificial languages such as mathematics and programminglanguages. They are also expressed, for learning purposesusing flowcharts to illustrate key algorithmic concepts inacademic settings.

4.0 Algorithm AnalysisAlgorithm analysis can take on a number of forms,

depending on the medium, or language, that it is expressedin. In computer science binary search is superior tosequential search. Regarding analysis of programminglanguages it is not needed to analyze a specific language toconduct an analysis, since programming languages can be

generalized in pseudo-code. The levels of description arehigh level description, implementation description, andformal description. Pseudo-code is a non-formal caricatureof a programming language that one wishes to test. Normally,during the testing of a program testing is first done withpseudo-code and then with the actual code that is beingtested. Overall, program optimization is a complex processthat is gradually revised and refined throughout testing, atvarying levels of complexity.

5.0 Legal IssuesSpecific algorithms are not included in the patent law.However, some applications of algorithms are included in thelaw. The reason behind this ruling was that algorithms areprocesses as per the Gottschalk v. Benson decision.Proponents of this measure argue that this free distributionof knowledge is essential to refining algorithms and itallows for greater potential for creativity and developmentwithin the study of computer science. Those who are not infavor of the measure argue that algorithms ought to beconsidered intellectual property.

6.0 Definition of Terms

A Computer: A computer is an electronic device thatmanipulates information, or "data." It has the ability tostore, retrieve, and process data.

Computer Algorithm: A computer algorithm is a precisespecification of a sequence of instructions to be carriedout by the computer in order to solve a given problem.

Computer Programming: The process of developing andimplementing various sets of instructions to enable acomputer to do a certain task.

Programmer: A programmer is an individual that composesinstructions for computer systems to refer to whenperforming a given action. Programmers usually have anextensive background in some form of computer codinglanguage, which may include XML, PHP, Perl, HTML, or SQL.Programmers are essential to the development of computersbecause without the coding that is necessary to make acomputer work properly, the machine would be useless.Programmers may specialize in one area or may writeinstructions for a wide range of systems or programs.

7.0 Features of A Good Computer AlgorithmA good algorithm must possess the following features:

1. It must have a start and an end.

2. It must be effective.

3. It must be unambiguous.

4. It must terminate.

5. It must produce at least a result.

6. It may accept input or generate its input internally.

7. It must not have an unending look.

8.0 Types of Computer Algorithm1. Pseudocode2. Flow chart3. NASSI - Schneiderman Diagrams4. Decision Table/Trees5. Data Flow Diagrams

8.0.1 Pseudocode

Pseudocode is a rough outline of a solution to a

problem. It is the use of English like statement for writing

out procedures that can be easily converted into a

programming language. Basically it is a map of task to be

done in order to accomplish a goal (Avison & Fitzgerald;

1991). Pseudocode is another way of showing the steps and

logic of the computer program. The pseudocode may be words

or abbreviations of words or nations written in the local

order of the program. It is a plan of what is to be done and

acts as a guide to the programmer for the actual coding.

Illustration Pseudocodes for calculating staff pay.

Perform initialization DO WHILE not EOF

Read next recordIf hours worked > 40Then calculate gross with overtime else calculate

Processing: Calculate TaxCalculate net payAccumulate subtotals.

END OF DO WHILEPrint totalsSTOP

Merits of Pseudocode1.) I t makes use of iteration.2.) The logical structure of the program is clarified.3.) It can easily be converted into programming language.

Limitations of Pseudocode Where the logic of the system is simple, flowcharts

nearly always serve the purpose better.

8.0.2 Flowcharts

Flowchart is a graphical representation of thesequence of all operations, movement, inspection, delays,decisions and storage activities of a process. A flowchartis a diagrammatic representation that illustrates thesequence of operation to be performed to get the solution ofa problem.

Flowchart can also be refer to as a diagrammaticrepresentation of logical steps to be taken in a procedureor pictorial representation of steps by steps instructionsrequired to accomplish a given task. It is a diagrammaticrepresentation of sequence of events usually drawn withconventional symbols representing events, documents, actionsand their interconnections (Wyse Association, 2004).

Types of Flow chart{i} Block charts (or outline charts){ii} System flowcharts{iii} Procedure flowcharts

{i} Block chartsThe block chart depicts the sequence of the main

procedures in a system. It gives the broad picture only andcontains no details of how each procedure is carried out.The only symbol employed in the construction of block chartis rectangle.

{ii} System flowcharts

System flow chart shows in more detail the procedureoutlined in the block chart. It provides a picture of theprocessing opreartions in the system. It is concerned withthe complete system including both clerical and computeroperations.The symbols used in system flowchart include:

Flow of data

{iii} Procedure flow charts The procedure flow charts are usually in tabular forms.It is employed to describe an existing manual system thatmay be computerized and act as aid to problem analysis.

Process Display e.g on a Vitual display unit

Magnetic tape

Offline StorageMagnetic

disk

Manual operation

Manual input

Documents e.g Producedby printing

The following symbols are used in construction of procedureflow chart.

= = TO PROCESS

= TO INPUT/OUTPUT

= FOR STORAGE

{Iv} Program FlowchartThe program flowchart can be likened to the blueprint

of a building. As we know a designer draws a blueprintbefore starting construction on a building, similarly, aprogrammer prefers to draw a flowchart prior to writing acomputer program. As in the case of drawing of a blueprint,

the flowchart is drawn according to defined rules and usingstandard institute.

Program flowchart is a method used in the second stage,

of program writing that is, planning for solution stage. Program flowchart depicts the logic of a computerprogram. All procedures are broken down into combination ofsequences, selection or repetitions of basic computeroperations and drawn on a program flowchart usingappropriate symbols as follows:

Itis used to depict START, BEGIN STOP END.

Itrepresents any kind of processing activity.

Itrepresents earlier defined process contained In aseparate flowcharts.

Itdepicts where a decision has to be made in selecting the subsequent path to be followed.

Terminal

Process

Pre- defined

Decision

Represents situation where data is to be inputted Orinformation to be presented as output.

Itindicates logical flow or a sequence. Arrow key

On pageconnector or linkage symbol between two blocks It representexit to or entry from another part of the chart

Off- page Connector Benefits of Flowchart

{i} Flowcharts are better ways of communicating thelogic of a system to all concerned.

{ii} With the assistance of flowcharts problems couldbe analyzed in a more effective way

{iii} The maintenance of operating programs becomes easywith the help of flowchart; efforts of the programmerbecome more efficient in this.

{iv} The flowchart helps in debugging process.

Input/ Output

{v} Program flowcharts serve as a good programdocumentation, which is needed for various purposes.

{vi} The flowchart acts as a guide or blueprint duringthe system analysis and program development phase; thusit leads to efficient coding.

Limitation of Flowchart{i} Complex logic: sometimes the program logic is

quite complicated. In which case the flowchart becomescomplex and clumsy

{ii} The essential of what is done can easily be lostin the technical details of how it is done.

{iii} Reproduction of flowcharts often becomes aproblem, since the symbols cannot be typed; however,the use of template has simplified this.

{iv} Too Technicality: the essentials of what is donecan easily be lost in the technical details of how itis done.

Flowchart and Some Structured Program Application The objective of structured programming is to makeprograms easier o read and write by making them simpler.Individual instructions to the computer are very easy tolearn but combining those instructions into a logicalpattern make programming difficult. We can however take careof this complexity by limiting the possible patterns to onlythe three control structures, which makes it easier to learnand communicate.

Some typical programming applications and designprocesses are:

{i} Accumulating {ii} Counting

{i} Accumulating: This is the process of keeping a runningtotal. In the physical term of the computer, the accumulatoris a location in main memory, and everytime the computerexecutes an accumulation instruction, another value isthrown in, adding to the value already there.

{ii} Counting: This is really a specialized type ofaccumulator, instead of putting any old number into theaccumulator, every time the computer executes a countingstatement, the same number is put in for instance it will beputting “1” if we are counting by ‘1’ and ‘5’ and so on.

8.0.3 NASSI – Schneiderman Diagrams Nassi – Schneiderman (NS) diagrams are namedafter Dr. Ben Schneiderman and Dr. Ike Nassi; an NS diagramis a graphical representation for structured programmingdeveloped in 1972. It is also called. Structogram (Weaver,1991). Following a top-down design, the problem at hand isreduced into smaller and smaller sub programs until simplestatements and control flow constructs remain. NS diagramsreflect this top-down decomposition in a straightforwardways, using nested boxes to represent sub problems.

Process: A process describe a program function Process

pseudocode.

Parallel Process: Place processes that are executed at the same time Inside a trapezium created by drawing two diagonal lines in the upper and lower border of the table.

Loops: Use loop notations when processes are repeated until a certain condition is met

Decision: This selection symbol is a rectangle divided into three parts by diagonal lines. Write the condition decision in the uppermost triangle and place the two possible outcomes

ProcesProcesProces

DecisionYES

While

NO

Process

Condition

Process

Until

Cas

Process

CasCas

Proces

on either side of the decision

Case Statement: List multiple cases next to each other in a table format

Merits of N-S Diagram{i} It create a blueprint for the program{ii} They are more structured than flowchart{iii} Problems are reduced until simple statements and

control flow constructs remain.Demerits of N-S Diagram

{i} Modifications usually require whole diagrams to beredrawn.

{ii} Their abstraction level is very close to program code in a structured programming language.

8.0.4 Decision Table /TreeDecision table/tree are used to communicate logic to

non-technicaDEl staff. They represent actions to be taken ina situation given a combination of conditions.

Merits of using Decision Table /Tree

{i} The format is standardized, thus aiding training and communication.

{ii} All possible combination of conditions can be mathematically worked out. It is therefore possible to ensure that the right numbers of combinations have beenconsidered

Demerits of using Decision Table /Tree{i} The total sequence is not clearly shown, i.e. no

overall picture is given as with flowcharts.{ii} Where the logic of a system is simple, flowcharts

nearly always serve the purpose better.

8.0.5 Data Flow Statement Data Flow Diagrams (DFDs) are structured,

diagrammatic technique for showing the functions performedby a system and the data flowing into, out of, and withinit. In the late 1970s, DFDs were introduced and popularizedfor structured analysis and design (Gane and Sarson 1979).Data Flow Statements shows the flow of data from externalinto the system showing how the data moved from one processto another, as well as its logical storage.

Rules for creating Data Flow Statement s All processes must have at least one data flow in and

one data flow out. All processes should modify the incoming data and

producing new form of outgoing data.

Each data stored must be involved with at least one data flow

A data flow must be attached to one process Each external entity must be involved with at least one

data flow

Merits of Data Flow Statement {i} They shows process within the system{ii} They show information flow within the system{iii} Interaction with external entities are shown{iv} The system boundary is depicted.

Demerits of Data Flow Statement{i} The essentials of what is done can too easily be

lost in the technical details of how it is done.{ii} Different levels of details can easily become

confused.

9.0 CONCLUSIONComputer Algorithms are very useful as a problem

solving tools of analysis. They can be used as part of thedocumentation describing the program for future reference.As was explained algorithms specify instructions for a taskthat needs to be preformed, often times by computers. Theyare also expressed, for learning purposes using flowchartsto illustrate key algorithmic concepts in academic settings.It is good programming to practice to write an algorithmbefore writing any program and also to make and preservepermanent copies of these records when the program isalready working because it will serves as guide and asreferencing tools to the computer programmer.

10.0 REFERENCE

Books

1. Oladipupo, A.O. & Ilaboya, O.J. (2006); Information Processing

Systems; Theory and Practice; Benin: Mindex Publishing, Pp.122

– 145.

2. P. M. Fitzpatrick and G. B. Findley, The Tracking Operation at the

National Space Surveillance Control Center, Directorate of Aerospace,

Air Proving Ground, Eglin AFB, FL, 2 September 1960.

3. Avison, D.E. & Fitzgerald, G. (1991); information System

Development; Houston; Blackwell, pp.1-2.

4. Wyse Associates (2004); Management Information System; Lagos:

Wyse Publishing, Pp. 226 – 230.

5. Wyse Associates (2004); Business Information System; Lagos:

Wyse Publishing, Pp. 61.

6. Microsoft Visio 2010, http://www.mousetraining.co.uk/