0% found this document useful (0 votes)
58 views

Discrete Structures and Its Application.: Rimsha Parvaiz MCS Lahore Garrison

maths

Uploaded by

rimsha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Discrete Structures and Its Application.: Rimsha Parvaiz MCS Lahore Garrison

maths

Uploaded by

rimsha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

2019

Discrete structures and its


application.

RIMSHA
PARVAIZ
MCS
LAHORE
GARRISON
Proposition:
PROPISITION.
1. Propositional logic is the simplest form of logic. Here the
only statements that are considered are propositions,
which contain no variables. Because propositions contain
no variables, they are either always true or always false.
2. • x+2=4. (May be true, may not be true; it depends on
the value of x
3. .) • x·0=1. (Always false, but not a proposition because of
the variable
4.As the last two examples show, it is not enough for a
statement to be always true or always false—whether a
statement is a proposition or not is a structural property.
Proposition:
But if a statement doesn’t contain any variables (or other
undefined terms), it is a proposition, and as a side-effect
of being a proposition it’s always true or always false.

BOOLEAN OPERATORS
negation
 negation of p is written as ¬p, or sometimes ∼p, −p or p. It has
the property that it is false when p is true, and true when p is fa
 E.g. If p = “I have brown hair.”
then ¬p = “It is not the case that I have brown hair” or “I do not have
brown hair.”
P ~P
Proposition:
T F
F T
Negation table.

Conjuction operator
The and of p and q is written as p∧q, and is true only
when both p and q are true.3 This is pretty much the
same as in English, where “I like to eat ice cream and I
own a private Caribbean island” is not a true
statement when made by most people even though
most people like to eat ice cream. The only complication
in translating English expressions into logical ands
Proposition:
is that logicians can’t tell the difference between “and”
and “but”: the statement “2+2 = 4 but 3+3 = 6”
becomes simply “(2+2=4)∧(3+3=6).”
 The binary conjunction operator “Ù” (AND)
combines two propositions to form their logical
conjunction.
 E.g. If p = “I will have salad for lunch.” and
q = “I will have steak for dinner.”
then, pÙq = “I will have salad for lunch and
I will have steak for dinner.”
Proposition:
P q P^q
T T T
T F F
F T F
F F F
Conjuction opearator truth table.
The disjunction operator[or]
The or of two propositions p and q is written as p∨q,
and is true as long as at least one, or possibly both, of
p and q is true.2 This is not always the same as what
“or” means in English; in English, “or” often is used
Proposition:
for exclusive or which is not true if both p and q are
true. For example, if someone says “You will give me
all your money or I will stab you with this table
knife”, you would be justifiably upset if you turn over
all your money and still get stabbed. But a logician
would not be at all surprised, because the standard “or”
in propositional logic is an inclusive or that allows for
both outcomes.
 The binary disjunction operator “Ú” (OR)
combines two propositions to form their logical
disjunction.
Proposition:
 E.g. If p = “My car has a bad engine.” and
q = “My car has a bad carburetor.”
then, pÚq = “My car has a bad engine, or
my car has a bad carburetor
Proposition:
Proposition:
 So, this operation is also called inclusive or,
because it includes the possibility that both p and
q are true.
Truth table disjunction.
The exclusive or operator
Exclusive or If you want to exclude the possibility
that both p and q are true, you can use exclusive
or instead. This is written as p⊕q, and true
precisely when exactly one of p or q is true.
Exclusive or is not used in classical logic much,
Proposition:
but is important for many computing
applications, since it corresponds to addition
modulo 2 (see §8.3) and has nice reversibility
properties (e.g. p⊕(p⊕q) always has the same
truth-value as q).
 The binary exclusive-or operator “Å” (XOR)
combines two propositions to form their logical
“exclusive or”
 E.g. If p = “I will earn an A in this course.” and
q = “I will drop this course.”, then
Proposition:
p Å q = “I will either earn an A in this course,
or I will drop it (but not both!)”

Truth table exclusive OR.


Proposition:
THE IMPLICATION OPERATOR
Implication This is the most important connective for
proofs. An implication represents an “if...then” claim.
If p implies q, then we write p → q or p ⇒ q, depending
on our typographic convention and the availability of
arrow symbols in our favorite font. In English, p → q
is usually rendered as “If p, then q,” as in “If you step
on your own head, it will hurt.” The meaning of p → q
is that q is true whenever p is true, and the proposition
p → q is true provided (a) p is false (in which case all
bets are off), or (b) q is true. In fact, the only way for p
Proposition:
→ q to be false is for p to be true but q to be false.
Because of this, p → q can be rewritten as ¬p∨q.
So, for example, the statements “If 2+2=5, then I’m
the Pope”, “If I’m the Pope, then 2+2=4”, and “If
2+2=4, then 3+3=6”, are all true, provided the
if/then is interpreted as implication. Normal English
usage does not always match this pattern. Instead,
if/then in normal speech is often interpreted as the
much stronger biconditional (see below), and often
carries connotations of causality. So if I say—entirely
truthfully—“If the moon is made of green cheese, then
Proposition:
the world will end at midnight,” my listeners will
think I have some mechanism in mind by which a
green-cheese moon will end the world. But all I am
doing is taking advantage of my knowledge that the
moon is not made of green cheese to make a statement
that is trivially true, because it has a false premise.
This is another example of how the language of logic
strips away the vast cloud of secondary 3The symbol
∧ is a stylized A, short for the latin word atque,
meaning “and also.”
 The conditional statement (aka implication)
Proposition:
p ® q states that p implies q.
 I.e., If p is true, then q is true; but if p is not true,
then q could be either true or false.
 E.g., let p = “You study hard.”
q = “You will get a good grade.”
p ® q = “If you study hard, then you will get a good
grade.” (else, it could go either way)
 p: hypothesis or antecedent or premise
 q: conclusion or consequence
Proposition:
Proposition:
Truth table for implication.

You might also like