15 views

Uploaded by Madhur Satija

Don't open this.

- summer project by nidhu
- student learning outcomes
- Top 10 Skills Needed for a Job in Electrical Engineering
- Competence System
- Sample Final Report
- Payroll Specialist Course Syllabus.pdf
- Objective
- Medical Practice
- Articulos Sobre Prospectiva
- learning outcomes
- HR
- Oracle HCM R12.2 New Features
- technology standards kentucky middle school
- 17099989 Polya Model Strategic Problem Solving
- SAP Payroll Schema Components
- Routine
- Sy Csme2430
- Teaching With Love - Logic
- Sr. Customer service/ supervisor/mgmt
- Paper 19

You are on page 1of 57

People make decisions every day to

solve problems that affect their lives

Problems may be as unimportant as

what to watch on television or as

important as choosing a new profession

If a bad decision is made, time and

resources are wasted, so its important

that people know how to make

decisions well

People solve problems daily at home,

or work, or wherever they go.

Problems at home include such things as

what to cook for dinner, which movie to see

this evening, which car to buy, or how to

sell the house.

At work, the problems might involve

dealing with fellow employees, work

policies, management, or customers.

The better the decisions an employee can

make, the more valuable that person will

be to the company.

In each case, the six steps in problem

solving can be followed

There are six steps in problem solving

Step 1 - Identify the problem

Classroom situation - Most problems

have been identified for you and given

to you in the form of written

assignments or problems out of a book.

Outside classroom Need to identify

the problem

Step 2

Understand the problem

- Must

understand what is involved in the

problem before you can continue

toward the solution

If you are setting up a solution for a

person, then you must know what that

person knows.

For example, to tell someone how to

find a restaurant in your city if he has a

limited knowledge of the city you can

only use the information known to him

Step 2

Knowing the knowledge base is very

important since you cannot use any

instructions outside this base

Must also know knowledge base of the

problem solver

Cannot solve a problem if the problem

solver do not know the subject

For example, to solve a problem

involving calculus, you must know

calculus; to solve a problem involving

accounting, you must know accounting.

Step 2

In the case of computer problems,

understanding the problem involves

identifying

Input available for the problem

Output to determined

Process in involved in achieving the output

from the given input

Step 3

problem.

List should be as complete as possible.

Sometimes may need to talk to other people

to find other solutions than those you have

identified.

Alternative solutions must be acceptable ones.

To travel from Mumbai to Chennai Alternative

ways to travel through

Land (Bus, Train, Car)

Air (Flight)

Sea (Ship)

Step 3

But sea seems to be infeasible solution

for this problem

Step 4

Select the best way to solve the

problem from the list of alternative

solutions.

Need to identify and evaluate pros and

cons of each possible solution before

selecting best one.

In order to do this, you need to select

criteria for the evaluation.

These criteria will serve as the

guidelines for evaluating each solution.

Step 5

solve the problem using the selected

solution.

These

numbered,

step-by-step

instructions must fall within the

knowledge base set up in step 2.

No instruction can be used unless the

individual

or

the

machine

can

understand it.

This can be very limiting, especially

when working with computers.

Step 6

Evaluate the solution.

To evaluate or test a solution means to check

its result to see if it is correct, and to see if it

satisfies the needs of the person(s) with the

problem.

When a person needs a piece of furniture to

sleep on, buying her a cot may be a correct

solution, but it may not be very satisfactory.

If

the

result

is

either

incorrect

or

unsatisfactory, then the problem solver must

review the list of instructions to see that they

are correct or start the process all over again.

individuals wish to spend the evening?

2. Understand the problem.

Knowledge base of the participants must

be considered.

Solutions selected are ones that everyone

involved would know how to do.

Probably would not select playing a game

of chess as a possible solution if the

participants did not know how to play

3. Identify alternatives.

Watch television

Invite friends over

Play video games

Go to the movies

Play miniature golf

Go to the amusement park

Go to a friends party.

think of no more alternatives.

4. Select the best way to solve the problem.

Weed

out

alternatives

that

are

not

acceptable, such as those that cost too much

money or do not interest one of the

individuals involved.

Specify the pros and cons of each remaining

alternative.

Weigh the pros and cons to make the final

decision.

This solution will be the best alternative if all

the other steps were completed well.

that will result in a fun evening.

6. Evaluate the solution. Are we having

fun yet? If nobody is having fun, then

the planner needs to review the steps

to have a fun evening to see whether

anything can be changed, if not then

