You are on page 1of 27

Discrete Structures for Computer Science

(CS C222)

Dr.N.L.Bhanu Murthy
BITS Pilani
Hyderabad Campus
What is Mathematics, really?

Its not just about numbers!


Mathematics is much more than that:

Mathematics is, most generally, the study of any and


all truths about any and all well-defined concepts.

But, these concepts can be about numbers, symbols,


objects, images, sounds, anything!

BITS Pilani, Hyderabad Campus


BITS Pilani, Hyderabad Campus
BITS Pilani, Hyderabad Campus
BITS Pilani, Hyderabad Campus
BITS Pilani, Hyderabad Campus
So, whats this class (Discrete Structures for Computer Science) about?

A set is an unordered collection of objects called the elements.


For example, V = { a, e, i, o, u} is the set of all vowels in the English alphabet.
A matrix is a rectangular array of numbers arranged in m horizontal rows
and n vertical columns.

Sets, Matrices etc are all called mathematical objects.


Collection of mathematical objects with operations defined on them and
the accompanying properties form a mathematical structure or system.
Example: The collection of sets with the operations of union, intersection, and
complement and their accompanying properties is mathematical structure. We
denote this structure by (sets, , U, ).

BITS Pilani, Hyderabad Campus


So, whats this class (Discrete Structures for Computer Science) about?

What are discrete structures anyway?

Discrete ( discreet!) - Composed of distinct, separable parts.


(Opposite of continuous.)
discrete:continuous :: digital:analog
Example - integers, people, house

Discrete Mathematical Structures or Discrete structures -


The abstract mathematical structures used to represent discrete
objects and relationships between the objects
Example graphs, sets, relations
Discrete Mathematics - The mathematical study of discrete
objects and structures.

BITS Pilani, Hyderabad Campus


BITS Pilani, Hyderabad Campus
Why study this course?

Information is stored and manipulated by computers in a discrete


fashion. 0101101

Digital computers are based on discrete bits. Therefore, both a


computers
structure (circuits) and
operations (execution of algorithms)
can be described by discrete math.

The basis of all of computing is: Discrete manipulations of discrete


structures represented in memory.

Discrete Math is the basic language and conceptual foundation for


all of computer science.

BITS Pilani, Hyderabad Campus


Discrete Math in Computer Science

Networking Artificial Intelligence


Database Computer Architecture
Image Processing Operating Systems
Programming Security & Cryptography
Languages Data Structures
Compilers & Interpreters Algorithms
Software Engineering Graphics & Animation

What else is remaining in computer science?

BITS Pilani, Hyderabad Campus


Quick Overview - Topics

Methods of proof

Direct proof: Assume p is true, and prove q.

Indirect proof: Assume q, and prove p.

Vacuous proof: Prove p by itself.

Trivial proof: Prove q by itself.

Proof by cases

Proof by Contradiction

BITS Pilani, Hyderabad Campus


Quick Overview - Topics

Methods of proof

The Domino Effect


Premise #1: Domino #0 falls.
Premise #2: For every n,
if domino #n falls,
then so does domino #n+1. 6
Conclusion: All of the dominoes fall down! 5
Weak Induction 4
3
Note:
Strong Induction
2 this works
even if there
Structural Induction 1 are infinitely
0 many dominoes!

BITS Pilani, Hyderabad Campus


Quick Overview - Topics

Set Theory

Nave Set Theory


Always implied
Formalized by Cantor in the 19th century
Set is any collection of objects
Allows construction of Set of All Sets
Georg Cantor
Russells Paradox
S={x:xx}
SSSS
If the barber shaves all those who do not
themselves shave, does he shave himself?

BITS Pilani, Hyderabad Campus


Quick Overview - Topics

