You are on page 1of 35

Problem Solving

Module 3: Learning Objectives 1 - 2


Problem Solving
Learning Objective 1
Problem Solving

• The core of computer science is problem solving

• Programmers must first understand how humans solve problems,


then translate this "algorithm" into something a computer can do,
and finally "write" the specific syntax (required by a computer) to
get the job done

• It is not uncommon for a machine to solve a problem in a


completely different way than a human
Problem Solving

Computer programmers are problem solvers. To solve a problem on


a computer, you must first:

• Understand how to represent the information (data) that


describes the problem

• Identify the steps required to convert information from one


representation to another
Information Representation

• At its core, a computer is actually not smart at all

• It can only understand a few things: numbers, characters,


booleans, and lists of these items aka arrays

• Everything else must be "approximated" by these data type


combinations
Information Representation

• A good programmer will encode all of the facts required to


represent a problem in variables

• In addition, there are good ways and bad ways to encode data

• Good methods make it simple for the computer to compute new


information
Algorithms

• An algorithm is a well-defined set of instructions to be followed in


a problem-solving scenario

• The ability to define the steps required to achieve a goal is at the


heart of what good programmers do

• Unfortunately, a computer only understands a very limited set of


possible steps
Encapsulation

• Encapsulation is the process of expressing or showing the most important


facts about something

• The idea behind encapsulation is to store the information necessary to a


particular idea in a set of variables associated with a single "object"

• We then create functions to manipulate this object, regardless of what the


actual data is. From that point on, we treat the idea from a "high level"
rather than worry about all the parts (data) and actions (functions)
necessary to represent the object in a computer
Abstraction

• Abstraction is the concept of "ignoring the details"

• A forest, for example, is a hugely complicated ecosystem that has


trees, animals, water routes, and so on

• However, to a computer scientist (and to the average person), it is


just "a forest"
Complex Hiding

• The concept of complexity concealment is the belief that most of


the time, details are unimportant

• A simple notion like drawing a square on the screen in a computer


program requires hundreds (if not thousands) of (low level)
computer instructions
Complex Hiding

• Again, a person couldn't possibly design fascinating programs if


every time they wanted to do something, they had to re-write
(properly) every single one of those instructions

• We make programming tractable by "encapsulating" what "draw


square" means and "reusing" this action again and over
The Problem-Solving Process
Learning Objective 2
Understanding the Problem

• Problem solving is a step-by-step process that always proceeds in a


linear and logical manner

• To create a successful solution to a problem, you first need to


understand the problem

• The first step in improving one's problem-solving abilities is to


become aware of the way we solve problems
Step 1 - Problem Definition

• Your problem definition transforms your topic to the level of a


scientific problem, which you will investigate and analyze

• The goal of writing a definition is to ensure the accuracy and


clarity of a project's scope

• This stage of development requires more than a one-sentence


explanation of a subject

• It involves determining its features, limitations, and applications


Step 1 – Problem Definition

• At this stage you should make a list of resources – people, books,


websites etc. that have information about the problem you are
trying to solve

• These resources should be used to clarify unfamiliar terms or


concepts and what you understand the problem to be

• At this point, you are looking for symptoms and evidence that a
problem exists
Step 1 – Problem Definition

Your problem definition should include a statement of purpose and


associated goals and should include the following characteristics:

• A well-defined topic:
• Limited enough in scope for you to complete within the school year

• Involves a scientific application

• Lends itself to visualization of results

• Makes good use of computing resources


Step 1 – Problem Definition

Your problem definition should include a statement of purpose and


associated goals and should include the following characteristics:

• A specific direction:
• Establishes an investigative tone

• Determines stages of development


Step 1 – Problem Definition

To define the problem, you should:


• Write a brief, factual statement of the existing problem or issue

• Set specific goals

• Check that these are understood and agreed by all involved

• Check that the problem is worth solving

• NEVER include implied solutions in the problem statement


Step 2 – Problem Analysis

• Following the discussion of the evidence for the presence of the problem
and the definition of the problem, you may now shift your focus to more
extensively evaluating the evidence, seeking for significant facts that
may explain why the problem occurs

• This phase in the approach involves examining the data you've gathered
as well as the sources from which it came
Step 2 – Problem Analysis

In this stage you should:


• Keep asking “Why?”

• Do a lot of investigating

• Use a systematic approach: E.g., ‘The 5 Whys’ / ‘Root Cause Analysis’

• Use a diagram to structure information: Cause & Effect chart / Fishbone


