01-prop_logic - CSIS1118 Foundations of Computer Science...

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

View Full Document Right Arrow Icon
CSIS1118 Foundations of Computer Science Logic Hubert Chan ([O1, O2]; chapters 1.1, 1.2) 1
Image of page 1

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

View Full Document Right Arrow Icon
Logic (Chapter 1) Propositional Logic Basic Definitions Logical operators Predicate Logic Predicates Quantified expressions 2
Image of page 2
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 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. 3
Image of page 3

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

View Full Document Right Arrow Icon
Example 2 (Section 1.1, Q60): Four friends have been identified as suspects for an 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 ” Diana said Peter lied when he said that I did it. a) If the authorities also know that exactly one of the four t i t lli th t th h did it? 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? 4
Image of page 4
Propositions Propositions – Definition Definition Propositions Definition Def: A proposition is a statement that is either true ( T ) or f l ( F ) b t t b th false ( ), 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. Come here quickly! 5
Image of page 5

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

View Full Document Right Arrow Icon