Logic Pro X Tutorial: Become a Power User Tutorial Part 12 – Mastering in Logic Pro X - MusicTech |
Tutorial 1: Logic
description
Transcript of Tutorial 1: Logic
![Page 1: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/1.jpg)
Tutorial 1: Logic
Peter Poon
![Page 2: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/2.jpg)
Self Introduction
• You can call me Peter• Email: [email protected]• Office: SHB117• Office hour: Friday 10:00am – 12:00 noon• Topics responsible: Logic and proofs
![Page 3: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/3.jpg)
Agenda
• Proof• Distributive Law• Construct and simplify• Contrapositive• Story
![Page 4: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/4.jpg)
Proof
• How to prove two statement are logically equivalent / not equivalent?
• Prove or disprove
![Page 5: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/5.jpg)
Proof
• Use truth table or equivalence laws to prove
p q
T T T
T F T
F T F
F F F
![Page 6: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/6.jpg)
Proof
p q rT T T T T
T T F T T
T F T T T
T F F F F
F T T F F
F T F F F
F F T F F
F F F F F
![Page 7: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/7.jpg)
Distributive Law
Like extracting common factor2 * (3 + 5) = (2 * 3) + (2 * 5)Consider If p is true, If p is false, both L.H.S and R.H.S are false
![Page 8: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/8.jpg)
Construct and simplify
• Construct and simplify the formulas of f(x, y, z)x y z f(x, y, z)T T T T
T T F F
T F T T
T F F T
F T T T
F T F F
F F T T
F F F F
![Page 9: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/9.jpg)
Construct and simplify
• Construct and simplify the formulas of f(x, y, z)
Very long!!!
x y z f(x, y, z)T T T T
T T F F
T F T T
T F F T
F T T T
F T F F
F F T T
F F F F
![Page 10: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/10.jpg)
Construct and simplify
• Construct and simplify the formulas of f(x, y, z)• We can find the opposite x y z f(x, y, z)
T T T T
T T F F
T F T T
T F F T
F T T T
F T F F
F F T T
F F F F
![Page 11: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/11.jpg)
Construct and simplify
• Simplify the formulas of f(x, y, z)
De Morgan’s law
Distribution Law
Distribution Law
Distribution Law
Distribution Law
Negation Law
Negation Law
![Page 12: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/12.jpg)
Contrapositive
• Sometime you may want the contrapositive form
• Find out the contrapositive form of
![Page 13: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/13.jpg)
Contrapositive
• Find out the contrapositive form of
• Use De Morgan’s law to help• Ans:
![Page 14: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/14.jpg)
Story• A detective has interviewed four witnesses to a crime.
From their stories, the detective has concluded that• (a) If the butler is telling the truth, then so is the cook.• (b) The cook and the gardener cannot both be telling the
truth.• (c) The gardener and the handyman are not both lying.• (d) If the handyman is telling the truth then the cook is
lying.• Deduce who MUST be lying? (There may be more than
one liar.)
![Page 15: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/15.jpg)
Story
• First, define the variable• There are four people
– Butler, Cook, Gardener, Handyman• Let B be “Butler is telling the truth”
C be “Cook is telling the truth”G be “Gardener is telling the truth”H be “Handyman is telling the truth”
![Page 16: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/16.jpg)
Story
• Then, write down the expression• (a) If the butler is telling the truth, then so is the cook.
• (b) The cook and the gardener cannot both be telling the truth.
• (c) The gardener and the handyman are not both lying.
• (d) If the handyman is telling the truth then the cook is lying.
![Page 17: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/17.jpg)
Story
• Make some assumption• Eg If B is true• Since , C is true• Since , G is false• Since , H is true• Since , C is false (contradiction!!!)• So,
– B must be false – and C must be false
![Page 18: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/18.jpg)
Story
• How about G and H?• We can’t determine them• Eg G = True, H = False and
G = false, H = True are both valid solution.
G H
T F T T T T
F T T T T T
![Page 19: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/19.jpg)
• You are visiting a town.• The people in the town either always tell the
truth or always lie. • One day you ask help from one townsman.• He said: "Don't worry, I will help you if and
only if I tell the truth." Should you feel happy?
![Page 20: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/20.jpg)
• Defining variable and write down expression
• Let P be “the townsman always tell the truth”Q be “the townsman will help you”
He said: “I will help you if and only if I tell the truth."
![Page 21: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/21.jpg)
Case 1: P is trueSince , so he will help you
Case 2: P is falseSince , so So he will not help you? NO!!!
![Page 22: Tutorial 1: Logic](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681671e550346895ddb9b18/html5/thumbnails/22.jpg)
• Case 2: P is false• Since he is lying, is false
– Verify by truth table or negate • Since P is false, so Q is true• So he will help you.
• Therefore, you should be happy.