Lecture # 01 - New

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 35

CSC:102 Discrete Structure

Instructor: Khurram Iqbal

Department of Computer Science


COMSATS University, Islamabad
Objectives of this course

 The course “Discrete Structure” has following


objective:
 To develop the ability to see a problem from a
mathematical perspective.
 This objective deals with familiarizing students with formal
system (propositional and predicate logic) on which
mathematical reasoning is based.
 To provides the mathematical foundations for many
computer science
 This objective deals with teaching important discrete
structures such as sets, relations, functions, graph and
trees.

Department of Computer Science 2


Objectives of this course

 The course “Discrete Structure” has following


objective:
 To train in the construction and understanding of
mathematical proofs.
 This objective deals with knowing basic methods of proof
and use certain basic strategies to produce proofs

Department of Computer Science 3


Our journey(road map) towards these objectives
Our journey(road map) towards these Course objectives
Outline

Introduction Function Graph

Logic Sequence
and Series Tree

Set
Recursion Conclusion

Methods
Relations
of Proof

Department of Computer Science 4


Our journey(road map) towards these objectives
Symbolic Logic: Propositional Logic: Logical
Connectives, Truth Tables, Normal Forms, Negation,
Notions of Implication, Converse, Inverse,
Mathematical Contrapositive, Tautology & Contradiction, Valid &
Reasoning Invalid Arguments, Predicate Logic, Translation of
English Sentences into Logical Expressions,
Applications, and Limitations.
CLO-1: Model real life problems using symbolic logic.
Rules of Inference: Propositional and Building
Arguments.
CLO-2: Apply rules of inference to build logical
arguments.
Sets: Venn Diagram, Union, Intersection,
Complement, Cartesian product, product sets,
cardinality of finite sets
Discrete Structures Relations: Reflexivity, symmetry, transitivity,
Equivalence relations, partial orders
Function: Surjections, injections, Bijections, Inverses,
Composition
CLO -3: Perform the operations associated with sets,
functions, and relations.
Department of Computer Science
Our journey(road map) towards these objectives
The structure of mathematical proofs, Direct proofs,
Proving Techniques Proof by counter example, Proof by contradiction,
Mathematical induction, Structural induction, Weak
and Strong induction
CLO-4: Apply appropriate proof techniques to
construct a sound argument.
Counting arguments, Sum and product rule,
Inclusion-exclusion principle, Arithmetic and
geometric progressions, Fibonacci numbers, The
pigeonhole principle, Permutations and combinations,
Counting & Basic definitions, Pascal’s identity, The binomial
Probability theorem, Solving recursive relations, Basic modular
arithmetic.
CLO-5: Use probabilistic concepts to solve a particular
problem.
Graph, Representation of Graph, Undirected graphs,
Directed graphs, Weighted graphs, Graph
Graph and Tree Isomorphism, Bipartite graph; Trees and Traversal
strategies
CLO-6: Model a real world problem using graphs and
trees.
Department of Computer Science
Assessment Plan

Assessme
CLO-1 CLO-2 CLO-3 CLO-4 CLO-5 CLO-6
nt Tools
Quizzes Quiz 1 Quiz 2 Quiz 3 Quiz 3 Quiz 4 -

Assignme Assignment Assignment Assignment Assignment Assignment


Assignment 2
nts 1 1 3 4 4
Midterm Mid Term Mid Term Mid Term
- - -
Exam Exam Exam Exam

Final Term
Final Term Exam
Exam

Department of Computer Science 7


Logistics and Marks distribution
 Web: CUOnline
 Textbook: See next slide
 Marks distribution: Grading on 100

Mid Term Terminal


Quizzes Assignments Total
Exam Exam
15 10 25 50 100
 Keys to success
 Don’t absent in class(80% Attendance required)
 Respect due date(Submit your assignment on due date,10%
marks will be deducted on late submission)
 Start early, Don’t fall behind, Seek help from Instructor
 Don’t cheat

Department of Computer Science


Text/Reference Book
 Text Book

Discrete Mathematics and its


Applications
(Latest edition), Kenneth H. Rosen (2018,
Prentice Hall, ISBN 0-13-080302-2)

 Reference Book

Discrete Mathematics with Applications


(Latest edition), Susanna S. Epp.

Department of Computer Science


Teaching-Learning strategy

 How to approach towards this subject?


 Pedagogy
What I hear, I forget.
What I see, I remember.
What I do, I understand.
— Confucius

Department of Computer Science


Teaching-Learning strategy

 This course is oriented towards :


 Active-learning:
 I will not be simply lecturing.

 For any topic, I will mostly pose some questions.

 Answering these question will lead you a meaning full


learning.
 You will have to do a lot of thinking during lecture!

 Collaborative-learning:
 You will do small group discussion activities.

 You will teach and learn from each other!

Department of Computer Science


Academic Honesty

 You must solve assignments entirely on


your own.
 You must neither take, nor show, give or
otherwise allow others to take your
solutions, or other work.
 Plagiarism, cheating, and other forms of
academic dishonesty are prohibited and
may result in grade F for the course.

Department of Computer Science


Today Covered
After completing this lecture you will be able to
know
 What this course is about?
 What is Discrete Structure?
 Why do you need to study Discrete
Structure?
 Fundamentals of logic
 Types of logic
 Proposition/statement
 Truth value

Department of Computer Science


Let us Start our
Journey