Diagram / Flowchart
Step 3 – Identifying Possible Solutions

• Once you understand a problem, you can develop an appropriate


solution

• Develop possible solutions for each root cause: e.g., by brainstorming,


then narrowing down to a few promising ones
Step 3 – Identifying Possible Solutions

Creating Alternative Solutions:

• Jumping from issue characterization to a single solution narrows your options and
denies you the opportunity to weigh the benefits and drawbacks of numerous solutions

• Of course, having too many options might make it difficult to choose the optimal choice

• Alternative solutions may be derived from previous experience, advice from others,
modeling of company operations models, and your own
Step 3 – Identifying Possible Solutions

Evaluating Alternative Solutions:

• The presented alternatives must be assessed in order to discover the optimal option

• The purpose of evaluation is to determine how effectively each alternative solution


assists the company and its selected subsystems in meeting their goals
Step 3 – Identifying Possible Solutions

Evaluating Alternative Solutions:

• Evaluation Criteria - should reflect the firm's objectives and constraints.


Two alternative solutions exist:

✓ Each alternative needs to be evaluated upon how well it meets the


evaluation criteria

✓ Criteria may be weighted on their relative importance in achieving


firm goals and objectives
Step 3 – Identifying Possible Solutions

Evaluating Alternative Solutions:

• Cost Benefit Analysis - Every legitimate solution will have some advantages or benefits,
and some disadvantages or costs. This process identifies the benefits and costs associated
with each alternative solution

➢ Tangible Costs - Quantified Costs:


✓ Customer goodwill

✓ Employee morale caused by system errors

✓ Installation/conversion problems
Step 3 – Identifying Possible Solutions

Evaluating Alternative Solutions:

• Cost Benefit Analysis - Every legitimate solution will have some advantages or benefits,
and some disadvantages or costs. This process identifies the benefits and costs associated
with each alternative solution

➢ Intangible Costs – Difficult to Quantify:


✓ Hardware

✓ Software

✓ Salaries
Step 3 – Identifying Possible Solutions

Evaluating Alternative Solutions:

• Cost Benefit Analysis - Every legitimate solution will have some advantages or benefits,
and some disadvantages or costs. This process identifies the benefits and costs associated
with each alternative solution

➢ Tangible Benefits – Favorable Results Attained by the Firm:


✓ Decrease in payroll

✓ Decrease in inventory carry


Step 3 – Identifying Possible Solutions

Evaluating Alternative Solutions:

• Cost Benefit Analysis - Every legitimate solution will have some advantages or benefits,
and some disadvantages or costs. This process identifies the benefits and costs associated
with each alternative solution

➢ Intangible Benefits – Hard To Estimate:


✓ Customer service

✓ Better delivery of customer request(s)


Step 4 – Selecting the Best Solution

• After all possible options have been reviewed, they may be compared,
and the "best" (most desired) solution chosen

• This decision is not usually an easy procedure because the solutions are
assessed based on numerous factors (some of which may be intangible)

• After you've developed a foundation for analyzing solutions, start


brainstorming ideas
Step 4 – Selecting the Best Solution

• Create a realistic range of ideas from the list of alternatives that emerge
from your brainstorming session and choose the one that best matches
your needs based on your assessment criteria.

• Evaluate each solution against the criteria:


✓ Will it prevent recurrence?
✓ Does it avoid creating new problems?
✓ Is it within our control?
✓ Does it meet our goals?
Step 5 – Implementation and Review

• After deciding on a solution, it must be put into action. A strategy for


implementation may be required

• To supervise the implementation of major projects, a project


management effort may be necessary

• An implementation plan often defines the actions, resources, and timing


required for proper implementation
Step 5 – Implementation and Review

This implementation plan might include:


• Types and sources of hardware and software

• Construction of physical facilities

• Hiring and training of personnel

• Start-up and operating procedures

• Conversion procedures and timetables


Step 5 – Implementation and Review

During implementation, you should:


• Eliminate solutions not meeting the criteria

• Choose between remaining solutions by cost, convenience, ease of


implementation, etc.

• Develop an Action Plan

• Implement and Evaluate


Step 5 – Implementation and Review

After successful implementation, a review should be done to find out if:


• The problem was defined correctly.

• You have jumped to a solution before analyzing the problem

• You have involved the people who know most about the problem

• You have had an open mind to the problem

• You were using the wrong criteria for choosing a solution


Objectives 1 – 2 Complete!
Source: http://www.cs.utah.edu/~germain/PPS/Topics/problem_solving.html

You might also like