Introduction to Problem Solving Using Computers Siti Nurbaya Ismail Senior Lecturer Faculty of Computer & Mathematical Sciences Universiti Teknologi MARA Kedah (e): sitinurbaya@kedah.uitm.edu.my (u): https://sitinur151.wordpress.com
Introduction to Problem Solving Using Computers what is a problem and examples of problem types of problems ( simple and typical real world ) what is a solution and sample of solutions types of solution ( algorithmic and heuristic ) steps to solve a problem using computer algorithm samples of problem solving
Introduction to Problem Solving Using Computers Part 1: Problem At the end of this chapter you will be able to; define a problem describe a solution explain examples of problem solving using computer describe the donnection between real life process and problem solving using computer
*may be solved using simple solution *need a complex solution What is a problem? Unsettled matter demanding solutions or decision and requiring usually considerable thought or skill for its proper solution or decision Problem *state of difficulty that needs to be resolved or a question raised for consideration or solution *difficulty; a matter about it is difficult to decide what to do or a question to be answered or solve Simple Problem *may be solved using simple solution *how make a cup of tea, how to cook a rice and how to log in to instagram account Difficult Problem *need a complex solution *traffic control, transport schedule and perform transactions using auto teller machines
What is solution? An action or process of solving a problem, also; The fact or state of a problem being solved, also; An answer to or means of answering a problem.
Relation: Problem & Solution From the definition, problem and solution are interrelated and therefore; a problem should not be investigated separately from its solution. Therefore, to solve a problem, three important steps should be performed: Understand the problem thoroughly Understand the conditions and requirements of the problem Search for alternative solutions and select a general solution
Problem & Solution Problem Solution How to make a cup of tea Put a tea beg into a cup Pour hot water into the cup Add sugar into the cup Stir
Problem & Solution Problem Solution How to log in into an Gmail email account Open a web browser Enter URL; www.gmail.com Enter Google Account username in the Enter Your Email text entry box Click Next Enter password in the Password text entry box Click Sign In button
Problem Solving Strategies Heuristics Solution Algorithmic Solution Strategies used to solved problem involves intelligent trial and error or reasoning based on knowledge and experience Example: no known algorithm that tell how to play a perfect game of chess, so computer chess playing programs must use a heuristic method of solution, using methods that area likely but not certain to give a good results in any particular case A clearly specified procedure that is guaranteed to give the correct answer. computing = algorithmic solutions are express as algorithm can give correct result algorithm a step by step procedures that accepts data, manipulate them following the prescribed steps, to achieve the desired values or tasks
Problem Solving Development Cycle To perform problem solving using computer Problem solving phases Implementation phases This phase consists of problem definition and algorithm design This phase consists of converting algorithm to program, compiling processes, program testing and program maintenance phases
Problem Solving Phases: Problem Definition problem definition = understanding the problem purpose = to analyze the problem clearly, precisely and completely. analyse means try to break up the problem into smaller meaningful workable pieces of information the solution for the problem depends entirely on the outcome from this phase.
Problem Solving Phases: Problem Definition the analysis should highlight the following important parts the analysis should clearly, precisely and completely identify the data, the processes that are needed, and the required information Understand the problem requirement. Determine what is the required information 1 List all the facts given in the problem. Determine how the facts can be used in the solution 2 Determine the assumption that has to be used. Avoid from using irrelevant or over assumptions 3 Determine the data to be used 4 Determine what data to get from the user 5 Determine what formulas to be used 6 How the expected screen looks like 7
Problem Solving Phases: Problem Definition When this phase is not handled carefully, the information gathred may: contain errors. not accurate (maybe the information is incomplete, it does not solve the entire problem). too precise than the information required.
Examples of Problem Solving Typical simple problem solving Cook a dish cake sandwich fried rice To get to a destination From home to UiTM Kedah
Examples of Problem Solving Typical simple problem solving Cook a dish: chocalate cake Input Process Output Ingredients Step to make cake Mix Butter + sugar Better + flour + milk + brown sugar + vanilla + baking powder + chocolate powder + egg Baked Baked cake!
Examples of Problem Solving Typical simple problem solving Cook a dish: tuna sandwich Input Process Output Ingredients Salad Tuna Tomatoes Bread Mayo Step to make sandwich Take 2 slice of bread Put salad, tomato, tuna & mayo in between the 2 slice of bread. Yummy sandwich!
Examples of Problem Solving Typical real world problems Transaction ATM Machine Web Application Decision Making Forecasting Control Problem Traffic controller Searching problems Search Engines Sorting problems Transport Schedule
Examples of Problem Solving Using Computer amirah atif Afiq izzati Typical real world problems Transaction : ATM Machine: Money Withdrawer Input Process Output
Examples of Problem Solving Using Computer alif amirul farhan Typical real world problems Transaction : Web Application: Online Purchase Input Process Output
Examples of Problem Solving Using Computer imran muhaimin naufal Typical real world problems Decision Making : Forecasting : Earthquakes Input Process Output
Examples of Problem Solving Using Computer nazmi haziq syafiq Typical real world problems Control Problem: Traffic Controller : Traffic Light Input Process Output
Examples of Problem Solving Using Computer najwa irdina syamimi Typical real world problems Searching problems: Search Engine :Zalora website Input Process Output
Examples of Problem Solving Using Computer adilah syakirah shafrika syazwani Typical real world problems Sorting problems: Transport schedule: Bus Schedule Input Process Output
Introduction to Problem Solving Next Class….. Part 2: Algorithm