Example: biology

A Course in Discrete Structures - Cornell University

A Course in Discrete StructuresRafael PassWei-Lung Dustin TsengPrefaceDiscrete mathematics deals with objects that come indiscretebundles, ,1 or 2 babies. In contrast, continuous mathematics deals with objects thatvarycontinuously, , inches from a wall. Think of digital watchesversus analog watches (ones where the second hand loops around continuouslywithout stopping).Why study Discrete mathematics in computer science? It does not directlyhelp us write programs. At the same time, it is the mathematics underlyingalmost all of computer science. Here are a few examples: Designing high-speed networks and message routing paths. Finding good algorithms for sorting.

exitivity, symmetry, and transitivity). A relation Ron ... Symmetric if whenever (x;y) 2R, (y;x) 2R. 1A folklore version of this paradox concerns itself with barbers. Suppose in a town, the only barber shaves all and only those men in town who do not shave themselves. This seems

Tags:

  Course, Structure, Discrete, Symmetry, And transitivity, Transitivity, A course in discrete structures

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of A Course in Discrete Structures - Cornell University

1 A Course in Discrete StructuresRafael PassWei-Lung Dustin TsengPrefaceDiscrete mathematics deals with objects that come indiscretebundles, ,1 or 2 babies. In contrast, continuous mathematics deals with objects thatvarycontinuously, , inches from a wall. Think of digital watchesversus analog watches (ones where the second hand loops around continuouslywithout stopping).Why study Discrete mathematics in computer science? It does not directlyhelp us write programs. At the same time, it is the mathematics underlyingalmost all of computer science. Here are a few examples: Designing high-speed networks and message routing paths. Finding good algorithms for sorting.

2 Performing web searches. Analysing algorithms for correctness and efficiency. Formalizing security requirements. Designing cryptographic mathematics uses a range of techniques, some of which is sel-dom found in its continuous counterpart. This Course will roughly cover thefollowing topics and specific applications in computer Sets, functions and relations2. Proof techniques and induction3. Number theorya) The math behind the RSA Crypto system4. Counting and combinatorics5. Probabilitya) Spam detectionb) Formal security6. Logica) Proofs of program correctness7. Graph theoryia) Message Routingb) Social networks8. Finite automata and regular languagesa) CompilersIn the end, we will learn to write precise mathematical statements thatcaptures what we want in each application, and learn to prove things aboutthese statements.

3 For example, how will we formalize the infamous zero-knowledge property? How do we state, in mathematical terms, that a bankingprotocol allows a user to prove that she knows her password, without everrevealing the password itself?ContentsContentsiii1 Sets, Functions and Sets .. Relations .. Functions .. Set Cardinality, revisited ..82 Proofs and Basic Proof Techniques .. Proof by Cases and Examples .. Induction .. Inductive Definitions .. Fun Tidbits .. 313 Number Divisibility .. Modular Arithmetic .. Primes .. The Euler Function .. Public-Key Cryptosystems and RSA.

4 564 The Product and Sum Rules .. Permutations and Combinations .. Combinatorial Identities .. Inclusion-Exclusion Principle .. Pigeonhole Principle .. 725 Probability Spaces .. Conditional Probability and Independence .. Random Variables .. Expectatation .. Variance .. 926 Propositional Logic .. Logical Inference .. First Order Logic .. Applications .. 1087 Graph Isomorphism .. Paths and Cycles .. Graph Coloring .. Random Graphs [Optional] .. 1228 Finite Deterministic Finite Automata .. Non-Deterministic Finite Automata.

5 Regular Expressions and Kleene s Theorem .. 133A Problem Problem Set A .. 137B Solutions to Problem Problem Set A .. 141 Chapter 1 Sets, Functions and Relations A happy person is not a person in a certain set of circumstances, but rather aperson with a certain set of attitudes. Hugh SetsA set is one of the most fundamental object in (Set, informal).A set is anunorderedcollections of definition is informal because we do not define what a collection is;a deeper study of sets is out of the scope of this following notations all refer to the same set:{1,2},{2,1},{1,2,1,2},{x|xis an integer,1 x 2}The last example read as the set of allxsuch thatxis an integer between 1and 2 (inclusive).

