Three jealous couples. Problem statement Three couples (husband and wife) wish to cross a river. They have only one boat that can carry at most 2 people.

Slides:



Advertisements
Similar presentations
Algorithmic Problem Solving Lecture 3 River Crossing Problems.
Advertisements

AGES By Clay Tattersall And Paul Podlas. What? For our project we had chosen to take a look at married couples ages, for the husband and women, and compare.
AE1APS Algorithmic Problem Solving John Drake
1 Valid and Invalid arguments. 2 Definition of Argument Sequence of statements: Statement 1; Statement 2; Therefore, Statement 3. Statements 1 and 2 are.
Problem Solving Well-formed predicate calculus expressions provide a means of describing objects and relations in a problem domain and inference rule.
Algorithmic Software Verification II. Modeling using FSA.
Inequalities More solution sets, and interval notation (1.6)
SEARCH ALGORITHMS David Kauchak CS30 – Spring 2015.
SEARCH APPLICATIONS David Kauchak CS30 – Spring 2015.
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 13, Monday, September 29.
Graphs and Trees This handout: Total degree of a graph Applications of Graphs.
Toy Problem: Missionaries and Cannibals
Problem solving by Searching Problem Formulation.
Intelligent agents Intelligent agents are supposed to act in such a way that the environment goes through a sequence of states that maximizes the performance.
Intelligent agents Intelligent agents are supposed to act in such a way that the environment goes through a sequence of states that maximizes the performance.
Dr Eleni Mangina – COURSE: LOGIC PROGRAMMING (during a joint degree with Fudan University in Software Engineering) DEPT. OF COMPUTER SCIENCE UCD Problem.
Assignment #1: Desperate Jealous Husbands
Artificial Intelligence Problem solving by searching CSC 361
Whiteboardmaths.com © 2009 All rights reserved
Artificial Intelligence Problem solving by searching CSC 361 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
Problem Solving. What is a Problem? An ambiguous situation not clearly showing how to reach the goal. Given Initial Situation Desired Goal Situation What.
FA3.4: 1-3: A boat points straight across a 68.0 m wide river and crosses it in 18.2 seconds. In doing this it is carried downstream 23.7 m. 1. What the.
The Z Notation: relations and functions Compiled By Tariq R. Soomro, Ph.D. Reference: Text Book Week-7.
Warm-Up 2/19 Factor each polynomial. 1. x² – x – 20 (x – 5)(x + 4)
Family Law Ch. 29&30. What is a Family? There is no precise legal definition of “Family.” There is no precise legal definition of “Family.” –May include.
1/7/13 Dolls House Journal 1 What are the assigned gender roles for men and women in our society? What are the domestic expectations we have of men as.
Module 1- Getting Started Tell me what to do Using sets of instructions…
The active and the passive voice 1 We usually use the active voice in writing and speaking. E.g. Nokia Someone or something (the agent) does something.
7.4 Partial Fraction Decomposition. A rational expression P / Q is called proper if the degree of the polynomial in the numerator is less than the degree.
Chapter P Prerequisites: Fundamental Concepts of Algebra 1 Copyright © 2014, 2010, 2007 Pearson Education, Inc. 1 P.9 Linear Inequalities and Absolute.
Alg. I Practice. |x+4|+ 3 = 17 |x+4|= 14 or x+4 = -14 x+4 = 14 x = 10or x = -18.
Sigma Notation A compact way of defining a series A series is the sum of a sequence.
Inequalities Denoting Inequalities Properties Solving Inequalities.
MATH CHALLENGE Challenge your mind!  Math is all around you in …  Nature  Art  Games  The following slides have links and puzzles for you.  Select.
THE DRAVA RIVER CROSS SECTION MEASUREMENTS Made by : Croatian COMENIUS Team.
Vectors: the goals Be able to define the term VECTOR and identify quantities which are vectors. Be able to add vectors by the “Head to Tail Method” Be.
Section 2.2 Subsets and Set Operations Math in Our World.
Example Solution For each geometric sequence, find the common ratio. a)  2,  12,  72,  432,... b) 50, 10, 2, 0.4, 0.08,... SequenceCommon Ratio.
Objectives: State and use symbols of inequality. Solve inequalities that involve addition and subtraction. Standards Addressed: C: Create and interpret.
Chapter 5.2/Day 3 Solving Quadratic Functions by Graphing Target Goal: 1. Solve quadratic equations by graphing.
Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.
2 2.2 © 2016 Pearson Education, Ltd. Matrix Algebra THE INVERSE OF A MATRIX.
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
GLOBAL POLITICS TFTW W/C 8 TH MAY THIS TERM WE ARE LOOKING AT THINGS GOING ON AROUND THE WORLD This week we are looking continuing to you look at.
Islam and Divorce. Learning Objectives To understand Muslim beliefs about Divorce To compare and contrast how a woman and a man divorce each other in.
Solving equations with fractions and decimals. M + 3⅔ = -4⅝ Solve - 3⅔ M = ³¹/₂₄ M = -8 ⁷/₂₄ ⁷/₂₄.
Uniqueness Quantifier ROI for Quantified Statement.
Factorials and Sequences
Solve It Convert This Say What? Compare Us Final Jeopardy.
Problem solving by Searching
2.) Is x = –5 a solution to 3x < - 12?
Some problems Cse-402 K3r20,k3r23.
Warmup Let f(x) = x – 3 and g(x) = x2. What is (f ○ g)(1)?
BELLRINGER: The graph below represents Maria’s distance from home one day as she rode her bike to meet friends and do a couple of errands for her mom before.
6-7: Solving Radical Inequalities
Solving Polynomial Inequalities
Linear Equations in One Variable
4. Computational Problem Solving
Multiple Choice Winning!!!!.
Some problems Cse-402 K3r20,k3r23.
Systems of Equations Solving by Graphing.
Problem Solving by Searching Search Methods :
Skill Check after HW Check
Statements joined by “And” (Conjunctions)
Propositional Logic In this lecture we solve a standard propositional problem of circuit equivalence and a puzzle about common knowledge. Problems and.
Chapter 3 Statistics for Describing, Exploring and Comparing Data.
Lesson 1 – 5 Solving Inequalities.
Applications of Permutations and Combinations
Warm-up: State the domain.
Problem Solving by Searching Search Methods :
Presentation transcript:

