×
WORK HARD UNTIL LAMP LIGHT OF STUDY TABLE BECOMES SPOT LIGHT OF STAGE.
--Your friends at LectureNotes
Close

Discrete Structures

by Rishab Sahoo
Type: NoteInstitute: Biju Patnaik University of Technology BPUT Specialization: Computer Science EngineeringOffline Downloads: 581Views: 6557Uploaded: 10 months agoAdd to Favourite

Share it with your friends

Suggested Materials

Leave your Comments

Contributors

Rishab Sahoo
Rishab Sahoo
A Course in Discrete Structures Rafael Pass Wei-Lung Dustin Tseng
Preface Discrete mathematics deals with objects that come in discrete bundles, e.g., 1 or 2 babies. In contrast, continuous mathematics deals with objects that vary continuously, e.g., 3.42 inches from a wall. Think of digital watches versus analog watches (ones where the second hand loops around continuously without stopping). Why study discrete mathematics in computer science? It does not directly help us write programs. At the same time, it is the mathematics underlying almost all of computer science. Here are a few examples: • • • • • • Designing high-speed networks and message routing paths. Finding good algorithms for sorting. Performing web searches. Analysing algorithms for correctness and efficiency. Formalizing security requirements. Designing cryptographic protocols. Discrete mathematics uses a range of techniques, some of which is seldom found in its continuous counterpart. This course will roughly cover the following topics and specific applications in computer science. 1. Sets, functions and relations 2. Proof techniques and induction 3. Number theory a) The math behind the RSA Crypto system 4. Counting and combinatorics 5. Probability a) Spam detection b) Formal security 6. Logic a) Proofs of program correctness 7. Graph theory i
a) Message Routing b) Social networks 8. Finite automata and regular languages a) Compilers In the end, we will learn to write precise mathematical statements that captures what we want in each application, and learn to prove things about these statements. For example, how will we formalize the infamous zeroknowledge property? How do we state, in mathematical terms, that a banking protocol allows a user to prove that she knows her password, without ever revealing the password itself?
Contents Contents iii 1 Sets, Functions and Relations 1.1 Sets . . . . . . . . . . . . . . 1.2 Relations . . . . . . . . . . . 1.3 Functions . . . . . . . . . . . 1.4 Set Cardinality, revisited . . . 2 Proofs and Induction 2.1 Basic Proof Techniques . . . 2.2 Proof by Cases and Examples 2.3 Induction . . . . . . . . . . . 2.4 Inductive Definitions . . . . . 2.5 Fun Tidbits . . . . . . . . . . 3 Number Theory 3.1 Divisibility . . . . . . . . 3.2 Modular Arithmetic . . . 3.3 Primes . . . . . . . . . . . 3.4 The Euler φ Function . . 3.5 Public-Key Cryptosystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 5 7 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 13 15 17 26 31 . . . . . . . . . . . . . . . . . . . . . . . . and RSA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 37 41 47 52 56 . . . . . 61 61 63 65 69 72 . . . . . . . . . . 4 Counting 4.1 The Product and Sum Rules . . 4.2 Permutations and Combinations 4.3 Combinatorial Identities . . . . . 4.4 Inclusion-Exclusion Principle . . 4.5 Pigeonhole Principle . . . . . . . 5 Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 iii

Lecture Notes