0% found this document useful (0 votes)
21 views

Chapter 5 Introduction Problem Solving Part-1

The document discusses problem solving and decomposition. It defines a problem and notes that computers are often used to solve problems through programming. It outlines the typical problem solving cycle of analyzing a problem, developing an algorithm, coding a solution, and testing/debugging. Decomposition is introduced as breaking down large problems into smaller subproblems to better understand them. As an example, creating a mobile app is decomposed into questions about its type, audience, interface, graphics, platform, navigation, services, and testing.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Chapter 5 Introduction Problem Solving Part-1

The document discusses problem solving and decomposition. It defines a problem and notes that computers are often used to solve problems through programming. It outlines the typical problem solving cycle of analyzing a problem, developing an algorithm, coding a solution, and testing/debugging. Decomposition is introduced as breaking down large problems into smaller subproblems to better understand them. As an example, creating a mobile app is decomposed into questions about its type, audience, interface, graphics, platform, navigation, services, and testing.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

chapter-5

Introduction to problem
solving
What is problem

Problems are at the center of what many people do at work every day.
A matter or situation regarded as unwelcome / harmful and need to be
dealt with overcome is known asproblem.

Computer / Microprocessor is the main device nowadays for finding the


solution of a problem ,because of it’s speed and the way it can deal with
data.
Generally problems are solved using some sort of program/software using
any computer programming language.
INTRODUCTION
• Quote by Steve Jobs--”
Everyone in this country should learn to program a computer because it teaches
you to think.

This quote itself is proof enough to say that in order to program a solution for a
problem.
• In this chapter you will learn about problem solving i.e., analysing a problem.
Designing algorithms using tools like flow charts and pseudocode and problem
solving using decomposition.
Problem solving cycle
 Programs are not quick creations. In order to create efficient and effective
programs, you should adopt a proper problem solving methodology and use
appropriate techniques.
 In fact, problem solving methods follow a cycle. The problem solving cycle. In
the coming lines we are going to discuss the same.

Broadly, problem solving requires 4 main steps.

1. Identify and analyse the problem.


2. Find it's a solution and develop algorithm of the problem.
3. Code the solution in a programming language.
4. Test and debug decoded solution and finally implement and maintain it.
Steps in problem solving cycle

4.
Performing 1. Analyse
testing and the problem
debugging

2. Find
3. Coding solution and
the solution develop
algorithm
• Each step contains the many sub steps.
• Let us talk about the sub-steps in order to understand the problem
solving cycle.
• The aim of the problem solving cycle is to create a working
program for the solution.

• The sub steps of the problem solving cycle to create a working


program are..
• Understanding the problem well Understand the problem minutely
Analyze the • Analyze the problem Identify the processing components and relationships
problem

• Think of possible solutions Think of different ideas for solutions


• Follow modular approach while designing most appropriate solution Check your ideas for aptness
Developing
• Identify operations for solution Break down solution into simple steps
the algorithm Identify min no of inputs, ALU operations

• Code program using appropriate control structures Use appropriate control structures(conditional or looping)
Coding
Think in terms of Speed, performance and effectiveness

• Test and debug your problem Process of finding errors in a program and correcting
Testing and • Complete your documentation
debugging

• Implement your code The real users can use your programs
Implement • Maintain your program Keep the program up-to-date as govt regulations or
and Maintain company policies change
PROBLEM SOLVING USING DECOMPOSITION
 The process of breaking down a big or complex problem into a set of smaller sub
processes in order to understand a problem or situation better is known as
decomposition.
Decomposition involves
 Dividing a task into sequence of sub tasks.
 Identifying elements or parts of a complex system.

Big problem
Break down into smaller, logical parts

Part 1 of problem Part 2 of problem

Further Break down into smaller,


logical parts
Sub Sub Sub Sub
problem 1 problem 2 problem 3 problem 4
DECOMPOSE THE TASK OF CREATING MOBILE APP
 To decompose the task of creating a mobile app, we would need to know the answers to a series
of smaller problems:
 What kind of app is to be created?
 Who the target audience for the app is?
 What the user interface of the app will be?
 What the apps graphics will look like?
 What audio will be included?
 What software platform will be used to build the app?
 How the user will navigate the app?
 What additional services will be required for the app?
 How the app will be tested?

You might also like