Presentation is loading. Please wait.

Presentation is loading. Please wait.

1/10/2006 1 Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone: 416-736-2100.

Similar presentations


Presentation on theme: "1/10/2006 1 Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone: 416-736-2100."— Presentation transcript:

1 1/10/2006 1 Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta datta@cs.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cs.yorku.ca/course/1019

2 1/10/2006 2 Administrivia Kenneth H. Rosen. Discrete Mathematics and Its Applications, Sixth Edition. McGraw Hill, 2007. Lectures: Tu-Th 10:00-11:30 am (CLH E) Exams: 2 tests (40%), final (40%) Homework (20%): equally divided between 3 or 4 assignments. Slides: should be available the previous evening Office hours: Tuesday 12-2 pm, Wed 1-2 pm or by appointment at CSEB 3043. Textbook:

3 1/10/2006 3 Administrivia – contd. Cheating will not be tolerated. Visit the webpage for more details on policies. TA: Tutorials/office hours TBA. I will have some extra-credit quizzes. These will be announced beforehand. HW submitted late will not be graded.

4 1/10/2006 4 Course objectives We will focus on two major goals: Basic tools and techniques in discrete mathematics –Propositional logic –Set Theory –Simple algorithms –Induction, recursion –Counting techniques (Combinatorics) –Introductory graph theory Precise and rigorous mathematical reasoning –Writing proofs

5 1/10/2006 5 To do well you should: Study with pen and paper Ask for help immediately Practice, practice, practice… Follow along in class rather than take notes Ask questions in class Keep up with the class Read the book, not just the slides

6 1/10/2006 6 Today Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic:    Implications:  

7 1/10/2006 7 Why study propositional logic? A formal mathematical “language” for precise reasoning. Start with propositions. Add other constructs like negation, conjunction, disjunction, implication etc. All of these are based on ideas we use daily to reason about things.

8 1/10/2006 8 Propositions Declarative sentence Must be either True or False. Propositions: York University is in Toronto York University is in downtown Toronto All students at York are Computer Sc. majors. Not propositions: Do you like this class? There are x students in this class.

9 1/10/2006 9 Propositions - 2 Truth value: True or False Variables: p,q,r,s,… Negation:  p (“not p”) Truth tables p pp TF FT

10 1/10/2006 10 Conjunction, Disjunction Conjunction: p  q [“and”] Disjunction: p  q [“or”] pq p  qp  qp  q TTTT TFFT FTFT FFFF

11 1/10/2006 11 Exclusive OR (XOR) p  q – T if p and q have different truth values, F otherwise Colloquially, we often use OR ambiguously – “an entrée comes with soup or salad” implies XOR, but “students can take MATH XXXX if they gave taken MATH 2320 or MATH 1019” usually means the normal OR (so a student who has taken both is still eligible for MATH XXXX).

12 1/10/2006 12 Conditional p  q [“if p then q”] p: hypothesis, q: conclusion E.g.: “If you turn in a homework late, it will not be graded”; “If you get 100% in this course, you will get an A+”. TRICKY: Is p  q TRUE if p is FALSE? YES!! Think of “If you get 100% in this course, you will get an A+” as a promise – is the promise violated if someone gets 50% and does not receive an A+?

13 1/10/2006 13 Conditional - 2 p  q [“if p then q”] Truth table: pqp  qp  q  p  q TTTT TFFF FTTT FFTT Note the truth table of  p  q

14 1/10/2006 14 Logical Equivalence p  q and  p  q are logically equivalent Truth tables are the simplest way to prove such facts. We will learn other ways later.

15 1/10/2006 15 Contrapositive Contrapositive of p  q is  q   p Any conditional and its contrapositive are logically equivalent (have the same truth table) – Check by writing down the truth table. E.g. The contrapositive of “If you get 100% in this course, you will get an A+” is “If you do not get an A+ in this course, you did not get 100%”.

16 1/10/2006 16 Converse Converse of p  q is q  p Not logically equivalent to conditional Ex 1: “If you get 100% in this course, you will get an A+” and “If you get an A+ in this course, you scored 100%” are not equivalent. Ex 2: If you won the lottery, you are rich.

17 1/10/2006 17 Other conditionals Inverse: inverse of p  q is  p   q How is this related to the converse? Biconditional: “If and only if” True if p,q have same truth values, flase otherwise. Q: How is this related to XOR? Can also be defined as (p  q)  (q  p)

18 1/10/2006 18 Readings and notes Read pages 1-12. Think about the notion of truth tables. Master the rationale behind the definition of conditionals. Practice translating English sentences to propositional logic statements.


Download ppt "1/10/2006 1 Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone: 416-736-2100."

Similar presentations


Ads by Google