0% found this document useful (0 votes)
17 views6 pages

COS102 Module3

This document outlines problem-solving techniques, emphasizing a structured process that includes identifying, analyzing, designing, implementing, and evaluating solutions. It discusses various techniques such as simplification, creative, testing, structural, and analytical methods, as well as the importance of algorithms and heuristics in problem-solving. Additionally, it highlights the role of program design tools in planning and organizing solutions before coding to enhance clarity and reduce errors.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

COS102 Module3

This document outlines problem-solving techniques, emphasizing a structured process that includes identifying, analyzing, designing, implementing, and evaluating solutions. It discusses various techniques such as simplification, creative, testing, structural, and analytical methods, as well as the importance of algorithms and heuristics in problem-solving. Additionally, it highlights the role of program design tools in planning and organizing solutions before coding to enhance clarity and reduce errors.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

COS 102 — Module 3

Problem Solving Techniques


Date: 17/3/2026

Recap (from Module 2)


• Requirements define system expectations
• Constraints limit design choices
• Proper analysis leads to better algorithms

What is a Problem-Solving Process?


Problem-solving techniques are:
• Structured ways of thinking
• Methods used to find solutions
• Tools that guide how we approach problems

Different problems require different techniques.

Five Steps in Problem Solving


1. Identify
2. Analyse
3. Design
4. Implement
5. Evaluate

Types of Techniques
• Simplification
• Creative
• Testing
• Structural
• Analytical

Overview of Problem-Solving Techniques

1. Simplification Techniques
* Abstraction
* Reduction

2. Idea-Generation Techniques / Creative Techniques


* Brainstorming
* Morphological Analysis
* Focal Object

3. Testing Techniques
• Trial and Error (it is random)
• Hypothesis Testing (it is logical and informed testing)

4. Structural Techniques
• Divide and Conquer
• Means-End Analysis

5. Analytical Techniques
• Root Cause Analysis (your goal is to find the actual cause, not the symptom)
• Research (use existing knowledge instead of starting from scratch)
• Proof (goal is to logically verify that the solution is correct)

Choosing Techniques
No single method works for all problems. The important thing is to know when to use one, and
always go for the simplest technique.

What is an Algorithm?
• Step-by-step instructions
• Used to solve a problem
• It is a finite step-by-step procedure to solve a particular problem.

Input → Algorithm (set of steps to accomplish a task or solve a problem) → Output

Characteristics of Algorithms
1. Finite
2. Clear
3. Effective
4. Produces output
5. A standard algorithm must have an input
6. It must be definite — it must be clear and have unambiguous steps

Why Do Algorithms Matter?


1. Provides a clear solution structure
2. Reduces errors
3. Improves efficiency
4. Enables programming
5. It allows computers to execute tasks
6. Without an algorithm, programmes become guesswork and the system becomes
unreliable

Example of an Algorithm
Find maximum number in a list:
1. Set first number as Max
2. Compare with next number
3. If larger → Update Max
4. Repeat until end
5. Output Max

What is a Heuristic?
Heuristics are like shortcuts or smart guesses that give solutions. It is a problem-solving
approach that finds a good solution quickly even if it is not the perfect or optimal solution. We use
it when problems are too complex or too large and an exact solution will take too long.

Methods:
• Approximate method
• Fast but not perfect

It is commonly used in AI and machine learning systems. They are used when speed is
important because they provide approximate solutions.

Algorithm vs Heuristic
Algorithm Heuristic

1. Exact and always correct Approximate


2. Always correct (if designed well) Usually correct
3. May be slow Faster
Solvable and Unsolvable Problems
Some problems:
• Can be solved with algorithms (solvable)
• Cannot be solved efficiently or at all (unsolvable)

Solvable Problems — Problems for which an algorithm can be designed to search for a value
(e.g., sorting problems, calculating averages) and can be executed using finite terms.

Unsolvable Problems — These are problems which algorithms cannot provide solutions for all
cases, e.g., the Halting Problem. Some problems are so tricky and can be seen as undecidable
problems. Not every problem is solvable.

Program Design Tools


Program design tools are methods used to:
• Plan solutions clearly
• Represent logic before coding

They act as a bridge between:


• The problem
• The final program

Why Do We Need Them?


Without design tools, programming becomes:
• Confusing
• Error prone
• Difficult to manage

Design Tools Help To:


• Organize ideas
• Visualize logic
• Communicate solutions
• Detect errors early
• Make coding easier

Where do they fit? — Problem-Solving Process:


Problem → Algorithm → Design Tool → Code
(Design tools come after algorithms but before coding)

Types of Program Design Tools


Common tools include:
• Flow Charts — Visual display of the algorithm, using diagrams
• Pseudo Code — Textual representation of algorithm, usually text-based
• Hierarchy Charts
• Decision Tables
• Decision Trees
Each tool helps in a different way.

Flow Charts
• Visual diagrams using symbols and arrows
• Shows step-by-step flow of logic
Best for: Understanding and explaining processes visually.

Pseudo Code
• Written in simple, English-like steps
• Looks like code but is not programming

Best for: Structuring logic before coding.

Hierarchy Charts (Structure Charts)


• Shows how a program is broken into parts
• Represents structure like a tree
Best for: Organizing large systems.

Other Problem-Solving Tools


As problems become complex, we also use:
• Decision Tables
• Decision Trees
• Other Analytical Tools
These help with complex decision-making.

Decision Tables
• Uses rows and columns
• Shows conditions and actions
Useful when: There are many conditions to consider.
Decision Trees
• Tree-like diagrams
• Shows choices and possible outcomes
Useful for: Analyzing different decision paths.

Summary
• Program design tools help plan before coding
• They connect algorithms to programs
• They improve clarity and reduce errors

You might also like