the process must start again.

Types of Problems

Some

problems

have

straightforward

solution and others do not

Some problems, such as balancing a

checkbook or baking a cake, can be solved

with a series of actions

These are algorithmic solutions.

Once the alternatives have been eliminated,

for example, and once one has chosen the

best among several methods of balancing

the checkbook, the solution can be reached

by completing the actions in steps.

These steps are called the algorithm.

Types of Problems

Solutions of other problems, such as how

to buy the best stock or whether to expand

the company, are not so straightforward.

These solutions require reasoning built on

knowledge and experience, and a process

of trial and error.

Solutions that cannot be reached through

a direct set of steps are called heuristic

solutions.

Problem solver can use the six steps for

both algorithmic and heuristic solutions.

Types of Problems

However, in step 6, evaluating the solution,

the correctness and appropriateness of

heuristic solutions are far less certain.

Its easy to tell if your completed checkbook

balance is correct and satisfactory, but its

hard to tell if you have bought the best

stock.

With heuristic solutions, the problem solver

will often need to follow the six steps more

than once, carefully evaluating each possible

solution before deciding which is best.

For each of the following tasks, write a set of

numbered, step-by-step instructions (a

solution) so complete that another person

could perform the task without asking

questions. Define the knowledge base of this

person by listing what you expect the person

to know in order to follow your directions. For

example, for task a (below), make a cup of

cocoa, the knowledge base might include

such things as knowledge of milk or water, a

refrigerator, pan, spoon, cocoa, cup, range

top or microwave, and so forth.

a. Make a cup of cocoa

b. Sharpen a pencil

c. Walk from the classroom to the

student lounge, your dorm, or the

cafeteria

d. Start a car (include directions

regarding what to do if the car doesnt

start)

e. Get a glass of water from your kitchen

f. Start your computer

Problem - puzzle that requires logical thought or

mathematics to solve

Puzzle - could be a set of questions on a

scenario which consists of description of

reality and set of constraints about

scenario

Scenario: VIT Chennai campus has a library.

The librarian issues books only to VIT

employees.

Description of reality : There is a library in VIT

chennai campus and there is a librarian in the

library.

Constraint : Librarian issues books only to VIT

employees

Yes!!! What are the problems in the

Process of Computational

Problem Solving

Computational problem solving does not simply

involve the act of computer programming.

It is a process, with programming being only one

of the steps.

Before a program is written, a design for the

program must be developed.

And before a design can be developed, the

problem to be solved must be well understood.

Once written, the program must be thoroughly

tested

Computer

When it is possible to produce solution of the

problem by a set of step-by-step procedures

or actions

This step-by-step action is called an

algorithm.

The algorithm will process some inputs and

produced output.

Solving problem by computer undergo two

phases:

Phase 1:

Organizing the problem or pre-programming phase.

Phase 2:

Programming phase.

Stuff to look at

Problem Solving Basics and Computer

Programming, by By Ronald A. Pasko

http://www.cs.iit.edu/~cs100/ProblemSolving.

pdf

Problem Description

Given the 3 dimensions of a box (length,

width, and height), multiply them together to

determine the volume

Decompose the problem description

description in 4 steps

Identify all of the nouns in the sentence

width, and height), calculate the volume.

Once these nouns are identified, they should

be grouped into one of two categories:

getting from the user)

the input)

There may be some information in the problem

that we really dont need to solve the problem (that is,

not all of thenouns may be relevant)

Eliminate the most general item

Process

Identify all of the verbs in the sentence

These actions, known as processing are the

Link you inputs, processes, and output

inputs need to be processed to get the desired output

Take our length, width, and height and multiply them, to

PRE-PROGRAMMING PHASE

Analyzing the problem.

Developing the Hierarchy Input

Process Output (HIPO) chart or

Interactivity Chart (IC).

Developing the Input-ProcessOutput (IPO) Chart.

Drawing the Program flowcharts.

Writing the algorithms.

Identify the following:

Data requirement

Processing requirement or

procedures that will be needed to

solve the problem

The output

Calculate the salary of an employee who works

by hourly basis, formula to be used is Salary =

Hour works * Pay rate

Data

Hours work,

Pay rate

Processing

Salary =

Hours work *

payrate

Output

Salary

Solution

Alternatives

1. Define the

hours worked

and pay rate

as constants.

2. Define the

hours worked

and pay rate

as input

values.

PAC

to

Convert

Miles

to

Kms

Convert the distance in miles to

