+ All Categories
Home > Documents > Topic 9: Logic

Topic 9: Logic

Date post: 23-Feb-2016
Category:
Upload: kiet
View: 53 times
Download: 0 times
Share this document with a friend
Description:
Topic 9: Logic. Dr J Frost ([email protected]) . Last modified: 6 th August 2013. ζ. Topic 9 – Logic. Part 1: General Questions. A quick video…. This… statement… is… false…. http://www.youtube.com/watch?v=JR4H76SCCzY. Starter Question. - PowerPoint PPT Presentation
27
Topic 9: Logic Dr J Frost ([email protected]) Last modified: 6 th August 2013
Transcript
Page 1: Topic 9:  Logic

Topic 9: LogicDr J Frost ([email protected])

Last modified: 6th August 2013

Page 2: Topic 9:  Logic

ζPart 1: General QuestionsTopic 9 – Logic

Page 3: Topic 9:  Logic

A quick video…

http://www.youtube.com/watch?v=JR4H76SCCzYThis… statement… is… false…

Page 4: Topic 9:  Logic

Starter Question

[Source: Junior Maths Olympiad]How many of the statements in the box are true?

None of these statements are true.Exactly one of these statements is true.

Exactly two of these statements are true.All of these statements are true.

0 1 2 3

(Click your answer)

4

Suppose that 2 statements were true. Then the third statement is true. But all the other statements would be false. This leads to a contradiction.

Page 5: Topic 9:  Logic

Question r)On a ship there are 5 pirates, all of whom are ruthless*, greedy and all of whom are perfect logicians.

They seize 100 gold coins from Crisan Cove, and the captain, as the most senior pirate, gets to decide how the treasure is divided up amongst the pirates (including himself).

All pirates (including the captain) vote on whether they agree with the allocation of gold. If at least half agree, then the deal goes ahead, otherwise the captain is thrown overboard, and the process repeats with the next most senior pirate as the new captain.

How should the captain allocate the gold to avoid and mutiny, while keeping as much as possible?

Hint: Think about the situation if there was just 2 pirates. Then reason about what would happen with 3 pirates if each knew what would happen if the captain was thrown overboard. Gradually extend to 5 pirates.

* A ruthless pirate would prefer to see the captain die provided it doesn’t affect their earnings.

Page 6: Topic 9:  Logic

Question r)

Solution:

Case A) There are 2 piratesThe first pirate can offer no gold, because by agreeing with his own deal, he constitutes the 50% agreement needed.

Case B) There are 3 piratesThe third ranking pirate knows that he must accept whatever deal he is offered, because if he disagrees and Pirate 1 is thrown overboard, he’ll now be Pirate 2, where we know from the case above he’ll get nothing. Therefore, Pirate 1 can offer Pirate 3 just one piece of gold, and Pirate 2 nothing. They’ll be two votes of agreement, which is over half.

Case C) There are 4 piratesPirate 3 knows that he’ll get nothing if Pirate 1 is thrown overboard, because of Case B above. He would have to accept any offer. The captain could technically also give one coin to Pirate 4, but Pirate 4, being ‘ruthless’, knows he’ll get one coin anyway when he becomes Pirate 3.

Case D) There are 5 piratesNow Pirate 1 must get two other pirates on his side to secure a majority. Pirate 5 must accept any offer, because he would next be Pirate 4, where from Case C, he’ll get nothing. Pirate 3 must accept any offer for the same reason.Thus, Pirate 1 can give just one coin to Pirate 3, and one coin to Pirate 5.

Page 7: Topic 9:  Logic

C B A

4 men are kidnapped and buried in the sand, awaiting execution.There’s four hats – 2 red and 2 blue. The men know that there’s two of each colour, although obviously can’t see the hat they’re wearing.All men are facing the wall. Hence C can see the hats of B and A. B can see the hat of A. The guy on the other side of the wall can’t see anyone, nor can be seen.

The prisoners all escape execution if any of them can work out the colour of their own hat, and when one person does, they call out to announce it.

(This is just one possibility in terms of how the hats are worn)

Page 8: Topic 9:  Logic

C B A

Solution: B and A can either be wearing hats of the same colour or of different colours.Case 1) Same colour. Then person C knows he must be wearing a hat of the other colour, so can call out.Case 2) Different colours. Then C can’t work out his colour. But person B, knowing C can’t work out their own hat after C fails to say anything, knows he must be wearing a different hat to A. So he just calls out the opposite of A’s colour.

This problem is an example of ‘epistemic logic’, the logic of ‘knowledge’. It allows us to model various people’s knowledge, and the effect of ‘announcements’ on people’s knowledge.

Page 9: Topic 9:  Logic

i. Alice, Bob, Charlie and Dianne each make the following statements:Alice: I am telling the truth.Bob: Alice is telling the truth.Charlie: Bob is telling the truth.Dianne: Charlie is lying.

Only one of the 4 people is telling the truth. Which one? Explain your answer.ii. They now make the following statements:

Alice: Bob is lying.Bob: Charlie is lying.Charlie: I like beer.Dianne: 2+2=4.

Now two of the four people are telling the truth. Which two? Explain your answer.iii. They are now joined by Egbert. They each make the following statements:

Alice: I like wine.Bob: Charlie is lying.Charlie: Alice is lying.Dianne: Alice likes beer.Egbert: Alice likes beer.

Now three of the five people are telling the truth. Which ones? Explain your answer.

MAT Question

Page 10: Topic 9:  Logic

i. Alice, Bob, Charlie and Dianne each make the following statements:Alice: I am telling the truth.Bob: Alice is telling the truth.Charlie: Bob is telling the truth.Dianne: Charlie is lying.

