Lecture 01 To 07 Introduction - To - PSAT
Lecture 01 To 07 Introduction - To - PSAT
Lecture 01 To 07 Introduction - To - PSAT
Computing
19CSE100
Problem Solving and Algorithmic
Thinking
L-T-P-C
LECTURES TUTORIALS
PRACTICALS CREDITS
2
Course Objective
4
Syllabus – Unit II
6
Text Books
7
Course Outcomes (Cos)
8
Do we have lab for PSAT?
Yes
Tools Used: Flowgramming
Flowgorithm
Evaluation
65 marks from
Continuous Assessments
35 marks from
End Semester Examination
11
Assessment Pattern
Assessment Component Marks
Internal Assessment (50 Marks)
Lab Evaluation
Project
20
Continuous Assessment (2 x 10 marks)
(Lab) Evaluation on a Coding Platform
10
(10 marks)
Periodical 1 & 2
Periodical 20
(10 marks + 10 marks)
External Assessment (50 Marks)
Paper-pen
Lab - oriented Exam
End Semester 35
(35 marks)
Total 100
12
Problem Solving
What is Problem Solving?
14
Problem solving consists of
“ moving from a given initial
situation to a desired goal
What Can I do
to move from
Initial A to B? Desired
Situation (A) Goal (B)
15
Problem solving is the
“ application of idea, skills, or
factual information to achieve
the solution to a problem or to
reach a desired outcome
16
A Framework for Problem Solving
Looking Back
17
What is Problem?
a proposition in mathematics or
a question raised for inquiry,
physics stating something to be
consideration, or solution
done
18
Types of Problems
Well-Defined Poorly-Defined
Problems Problems
19
Types of Problems
Routine Poorly-Defined
Problems Problems
20
Activity Time – Design Challenge 1
▪ Design a one button remote for television
21
Questions that come into your mind
▪ What is the purpose of the Remote?
▪ What are the basics operations to be included?
▪ Who are the users?
▪ Nature of button
▪ Functionalities of button
▪ What is the shape / Dimensions ?
▪ How it is connected to device?
22
“ Problem Statement
A problem statement is a
concise description of the
problem or issues that
someone/something seeks
to address
23
The key elements of a problem statement
Ideal Reality
Situation
Consequences Proposals
24
Problem Statement: One Button Remote
25
Activity Time – Design Challenge 2
▪ Design an ATM interface for kids
26
Questions for Kid’s ATM
27
From Kids’ Perspective - Why ATM for Kids?
28
From Parents’ Perspective - Why ATM for Kids?
29
The necessary constraints
30
“
The Fundamental Requirements
▪ The ATM machine needs to be adjustable
▪ If we don’t ask for debit cards, there must
be another way to identify the user
▪ The ability to deposit change
▪ A limit on the amount that can be
withdrawn
▪ A prompt to ask what the money is for
31
32
PROTOTYPING
33
PROTOTYPING
34
PROTOTYPING
35
PROTOTYPING
36
PROTOTYPING
37
PROTOTYPING
38
PROTOTYPING
39
PROTOTYPING
40
PROTOTYPING
41
PROTOTYPING
42
PROTOTYPING
Constraints not cosidered here
43
Constraints not cosidered here
44
Activity time – Peculiar Problem 1
Car allergic to Vanilla Ice cream
▪ Strange complaint @ Pontiac Division of General Motors
▪ “My car won't start after I buy a Vanilla Ice cream” – The complaint
45
Activity time – Peculiar Problem 2
Increasing ice cream sales causes more shark attacks
▪ Do sharks like to eat people that are full of ice cream?
▪ Confounding Variable: Temperature
46
Activity time – Peculiar Problem 3
Diaper-beer Syndrome
▪ Wal-Mart, the world’s largest retailer, supposedly found out that
there are certain times at which beer and diapers sell particularly
well together
▪ Based on working men who had been asked to pick up diapers on
their way home from work
47
“ Not all correlations are
causations…!
48
Takeaway assignment - Desert Survival
Your flight crashed in a desert and the
below 10 items were saved before the
flight caught fire. Prioritize them and
explain your priority list
49
Time to recall
▪ Problem
▪ A doubtful or difficult matter requiring a solution
▪ Something hard to understand or accomplish or deal
with
50
Reflections
51
Reflections
52
Problem Identification
54
Problem Idetification
55
“ Searching for a solution
• Taste & Style?
• Allergies?
•
•
She likes chocolate and fruit.
Nuts
• None
• Health issues?
• A simple “Happy Birthday” with simple
• Presentation?
decorations, flowers and a base. No candles.
• Party context?
• Indoor - 15 members
• Budget? • $ 800
56
Problem Identification - Iteration
57
Problem Understanding
58
4th May I NEED A CAKE FOR MY Budget: $ 800
GRANDMOTHER’S BIRTHDAY
PARTY
63
Budget: $ 800
Moving to a solution
“I need a cake for my grandmother’s birthday party.”
Finished Cake
Cake Algorithm
3rd May
65
Can a computer Do I need to break down
help solve my my problem into smaller
Problem Problem
Identification Decomposition
66
Problem identification
▪ Topic: What is the big problem you are trying to solve? Can you
state this in a problem statement? Is the problem statement too
broad or vague?
▪ Data: What information or data do you have to contribute to a
problem solving approach? What other information or data might
you need?
▪ Feasibility: Can you solve the problem given what you know ?Is this
problem solvable with a computer?
67
Problem identification
▪ Have we identified a problem that is “solvable” with a computer?
Believe it or not, some problems can’t be necessarily solved with
computers!
▪ How can we know when a problem is a good candidate for using a
computer to generate a solution?
▪ How might we incorporate different kinds to solve this type of
problem?
68
Abstraction
▪ Can we identify non - essential aspects of our problem that we can
ignore?
▪ This involves filtering out, or ignoring aspects of the problem or
any patterns you might have identified in order to concentrate on
the necessary aspects of the problem or potential solution
▪ Think about…
▪ Asking whether some parts of the problem less relevant to a
successful outcome? Are any extraneous?
69
Decomposition
▪ You have a problem statement… Can we break our big problem
down into smaller sub - problems that are more straightforward to
solve?
▪ If the problem statement is too big, it is difficult to see how you can go
about developing a conceptual solution
▪ Solving the sub-problems can then help you arrive at a solution for
your original problem statement
70
Pattern recognition
▪ Can we see familiar patterns or characteristics that can lead us to
potential solutions?
▪ Finding the similarities or patterns among the smaller, decomposed
problems that can help us solve these problems more efficiently
▪ Think about…
▪ Have you seen solutions to similar problems previously that we can use
here?
▪ How is this problem the same or different from other problems you have
identified or addressed?
71
Activity Time – Spit-Not-Fop Game
▪ Rules
▪ Write down the words:
▪ SPIT, NOT, SO, AS, IF, IN, PAN, FAT, FOP
▪ The game is played as follows:
▪ The first player chooses a word that is on the list, crosses it out and
writes it in front of them
▪ The second player then does the same thing with a word not crossed out
▪ The players take turns to do this until one person wins
The winner is the first player to hold three words
72
containing the same letter.
Did you find any winning
“ strategy?
73
Do you know a game that resembles
“ this?
74
Appropriate problem
“ representation or transformation
to convert it to a problem whose
solutions are well known.
75
“ Locked-in Syndrome
▪ It leaves you with all your mental abilities
intact, but totally paralyzed except
perhaps for the blink of an eye
77
Can a computer scientist help
someone who suffered a
locked-in syndrome?
Jean Dominique Bauby
79
The diving bell and the butterfly
200,000 blinks
2 months
3 hours/day
80
Designing a way of communication for Bauby
81
A simple way
82
Helper can speak
83
Beyond alphabets
84
Helper can Think too!!!
85
Helper Can Speak!!! – How fast is this?
Best/Worst/Average cases
86
Can we reduce the number of questions?
87
Let’s play a game
88
Winning at 20 questions
89
5 Questions
92
Looking for Patterns
93
Looking for Patterns
94
Searching problem
95
Activity Time
96
Best Solution
▪ Move piece in square 2 to square 3
▪ Jump piece in square 4 to square 2
▪ Move piece in square 5 to square 4
▪ Jump piece in square 3 to square 5
▪ Jump piece in square 1 to square 3
▪ Move piece in square 0 to square 1
▪ Jump piece in square 2 to square 0
▪ Jump piece in square 4 to square 2
97
Best Solution contd.
▪ Jump piece in square 6 to square 4
▪ Move piece in square 5 to square 6
▪ Jump piece in square 3 to square 5
▪ Jump piece in square 1 to square 3
▪ Move piece in square 2 to square 1
▪ Jump piece in square 4 to square 2
▪ Move piece in square 3 to square 4
98