0% found this document useful (0 votes)
76 views27 pages

Discrete Structure: CS-1203 Syed Ijaz Hussain Bukhari

This document provides an overview of the course "Discrete Structure". The course objectives include expressing statements with formal logic, analyzing arguments for validity, applying set theory and operations, defining terms recursively, and proving statements using induction and direct/indirect methods. Main topics covered are logic, sets and relations, functions, sequences/series, induction, combinatorics, probability, and graphs. Recommended textbooks are also listed. The document then discusses logic and propositions in more detail, including symbolic representation and truth tables for logical connectives like negation, conjunction, and disjunction.

Uploaded by

Kashif Kashif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views27 pages

Discrete Structure: CS-1203 Syed Ijaz Hussain Bukhari

This document provides an overview of the course "Discrete Structure". The course objectives include expressing statements with formal logic, analyzing arguments for validity, applying set theory and operations, defining terms recursively, and proving statements using induction and direct/indirect methods. Main topics covered are logic, sets and relations, functions, sequences/series, induction, combinatorics, probability, and graphs. Recommended textbooks are also listed. The document then discusses logic and propositions in more detail, including symbolic representation and truth tables for logical connectives like negation, conjunction, and disjunction.

Uploaded by

Kashif Kashif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Discrete Structure

CS-1203
Syed Ijaz Hussain Bukhari
Discrete Structure
Course Objective
1.Express statements with the precision of formal logic
2.Analyze arguments to test their validity
3.Apply the basic properties and operations related to sets
4.Apply to sets the basic properties and operations related to relations and function
5.Define terms recursively
6.Prove a formula using mathematical induction
7.Prove statements using direct and indirect methods
8.Compute probability of simple and conditional events
9.Identify and use the formulas of combinatorics in different problems
10.Illustrate the basic definitions of graph theory and properties of graphs
11.Relate each major topic in Discrete Mathematics to an application area in
computing
Discrete Structure
• Recommended Books:
1. Discrete Mathematics and Its Applications
(7th edition) by Kenneth H. Rosen

2. Discrete Mathematics with Applications


(second edition) by Susanna S. Epp
Discrete Structure
MAIN TOPICS

1. Logic
2. Sets & Operations on sets
3. Relations & Their Properties
4. Functions
5. Sequences & Series
6. Recurrence Relations
7. Mathematical Induction
8. Loop Invariants
9. Combinatorics
10. Probability
11. Graphs and Trees
What is Discrete Math?
Discrete Mathematics concerns processes that
consist of a sequence of individual steps.
The Foundations: Logic and Proofs
The rules of logic specify the meaning of mathematical statements. For instance, these rules help us
understand and reason with statements such as “There exists an integer that is not the sum of two
squares” and “For every positive integer n, the sum of the positive integers not exceeding n is
n(n+1)/2.” Logic is the basis of all mathematical reasoning, and of all automated reasoning. It has
practical applications to the design of computing machines, to the specification of systems, to
artificial intelligence, to computer programming, to programming languages, and to other areas of
computer science, as well as to many other fields of study.

To understand mathematics, we must understand what makes up a correct mathematical argument,


that is, a proof. Once we prove a mathematical statement is true, we call it a theorem. A collection of
theorems on a topic organize what we know about this topic. To learn a mathematical topic, a
person needs to actively construct mathematical arguments on this topic, and not just read
exposition. Moreover, knowing the proof of a theorem often makes it possible to modify the result
to fit new situations.
The Foundations: Logic and Proofs
Everyone knows that proofs are important throughout
mathematics, but many people find it surprising how
important proofs are in computer science. In fact,
proofs are used to verify that computer programs
produce the correct output for all possible input values,
to show that algorithms always produce the correct
result, to establish the security of a system, and to
create artificial intelligence. Furthermore, automated
reasoning systems have been created to allow
computers to construct their own proofs.
Logic and Proposition
What is Logic?
Logic is the study of the principles and methods
that distinguishes between a valid and an invalid
argument.

Propositions
A proposition is a declarative sentence (that is, a
sentence that declares a fact) that is either true
or false, but not both.
Logic and Proposition
SIMPLE STATEMENT:
• A statement is a declarative sentence that is either true
or false but not both.
• A statement is also referred to as a proposition
Example: 2+2 = 4, It is Sunday today
• If a proposition is true, we say that it has a truth value of
"true”.
• If a proposition is false, its truth value is "false".
• The truth values “true” and “false” are, respectively,
denoted by the letters T and F.
Logic and Proposition
• EXAMPLES:
1. Grass is green.
2. 4 + 2 = 6
3. 4 + 2 = 7
4. There are four fingers in a hand.
5. Washington, D.C., is the capital of the United States of
America.
6. Toronto is the capital of Canada.
7. 1+1=2
8. 2+2=3 are propositions
Logic and Proposition
Not Propositions
• Close the door.
• x is greater than 2.
• He is very rich.
are not propositions.
Logic and Proposition
Rule:
• If the sentence is preceded by other sentences that make the pronoun
or variable reference clear, then the sentence is a statement.
Example:
• x=1
• x>2
• x > 2 is a statement with truth-value FALSE.

Example
• Bill Gates is an American
• He is very rich
• He is very rich is a statement with truth-value TRUE.
Logic and Proposition
• UNDERSTANDING STATEMENTS:
1. x + 2 is positive. Not a statement
2. May I come in? Not a statement
3. Logic is interesting. A statement
4. It is hot today. A statement
5. -1 > 0 A statement
6. x + y = 12 Not a statement
 