Only one of the 4 people is telling the truth. Which one? Explain your answer.

MAT Question

If Bob is telling the truth, then so is Alice, contradicting the given fact that only one person is telling the truth. So Bob is lying which means Alice also is. Similarly Charlie is also lying. Hence Dianne is the one telling the truth.

?

Page 11: Topic 9:  Logic

ii. They now make the following statements:Alice: Bob is lying.Bob: Charlie is lying.Charlie: I like beer.Dianne: 2+2=4.

Now two of the four people are telling the truth. Which two? Explain your answer.

MAT Question

Clearly Dianne is telling the truth. If Alice is telling the truth, then Bob is lying and Charlie is telling the truth — but that leaves three telling the truth, a contradiction. So Alice is lying, which means Bob is telling the truth and Charlie is lying.

?

Page 12: Topic 9:  Logic

iii. They are now joined by Egbert. They each make the following statements:Alice: I like wine.Bob: Charlie is lying.Charlie: Alice is lying.Dianne: Alice likes beer.Egbert: Alice likes beer.

Now three of the five people are telling the truth. Which ones? Explain your answer.

MAT Question

Now three are telling the truth. Either Dianne and Egbert are both telling the truth, or both are lying. If they are both lying, the other three must be telling the truth — but Charlie telling the truth means Alice is lying, a contradiction. So Dianne and Egbert are telling the truth and one of the others. Either Alice and Bob are each telling the truth and Charlie is lying, or vice versa. As only one of these three is truthful it must be Charlie. So Charlie, Dianne, Egbert are telling the truth.

?

Page 13: Topic 9:  Logic

ζPart 2: Boolean AlgebraTopic 9 – Logic

Page 14: Topic 9:  Logic

Conventional Algebra Boolean Algebra

Values for variables/constants

Any number (-3.2, 6, 783, etc.) True (T) or False (F)

Operators+ (Addition)

- (Subtraction)× (Multiplication)

÷ (Division)

˄ (Conjunction)˅ (Disjunction)

¬ (Negation)

Boolean Algebra

?

?

?

?

In algebra, letters/variables/constants represent values and we have a number of operations which allows us to combine them.

Page 15: Topic 9:  Logic

𝑎∧𝑏“It is raining.” “The ground is wet.”

“It is raining AND the ground is wet.”

ConjunctionSuppose that the variables and represent the following true/false statements:

Then what does the above represent?

?

Page 16: Topic 9:  Logic

a b a ∧ b

F F F

F T F

T F F

T T T

This is known as a ‘truth table’. It gives us the value of the overall expression (here: ) for all possible values for the variables.

Conjunction

?

?

?

?

Page 17: Topic 9:  Logic

𝑎∨𝑏“It is raining.” “The ground is wet.”

“It is raining OR the ground is wet.”

Then what does the above represent?

?

Disjunction

Page 18: Topic 9:  Logic

a b a ∨ b

F F F

F T T

T F T

T T T

Disjunction

?

?

?

?

Page 19: Topic 9:  Logic

¬a

“It is raining.”

“It is NOT raining.”

Negation

Then what does the above represent?

?

Page 20: Topic 9:  Logic

a ¬a

F T

T F

Negation

?

?

Page 21: Topic 9:  Logic

a: “It is raining.” b: “The ground is wet.”

¬a ∨ b

(¬a ∧ b) ∨ (a ∧ ¬b) (a ∨ b) ∧ ¬(a ∧ b)

¬(a ∨ b) ¬a ∧ ¬b

Which of these statements are equivalent? (We could use a truth table to prove it).

What do these mean?

These are equivalent. Their equivalence is known as De Morgan’s Law.

These are equivalent. They both indicate “it’s raining or wet, but not both”.

Page 22: Topic 9:  Logic

a ⟶ b

“It is raining.” “The ground is wet.”

“If it is raining, the ground is wet.”

Implication

Then what does the above represent?

?

Page 23: Topic 9:  Logic

a b a ⟶ b

F F T

F T T

T F F

T T T

Implication

?

?

?

?

Perversely, this implies statements like the following are true:“If 2+2=5, I am the Pope”. Because the condition is false, the statement is vacuously true.

We only falsify an conditional statement if the condition is true, but the implication is false.

Page 24: Topic 9:  Logic

implies that

a = “It is raining.” b = “The ground is wet.”

Hypothesis 1

Implication

TrueFalse

(Click to vote!)

Page 25: Topic 9:  Logic

implies that

a = “It is raining.” b = “The ground is wet.”

Hypothesis 2

Implication

TrueFalse

Page 26: Topic 9:  Logic

implies that

a = “It is raining.” b = “The ground is wet.”

Hypothesis 3

Implication

TrueFalse

Only the last one is true. This law in Latin is known as “modus tollens”, which means “that way that denies by denying”.

Page 27: Topic 9:  Logic

A K 3 2

There are 4 cards on the table. You know that all have a letter on one side, and a number on the other.

A friend claims “If a card has a consonant on one side, it has an even number on the other.”

I need to verify whether this claim is true or not. What are the minimum number of cards I need to turn over?

Example

Answer: 2 cardsNote first that the implication is one way!• Turning ‘A’ over is unnecessary, because it

can’t falsify our statement regardless of whether we see an odd or even number.

• ‘K’ is necessary, because if we saw say a 5 on the other side, the statement would be false.

• Similarly, ‘3’ is necessary, because if we saw a ‘C’ say, the statement would be false.

• Turning the ‘2’ over is unnecessary, because if it was a vowel, it wouldn’t falsify our statement.

?


Recommended