Three jealous couples

Problem statement Three couples (husband and wife) wish to cross a river. They have only one boat that can carry at most 2 people. The husbands are so jealous that none is willing to allow their wife to be with another man if they themselves are not present. How can all 3 couples get across the river.

Symmetries There are a couple of symmetries that might help us solve the problem. We could get each couple across individually. We could get all the women across first. We could get all the men across first.

Notation We use H, W, C to denote husband, wife and couple (H+W). 2H means two husbands 1C, 2H means one couple and two husbands. 1H, 1W mean a husband and wife who are not a couple. Note we do not name people e.g. Alice, Bob, Clare… as it is only the number that is relevant

States A state describes a situation where each person is on the left or right river bank. 3H||3W means 3 husbands on left bank and 3 wives on right bank 1C, 2H || 2W denotes one couple and two husbands on the left and two wives on the right.

Action An action is a state transition (verb) An action is a person(s) being transported across the river. 3H|2W|1W means two wives are crossing the river. Not that this does not say if the boat is going left or right Is this abiguous.

Invalid States This notation allows valid and invalid states to be identified easily. 1C, 1W||1C, 1H is invalid, why? 3H|3W| is invalid, why?

Problem statement Start state 3C|| Final state ||3C A solution is sequence of actions from the start state to the final state. {3C||} S? {||3C}

Sequence of actions An action results in a state change. If p and q denote states, and S is a sequence of actions {p} S {q} A sequence of actions S will take us from state p to state q.

Sequence of actions e.g. {2C, 1H||1W} //state 3H|2W|1W//action {3H||3W}//state

Problem Decomposition {3C||} S0 {||3C} //start We can decompose this into the following. {3C||} S1 {3H||3W}, {3H||3W} S2 {3W||3H}, {3W||3H}S3 {||3C}, What do you notice about S1 and S3

S1 {3C||} 1C, 2H | 2W| {1C, 2H||2W} 1C, 2H|W|W {2C, 1H||1W} 3H|2W|1W {3H||3W}

S2 We can break S2 down into two parts {3H||3W} T1 {1C|1C|1C} T2 {3W||3H} What can we say about T1 and T2.

T1 {3H||3W} 3H|1W|2W {1C, 2H||2W} 1C|2H|2W {1C||2C} And T2 is just the reverse.