Lecture Coursework 2. Rectangle Game Look at proof of matchsticks Read thru the question. A rectangular board is divided into m columns by n rows. The.

Slides:



Advertisements
Similar presentations
2.5 Reasoning in Algebra and Geometry
Advertisements

AE1APS Algorithmic Problem Solving John Drake. The island of Knights and Knaves is a fictional island to test peoples ability to reason logically. There.
AE1APS Algorithmic Problem Solving John Drake.  Coursework 3 due on Thursday at 1pm  (i.e. before the start of the tutorial).  Submit either hard-copy.
Introduction to Theorem Proving
2.8 Solving Linear Inequalities
Chapter 2 Section 8 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
AE1APS Algorithmic Problem Solving John Drake.  Invariants – Chapter 2  River Crossing – Chapter 3  Logic Puzzles – Chapter 5 (13) ◦ Knights and Knaves.
AE1APS Algorithmic Problem Solving John Drake..  Previously we introduced matchstick games, using one pile of matches  It is possible to have more than.
CS128 – Discrete Mathematics for Computer Science
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Sets. Copyright © Peter Cappello Definition Visualize a dictionary as a directed graph. Nodes represent words If word w is defined in terms of word.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Linear Systems The definition of a linear equation given in Chapter 1 can be extended to more variables; any equation of the form for real numbers.
Elementary Algebra Exam 4 Material Exponential Expressions & Polynomials.
The Foundations: Logic and Proofs
Algebraic Structures: An Activities Based Course MATH 276 UWM MATH 276 UWM.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
Week 1 - Wednesday.  Course overview  Propositional logic  Truth tables  AND, OR, NOT  Logical equivalence.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Copyright © Curt Hill Truth Tables A way to show Boolean Operations.
Lecture 5 Knights and Knaves.. Administration Show hand in form. Show plagiarism form. Any problems with coursework? Google knight and knaves and look.
Chapter 1: The Foundations: Logic and Proofs
Intermediate Algebra Prerequisite Topics Review Quick review of basic algebra skills that you should have developed before taking this class 18 problems.
Part II - Sums of Games Consider a game called Boxing Match which was defined in a programming contest m.short.html.
2-1 Inductive Reasoning & Conjecture
You are going to work in pairs to produce a Maths board game.
Final Lecture. Instructions in Exam ANSWER 2 QUESTIONS. There will be a choice of 3 questions. Each question will be in parts e.g. a, b, c. You can see.
Dr. Naveed Riaz Design and Analysis of Algorithms 1 1 Formal Methods in Software Engineering Lecture # 24.
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
6 Sums of Games.. Lecture6 Admin Plagiarism forms Answer football cup final problem. //Daisy Problem hints e.g. try a smaller size. General problem solving.
Section 2.2 More about Solving Equations. Objectives Use more than one property of equality to solve equations. Simplify expressions to solve equations.
MATH 224 – Discrete Mathematics
Proofs, Induction and Recursion Basic Proof Techniques Mathematical Induction Recursive Functions and Recurrence Relations.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
Mathematical Preliminaries
Sets Goal: Introduce the basic terminology of set theory.
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
CSS342: Quantifiers1 Professor: Munehiro Fukuda. CSS342: Quantifiers2 Review of Propositions Proposition: a statement that is either true or false, but.
Chapter 2 … part1 Matrices Linear Algebra S 1. Ch2_2 2.1 Addition, Scalar Multiplication, and Multiplication of Matrices Definition A matrix is a rectangular.
Lecture Coursework 2 AGAIN. Rectangle Game Look at proof of matchsticks A rectangular board is divided into m columns by n rows. The area of the board.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
Discrete Mathematics CS 2610 February 10, Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)
Week 1 - Wednesday.  Course overview  Propositional logic  Truth tables  AND, OR, NOT  Logical equivalence.
Dr. Naveed Riaz Design and Analysis of Algorithms 1 1 Formal Methods in Software Engineering Lecture # 25.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Content Game of Nim Impartial Games Sprague-Grundy theorem
Algebra 2 Properties of Real Numbers Lesson 1-2 Goals Goal To graph and order real numbers. To Identity properties of real numbers. Rubric Level 1 –
Mathematical Induction. The Principle of Mathematical Induction Let S n be a statement involving the positive integer n. If 1.S 1 is true, and 2.the truth.
Sets.
Computer Science 210 Computer Organization
Thinking Mathematically
Identity and Equality Properties
Chapter 2 Section 8.
Y. Davis Geometry Notes Chapter 2.
Chapter 5 Induction and Recursion
Chapter 2 Section 8.
CS100: Discrete structures
2.5 Reasoning in Algebra and Geometry
CS 220: Discrete Structures and their Applications
Formal Methods in Software Engineering
Associativity of Equivalence
Foundations of Discrete Mathematics
Let Q be the question Let A be “the native is a knight”
Digital Systems Section 3 Boolean Algebra. Digital Systems Section 3 Boolean Algebra.
Using the Distributive Property to Simplify Algebraic Expressions
Presentation transcript:

