Propositional Variables - Discrete Mathematics - Lecture Slides, Slides of Discrete Mathematics

During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Propositional Variables, Single Variable, Operation of Multiple Variables, Logical Operators, Algebraic Operators, Bi-Conditional Means, Truth Values, Boolean Operators Summary, Precedence of Operators, Boolean Searches

Typology: Slides

2012/2013

Uploaded on 04/27/2013

atasi
atasi 🇮🇳

4.6

(32)

134 documents

1 / 20

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Discrete Mathematics
Lecture 1
Introduction
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download Propositional Variables - Discrete Mathematics - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity!

Discrete Mathematics

Lecture 1

Introduction

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 )

Logical operators: Not

A “not” operation switches (negates) the

truth value

Symbol: ¬ or ~

¬ p = “Today is not Friday”

p ¬ p T F F T

Logical operators: And

An “and” operation is true if both operands

are true

Symbol: ∧

It’s like the ‘A’ in And

pq = “Today is Friday and

today is my birthday”

p q pq T T T T F F F T F F F F

Logical operators: Conditional 1

A conditional means “if p then q ” Symbol: →  pq = “If today is Friday, then today is my birthday”  p→q=¬pq

the antecedent

the consequence

p q pq T T T T F F F T T F F T

Logical operators: Conditional 2

Let p = “I am elected” and q = “I will lower taxes”

I state: pq = “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

p q pq T T T T F F F T T F F T

Logical operators: Conditional 4

Conditional Inverse Converse Contrapositive p q ¬ p ¬ q pq ¬ p →¬ q qp ¬ q →¬ p T T F F T T T T T F F T F T T F F T T F T F F T F F T T T T T T

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

p q pq T T T T F F F T F F F T

Boolean operators summary

Learn what they mean, don’t just memorize the table!

not not and or xor conditional Bi-conditional p q ¬ p^ ¬ q^ pq^ pq^ pq^ pq^ pq T T F F T T F T T T F F T F T T F F F T T F F T T T F F F T T F F F T T

Precedence of operators

Just as in algebra, operators have precedence 4+32 = 4+(32), not (4+3)*

Precedence order (from highest to lowest):

¬ ∧ ∨ → ↔ The first three are the most important

This means that pq ∧ ¬ rst yields: ( p ∨ ( q ∧ (¬ r )) → s ) ↔ ( t )

Not is always performed before any other operation

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

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

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

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. 10110100 is eight Boolean values in one string

We can then do operations on these Boolean strings Each column is its own Boolean operation

01011010 ⊕ 10110100 11101110