×
Excuses Don't get results

# Note for Discrete Structures - DS By Rishab Sahoo

• Discrete Structures - DS
• Note
• Biju Patnaik University of Technology BPUT - BPUT
• Computer Science Engineering
• 17 Topics
• 14418 Views
0 User(s)

#### Text from page-1

A Course in Discrete Structures Rafael Pass Wei-Lung Dustin Tseng

#### Text from page-2

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

#### Text from page-3

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?

#### Text from page-4

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