Set Theory
Responded to by introduction of rigorous axioms in set theory
(Zermelo-Fraenkel axioms)
ZFC Axioms
Extensionality: xy[z(zx zy) x=y]
Null Set: xy(yx)
Pairs: xyzw(wz w=x w=y)
Unions: xyz[zy w(wx & zw)]
Power Set: xyz[zy w(wz wx)]
Infinity: x[x y(yx {y,{y}}x)]
Regularity: x[x y(yx & z(zx (zy)))]
Replacement Schema: z1vzk[x!y(x,y,z ) uvr(rv
s(su & x,y [s,r,z]))]
Separation Schema: z1zk[uvr(rv ru & x, [r, z])]
Axiom of Choice: yzw[(zw & wx ) vu[t((uw
& wt) & (ut & ty) u = v)] (optional)

Set of all sets impossible to construct from axioms


BITS Pilani, Hyderabad Campus
Quick Overview - Topics

Relations
Relations as concepts are building
blocks for modern databases (relational
database management systems)

Equivalence Relation Partial Order Relations & Lattice Theory

BITS Pilani, Hyderabad Campus


Quick Overview - Topics

Number Theory & Introduction to Cryptography


Get to rediscover the old reliable number theory and find out some
surprising facts
Very useful in crypto-systems

BITS Pilani, Hyderabad Campus


Quick Overview - Topics

Graph Theory
Begun in 1735
Bridges of Konigsberg (todays Kaliningrad): walk all 7 bridges
without crossing a bridge twice

Very useful in describing problems in Databases, Operating Systems,


Networks, EVERY CS DISCIPLINE!!!!

BITS Pilani, Hyderabad Campus


Discrete Structure of Indian Railways

Discrete Objects are all metros /


cities / towns / villages

Relation between discrete objects


is railway track

BITS Pilani, Hyderabad Campus


Quick Overview - Topics

Graph Vertexes Edges


(Nodes) (Arcs) Flow
(Network)
Telephones exchanges, Cables, fiber optics, Voice, video,
Communications computers, satellites microwave relays packets
Gates, registers,
Circuits Wires Current
processors
Rods, beams,
Mechanical Joints Heat, energy
springs
Reservoirs, pumping
Hydraulic Pipelines Fluid, oil
stations, lakes
Financial Stocks, currency Transactions Money
Freight,
Airports, rail yards, street Highways, railbeds,
Transportation vehicles,
intersections airway routes
passengers

BITS Pilani, Hyderabad Campus


Quick Overview - Topics

Recursion, Recurrence Relations

Problem: Get all disks from peg 1 to peg 2.


Rules:
a) Only move 1 disk at a time.
b) Never set a larger disk on a smaller one.

Peg #1 Peg #2 Peg #3


BITS Pilani, Hyderabad Campus
Quick Overview - Topics

Counting and Combinatorics


Compute your odds of winning lottery
Important for predicting how long certain
computer program will take to finish

Pigeonhole Principle
If there are n+1 pigeons, which must fit into n pigeonholes then
some pigeonhole contains 2 or more pigeons.

BITS Pilani, Hyderabad Campus


Quick Overview - Topics

Algebraic Structures Semi Groups, Groups, Rings, Fields

Group Theory Applications


Without coding theory and error-correcting codes there would be no deep-
space travel and pictures, no satellite TV, no compact disc, no no no .

Error-correcting codes are used to correct messages when they are


transmitted through noisy channels.

Error correcting framework


Example

BITS Pilani, Hyderabad Campus


Teaching & Evaluation
CS F222 L P U 3 0 3
Series of ~ 40 lectures ( 3hrs per week )

Lecture - Monday, Wednesday, Friday @1000Hrs (F106)

Common Hour (Tutorial) Section 1 N.L.Bhanu Murthy @1600Hrs (F106)


Section 2 - Surender Singh Samant - Friday @ @1600Hrs (F106)

Consultation Hours Friday @16.00 Hrs (B219)

S No. Component Duration Weightage Date, Day & Hour Remarks

1 Mid Test 90 mins 25% As per Time Table Close Book

2 Quiz(2) 30 mins 15% TBD Closed Book


each
3 Lab Exam / Assignments Take Home 15% TBD Open Book

4 Comprehensive 3 hours 45% As per Time Table Closed Book


Examination

Make up policy - Make-up for tests will be granted on prior permission and on justifiable grounds only.

Course notices - CSIS Group Notice Board (in B block).


Books

Text Book
T1. Kenneth H. Rosen : Discrete Mathematics and its Applications, Tata McGraw
Hill, 5th Edition, 2004 Seventh Edition

Reference Book
R1. Kolman, Busby, Ross and Rehman, Discrete Mathematical Structures for
Computer Science, Pearson Education, 5th Edition, 2003.

R2. Goodaire & Parmenter : Discrete Mathematics & Graph Theory, Pearson
Education, 2000

R3. D.S.Malik and M.K.Sen, Discrete Mathematical Structures: Theory and


Applications, Thomson, 2004.

R4. C.L.Liu, Elements of Discrete Mathematics, 2nd Edition, McGraw Hill, 1986.

BITS Pilani, Hyderabad Campus


Notations

p pq pq pq pq x P( x)
x P( x) {a1 , , an } Z, N, R {x | P( x)} xS
n
S T |S| A B A A i
i 1
n
f : A B f 1 ( x) f g x

a
S
a
i 1
i

O, , min, max a /| b gcd, lcm mod a b (mod m)


n
( a k a0 ) b [aij ] AT B
A A[ n ]
r
C (n; n1 ,, nm ) p( E | F ) R [ a ]R deg (v)

BITS Pilani, Hyderabad Campus


Thank You!!

BITS Pilani, Hyderabad Campus

You might also like