01 Logic

01 Logic - ENGG1007 Foundations of Computer Science Logic...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
1 ENGG1007 Foundations of Computer Science Logic Logic Prof. Francis Chin, Dr SM Yiu (chapters 1.1, 1.2)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 ENGG1007 FCS Logic (Chapter 1) Logic (Chapter 1) Propositional Logic Basic Definitions Logical operators Predicate Logic Predicates Quantified expressions
Background image of page 2
3 ENGG1007 FCS Logic IQ questions Logic IQ questions Example 1 (Section 1.1, Q61): Steve would like to determine the relative salaries of three coworkers using two facts. First, he knows the following. You can assume that they all have different salaries. If Fred is not the highest paid of the three, then Janice is. If Janice is not the lowest paid, then Maggie is paid the most. Is it possible to determine the relative salaries of Fred, Maggie, and Janice from what Steve knows? If so, who is paid the most and who the least? Explain your answer.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 ENGG1007 FCS Example 2 (Section 1.1, Q60): Four friends have been identified as suspects for an unauthorized access into a computer system. They have made statements to the investigating authorities. You can assume that only one of them did it. Alice said “Peter did it.” John said “I did not do it.” Peter said “Diana did it.” Diana said “Peter lied when he said that I did it.” a) If the authorities also know that exactly one of the four suspects is telling the truth, who did it? b) If the authorities also know that exactly one of the four suspects is lying, who did it?
Background image of page 4
5 ENGG1007 FCS Propositions – Definition Propositions – Definition Def: A proposition is a statement that is either true ( T ) or false ( F ), but not both . Which of the followings are propositions? 1 + 1 = 7. Do you feel hungry? Hong Kong is the largest city of China. 1 + 3. x + 2 = 5. Come here quickly!
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 ENGG1007 FCS Compound Proposition Compound Proposition A proposition (compound proposition) can be formed by combining several propositions using logical operators. Logical operators: ¬ (negation), (and), (or), (exclusive or), (implication), (biconditional) Example: Mr. Wong is stupid and his wife is lazy. p : Mr. Wong is stupid q : his wife is lazy. p q : where stands for connective “and” A compound proposition also has a truth value (T or F) depending on the truth values of its constituting propositions and the operator(s).
Background image of page 6
7 ENGG1007 FCS Logical operators Logical operators
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 22

01 Logic - ENGG1007 Foundations of Computer Science Logic...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online