CSci 2011 Textbook ^Discrete Mathematics and Its Applications,  Rosen  6th Edition  McGraw Hill  2006.

Slides:



Advertisements
Similar presentations
Logic The study of correct reasoning.
Advertisements

TRUTH TABLES The general truth tables for each of the connectives tell you the value of any possible statement for each of the connectives. Negation.
1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: The Moon is made of green cheese. Trenton.
CSE 311 Foundations of Computing I Spring 2013 Lecture 1 Propositional Logic.
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 1 Propositional Logic.
1 Section 1.1 Logic. 2 Proposition Statement that is either true or false –can’t be both –in English, must contain a form of “to be” Examples: –Cate Sheller.
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.
First Order Logic. Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence.
22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
The Foundations: Logic and Proofs
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
Intro to Discrete Structures
Discrete Maths 2. Propositional Logic Objective
CSE 311 Foundations of Computing I Autumn 2012 Lecture 1 Propositional Logic 1.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Ch.1 (Part 1): The Foundations: Logic and Proofs Introduction.
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Foundations of Computing I CSE 311 Fall CSE 311: Foundations of Computing I Fall 2014 Lecture 1: Propositional Logic.
CS 103 Discrete Structures Lecture 02
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
Introductory Lecture Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
1 Boolean Logic CS 202, Spring 2007 Epp, sections 1.1 and 1.2 Aaron Bloomfield.
CS 2210 (22C:019) Discrete Structures Introduction and Scope: Propositions Spring 2015 Sukumar Ghosh.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
Discrete Structures – CS Text Discrete Mathematics and Its Applications Kenneth H. Rosen (7 th Edition) Chapter 1 The Foundations: Logic and Proofs.
SSK3003 DISCRETE STRUCTURES
LOGIC Lesson 2.1. What is an on-the-spot Quiz  This quiz is defined by me.  While I’m having my lectures, you have to be alert.  Because there are.
Conditional Statements
MAIN TOPIC : Statement, Open Sentences, and Truth Values Negation Compound Statement Equivalency, Tautology, Contradiction, and Contingency Converse, Inverse,
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
How do I show that two compound propositions are logically equivalent?
1/10/ Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone:
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Logical Form and Logical Equivalence M Logical Form Example 1 If the syntax is faulty or execution results in division by zero, then the program.
CS203 Discrete Mathematical Structures
Chapter 1: The Foundations: Logic and Proofs
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
1 Boolean Logic CS/APMA 202, Spring 2005 Rosen, section 1.1 Aaron Bloomfield.
CSci 2011 Recap ^Propositional operation summary not andorconditionalBi-conditional pq ppqqpqpqpqpqpqpqpqpq TTFFTTTT TFFTFTFF FTTFFTTF FFTTFFTT.
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
TRUTH TABLES Edited from the original by: Mimi Opkins CECS 100 Fall 2011 Thanks for the ppt.
Discrete Mathematics Lecture # 4. Conditional Statements or Implication  If p and q are statement variables, the conditional of q by p is “If p then.
Conditional statement or implication IF p then q is denoted p ⇒ q p is the antecedent or hypothesis q is the consequent or conclusion ⇒ means IF…THEN.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
Introduction to Discrete Mathematics Discrete Mathematics: is the part of mathematics devoted to the study of discrete objects. Discrete Mathematics is.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Chapter 1 Logic and proofs
Material Taken From: Mathematics for the international student Mathematical Studies SL Mal Coad, Glen Whiffen, John Owen, Robert Haese, Sandra Haese and.
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
CS 2130 Computational Structures (Discrete Mathematics for Computing)
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
Logical functors and connectives. Negation: ¬ The function of the negation is to reverse the truth value of a given propositions (sentence). If A is true,
22C:19 Discrete Structures Introduction and Scope: Propositions
CS 2210:0001 Discrete Structures Introduction and Scope: Propositions
CS 202, Spring 2008 Epp, sections 1.1 and 1.2
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
Ch.1 (Part 1): The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Discrete Math (2) Haiming Chen Associate Professor, PhD
CSE 321 Discrete Structures
Discrete Structures Prepositional Logic 2
Presentation transcript:

CSci 2011 Textbook ^Discrete Mathematics and Its Applications,  Rosen  6th Edition  McGraw Hill  2006

CSci 2011 Overview ^Much of the basic mathematical machinery useful in computer science will be presented, with applications. ^Students will learn actively the art of creating real- world proofs in these areas,  preparing them for diverse regions of computer science such as architecture, algorithms, automata, programming languages, cryptography, and  increasing their general problem-solving abilities in all areas.

CSci 2011 Problems solved using Discrete Math ^How many secure passwords? ^Probability of winning Texas Hold’em? ^How can I encrypt a message? ^Shortest paths between two cities using public transportation? ^How many steps required to sort 10,000 numbers? Is this algorithm correct? ^How to design a circuit that multiply two integers?

CSci 2011 Why study Discrete Maths? ^Proof  Ability to understand and create mathematical argument ^Gateway to more advanced CS courses  Data structures, algorithms, automata theory, formal languages  Database, networks, operating system, security

CSci 2011 Course content very approximately in temporal order ^Ch. 1: Logic and Proofs ^Ch. 2: Sets, Functions, Sequences and Sums ^Ch. 3: Algorithms, the Integers, and Matrices ^Ch. 4: Induction and Recursion ^Ch. 5: Counting ^Ch. 6: Discrete Probability ^Ch. 8: Relations

