Week1(1) problem solving concept
-
Upload
nur-afny-andryani -
Category
Documents
-
view
1.176 -
download
6
description
Transcript of Week1(1) problem solving concept
Algorithm& Problem Solving(CS 110)
Week1.1_Problem Solving Concept
Nur Afny C. Andryani SSi (Applied Math) MSc (AI-Soft Computing)
[email protected] [email protected]
www.istb.ac.id
I have some questions
• In a class of 25 students, 17 lived with both parents, 21 lived with their mothers, and 20 lived
with their fathers. How many lived with neither parent?
• How many forty passenger buses are needed for a school field trip, if 156 students and five
teachers will be going on the field trip? (They need to be legal for liability.)
• A grocery store is having a special on cans of soup which is normally price at 45¢ per can.
The advertisement reads 3 for $1.00. You buy only one can of soup. How much does it cost?
What is a problem?
• Problem can generally be defined as an obstacle, that remains perplexing until solved.
• Problem is the gap between the present situation into the more desirable situation
Type of Problems
• Problem with Algorithmic solution, Some Problems have straightforward solution.
These kind of problem needs series of action to get the solution. The best series
of action can be produced from trial and error.
Ex: How to bake a cake, How to ride a car, etc
• Problem with Heuristics solution, Not all problems have straightforward solution.
Some of them need reasoning solution before taking decision. These solution
require reasoning built on knowledge and experience and a process of trial and
error
Ex: How to decide which company as your targeted M&A
How to buy the best stock, etc
Reactions to a Problem
1. Problem exists, but the individual is not cognizant of it.
2. Problem exists and the individual is aware of it, however
lacks the motivation to solve it.
3. The individual is aware of the problem, however does not
know how to solve it or is in the process of solving it, and
perhaps shows distress.
4. The individual has solved the problem and shows
satisfaction.
Arrangement problems
• Rearrange the letters to make words
Solution
• Requires recognition and transformation to solve the
problem
Arrangement problems
• How would you arrange six matches to form four equilateral
triangles?
Solution
• Use trial & error to find the solution
Solution to Problems
1.Initial State: Describes the situation at the beginning of the
problem.
2.Obstacles: Describes the restrictions that make it difficult to
reach the goal state.
3.Goal State: Reaching the solution to the problem.
Steps to Solution
Practice Problems
• There are three boxes. One is labeled "APPLES" another is
labeled "ORANGES". The last one is labeled "APPLES AND
ORANGES". You know that each is labeled incorrectly. You
may ask me to pick one fruit from one box which you
choose.
– How can you label the boxes correctly?
– Pick from the one labeled "Apples & Oranges". This box
must contain either only apples or only oranges.
– E.g. if you find an Orange, label the box Orange, then
change the Oranges box to Apples, and the Apples box to
"Apples & Oranges"
Practice Problems
• A frog is at the bottom of a 30 meter well. Each day he summons enough
energy for one 3 meter leap up the well. Exhausted, he then hangs there
for the rest of the day. At night, while he is asleep, he slips 2 meters
backwards. How many days does it take him to escape from the well?
• Note: Assume after the first leap that his hind legs are exactly three
meters up the well. His hind legs must clear the well for him to escape.
Practice Problems
Mary'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?
Practice Problems
• Anna had six apples and ate all but four of them. How
many apples were left?
• If there are 12 one-cent stamps in a dozen, how many
two cent stamps are there in a dozen?
Practice Problems
‘I have as many brothers as sisters’, says A…
to his sister Belinda.
‘That’s nothing’ replies Belinda who always
has to be one up, ‘I have twice as many
brothers as sisters’.
How many brothers and sisters are there?
Defining the Problem Summary
To help with this initial analysis, identify in the problem the:
• start state;
• goal state (or states);
• the operators and their constraints.
Home Assignment
• Search for a minimum of 5 problems from any source(books or Websites).
• Be sincere in solving those problems.
• Share the problems with your friends and ask them to solve it.
• Show your work to me in our next meeting.
Reference
• CSCI 103 lecture note: University of Wollongong, Australia
• Sprankle, Mauren., “Problem Solving and Programming Comcept.”, Prentice Hall, 2001
• Some online Resources of Brain teaser Question