Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Lecture Coursework 2

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.

3 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

4 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.

5 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.

6 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.

7 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

8 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)

9 Truth table p q | p or q = p | p and q = q 0 0 1 0 1 0 1 0 1 1 1 1

10 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

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

12 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.

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

14 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.

15 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'"

16 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

17 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

18 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.

19


Download ppt "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."

Similar presentations


Ads by Google