0% found this document useful (0 votes)
7 views26 pages

L01 - Introduction+Proposition

The document outlines the course IS 143 Discrete Structure at the University of Dar es Salaam, detailing its objectives, learning outcomes, and content. It emphasizes the importance of discrete mathematical structures in computer science and engineering, including topics like logic, sets, relations, and graph theory. Additionally, it provides information on course conduct, assessment methods, and rules of engagement for students.

Uploaded by

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

L01 - Introduction+Proposition

The document outlines the course IS 143 Discrete Structure at the University of Dar es Salaam, detailing its objectives, learning outcomes, and content. It emphasizes the importance of discrete mathematical structures in computer science and engineering, including topics like logic, sets, relations, and graph theory. Additionally, it provides information on course conduct, assessment methods, and rules of engagement for students.

Uploaded by

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

UNIVERSITY OF DAR ES SALAAM

COLLEGE OF ICT

IS 143
Discrete Structure

Lecture 1
Instructor
Dr. Joseph Cosmas

Kijitonyama Campus
Block A,
Room No. A023

[email protected]
Objectives
The objectives of this course are to:
1) Develop the fundamental understanding of discrete
mathematical structures such as propositional logic, predicate
logic, sets, relations, graphs and their applications in
Computer science and engineering.

2) Provides basic proof skills to prove properties of discrete


structures and to apply counting techniques to examine
discrete structures.

3) Introduce basic skills of mathematical modeling using discrete


structures.
Learning Outcomes
 Upon the end of the course, students should be able to:
1) Explain, with examples, the basic terminologies of functions,
relations, and sets.
2) Relate practical examples to the appropriate set, function,
or relation model, and interpret the associated operations
and terminology in context.
3) Describe how formal tools of symbolic logic are used to
model real-life situations, including those arising in
computing contexts such as program correctness, database
queries, and algorithms.
4) Outline the basic structure of and give examples of each
proof technique described in this unit.
Learning Outcomes
 Upon the end of the course, students should be able to:
5) Identify the difference between mathematical and strong
induction, and give examples of the appropriate use of each.

6) Illustrate by example the basic terminology of graph theory,


and some of the properties and special cases of each.

7) Relate graphs and trees to data structures, algorithms, and


counting.

8) Apply the binomial theorem to independent events and


Bayes’ theorem to dependent events.
Content
 Introduction to Course

 Proposition, Sets, Relations and Functions

 Algorithm and Basic Logics

 Proof Techniques

 Basics Of Counting (Mathematical Reasoning)

 Graphs And Trees

 Discrete Probability
Course Info.
 Primary Text:
 W.D. Wallis, A Beginner's Guide to Discrete Mathematics,
Springer, 2011.
 James L. Hein, Discrete Structures, Logic, and
Computability, Jones & Bartlett Learning, 2010.
 Kenneth Rosen, Discrete Mathematics and Its
Applications, 7th Ed., McGraw Hill, 2011.
 Gordon J. Pace, Mathematics of Discrete Structures for
Computer Science, Springer, 2012.
 Harriett Capron (1996), Essentials of Computing (2nd
Edition), Prentice Hall
Course Info.
 Course Conduct
 30 Lecture Hours

 15 Tutorial Hours
 Course Assessment:
 Coursework: Accounts for 40%
 Assignments: 20%
 Mid-Term: 20% (one or two tests)

 Final Exam: Accounts for 60%

 N. B.: This schedule may change as we progress


Rules of Engagement
 During the course, the following rules should be observed:
1) You are required to attend at least 75% of lectures to be
allowed to sit for UE.
2) Its okay to miss a test, quiz or assignment… but make sure
you have a permission from Head of Department.
3) …
Introduction
 Areas in which discrete structure concepts are present
o Formal Languages (logic, programming, syntax, etc.)
o Compiler Design
o Data Structures
o Computability
o Automata Theory
o Algorithm Design
o Relational Database Theory
o Complexity Theory (counting)
Proposition
 Proposition is a a statement or assertion that
expresses a judgment or opinion.

 A statement that lead to true = T (or 1) or false = F (or


0) (binary logic), for instance:
o ‘the moon is made of green cheese’
o ‘go to town!’ X - imperative
o ‘What time is it?’ X – interrogative

 Propositional variables: P, Q, R, S, . . .

 Calculus of propositions – argue or relate propositions


using TRUTH TABLES
Propositional Logic
 Arguing propositional Logic is normally facilitated by
logical operators: categorized as unary or binary

 Unary Logical operator:


o Negation

 Binary Logical operator:


o Conjunction
o Disjunction
o Exclusive OR
o Implication
o Biconditional
Unary Logical Operator
 Unary
