










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











Business Informatics & Digital Transformation Program
Lecture Outline Introduction to Algorithms & Problems Solving Understanding the concept of problems solving Understanding the concept of Algorithms Identify the problems-solving Process Techniques to Design Algorithms Case Study 1 (grading System) Case Study 2 (prepare cups of tea)
Problem Solving Algorithm : Step-by-step problem-solving process Solution achieved in determinate amount of time
Phase 1 - Analyze the problem Outline the problem and its requirements Design (algorithm) to solve the problem ( Flow chart, pseudo code) Algorithm tracing Phase 2 - Implement the algorithm Implement the algorithm in code (in Programming Language → Program) Verify that the algorithm works Phase 3 - Maintenance Use and modify the program if the requirements changes
2 ) Design Algorithm
Analyze the Problem
Design Algorithm A Flowchart is An algorithm graphical representation. Written as a combination of the following graphical notations: Start and End Input / output Selection Calculation Data Flow
Convert a student mark from decimal mode to ABC mode. Understand problem requirements Is the problem statement complete and clear? Does program require user interaction? → Input the mark Does program manipulate data? → covert mark → Control Requirements ( IF statement ) What is the output? The mark converted to A or B or C or error Is there subproblem? No Analyze the Problem (Example 1 )
Important Note an algorithm may work correctly but be inefficient – by taking more time and using more resources than required to solve the problem. becomes more important for larger programs. Analyze the Problem
Design Algorithm → Algorithm Discovery
Break the problem into several sub-problems Solve each subproblem separately Produces a modular structure Analyze the Problem
**Example. Making tea. Suppose we have a robot which carries out household tasks. We wish to program the robot to make a cup of tea. An initial attempt at an algorithm might be:
Note ( 1 )
Control requirements: while
— Example. Repeat the mark conversion for a classroom of 30 students. Each student having a unique student number from 1 to
Note ( 2 )