CSci 2011 Propositions ^A proposition is a statement that can be either true or false  “Yongdae has an Apple laptop.”  “Yongdae is a professor.”  “3 = 2 + 1”  “3 = 2 + 2” ^Not propositions:  “Are you Bob?”  “x = 7”  “I am heavy.”

CSci 2011 Propositional variables ^We use propositional variables to refer to propositions  Usually are lower case letters starting with p (i.e. p, q, r, s, etc.)  A propositional variable can have one of two values: true (T) or false (F) ^A proposition can be…  A single variable: p  An operation of multiple variables: p(qr)

CSci 2011 Introduction to Logical Operators ^About a dozen logical operators  Similar to algebraic operators + * - / ^In the following examples,  p = “Today is Friday”  q = “Today is my birthday”

CSci 2011 Logical operators: Not ^A “not” operation switches (negates) the truth value ^Symbol:  or ~ ^p = “Today is not Friday” p pp TF FT

CSci 2011 Logical operators: And ^An “and” operation is true if both operands are true ^Symbol:   It’s like the ‘A’ in And ^pq = “Today is Friday and today is my birthday” pq pqpq TTT TFF FTF FFF

CSci 2011 Logical operators: Or ^An “or” operation is true if either operands are true ^Symbol:  ^pq = “Today is Friday or today is my birthday (or possibly both)” pq pqpq TTT TFT FTT FFF

CSci 2011 Logical operators: Conditional 1 ^A conditional means “if p then q” ^Symbol:  ^pq = “If today is Friday, then today is my birthday” ^p → q=¬pq the antecedent the consequence pq pqpq TTT TFF FTT FFT

CSci 2011 Logical operators: Conditional 2 ^Let p = “I am elected” and q = “I will lower taxes” ^I state: p  q = “If I am elected, then I will lower taxes” ^Consider all possibilities ^Note that if p is false, then the conditional is true regardless of whether q is true or false pq pqpq TTT TFF FTT FFT

CSci 2011 Logical operators: Conditional 3 ^Alternate ways of stating a conditional:  p implies q  If p, q  p only if q  p is sufficient for q  q if p  q whenever p  q is necessary for p

CSci 2011 Logical operators: Conditional 4 ConditionalInverseConverseContrapositive pq ppqqpqpqpqqpqpqp TTFFTTTT TFFTFTTF FTTFTFFT FFTTTTTT

CSci 2011 Logical operators: Bi-conditional 1 ^A bi-conditional means “p if and only if q” ^Symbol:  ^Alternatively, it means “(if p then q) and (if q then p)” ^Note that a bi-conditional has the opposite truth values of the exclusive or pq pqpq TTT TFF FTF FFT

CSci 2011 Logical operators: Bi-conditional 2 ^Let p = “You take this class” and q = “You get a grade” ^Then pq means “You take this class if and only if you get a grade” ^Alternatively, it means “If you take this class, then you get a grade and if you get a grade then you take (took) this class” pq pqpq TTT TFF FTF FFT

CSci 2011 Boolean operators summary ^Learn what they mean, don’t just memorize the table! not andorxorconditionalBi-conditional pq ppqqpqpqpqpqpqpqpqpqpqpq TTFFTTFTT TFFTFTTFF FTTFFTTTF FFTTFFFTT

CSci 2011 Precedence of operators ^Just as in algebra, operators have precedence  4+3*2 = 4+(3*2), not (4+3)*2 ^Precedence order (from highest to lowest): ¬   → ↔  The first three are the most important ^This means that p  q  ¬r → s ↔ t yields: (p  (q  (¬r)) → s) ↔ (t) ^Not is always performed before any other operation

CSci 2011 Translating English Sentences ^Question 7 from Rosen, p. 17  p = “It is below freezing”  q = “It is snowing” ^It is below freezing and it is snowing ^It is below freezing but not snowing ^It is not below freezing and it is not snowing ^It is either snowing or below freezing (or both) ^If it is below freezing, it is also snowing ^It is either below freezing or it is snowing, but it is not snowing if it is below freezing ^That it is below freezing is necessary and sufficient for it to be snowing pqpq p¬qp¬q ¬p¬q¬p¬q pqpq p→qp→q ((pq)¬(pq))(p → ¬q) p↔qp↔q

CSci 2011 Translation Example 2 ^Heard on the radio:  A study showed that there was a correlation between the more children ate dinners with their families and lower rate of substance abuse by those children  Announcer conclusions:  If children eat more meals with their family, they will have lower substance abuse  If they have a higher substance abuse rate, then they did not eat more meals with their family

CSci 2011 Translation Example 3 ^“I have neither given nor received help on this exam” ^Let p = “I have given help on this exam” ^Let q = “I have received help on this exam” ^¬p¬q^¬p¬q

CSci 2011 Translation Example 4 ^You can access the Internet from campus only if you are a computer science major or you are not a freshman.  a  (c   f) ^You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old.  (f   s)   r  r  ( f  s)

CSci 2011 Boolean Searches (2011 OR 5471) AND yongdae AND “computer science” ^Note that Google requires you to capitalize Boolean operators ^Google defaults to AND; many others do not

CSci 2011 Bit Operations ^Boolean values can be represented as 1 (true) and 0 (false) ^A bit string is a series of Boolean values. Length of the string is the number of bits.  is eight Boolean values in one string ^We can then do operations on these Boolean strings  Each column is its own Boolean operation 