Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Forman Christian College, Lahore
(A Chartered University)
Assignment 2
Due: Wednesday 20/7/2016 at the start of class
1. Five friends have access to a chat room. Is it possible to determine who is chatting if the following
information is known? Either Kev
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
FORMAN CHRISTIAN COLLEGE (A Chartered University)
Spring 2016
Discrete Mathematics (3 Credits Hrs)
Course Outline and Weekly Plan
Instructor Information:
Name
Umber Nisar
Email
umbernisar@fccollege.edu.pk
Office
S 426
Office Hours Monday, Wednesday 12:00
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Forman Christian College, Lahore
(A Chartered University)
Assignment 1
Due: Wednesday 15/6/2016 at the start of class
1. Suppose the following two propositions are both False.
If the student has passed Calculus, then he is registered for Discrete Math.
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Lecture 5
Discrete Mathematics
Sets
Ordered ntuples
These are like sets, except that duplicates matter,
and the order makes a difference.
For nN, an ordered ntuple or a sequence or list
of length n is written (a1, a2, , an).Its first
element is a1, etc
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Lecture 2
Discrete Mathematics
Propositional Equivalence
Propositional Equivalence
Two syntactically (i.e., textually) different compound propositions may
be the semantically identical (i.e., have the same meaning).We call
them equivalent. Learn:
Various
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Lecture 4
Discrete Mathematics
Sets
SET
What is a set?
It's a collection
SET
First you specify a common property among "things" and
then you gather up all the "things" that have this common
property.
?
?
SET
A set is a type of structure, representing a
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Lecture 3
Discrete Mathematics
Logic and Proof
Predicate Logic
Predicate logic is an extension of propositional
logic that permits concisely reasoning about
whole classes of entities.
Propositional logic treats simple propositions as
atomic entities.
I
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Lecture 6
Discrete Mathematics
Functions
Functions
The concept of function is extremely important in discrete
mathematics as functions are used:
In definition of discrete structures like sequences and strings.
To represent how long it takes a computer t
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Lecture
Discrete Mathematics
Algorithms
1
11/13/2015
An algorithm is a finite sequence of precise
instructions for performing a computation or for
solving a problem.
2
11/13/2015
Describe an algorithm for finding the
maximum (largest) value in a finite
s
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Lecture
Discrete Mathematics
Algorithms
1
11/16/2015
An algorithm is a finite sequence of precise
instructions for performing a computation or for
solving a problem.
2
11/16/2015
Describe an algorithm for finding the
maximum (largest) value in a finite
s
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Lecture 1
Discrete Mathematics
Logic and Proof
Foundations of Logic
Mathematical Logic is a tool for working with elaborate compound
statements. It includes:
A formal language for expressing them.
A concise notation for writing them.
A methodology for
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Lecture 7
Discrete Mathematics
Functions
OnetoOne Functions
A function is onetoone (11), or injective, or an
injection, iff f(x) = f(y) implies that x=y for all x and y
in domain of f.
In other words every element of its range has only 1
preimage.
Forman Christian College, Lahore (university status)
Discrete Mathematics
COMPUTER S 113

Summer 2016
Lecture 8
Discrete Mathematics
Functions
Onto (Surjective) Functions
A function f:AB is onto or surjective or a surjection iff its
range is equal to its codomain (bB, aA: f(a)=b).
Think: An onto function maps the set A onto (over, covering) the
entirety
Forman Christian College, Lahore (university status)
Programming 2
COMPUTER S CS111

Spring 2016
Pointer Practice Questions
Fakhir Shaheen
April 21, 2016
1
Iterating through arrays
1.1
Write a function having the following signature that returns the index of the element
having maximum value in an array:
int FindMax(int * a, int SIZE);
EXAMPLE:
Sampl