6 We will encounter the following sets and notations throughout the Course : ={ }, the empty set. N={0,1,2,3,..}, the non-negative integers N+={1,2,3,..}, the positive integers Z={.., 2, 1,0,1, }, the integers Q={q|q=a/b, a,b Z, b6= 0}, the rational numbers Q+={q|q Q, q >0}, the positive rationals R, the real numbers12sets, functions and relations R+, the positive realsGiven a collection of objects (a set), we may want to know how large is thecollection:Definition (Set cardinality).The cardinality of a setAis the number of(distinct) objects inA, written as|A|. When|A| N(a finite integer),Ais afinite set; otherwiseAis an infinite set. We discuss the cardinality of infinitesets |{1,2,3}|=|{1,2,{1,2}}|= two collections of objects (two sets), we may want to know if theyare equal, or if one collection contains the other.

7 These notions are formalizedas set equality and subsets:Definition (Set equality).Two setsSandTare equal, written asS=T,ifSandTcontains exactly the same elements, , for everyx,x S x (Subsets).A setSis a subset of setT, written asS T, ifevery element inSis also in T, , for everyx,x S x T. SetSis astrictsubset of T, written asS TifS T, and there exist some elementx Tsuch thatx / {1,2} {1,2,3}. {1,2} {1,2,3}. {1,2,3} {1,2,3}. {1,2,3}6 {1,2,3}. For any setS, S. For every setS6= , S. S TandT Sif and only ifS= , it is time to formalize operations on sets. Given two collection ofobjects, we may want to merge the collections (set union), identify the objectsin common (set intersection), or identify the objects unique to one collection(set difference).

8 We may also be interested in knowing all possible ways ofpicking one object from each collection (Cartesian product), or all possibleways of picking some objects from just one of the collections (power set).Definition (Set operations).Given setsSandT, we define the SETS3 Power (S) is the set of all subsets ofS. Cartesian T={(s,t)|s S,t T}. T={x|x Sorx T}, set of elements inSorT. T={x|x S,x T}, set of elements inSandT. T={x|x S,x / T}, set of elements inSbut notT. {x|x / S}, set of elements not inS. This isonly meaningful when we have an implicit universeUof objects, ,S={x|x U,x / S}.Example {1,2,3},T={3,4},V={a,b}. Then: P(T) ={ ,{3},{4},{3,4}}.

9 S V={(1,a),(1,b),(2,a),(2,b),(3,a),(3,b)}. S T={1,2,3,4}. S T={3}. S T={1,2}. If we are dealing with the set of all integers,S={.., 2, 1,0,4,5,..}.Some set operations can be visualized using Venn diagrams. See To give an example of working with these set operations, consider thefollowing set all setsSandT,S= (S T) (S T). can visualize the set identity using Venn diagrams (see Figure ). To formally prove the identity, we will show both of the following:S (S T) (S T)( )(S T) (S T) S( )To prove ( ), consider any elementx S. Eitherx Torx / T. Ifx T, thenx S T, and thus alsox (S T) (S T). Ifx / T, thenx (S T), and thus againx (S T) (S T).To prove ( ), consider anyx (S T) (S T).

10 Eitherx S Torx S T Ifx S T, thenx S4sets, functions and relationsSTU(a)S TSTU(b)S TSTU(c)S TSTU(d)SSTV(e) Venn diagram with three : Venn diagrams of setsS,T, andVunder universeU. Ifx S T, thenx S. In computer science, we frequently use the following additional notation(these notation can be viewed as short hands):Definition a setSand a natural numbern N, Snis the set of lengthn strings (equivalentlyn-tuples) with alphabetS. Formally we define it as the product ofncopies ofS( ,S S S). S is the set of finite length strings with alphabetS. Formally wedefine it as the union ofS0 S1 S2 , whereS0is a set thatcontains only one element: the empty string (or the empty tuple () ).


Related search queries