kilometers where 1.609 kilometers per

mile.

Data

Distance in

miles

Processing

Output

Solution

Alternatives

Kilometers =

1.609 x miles

Distance in

kilometers

1. Define the

miles as

constants.

2. Define the

miles as

input values.

Logic

Definition : A method of human thought

that involves thinking in a linear, step by

step manner about how a problem can be

solved

Logic is a language for reasoning. It is a

collection of rules we use when doing reasoning.

Example

John's mum has four children.

The first child is called April.

The second May.

The third June.

What is the name of the fourth child?

primeProcess

or not? Outp Solution Alternatives

Data

ing

Numbe Check if

r, N

there is

a factor

for N

ut

Print

Prime

or Not

Prime

2 to N and if for all the

division

operations,

the

reminder is non zero, the

number is prime otherwise it

is not prime

2. Same as 1 but divide the N

from 2 to N/2

3. Same as Logic 1 but divide

N from 2 to square root of N

player has to give a number 'N' of his choice. If N is

lesser than M then he is out of game and doesn't gain

any points. Otherwise he has to place all coins in the

MXM grid in the NXN grid and he gains points equal to

the number of free cells in the N X N grid.

Data

Process Outp Solution Alternatives

ing

ut

Numbe If N is

Numb 1. Compute N2 - M2 as NXN

rs

M less than er of MXM

and N M

points

Points = gaine 2. Compute (N + M) X (N M)

d

0

(Number of multiplication is

Otherwis

reduced)

e

Comput

Problem Description

Write a problem analysis chart (PAC)

that asks a user to enter the distance

of a trip in miles, the miles per gallon

estimate for the users car, and the

average cost of a gallon of gas.

Calculate and display the number of

gallons of gas needed and the

estimated cost of the trip.

Data

Processing

Output

distance,

miles per

gallon,

cost per

gallon

gas needed =

distance / miles

per gallon.

Display gas

needed

estimated cost =

cost per gallon x

gas needed

Display

estimated cost

(HIPO) or Interactivity Chart

Developed when the problem is normally

big and complex

Processing can be divided into subtasks

called modules

These modules are connected to each

other to show the interaction of processing

between the modules

Main/control module controls the flow all

other modules.

The IC is developed using top-downmethod: top to down left to right order

HIPO

Interaction will form a hierarchy,

called Hierarchy Input Process Output

Chart (HIPO) or Interactivity Chart

(IC).

Main

Module

Module 1

Module 4

Module 2

Module 3

Module 5

Module 6

PAYROLL

READ

CALCULA

TE

You are required to write a program

to calculate both the gross pay and

the net pay of every employee of

your company. To determine the

gross pay, you have to multiply the

accumulated total hours worked by

the employee, by the appropriate

pay rate. The program should print

the cheque that tells the total net

pay. The net pay is calculated by

subtracting the gross pay with any

deductions that may be incurred by

Problem

Payroll

Calculate

Gross Pay

Accumulate

Hourly

Worked

Determine

Pay rate

Calculate

Net Pay

Calculate

Deduction

s

Write

Cheque

Write a PAC and Hierarchy Input

Process Output (HIPO) that asks a

user to enter the distance of a trip in

miles, the miles per gallon estimate

for the users car, and the average

cost of a gallon of gas. Calculate and

display the number of gallons of gas

needed and the estimated cost of the

trip.

Problem

Input

- Distance in

miles

- Miles per

gallon

- Cost gas per

gallon

Processing

- Enter distance

- Enter miles per gallon

- Calculate total gas

needed

- Enter cost gas per gallon

- Calculate estimated cost

- Display total gas and

estimated cost

- End

Output

-Total gas

needed

- Estimated

cost

Calculate gas

Estimation

Determine whether a given number is

prime or not?

Input Data

Processing

Output

Number, N

a factor for N

Prime

Solution Alternatives

1. Divide N by numbers from 2 to N and if for

all the division operations, the reminder is non

zero, the number is prime otherwise it is not

prime

2. Same as 1 but divide the N from 2 to N/2

3. Same as Logic 1 but divide N from 2 to

square root of N

Flow Chart

Implementation

n = int(input())

x = n // 2

# For some y > 1

counter = 2

while counter <= x:

if n % counter == 0:

#

Remainder

print(The given number

is Composite)

break # Skip else

counter += 1

else:

# Normal exit