Logic and Proposition
Consider the following sentences.
1. What time is it?
2. Read this carefully.
3. x+1=2.
4. x+y=z.
Sentences 1 and 2 are not propositions because they are
not declarative sentences. Sentences 3 and 4 are not
propositions because they are neither true nor false.
Note that each of sentences 3 and 4 can be turned into a
proposition if we assign values to the variables.
COMPOUND STATEMENT:
Simple statements could be used to build a
compound statement.
LOGICAL CONNECTIVES
EXAMPLES:
1. “3 + 2 = 5” and “Lahore is a city in Pakistan”
2. “The grass is green” or “ It is hot today”
3. “Discrete Mathematics is not difficult to me”
AND, OR, NOT are called LOGICAL CONNECTIVES.
Logic and Proposition
• SYMBOLIC REPRESENTATION:
• We use letters to denote propositional variables (or
statement variables), that is, variables that
represent propositions, just as letters are used to
denote numerical variables. The conventional letters
used for propositional variables are p, q, r, s, ... . The
truth value of a proposition is true, denoted by T, if
it is a true proposition, and the truth value of a
proposition is false, denoted by F, if it is a false
proposition.
SYMBOLIC REPRESENTATION

CONNECTIVE MEANINGS SYMBOL CALLED

Negation not ~ Tilde

Conjunction and  Hat

Disjunction or  Vel

Conditional if…then…  Arrow

Biconditional if and only if  Double arrow


Logic and Proposition
EXAMPLES:
p = “Islamabad is the capital of Pakistan”
q = “17 is divisible by 3”

p  q = “Islamabad is the capital of Pakistan and 17 is divisible


by 3”
p  q = “Islamabad is the capital of Pakistan or 17 is divisible by
3”
~p = “It is not the case that Islamabad is the capital of Pakistan” or
simply
“Islamabad is not the capital of Pakistan”
 
TRANSLATING FROM ENGLISH TO SYMBOLS:
Let p = “It is hot”, and q = “It is sunny”
SENTENCE SYMBOLIC FORM
1. It is not hot. ~ p
2. It is hot and sunny.p q
3. It is hot or sunny. p  q
4. It is not hot but sunny. ~ p q
5. It is neither hot nor sunny. ~ p ~ q
EXAMPLE:
• Let h = “Zia is healthy”
 
w = “Zia is wealthy”
s = “Zia is wise”
Translate the compound statements to symbolic form:
1. Zia is healthy and wealthy but not wise. (h  w)  (~s)
 
2. Zia is not wealthy but he is healthy and wise. ~w  (h  s)
 
3. Zia is neither healthy, wealthy nor wise. ~h  ~w  ~s
 
 
TRANSLATING FROM SYMBOLS TO ENGLISH:
Let m = “Ali is good in Mathematics”
c = “Ali is a Computer Science student”
Translate the following statement forms into plain English:
 
1. ~ c Ali is not a Computer Science student
 
2. c  m Ali is a Computer Science student or good in Maths.
 
3. m  ~c Ali is good in Maths but not a Computer Science student
A convenient method for analyzing a compound statement is to make a truth
table for it.
A truth table specifies the truth value of a compound proposition for all
possible truth values of its constituent propositions.
• NEGATION (~):
• If p is a statement variable, then negation of p,
“not p”, is denoted as “~p”
• It has opposite truth value from p i.e.,
• if p is true, ~p is false; if p is false, ~p is true.
TRUTH TABLE FOR ~ p
  P ~P
T F
F T
CONJUNCTION ():
• If p and q are statements, then the conjunction of
p and q is “p and q”, denoted as “p  q”.
• It is true when, and only when, both p and q are
true. If either p or q is false, or
• if both are false, pq is false.
• TRUTH TABLE FOR
p q P^q
T T T
• pq T F F
F T F
  F F F
• DISJUNCTION () or INCLUSIVE OR
 If p & q are statements, then the disjunction of
p and q is “p or q”, denoted as “p  q”. It is
true when at least one of p or q is true and is
false only when both p and q are false.
  TRUTH TABLE FOR p  q
p q pq
T T T
T F T
F T T
F F F
Applications of Propositional Logic
• Logic has many important applications to mathematics,
computer science, and numerous other disciplines.
Statements in mathematics and the sciences and in natural
language often are imprecise or ambiguous. To make such
statements precise, they can be translated into the language
of logic. For example, logic is used in the specification of
software and hardware, because these specifications need
to be precise before development begins. Furthermore,
propositional logic and its rules can be used to design
computer circuits, to construct computer programs, to verify
the correctness of programs, and to build expert systems.
Applications of Propositional Logic
• Translating English Sentences
• There are many reasons to translate English sentences into
expressions involving propositional variables and logical connectives.
In particular, English (and every other human language) is often
ambiguous. Translating sentences into compound statements (and
other types of logical expressions, which we will introduce later in
this chapter) removes the ambiguity. Note that this may involve
making a set of reasonable assumptions based on the intended
meaning of the sentence. Moreover, once we have translated
sentences from English into logical expressions we can analyze these
logical expressions to determine their truth values, we can
manipulate them, and we can use rules of inference (which are
discussed in Section 1.6) to reason about them.
• Example
How can this English sentence be translated into a logical expression?
“You can access the Internet from campus only if you are a computer science
major or you are not a freshman.”

You might also like