Problem Solving in Computing (PRL1013) LU1 Introduction PDF

Summary

This document provides an introduction to problem solving in computing. It covers the characteristics of computing problems, barriers to problem solving, and steps to efficient problem solving. This document is useful for computer science students.

Full Transcript

PRL1013 PROBLEM SOLVING IN COMPUTING LU1: Introduction Michelle Anak George Eaqerzilla Phang Dr Sinarwati Binti Mohamad Suhaili I: EP D:M G Agenda SUB-TOPICS COVER IN LEARNING UNIT Characteristic of Computin...

PRL1013 PROBLEM SOLVING IN COMPUTING LU1: Introduction Michelle Anak George Eaqerzilla Phang Dr Sinarwati Binti Mohamad Suhaili I: EP D:M G Agenda SUB-TOPICS COVER IN LEARNING UNIT Characteristic of Computing Problem Barriers of Problem Solving Steps to Efficient Problem Solving I: EP D:M G CHARACTERISTIC OF COMPUTING PROBLEM Understanding the Nature, Properties, and Paradigms I: EP D:M G W H AT IS A COM P U TIN G P ROBLEM? Presents a task or challenge that requires a solution. It can range from simple calculations to complex simulations, data analysis, or system design Computing problems utilizes computational methods, which involve applying mathematical, logical, and algorithmic techniques to process information and generate results. W H Y IT IS IMP ORTA N C E TO UN DE RSTA ND C OM P U TIN G Recognize the problem accurately P ROB LEMS? Develop effective solutions Enhance problem-solving efficiency Avoid common pitfalls and errors I: EP D:M G NATURE OF C OMP U TIN G P ROBLEM Algorithmic Problems S Data Processing System Design Problems Problems Involve designing and Deal with handling, Involve creating complex implementing step-by- manipulating, and systems that integrate step procedures to extracting insights multiple components, solve a specific task. from large sets of processes, and These algorithms typically data. They often technologies. These involve manipulating involve tasks like data systems often aim to solve data, performing cleaning, complex real-world calculations, or making transformation, challenges and provide logical decisions analysis, and solutions for diverse visualization. applications. Examples: sorting algorithms, search algorithms, Examples: database Examples: scalable web mathematical algorithms queries, data analysis, applications, distributed P ROP ERTIES OF C OM P U TING PComplexity ROBLEMS Scalability Specificity Measures the resources Refers to a system's Refers to the degree of required to solve a ability to handle precision and clarity computing problem. It increasing workload, of a problem's includes: such as larger data requirements and sets or more users constraints. Time complexity: Importance for ensuring It is essential for Measure the time the performance and developing solutions required to execute an efficiency of a system as that meet the specific algorithm it grows needs and expectations Space complexity: of a problem Measures the amount of I: EP memory used by the D:M G Well-defined Open-ended Ill-defined Closed Problems Problems Types of Computing Problems Deterministic Non-deterministic Problems I: EP D:M G W E L L-DEFIN ED V S IL L -DE FINED P ROBLEMS Well-defined Ill-defined Problems have clear and Problem have ambiguous goals, requirements, unambiguous goals, and constraints. The desired outcome may be requirements, and subjective or open to interpretation, leading to constraints. The desired a range of possible solutions. outcome and the steps to achieve it are well-defined, Example: Designing a user-friendly website leading to specific solutions 1.Ambiguous Goals: "User-friendly" can mean different things Example: Finding the Shortest Path to different people. on a Map 2.Variable Requirements: Features and design elements are open to interpretation and may change. 3.Constraints: Budget, technology, and time limitations affect the design process. 4.Subjective Outcome: Different users have different preferences, leading to multiple valid solutions. OP EN-E N DED V S C LOSED P ROB L E M S Open-ended Closed Allow for a wide range of possible Have a single correct solution or a solutions. There is no single limited set of well-defined "correct" answer, and solutions can solutions. The desired outcome is vary in their approach, complexity, clear, and there is a specific and effectiveness. method or algorithm to achieve it. Example: Creating a new game (There are Example: Checking if a number is prime, countless ways to design and develop a solving a simple equation (The problem I: EP game, with various genres, mechanics, has a specific method and a single correctD:M G and features) output for a given input) DETERM IN ISTIC V S N ON - DETERM IN ISTIC P ROB L EMS Deterministic Non-deterministic Problems have predictable Problems have multiple potential outcomes. The steps are clearly outcomes. The solution may depend defined, and the result is on factors that are not fully predictable unambiguous. or controllable, leading to a range of possible results. Example: Adding two numbers (Given the same input, the algorithm will always Example: Solving a Sudoku puzzle (There produce the same output.) can be multiple possible solutions and different paths to reach them) Step-by-Step Procedures Problem- Involves breaking down a problem into a Solving 1 sequence of well-defined steps. These steps form an algorithm that provides a clear and systematic approach to solve the Paradigms: problem. Algorithmic Clear and Logical Sequence Each step in an algorithm is clearly Thinking 2 defined, and the sequence of steps is logical and well-structured. The steps must be performed in a specific order to achieve the desired outcome. Example: Sorting a list of numbers 3 Searching for a specific value in a data set, Calculating the factorial of a number Implementing a specific pattern-matching algorithm Using Rules and Logic Involves applying rules and principles to derive Problem- 1 conclusions or solve problems. Deductive Reasoning: Apply general principles to Solving specific cases. Inductive Reasoning: Use specific observations to Paradigms: form general conclusions. Logical Deriving Conclusions Systematically Each step in an algorithm is clearly Reasoning 2 defined, and the sequence of steps is logical and well-structured. The steps must be performed in a specific order to achieve the desired outcome. Example: Proving a mathematical theorem 3 Solving a logic puzzle Determining if a number is even or odd Developing a decision-making process based on specific criteria Abstraction Problem- Involves simplifying complex problems by Solving 1 focusing on essential concepts and ignoring irrelevant details. Example: Representing a complex user interface Paradigms: as a set of simpler components like buttons, text fields, and menus Decomposition Computational Large problem is divided into smaller, more manageable subproblems, making it easier Thinking 2 to address each part individually and reduce overall complexity. Example: Breaking down the task of building a website into smaller tasks like designing the layout, coding the front-end, and setting up the back-end. Pattern Recognition: Involves identifying recurring patterns and 3 solutions within a problem or across different problems Leverage existing knowledge and approaches to solve new problems more effectively. BARRIERS OF PROBLEM SOLVING Identifying and Overcoming Obstacles to Effective Problem Solving I: EP D:M G COMMON OBSTACLES IN PROBLEM SOLVING Identify various challenges ⚬ Look for and recognize the different obstacles that might come up when trying to solve a problem. Understand their impact on problem- solving ⚬ Understand how these challenges make it harder to find a solution. I: EP D:M G IMPORTANCE OF RECOGNIZING THESE BARRIERS Develop strategies to overcome obstacles ⚬ Once barriers are recognized, it becomes possible to create targeted strategies to overcome them by finding alternatives, reallocating resources, or adjusting the approach. Enhance problem-solving efficiency ⚬ Make problem-solving faster and more effective by dealing with barriers early Cognitive Barriers Obstacles that hinder the effective processing of information and the development of solutions Types Limited Memory Limited Processing Power Biases and Heuristics Descripti Human Memory Limitations: Brain's Finite Processing Mental Shortcuts: on Ability to remember information is Capacity: Heuristics are mental restricted. This can impact how well The human brain has a limited shortcuts that we can recall past experiences or capacity to handle and process simplify decision- relevant knowledge when solving information simultaneously. This making but can also problems restriction means we can only introduce biases. focus on a certain amount of data at once. Impact Affecting Recall and Processing: Impeding Complex Problem- Errors or Missed Limited memory can make it Solving: Solutions: difficult to retrieve necessary Make it difficult to analyze all These biases may information or integrate new data, aspects of complex problems, cause judgment which can slow down or complicate leading to incomplete or flawed errors or overlook the problem-solving process. solutions. better solutions. Technical Barriers Obstacles from technical or technological issues that impede finding and implementing effective solutions Types Incomplete Hardware Limitations Software Bugs Information Descripti Lack of necessary data Hardware constraints: Errors in the code: on or requirements: Constraints in the physical Bugs or defects in software code Lacking essential components of a computer that caused program to information, such as system, such as processing malfunction, produce incorrect requirements, power, memory, or storage results, or fail to perform as specifications, or capacity intended historical data Impact Hindering problem- Impacting performance and Preventing solutions from solving efforts: capabilities: working correctly: Can lead to incorrect Can lead to slow performance, Delaying progress and hindering assumptions, missed system crashes, or limitations in problem-solving and require details, or ineffective the types of analyses that can be debugging that consume solutions performed significant time and effort to Environmental Barriers Obstacles in a person's physical or social environment that impede their ability to effectively address and solve problems Types Time Constraints Resource Constraints Organizational Barriers Descriptio Limited time to solve Insufficient budget, tools, or Lack of support or n problems: personnel: cooperation within the When there is limited time Limited financial resources, organization: available to address and solve inadequate tools, or a shortage Lack of support, cooperation, problems of staff can all limit the ability or communication from leader to solve problems effectively or poor collaboration among team members Impact Leading to rushed or Hindering problem-solving Impacting collaboration suboptimal solutions: efforts: and effectiveness: Lead to solutions that are restrict access to necessary Create roadblocks, delay rushed or not fully thought out, tools, limit the scope of progress, or hinder the potentially resulting in lower investigations, or hinder the implementation of effective quality outcomes or incomplete ability to implement solutions solutions Psychological Barriers Mental or emotional obstacles that can impede an individual's ability to think clearly, communicate effectively, or perform optimally Types Stress and Anxiety Overconfidence Lack of Motivation Descripti Negative Emotions Affecting Underestimating problem Low motivation reducing on Cognitive Function: complexity: effort: Can hinder ability to think Underestimating problem Related to factors such as clearly and process complexity by oversimplifying lack of interest, unclear information effectively. the problem and not goals, insufficient rewards, or Can cloud judgment and addressing all its aspects previous failures reduce cognitive performance. Impact Impairing Decision-Making Skipping necessary steps Affecting persistence and and Problem-Solving: and making mistakes: problem-solving Can lead to tunnel vision, Lead individuals to skip effectiveness: hindering creativity and the important steps in the Lower persistence and ability to consider alternative problem-solving process and increase the likelihood of solutions result in mistakes and giving up, which reduces the STEPS TO EFFICIENT PROBLEM SOLVING Enhancing Solutions with Structured Approaches I: EP D:M G Why Efficiency Matters? 1 Saves Time and Resources Complete tasks quickly Maximizing your productivity Minimizing wasted effort 2 Leads to Better More Solutions time to analyze the problem thoroughly Explore alternative approaches Refine your solution I: EP D:M G Problem 1 Define the Solving Problem Process Analyze the 2 Problem 3 Develop a Plan Implement the 4 Solution 5 Test the Solution Review and 6 Reflect I: EP D:M G Step 1: Define the Problem Understand the Problem Statement Clearly grasp what needs to be solved ⚬ Figure out exactly what the problem is and what you need to fix. Ensure accurate problem definition ⚬ Make sure you describe the problem accurately so that you can address it properly. Identify Constraints and Know the limitations and criteria for the solution Requirements ⚬ Understand any restrictions or rules that affect your solution, like time, resources, or technical needs. Clarify the scope of the problem ⚬ Decide what parts of the problem are included and what is not. I: EP D:M Step 2: Analyze the Problem Break Down the Problem Divide into smaller, manageable parts ⚬ Split the problem into smaller, easier sections Simplify complex problems ⚬ Make the problem simpler by focusing on the main parts Identify Key Components and Dependencies Understand essential elements and their relationships ⚬ Figure out the key elements and how they fit together Recognize interdependencies and critical factor ⚬ See how different parts depend on each other and what is most important. I: EP D:M G Step 3: Develop a Plan Choose Appropriate Strategies and Select the best methods for solving the problem Tools ⚬ Decide on the most effective ways to solve the problem Use suitable tools and technologies ⚬ Choose tools and technologies that will help you solve the problem Plan the Steps to Solve the Problem Outline the sequence of actions ⚬ Write down the steps you need to take to solve the problem. Create a clear roadmap for implementation ⚬ Make a simple guide showing how you will implement each step and what resources you will need I: EP D:M Step 4: Implement the Solution Write the Code or Develop the System Carry out the plan by coding or building ⚬ Start writing the code or building the system as you planned Implement the solution as designed ⚬ Make sure you stick to the design you created Follow the Plan and Adapt as Stick to the plan but be flexible Necessary ⚬ Keep following the plan you made Make adjustments if needed during implementation ⚬ If problems come up, make changes to solve them but stay focused on the main goal I: EP D:M G Step 5: Test the Solution Test for Correctness and Efficiency Ensure the solution works correctly​ ⚬ Check if the solution solves the problem as expected Evaluate its performance and efficiency ⚬ ​See how fast and efficient the solution is Debug and Refine the Solution Identify and fix any issues​ ⚬ Find and fix any errors or issues Improve the solution through iterative refinement ⚬ Make changes to enhance performance and efficiency I: EP D:M Step 6: Review and Reflect Analyze the Results Evaluate how well the solution worked ⚬ See if the solution solved the problem as intended Assess the outcomes and effectiveness ⚬ Determine if the results were what you expected and if they were good Reflect on the Process and Learn Identify from it lessons learned ⚬ Figure out what you learned from this experience. What went well? What didn’t? Improve future problem-solving effort ⚬ Use what you learned to make your problem-solving better in the future. Debugging Tools Purpose: These tools help identify and fix errors in your code Common Examples: Debuggers: Let you watch your code run step by step and check Techniques for and Tools problems Logging: Lets you add notes in your code to see what it’s doing at different points Algorithm Libraries Purpose: Provide ready-made solutions for common problems Examples: Standard Libraries: Built-in sets of tools and functions that come with most programming languages. Open-source Libraries: Extra tools created by others and shared for free. Version Control Systems Purpose: Track changes to your code and help manage different versions Examples: Git: Keeps a record of changes and helps teams work together on the same project. Document Your Process Keep detailed records of steps and decisions you make Ensure your notes are easy to understand and useful later Collaborate and Seek Feedback Work with others to enhance solutions Get opinions from peers to find new ideas or spot mistakes Continuously Learn and Improve Best Stay updated with new techniques and Practices tools Enhance skills through ongoing learning: Keep learning to get better at solving problems. I: EP D:M Summary Characteristics of Computing Problems: Computing problems vary in complexity, scalability, and specificity, requiring precise definition for effective solutions. Barriers to Problem Solving: Cognitive, technical, environmental, and psychological barriers can impede efficient problem-solving and must be recognized and addressed. Steps to Efficient Problem Solving: A structured approach involving defining, analyzing, planning, implementing, testing, and reviewing ensures effective and efficient problem-solving. Extra Notes Algorithm: Step-by-step set of instructions or rules designed to perform a specific task or solve a particular problem. Solution: A solution to a computing problem involves developing a set of instructions, algorithms, or processes that can be executed by a computer to achieve a desired outcome. Debugging: The process of finding and resolving coding errors or “bugs” in a software program Extra Notes Bugs: An error, fault, or flaw in any computer program or hardware system. Example can refer here: https://shorturl.at/xf1o3

Use Quizgecko on...
Browser
Browser