o Negation
Truth Table
‘not’
Symbol:  P P
F(0) T(1)
o Example: P: I am going to town
T(1) F(0)

 P: I am not going to town;

It is not the case that I am going to town;

I ain’t goin’.
Binary Logical Operator
 Binary
Truth Table
o Conjunction: ‘and’
P Q PQ
Symbol: 
0 0 0
o Example: P - ‘I am going to town’ 0 1 0
Q - ‘It is going to rain’ 1 0 0
1 1 1

P  Q: ‘I am going to town and it is going to rain.’

Note: Both P and Q must be true for proposition to be true!


Binary Logical Operator (Cont…)
 Binary
o Disjunction: inclusive ‘or’ Truth Table:
Symbol:  PQ
P Q
o Example: P - ‘I am going to town’ 0 0 0
Q - ‘It is going to rain’ 0 1 1
1 0 1
P  Q: ‘I am going to town or
it is going to rain.’ 1 1 1

Note: Only one of P and Q must be true for proposition to be true.


Hence, the inclusive nature.
Binary Logical Operator (Cont…)
 Binary
Truth Table
P Q PQ
o Exclusive OR: Symbol 
0 0 0
Example:
0 1 1
P - ‘I am going to town’
Q - ‘It is going to rain’
1 0 1
1 1 0

P  Q: ‘Either I am going to town or it is going to rain.’

Note: Only one of P and Q must be true.


Binary Logical Operator (Cont…)
 Binary Truth Table
P Q PQ
o Implication: ‘If...then...’
Symbol:  0 0 1
0 1 1
o Example: 1 0 0
P - ‘I am going to town’ 1 1 1
Q - ‘It is going to rain’

P  Q: ‘If I am going to town then it is going to rain.’

Note: The conditional statement p → q is false when p


is true and q is false, and true otherwise
Binary Logical Operator (Cont…)
 Implication (cont.)

o Equivalent forms:
If P, then Q
P implies Q
If P, Q
P only if Q
P is a sufficient condition for Q
Q if P
Q whenever P
Q is a necessary condition for P

Note: The implication is false only when P is true and Q is false!


Binary Logical Operator (Cont…)
 Terminology:

P = premise, hypothesis, antecedent


Q = conclusion, consequence

 More terminology:

Q  P is the CONVERSE of P  Q

 Q   P is the CONTRAPOSITIVE of P  Q
Binary Logical Operator (Cont…)

Example:

Find the converse and contrapositive of the following statement:

R: ‘Raining tomorrow is a sufficient condition for me not


going to town.’
Binary Logical Operator (Cont…)
 Step 1:Assign propositional variables to component propositions
P: It will rain tomorrow
Q: I will not go to town

 Step 2: Symbolize the assertion


R: P  Q

 Step 3: Symbolize the converse


QP

 Step 4: Convert the symbols back into words


‘If I don’t go to town then it will rain tomorrow’
or
‘Raining tomorrow is a necessary condition for me not going to town.’
or
‘Me not going to town is a sufficient condition for it raining tomorrow.’
Binary Logical Operator (Cont…)
 Binary
Truth Table
 Biconditional: ‘if and only if’, ‘iff’ P Q PQ
Symbol:  0 0 1
Example: P - ‘I am going to town’, 0 1 0
Q - ‘It is going to rain’ 1 0 0
1 1 1
P  Q: ‘I am going to town if and only if it is going to rain.’

Note: Both P and Q must have the same truth value.

 Imprecision of the natural language:


‘If you finish your meal then you can have dessert’
Binary Logical Operator (Cont…)
 Breaking assertions into component propositions - look for the
logical operators!

Example: ‘If I go to Harry’s or go to the country I will not go shopping.’

P: I go to Harry’s
Q: I go to the country
R: I will go shopping

If......P......or.....Q.....then....not..…R

(P V Q)R
Truth Table
 Constructing a truth table:

o one column for each propositional variable

o one for the compound proposition

o count in binary

o If you have n propositional variables = 2n rows

 You may find it easier to include columns for propositions, which


themselves are component propositions.
Truth Table
 So, what is the truth table of (P V Q)R

Truth Table
P Q R (P V Q)R

0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
Application Proposition Logic (Exercise)
1. How can this English sentence be translated into a logical
expression?
o “You can access the Internet from campus only if you are a computer
science major or you are not a freshman.”
o “You cannot ride the roller coaster if you are under 4 feet tall unless
you are older than 16 years old.”

2. Express the specification “The automated reply cannot be sent


when the file system is full” using logical connectives.

3. Determine whether these system specifications are consistent:


o “The diagnostic message is stored in the buffer or it is
retransmitted.”
o “The diagnostic message is not stored in the buffer.”
o “If the diagnostic message is stored in the buffer, then it is
retransmitted.”

You might also like