print(The given number is prime')

Debugging

Correct Syntactical / logical errors

Testing

Generate Test cases with boundary

conditions:

A prime number Eg: 19

A composite number Eg: 24

Boundary Conditions: 0,1, 2.3

For 1 Print the number is neither prime nor

composite

For 0 Invalid input

For 2.3 Invalid input

- summer project by nidhuUploaded bynidhuv
- student learning outcomesUploaded byapi-251731925
- Top 10 Skills Needed for a Job in Electrical EngineeringUploaded byAbrar Ul Haq
- Competence SystemUploaded byJoris Schut
- Sample Final ReportUploaded bySidhu Sidhartha Rai
- Payroll Specialist Course Syllabus.pdfUploaded byAudrey R.M
- ObjectiveUploaded byHanis Izzati
- Medical PracticeUploaded byoggok
- Articulos Sobre ProspectivaUploaded bymeylinschi
- learning outcomesUploaded byapi-238079916
- HRUploaded bysreekumar
- Oracle HCM R12.2 New FeaturesUploaded byAhmed Abozead
- technology standards kentucky middle schoolUploaded byapi-269832253
- 17099989 Polya Model Strategic Problem SolvingUploaded byprincess hepsi
- SAP Payroll Schema ComponentsUploaded byraghu_jntu
- RoutineUploaded byYingYing Khor
- Sy Csme2430Uploaded byJing Cruz
- Teaching With Love - LogicUploaded byرجل المستحيل
- Sr. Customer service/ supervisor/mgmtUploaded byapi-77177246
- Paper 19Uploaded byHabtamu Asmare
- Module 2 1 Flow ChaRTUploaded bySam
- Com 101 Exam 2 Study GuideUploaded byHajmola123
- Strategic Problem SolvingUploaded byfahriza123
- scn 494 lesson plan finalUploaded byapi-243045561
- 2.9 App and in App Cal and ComUploaded byschuu lela
- march 2 - 5 6thUploaded byapi-389591300
- HADLEY FINANCE REPORT.pdfUploaded byNewspapers of New England
- Interview SkillsUploaded byɃasicÑérmina
- Marxan_User_Manual_2008.pdfUploaded byYayuramdhani
- Gagne.docxUploaded byVeronica Vella

- Gang of Four Design Patterns 2.0Uploaded byRajesh Kumar Rolen
- Features of Quality AssuranceUploaded byikram7550
- Norikkon APay Suite 2009 w Esker OCR_ScanUploaded byjmcn6410
- Design, Simulation and Fabrication of a Microstrip Bandpass FilterUploaded byATS
- NTMF01Uploaded byganistrum
- [Heat Transfer] Chapter 7Uploaded byAtheer Mech
- RPM 1.2 ManualUploaded bymaanalmu
- Fls 1245Uploaded byJe Mohamad
- Online Professional IdentityUploaded byDamaris Bravo
- iso_5211Uploaded byfabiosouza2010
- XINJE-XCPLCV2.51Uploaded byTran Le
- Chemistry and engineering of cement production. State of the art. Sorretino..pdfUploaded byrmarin_90
- A Bitemporal SQL ExtensionUploaded byIDES
- Una Revision Sobre El Papel Del Empaque en El Aseguramiento de Un Sistema Alimentario Agregando Valor a Los Productos Alimenticios y Reduciendo Perdidas y DesperdiciosUploaded byAnonymous C06P6LXh9
- Assignment 1 (Magen)Uploaded byK.Magenthran (UTHM)
- 1-s2.0-S0263786316300631-main.pdfUploaded bysahilkaushik
- AI Combat-Inspiration and State of the ArtUploaded byAmanda Johnson
- index.pdfUploaded byrosita devi anggraini
- Atm1602b Display LcdUploaded byGuillermo Bloem
- Air Pressure and the Building EnvelopeUploaded byjackleesj
- UK--Chinese Espionage a Voracious ProblemUploaded byRepentChristian
- hp54200a_54200d_54201a_54201dUploaded byZoran
- Wartsila Scrubber Retrofit PresentationUploaded byjohn9999_502754
- Modeling and Simulation of Polymerization of Lactide to PolylacticUploaded bykeyur1109
- Deloitte_Establishing the Investment CaseUploaded byjhgkuugs
- resume tiffany sollisUploaded byapi-224484023
- Cisco Wlan Design GuideUploaded bysujan00
- dbms1Uploaded byEisha Jain
- spraar7f.pdfUploaded bysharp530jj
- 2009 Mercedes Benz ManualUploaded bysriramkaa