Department of Computer Science


Lecture No 1

Introduction

(What, Why and Where Discrete Structure . . .)

Department of Computer Science 15


CONCEPT
WHAT

Department of Computer Science


What is Discrete Structure?

 Discrete structure is the part of mathematics


devoted to the study of discrete objects. (Here
discrete means consisting of distinct or
unconnected elements.)

Department of Computer Science


Motivation/
WHY

Department of Computer Science


Why Study Discrete Mathematics?

 There are several important reasons for studying


discrete mathematics.
 FIRST REASON:
 Develop your mathematical maturity:
 that is, through this course develop your ability to
understand and create mathematical arguments.
 SECOND REASON
 discrete mathematics is the gateway for many
computer science courses. Students find these
courses much more difficult when they have not had
the appropriate mathematical foundations from
discrete math.

Department of Computer Science 19


WHERE

Department of Computer Science


Foundation of CS
Topic Subject(Foundation
Logic and Proof Programming Languages,
Digital logic Design, AI
Set and Number theory Cryptography, Information
Security, Network security
Function Analysis of Algorithm
Relation Database
Induction and Recursion Correctness of Algorithm
Combinatorial Analysis Simulation and Modeling,
Average case Analysis of
Algorithm, Statistical
Inference
Graph and Tree Computer Network, Social
Networks, Circuit theory,
Department of Computer Science
What kind of problems can be solved using DM?

 How can a circuit that adds two integers be


designed? (Boolean Algebra/Digital Logic
Design)
 How many ways are there to choose a valid
password on a computer system?
(combinatorics)
 Is there a link between two computers in a
network?(Graph Theory)
 How can I identify spam e-mail messages?
(Artificial Intelligence)
 How can we encrypt credit card information on
the web?(Cryptography)
Department of Computer Science 22
What kind of problems can be solved using DM?
 What is the shortest path between two cities
using a transportation system? (Graph Theory)
 How can a list of integers be sorted so that the
integers are in increasing order? (Algorithm
Thinking)
 How many steps are required to do such a
sorting? (Algorithm Analysis)
 How can it be proved that a sorting algorithm
correctly sorts a list? (Correctness of
Algorithm)
 How many valid Internet addresses are there?
(combinatorics)
Department of Computer Science 23
Let’s get started with...

Logic!

Department of Computer Science 24


What is LOGIC?

 Logic is the study of principles and techniques


of reasoning.
 It originated with the ancient Greeks, led by the
philosopher Aristotle, who is often called the
father of logic.
 Use of logical methods in mathematics:
 To prove theorems and arguments
 Use of logical methods computer science:
 To prove that programs do what they are alleged to
do.

Department of Computer Science 25


Logic

 “Logic is the beginning of wisdom, not the


end”
 Science of Reasoning
 Logic n.1. The branch of philosophy concerned
with analysing the patterns of reasoning by
which a conclusion is drawn from a set of
premises, without reference to meaning or
context
(Collins English Dictionary)

Department of Computer Science


Why Logic?

 Basis of mathematical reasoning


 gives precise meaning to mathematical statements
 is used to distinguish between valid and invalid
mathematical arguments
 Applications in CS:
 Design of Hardware
 Programming
 Artificial Intelligence
 Databases
 And many more

Department of Computer Science 27


What is simple statement/ proposition?

Which of the following sentences are either true or false (but not
both)?
a)The only positive integers that divide 7 are 1 and 7 itself.
b)He is very rich.
c)For every positive integer n, there is a prime number larger than n.
d)Buy two tickets to the “Unhinged Universe” rock concert for Friday.
e)x + 4 = 6.

A sentence that is either true or false, but not both, is called a


proposition.

Department of Computer Science 28


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.

Department of Computer Science 29


Examples

1. Grass is green (with truth value T).


2. 4 + 2 = 6 (with truth value T).
3. 4 + 2 = 7 (with truth value F).
4. There are four fingers in a hand. (with truth value F).
All the above sentences are propositions

But the statements given below are not propositions.


• Close the door (here a command is given).
• x is greater than 2 (here we have an unknown variable).
• He is very rich (here we don’t about He).

Department of Computer Science 30


Note

If the sentence is preceded by other


sentences that make the pronoun or
variable reference clear, then the sentence
is a statement.
x=1 Bill Gates is an American
x>2 He is very rich
x > 2 is a statement with He is very rich is a statement with
truth-value FALSE. truth-value TRUE.

Department of Computer Science 31


Your Turn

UNDERSTANDING STATEMENTS

1. x + 2 is positive.
2. May I come in?
3. Logic is interesting.
4. It is hot today.
5. -1 > 0
6. x + y = 12

{Some of these sentences are statements and others are not. Can you
tell?}

Department of Computer Science 32


Symbolic Representation

Statements are symbolically represented by letters such as p, q, r,...

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

Department of Computer Science 33


CONCLUSION

Department of Computer Science


Objectives of this course

 UPSHOT
 SPEAKING MATHEMATICALLY
 To teach students how to think logically and mathematically.
 mathematical way of thinking help you in a wide variety of situations.
 FOUNDATION OF COMPUTER SCIENCE
 To lay the mathematical foundation for computer science
courses such as
 Data structures
 Design and Analysis of algorithms
 Relational database theory
 Automata theory and formal languages
 Artificial Intelligence
 Compiler design
 Cryptography.

Department of Computer Science 35

You might also like