Lecture Coursework 2

Rectangle Game Look at proof of matchsticks Read thru the question. A rectangular board is divided into m columns by n rows. The area of the board is nxm. Each player takes turns to cut the board along a line. The smaller piece is discarded. The game ends with a 1 by 1 board, And the player whose turn it is to move is the loser.

Sum Game This is a sum game. The component games are copies of the same game. The position in a component game is given by m (a positive integer). A move in the game is to replace m by a number n such that n < m <= 2n

Symmetry Clearly one winning strategy is the following. If the board is square Ie the number of rows = the number of columns Then just copy the opponents moves. Similar to the daisy game. But what if we are not in a position to make the board square. In this case we need mex numbers.

Mex Numbers Draw a graph of the problem A successor is a state which we can move to from the current state. There maybe one or more successors from the current state. The final state has no moves, as it is the final state. This is given mex number 0 A given state has mex number which is the smallest natural number not included in the mex numbers of the successor states. Show diagram in my book. What are the patterns in the mex numbers? The strategy is to get symmetry with the mex numbers. This is how to play the sum game.

Winning and losing positions A winning position is a position from which there is a losing position we can move to. A losing position is a position from which ever position is to a winning position. A winner always wants to push a loser to a losing position, so the loser has no choice but to push to a winning position. Write down an inductive hypothesis about winning/losing positions. Show the table Talk about similarities with matchstick game.

Disjunction – Or True when one of the pair is true (p or q) Properties Idempotence p or p = p Symmetry p or q = q or p Associativity p or (q or r) = (p or q) or r Allows us to omit parentheses Distributivity p or (q = r) = p or q = p or r Excluded middle p or not p

Golden rule 7.2 p or q = p = q = p and q (this is a definition of and) And has equal precedence as or. Giving one precedence over the other obscures symmetries in their algebraic properties. The golden rule can be read in 3 different ways (at least)

Truth table p q | p or q = p | p and q = q

Modus Ponens and De Morgan Modus Ponens p and (p=q) = p and q not ( p and q) = not p or not q not ( p or q) = not p and not q

Implication Definition of if p <- q = p = p or q p <- q = q = p and q these are the same, via the golden rule.

Turning the arrows around Definition of only-if p -> q = q = p or q p -> q = p = p and q these are the same, via the golden rule.

Leibniz (equals for equals) If two expressions are equal, and F is any function, Then F(x) = F(y)

Return to Knights and Knaves Knights tell the truth, and knaves lie Truth table of knights and knaves. P4 A says I am same type as B Is there gold on the island This is exactly the same process as before.

Formulating questions p3 my book You are at a fork in the road, you want to know if the gold is to the left or the right. Let Q be the question to be posed. The response to the question will be A = Q Let L denote, "the gold can be found by following the left fork" The requirement is that L is the same are the response to Q. i.e. we require L=(A=Q) {but as equality is associative} (L = A) = Q So the question Q posed is L=A I.e. "is the value of 'the gold can be found by following the left fork' equal to the value of 'you are a knight'"

Equals for Equals p6 my book There are three natives A B C. C says "A and B are both the same type". Formulate a question, that when posed to A determines if C is telling the truth. Let A be the statement A is a "knight". Let Q be the unknown question. The response we want is C (i.e. if C is true then C is a knight). By the previous section, Q = (A=C) i.e. we replace L by C. C's statement is A=B, so now we know C = (A=B) by equality. So Q = (A = (A=B)) which simplifies to Q = B, so the question to be posed is "is B a knight". Show the formal working from book p 69

Portia's Casket How do we write the portrait is in one and only one casket? The truth of the portrait being in the gold casket is indicated by the silver inscription. The inscriptions on the silver casket a. the inscription on the gold casket is true, if this inscription is true b. the inscription on the gold casket is false, if this inscription is true c. if the inscription on the gold casket is true, this inscription is false d. if the inscription on the gold casket is false, this inscription is false see p 8

variable names ig the inscription on the gold casket is true is the inscription on the silver casket is true pg the portrait is in the gold casket ps the portrait is in the silver casket. Each of these will end up with a true/false value at the end. Only one of pg and ps can be true.