discrete mathematical structures notes

Upload: tj1989

Post on 03-Apr-2018

242 views

Category:

Documents


1 download

TRANSCRIPT

  • 7/28/2019 Discrete mathematical structures Notes

    1/23

    1 Logical Operators

    p q (1)is False when Both p and q are False; True otherwise

    p q (2)is True when Both p and q are True; False otherwise

    p q (3)is True when exactly one is True; False otherwise

    p q (4)Can be read as p only if q

    is False when p is True and q is False; True otherwise

    True when both p and q are True True when p is False (q doesnt matter) is False when p is True and q is False

    ifp is False, then q must be Trueq unless p and p q have the same truth value

    Assume

    p q (5)Converse q pContrapositive q p

    Same truth value as p q False only when p is False and q is True

    Inverse p q

    p q (6) True when p and q have same truth value

    1

  • 7/28/2019 Discrete mathematical structures Notes

    2/23

    True when p q is True and q p is True; False otherwise

    Tautology is a proposition that is always True

    Contradiction is a proposition that is always False

    2 Logical Equivalencies

    Identity Lawsp T p

    p F pDomination Laws

    p T Tp F F

    Idempotentp p p

    p

    p

    p

    Commutative p q qpp q qp

    Associative(p q) r p (q r)(p q) r p (q r)

    Distributionp (q r) (p q) (p r)

    p (q r) (p q) (p r)Absorption

    p (p q) pp (p q) p

    Negation (Complement)p p T

    p p F

    2.1 Logical Equivalencies With Conditional Statements

    p q p qp q q p

    p q p qp q p q

    p q p qp q (p q)(p q) p q

    (p q) (p r) p (q r)(p r) (q r) (p q) r(p q) (p r) p (q r)(p r) (q r) (p q) r

    2.2 Logical Equivalencies with Biconditionalsp q (p q) (q p)

    p q p qp q (p q) (p q)

    (p q) (p q)

    2

  • 7/28/2019 Discrete mathematical structures Notes

    3/23

    2.3 De-Morgans Laws

    (p q) p q(p q) p q

    3 Quantifiers

    3.1 Universal Quantifier

    (7)

    It is read as For all. So x means For all x The statement xP(x) is the same as the conjunction P(x1) P(x2)

    P(xn).

    Can be distributed over a conjunction (), but can not be distributedover a disjunction().

    Meaning x(P(x) Q(x)) xP(x) xQ(x))

    3.2 Existential Quantifier

    (8)

    It is read as There exists. So x means There exists an x Similarly the statement xP(x) is the same as the disjunction P(x1)

    P(x2) P(xn)

    Can be distributed over a disjunction(), but can not be distributedover a conjunction().

    Meaning x(P(x) Q(x)) xP(x) xQ(x))

    Statement When is it True? When is it FalsexP(x) P(x) is True for all x There is an x for which P(x) is FalsexP(x) There is an x for which P(x) is True P(x) is False for every x

    4 Other Quantifiers

    4.1 Uniqueness Quantifier

    ! (9)Denoted by ! or 1. !xP(x) states that There exists a unique x such thatP(x) is true.

    3

  • 7/28/2019 Discrete mathematical structures Notes

    4/23

    4.2 Negating Quantified Expressions

    De Morganss Laws for QuantifiersNegation Equivalent Statement When is Negation True? When False?xP(x) xP(x) For every x, P(x) is False There is an x for which

    P(x) is TruexP(x) xP(x) There is an x for which

    P(x) is FalseP(x) is True for every x.

    5 Rules of Inference

    Rule of Inference Tautologyp (p (p q)) q

    p

    q

    qq (q (p q)) p

    p q p

    p q ((p q) (q r)) (p r)q r p q

    p q ((p q) p) qp q

    p q (p q) p p

    p ((p) (q)) (p q)q p qp q ((p q) (p r)) (q r)p r q r

    6 Rules of Inference for Quantified Statements

    Universal Instantiation is the rule of inference used to conclude that P(c)is true where c is a particular member of the domain, given the premisexP(x).

    Universal Generalization is the rule of inference that states that xP(x) istrue, given the premise that P(c) is true for all elements c in the domain.It is used when we show that xP(x) is true by taking an arbitrary elementc from the domain and showing that P(c) is true. The element c that weselect must be an arbitrary, and not a specific, element of the domain.

    4

  • 7/28/2019 Discrete mathematical structures Notes

    5/23

    Existential Instantiation is the rule that allows us to conclude that there isan element c in the domain for which P(c) is true if we know that

    xP(x)

    is true. We cannot select an arbitrary value of c here, but it must be a cfor which P(c) is true.

    Existential Generalization is the rule of inference that is used to concludethat xP(x) is true when a particular element c with P(c) true is known.That is if we know one element c in the domain for which P(c) is true,then we know that xP(x) is true.

    Rule of Inference NamexP(x) Universal Instantiation P(c)

    P(c) for an arbitrary c Universal Generalization

    P(x)

    xP(x) Existential Instantiation P(c) for some element c

    P(c) for some element c Existential Generalization

    xP(x)

    7 Proofs

    Common terminology

    Theorem a statement that can be shown to be true

    Proposition less important theorem.

    Proof a valid argument that establishes the truth of a theorem.Axioms statements that are used in a proof. They are assumed to be true.

    Lemma less important theorem that is helpful in the proof of other results.

    7.1 Types of Proofs

    Direct Proof of a conditional statement p q First step is the assumption that p is true. Then use the rules of infrence to get to q must also be true. With most direct proofs you will see that they are straightforward,

    using a fairly obvious sequence of steps to get to the conclusion.

    Proof by Contraposition Prove q p They use the fact that p q is equivalent to its contrapositive q

    p So the hypothesis is that q is true

    5

  • 7/28/2019 Discrete mathematical structures Notes

    6/23

    Then get to the conclusion that p is true as well using axioms, def-initions, and previously proven theorems with the rules of inference

    Proofs by Contradiction Prove p q Suppose you want to prove the statement p is true, and we can find

    a contradiction q such that p q is true. Because q is false, but p q is true, we can conclude that p is

    false, which means that p is true.

    Since r r is a contradiction, we can prove that p is true if we canshow that p (r r) is true from some proposition r

    8 Sets, Functions, Sequences, and Sums

    8.1 Sets

    Notes A set is an unordered collection of objects. The objects in a set are called the elements or members of the set. Normally lower case letters are used to denote the elements of a set. The order in which the elements of a set are listed doesnt matter. A special set that has no elements is called the Empty Set and is denoted

    by

    A set with one elements is called a Singleton Set

    A common error is to confuse the empty set, with the singleton set, {} The single element of the set {} is the empty set itself.

    When we wish to emphasize that a set A is a subset of the set B butthat A = B, we write A B and say that A is a proper set of B. ForA B to be true, it must be the case that A B and there must existan element x of B that is not an element of A.

    A way to show that two sets have the same elements is to show that eachset is a ubset of the other. So if we can show that if A and B are sets withA B and B A then A = B.

    The Power Set of a set S, has as its members all the subsets of S. If a set has n elements then its power set has 2n elements The order of elements in a collection is often important, since sets are

    unorded, a dfferent structure is needed to represent ordered collections.This is proveded by ordered n- tuples.

    6

  • 7/28/2019 Discrete mathematical structures Notes

    7/23

    Two ordered n-tuples are equal if and only if each corresponding pair oftheir elements is equal. So (a1, a2, . . . , an) = (b1, b2, . . . , bn) if and only if

    ai = bi

    Definitions

    Two sets are equal if and only if they have the same elements. That is ifAand B are sets, then A and B are equal if and only ifx(x A x B)we write A = B if A and B are equal sets.

    The set A is said to be a subset of B if and only if every element of A isalso an element of B. This is written by: A B.This s true only whenx(x A x B) is true.

    Every nonempty set S is guaranteed to have at least two subsets, theempty set and the set S itself.

    For every set S the following is always true:

    S S S

    A is the proper subset of B (A B) if: x(x A x B) x(x B x / A)

    Let S be a set. If there are exactly n distinct elements in S where nis a nonnegative integer we say that S is a finite set and that n is thecardinality of S. The cardinality of S is denoted by |S|

    Given a set S, the Power Set of S is the set of all subsets of the set S.The power set of S is denoted by P(S)

    the ordered n-tuple (a1, a2, . . . , an) is the ordered collection that has a1as its first element and a2 as its second element, . . . , and an as its nthelement.

    2-tuples are called ordered pairs. Let A and B be sets. The Cartesian Product of A and B. denoted

    A B is the set of all ordered pairs (a, b), where a A and b B. Hence,A B = {(a, b)|a A b B}

    A subset R of the Cartesian product A B is called a relation from theset A to the set B. The elements of R are ordered pairs, where the firstelement belongs to A and the second to B.

    Given a predicate P and a domian D, we define the Truth Set of P tobe the set of elements x in D for which P(x) is true, and is denoted by{x D|P(x)}

    7

  • 7/28/2019 Discrete mathematical structures Notes

    8/23

    Set Notation with Quantifiers If we restrict the domain of a quantifiedstatement explicitly by making use of a particular notion, for example

    x

    S(P(x)) denotes the universal quantification ofP(x) over all elements in the setS, which is short hand for x(x S P(x)). Similarly x S(P(x)) denotesthe existential quantification of P(x) over all elements in S. Which is shorthand for x(x S P(x))

    8.2 Set Operations

    Notes An element x belongs to the union of the sets A and B if and only if x

    belongs to A or x belongs to B.

    An element x belongs to the difference of A and B if and only if x Aand x /

    B.

    An element belongs to A if and only if x / A Set identities can be proved using Membership Tables. We consider

    each combination of sets that an element can belong to and verify thatelements in the same combination of sets belong to beth the sets in theidentity. To indicate that an element is in a set use the number 1, andthe number 0 when it is not a member.

    We can extend the notation we have for unions and intersections to otherfamilies of sets. Using the notation A1 A2 An =

    i=1

    Ai to denote

    the union of the sets A1, A2, . . . , An, . . . . . . .

    For the intersection of theses sets: A1 A2 An =i=1

    Ai for the sets

    A1, A2, . . . , An, . . . . . .

    8

  • 7/28/2019 Discrete mathematical structures Notes

    9/23

    Definitions

    Let A and B be sets. The Union of the sets A and B, denoted by A B,is the set that contains those elements that are either in A or in B, orin both. Which is written by: A B = {x|x A x B}

    Let A and B be sets. The Intersection of the sets A and B, denoted byA B, is the set that conatins those elements that are in both A and B.Which is written by: {x|x A x B}

    Two sets are called disjoint if their intersection is the empty set. the Principle of inclusion-exclusion is the generalization of |A B| =

    |A| + |B| |A B| to unions of an arbitrary number of sets. Let A and B be sets. The Difference of the A and B, denoted by A B,

    is the set containing those elements that are in A but not in B. Thedifference ofA and B is also called the Complement of B with respectto A. This tells us that A B = {x|x A x / B}

    Once the universal set U has been specified the complement of a set canbe defined by the following:

    Let U be the universal set. The Complement of the set A, denotedby A is the Compliment of A with respect to U. In other words,the compliment of the set A is U A

    This is written by: A = {x|x / A} The Union of a collection of sets is the set that contains those elements

    that are members of at least one set in the collection. The notation:

    A1A2 An =n

    i=1

    Ai is denoting the union of the sets A1, A2, . . . , An.

    the Intersection of a collection of sets is the set that contains thoseelements that are member of all the sets in the collection. And is denoted

    by: A1 A2 An =n

    i=1

    Ai is denoting the intersection of the sets

    A1, A2, . . . , An.

    9

  • 7/28/2019 Discrete mathematical structures Notes

    10/23

    Set Identities

    Set IdentitiesName Identity

    Identity LawsA = AA U = A

    Domination LawsA U = UA =

    IdempotentA A = AA A = A

    Complementation law (A) = A

    CommutativeA B = B AA B = B A

    AssociativeA (B C) = (A B) CA

    (B

    C) = (A

    B)

    C

    DistributionA (B C) = (A B) (A C)A (B C) = (A B) (A C)

    De Morgans LawsA B A BA B = A B

    AbsorptionA (A B) = AA (A B) = A

    ComplementA A = UA A =

    8.3 Functions

    Notes

    If we assign to each element of a set a particular element of a second set,it is called a Function. Functions are sometimes called Mappings or Transformations. A relation from A to B is just a subset of A B. A relation from A to

    B that contains one, and only one, ordered pair (a, b) for every elementa A defines a function f from A to B. This function is defined by theassignment f(a) = b where (a, b) is the unique ordered pair in the relationthat has a as its first element.

    When we define a function we specify its domain, its codomain, and themapping of elements of the domain to elements in the codomain.

    Two functions are equal when they have the same domain, codomain,

    and map elements of their common domain to the same elements in theircommon codomain.

    The notation f(S) for the image of the set S under the function f ispotentially ambiguous. Here, f(S) denotes a set, and not the values ofthe function f for the set S.

    10

  • 7/28/2019 Discrete mathematical structures Notes

    11/23

    Some functions never assign the same value to two different elements.These functions are said to be One-to-one.

    A function f is one-to-one if and only if f(a) = f(b) whenever a = b.This way of expressing that f is one-to-one is obtained by taking thecontrapositive of the implication in the definition.

    We can express that f is one-to-one using quantifiers asab(f(a) = f(b) a = b)

    A function f is increasing ifxy(x < y f(x) f(y)), strictly increas-ing if xy(x < y f(x) < f(y)), decreasing if xy(x < y f(x) f(y)) and strictly decreasing ifxy(x < y f(x) > f(y))

    A function that is either strictly increasing or strictly decreasing mustbe one-to-one. However a function that is increasing, but not strictly,

    decreasing, but not strictly, is not necessarily one-to-one.

    For some functions the range and codomain are equal. That is, everymember of the codomain is the image of some element of the domain.Functions with this property are called onto functions.

    A function f is onto ifyx(f(x) = y), where the domain of x is the do-main of the function and the domain for y is the codomain of the function.

    Consider a one-to-one correspondence f from the set A to the set B.Because f is an onto function, every element of B is the image of someelement in A. Also since f is also a one-to-one function, every elementof B is the image of a unique element of A. Consequently, we can definea new function from B to A that reverses the correspondence given by f.

    Do not confuse the function f1 with the function 1/f, which is the func-tion that assigns to each x in the domain the value 1/f(x). The lattermakes sense only when f(x) is a non-zero real number.

    If a function f is not a one-to-one correspondence, we cant define aninverse function of f.

    A one-to-one correspondence is called invertible because we can de-fine an inverse of this function.

    A function is not invertible it if is not a one-to-one correspondence,because the inverse of such a function does not exist.

    Sometimes we can restrict the domain or the codomain of a function, orboth, to obtain an invertible function.

    fg is the function that assigns to the element a ofA the element assignedby f to g(a). That is to find (f g)(a) we first apply the function g to ato obtain g(a) and then we apply the function f to result g(a).

    11

  • 7/28/2019 Discrete mathematical structures Notes

    12/23

    The composition f g cant be defined unless the range of g is a subset ofthe domain of f.

    The commutative law does not hold for the composition of functions. We can associate a set of pairs in A B to each function from A to B.

    This set of pairs is called the graph of the function and is often displayedpictorially to aid in understand the behavior of the function.

    from the definition, the graph of a function f from A to B is the subsetof A B containing the ordered paris with the second entry equal to theelement of B assigned by f to the first entry.

    Let x be a real number. The floor function rounds x down to the closesinteger less that or equal to x.

    Let x be a real number. The ceiling function rounds x up to the closesinteger great than or equal to x. The floor function is often also called the greatest integer function.

    and is often denoted by: [x]

    Definitions

    Let A and B be nonempty sets. A Function f from A to B is an assign-ment of exactly one element of B to each element ofA. We write f(a) = bif b is the unique element of B assigned by the function f to the elementa of A. If f is a function from A to B we write f : A B.

    If f is a function from A to B, we say that A is the domain of f and B

    is the codomain off. Iff(a) = b, we say that b is the image ofa and ais a preimage if b. The Range of f is the set of all images of elementsof A. Also, if f is a function from A to B, we say that f maps A to B.

    Let f1 and f2 be functions from A to R. Then f1 + f2 and f1f2 are alsofunctions from A to R defined by:

    (f1 + f2)(x) = f1(x) + f2(x)(f1f2)(x) = f1(x)f2(x)

    Let f1 and f2 be functions from A to the set B and let S be a subset ofA.The Image of S under the function of f is the subset of B that consistsof the images of the elements ofS. We denote the image of S by f(S), so:

    f(S) = {t|s S(t = f(s))} .

    The short hand is written: {f(s)|s S} A function f is said to be one-to-one or injective if and only iff(a) =

    f(b) implies that a = b for all a and b in the domain of f. A function issaid to be an injection if it is one-to-one.

    12

  • 7/28/2019 Discrete mathematical structures Notes

    13/23

    A function f whose domain and codomain are subsets of the set of realnumber is called increasing if f(x)

    f(y) and strictly increasing if

    f(x) < f(y), whenever x < y and x and y are in the domain of f.

    A function f whose domain and codomain are subsets of the set of realnumber is called decreasing if f(x) f(y) and strictly decreasing iff(x) > f(y), whenever x > y and x and y are in the domain of f.

    A function f from A to B is called onto or surjective, if and only if forevery element b B there is an element a A with f(a) = b. A functionf is called surjection if it is onto.

    The function f is a one-to-one correspondence or a bijection, if it isboth one-to-one and onto.

    Let f be a one-to-one correspondence from the set A to the set B.

    The inverse function of f is the function that assigns to an element bbelonging to B the unique element of a in A such that f(a) = b. Theinverse function of f is denoted by f1. Hence f1(b) = a when f(a) = b

    Let g be a function from the set A to the set B and let f be a functionfrom the set B to the set C. The composition of the functions f and g,denoted by f g is defined by

    (f g)(a) = f(g(a)) Let f be a function from the set A to the set B. The graph of the function

    f is the set of ordered pairs {(a, b)|a A and f(a) = b} The floor function assigns to the real number x the largest integer that

    is less than or equal to x. The value of the floor function at x is denotedby: x

    The ceiling function assigns to the real number x the smallest integerthat is greater than or equal to x. The value of the ceiling function atx is denoted by: x

    13

  • 7/28/2019 Discrete mathematical structures Notes

    14/23

    Properties of the Floor and Ceiling Functions

    x = n if and only if n x < n + 1 x = n if and only if n 1 < x n x = n if and only if x 1 < n x x = n if and only if x n < x + 1 x 1 < x x x < x + 1 x = x x = x

    x + n

    =

    x

    + n

    x + n = x + n

    8.4 Sequences and Summations

    Notes When the elements of a set can be listed, the set is called countable. A sequence is a discrete structure used to represent an ordered list. The notation {an} is used to describe a sequence. an represents an individual term of the sequence {an}

    A geometric progression is a discrete analogue of the exponential func-tion f(x) = arx.

    A arithmetic progression is a discrete analogue of the linear functionf(x) = dx + a

    Finite sequences are also called strings. They are denoted by a1a2 . . . an The length of the string S is the number of therms in the string. The empty string denoted by is the string that has no terms, and has

    length zero.

    An infinite set is countable if and only if it is possible to list the ele-ments of the set in a swquence. The reason for this is that a one-to-one

    correspondence f from the set of positive integers to a set S can beexpressed in terms of a sequence a1, a2, . . . , an, . . . where a1 = f(1), a2 =f(2), . . . an = f(n), . . .

    14

  • 7/28/2019 Discrete mathematical structures Notes

    15/23

    Definitions

    A sequence is a function from a subset of the set of integers (Usuallyeither the set {0, 1, 2, . . . } or the set {1, 2, 3, . . . }) to a set S. We use thenotation an to denote the image of the integer n. We call an a term ofthe sequence.

    A geometric progression is a sequence of the form: a,ar,ar2, . . . , a rn, . . . .Where the initial term a and the common ratio r are real numbers.

    An arithmetic progression is a sequence of the form:a, a+d, a+2d , . . . , a+n d , . . . . Where the initial term a and the commondifference d are real numbers.

    If a and r are real numbers and r = 0 then:

    nj=0

    arj =

    arn

    +1ar1 if r = 1

    (n + 1)a if r = 1

    Solving for S shows that if r = 1 then,S = ar

    n+1a

    r1

    The sets A and B have the same cardinality if and only if there is a one-to-one correspondence from A to B.

    A set that is either finite or has the same cardinality as the set of pos-itive integers is called countable. A set that is not countable is calleduncountable. When an infinite set S is countable, we donote the car-dinality of S by

    0. We write

    |S

    |=

    0 and say that S has cardinality

    aleph null.

    15

  • 7/28/2019 Discrete mathematical structures Notes

    16/23

    9 Integers and division

    Notes a|b can be expressed using quantifiers by c(ac = b)Definitions

    If a and b are integers with a = 0 we say that a divides b if there is aninteger c such that b = ac. When a divides b we say that a is a factor ofb and that b is a multiple of a. The notation a|b denotes that a dividesb. We write a b when a doesnt not divide b.

    In the equality given in the division algorithm, d is called the divisora is called the dividend, q is called the quotient and r is called theremainder. This notation is used to express the quotient and remainder.q = a div d, r = amod d.

    If a and b are integers and m is a positive integer, then a is Congruentto b modulo m if m divides a b. The notation a b (mod m) toindicate that a is congruent to b modulo m. If a and b are not congruentmodulo m, we write a b (mod m)

    Theorems

    The Division Algorithm: Let a be an integer and d be a positive integer.Then there are unique integers qand r with 0 r < d such that a = dq+r

    Let a, b, and c be integers. Then: if a|b and a|c then a|(b + c);

    if a|b then a|bc for all integers c; if a|b and b|c then a|c;

    Let a and b be integers and let m be a positive integer. Then a b (modm) if and only if a mod m = b mod m.

    Let m be a positive integer. The integers a and b are congruent modulom if and only if there is an integer k such that a = b + km.

    Let m be a positive integer, If a b (mod m) and c d (mod m) then:a + c b + d (mod m) and ac bd (mod m)

    Corollaries

    If a, b and c are integers such that a

    |b and a

    |c, then a

    |mb + nc whenever

    m and n are integers

    Let m be a positive integer and let a and b be integers. Then:(a + b) mod m = ((a mod m) + (b mod m)) mod m

    andab mod m = ((a mod m)(b mod m)) mod m)

    16

  • 7/28/2019 Discrete mathematical structures Notes

    17/23

    10 Primes and Greatest Common Divisors

    Definitions A positive integer p greater than 1 is called prime if the only positivefactors of p are 1 and p. A positive integer that is greater than 1 and isnot prime is called composite.

    Let a and b be integers, not both zero. The largest integer d such that d|aand d|b is called the greatest common divisor ofa and b. The greatestcommon divisor of a and b is denoted by gcd(a, b)

    The integers a and b are relatively prime if their greatest common divisoris 1.

    The integers a1, a2, . . . , an are pairwise relatively prime ifgcd(ai, aj) = 1 whenever 1

    i < j

    n.

    The Least common multiple of the positive integers a and b is thesmallest positive integer that is divisoble by both a and b. The leastcommon multiple of a and b is denote by lmc(a, b).

    Theorems

    The fundamental theorem of arithmetic says that every positive in-teger greater than 1 can be written uniquely as a prime or as the productor 2 or more primes where the prime factors are written in order of non-decreasing size.

    If n is a composite integer, then n has a prime divisor less than or equalto

    n

    There are infinitely many primes Prime Number theorem states that the ratio of the numbers of primes

    not exceeding x and x/lnx approaches 1 as x grows without bound.

    Let a and b be positive integers. Thenab = gcd(a, b) lmc(a, b).

    Notes

    The integer n is composite if and only if there exists an integer a suchthat a|n and 1 < a < n

    17

  • 7/28/2019 Discrete mathematical structures Notes

    18/23

    11 Integers and Algorithms

    Definitions Base Conversion The algorithm for constructing the base b expansionon an integer n is given by first dividing n by b to obtain a quotient andremainder,

    n = bq0 + a0, 0 ao < b.The remainder a0 is the rightmost digit in the base b expansion ofn. Next,divide q0 by b to get

    q0 = bq1 + a1, 0 a1 < b .We see that a1 is the second digit from the right in the base b expansionof n. Continue this process, successively dividing the quotients by b, ob-taining additional base b digits as the remainders. The process terminateswhen we obtain a quotient equal to 0.

    Theorems

    Let b be a positive integer greater than 1. Then if n is a positive integer,it can be expressed uniquely in the form

    n = nkbk + ak1b

    k1 + + a1b + a0where k is a nonnegative integer, a0, a1, . . . , ak are nonnegative integersless than b, and ak = 0.This is called the base b expansion of n

    Lemmas

    Let a = bq+ r, where a,b,qand r are integers. Then gcd(a, b) = gcd(b, r)

    Notes Choosing 2 as the base gives binary expansions of integers. The base 16 expansion on an integer is called its hexadecimal expansion.

    Usually the hexadecimal digits used are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A,B, C, D, E, and F. Where the letters A through F represent the digitscorresponding to the numbers 10 through 15.

    Conversion between binary and hexadecimal expansions is easy becauseeach hexadecimal digits corresponds to a block of 4 binary digits.

    18

  • 7/28/2019 Discrete mathematical structures Notes

    19/23

    11.1 Applications of Number Theory

    Definitions A congruence of the form ax b (mod m). where m is a positive integer,a and b are integers, and x is a variable, is called a linear congruence.

    Let b be a positive integer. If n is a composite positive integer, andbn1 1 (mod n), then n is called pseudoprime to the base b

    A composite integer n that satisfies the congruence bn1 1 (mod n) forall positive integers b with gcd(b, n) = 1 is called a Carmichael number.

    Theorems

    Ifa and b are positive integers, then there exist integers s and t such thatgcd(a,b) = sa + tb

    where s and t are integers. In other words, gcd(a,b) can be expressed as a

    linear combination with integer coefficients of a and b.

    Let m be a positive integer and let a, b and c be integers. If ac bcmod(m) = 1, then a b mod(m).

    If a and m are relatively prime integers and m > 1, then an inverse of amodulo m exists. This inverse is unique modulo m. (That is, there is aunique positive integer a less than m that is an inverse of a modulo m andevery other inverse of a modulo m is congruent to a modulo m).

    the Chinese Remainder Theorem says: Let m1, m2, . . . , mn be pair-wise relatively prime positive integers and a1, a2, . . . , an arbitrary integersthen the system.

    x

    a1(mod m1)

    x a2(mod m2)...

    x an(mod mn)has a unique solution modulo m = m1m2 . . . mn. (That is, there is a so-lution x with 0 x < m, and all other solutions are congruent modulo mto this solution.)

    Fermats Little Theorem states: If p is prime and a is an integer notdivisible by p, then

    ap1 1 (mod p)Furthermore, for every integer a we have

    ap a (mod p)

    Lemmas If a,b, and c are positive integers such that gcd(a,b) = a and a|bc then

    a|c. If p is a prime and p|a1a2 . . . an where each ai in an integer, then p|ai for

    some i.

    19

  • 7/28/2019 Discrete mathematical structures Notes

    20/23

    11.2 Induction

    Notes In general, mathematical induction can be used to prove statements thatassert that P(n) is true for all positive integers n, where P(n) is a propo-sitional function.

    A proof by induction has two parts: A basis step, where we show thatP(1) is true and an inductive step where we show that for all positiveintegers k, if P(k) is true, then P(k + 1) is also true.

    The assumption that P(k) is true is called the inductive hypothesis.

    11.3 Strong Induction

    Theorems

    A simple polygon with n sides, where n is an integer with n 3, can betriangulated into n 2 triangles.

    Lemma

    Every simply polygon has an interior diagonal.

    Notes

    Strong Induction is often used when we cannot easily prove a resultusing regular induction.

    The basis step of a proof by strong induction is the same as a proof ofthe same result using regular induction. That is, in a strong inductionproof that P(n) is true for all positive integers n, the basis step showsthat P(1) is true.

    However, the inductive step in theses two proof methods are different.In a regular induction, the inductive step shows that if the inductivehypothesis P(k) is true, then P(k + 1) is also true.

    In a proof by strong induction, the inductive step shows that ifP(j) is true for all positive integers not exceeding k, then P(k + 1) istrue. That is, for the inductive hypothesis we assume that P(j)is true for j = 1, 2, . . . , k.

    Steps for Strong Induction. To prove that P(n) is true for all positiveintegers n, where P(n) is a propositional function, we complete two steps:

    Basis Step. We verify that the proposition P(1) is true.

    Inductive Step. We show that the conditional statement[P(1) P(2) P(k)] P(k + 1)

    is true for all positive integers k.

    20

  • 7/28/2019 Discrete mathematical structures Notes

    21/23

    The validity of both the principle of mathematical induction and stronginduction follows from a fundamental axiom of the set of integers, the well-

    ordering property. It states that every nonempty set of nonnegativeintegers has a least element. It can be shown that the well-orderingproperty, the principle of mathematical induction, and strong inductionare all equivalent.

    The well-ordering property states: Every nonempty set of nonnegativeintegers has a least element.

    The W.O.P can often be used directly in proofs.

    11.4 Counting

    Definitions

    The Product Rule. Suppose that a procedure can be broken down intoa sequence of two tasks. THe there are n1 ways to do the first task andfor each of these ways of doing the first task, there are n2 ways to do thesecond task, then there are n1n2 ways to do the procedure.

    The Sum Rule. If a task can be done either in one of n1 ways or in oneofn2 ways, where none of the set of n1 ways is the same as any of the setof n2 ways, then there are n1 + n2 ways to do the task.

    Notes

    Many counting problems cant be solved using just the sum or just theproduct rule. But many complicated counting problems can be solvedusing both of these rules in combination.

    If a task can be done in n1 or n2 ways, but some of the set n1 is also inn2, then adding the ways leads to an over count. So to correctly count thenumber of ways you add the number of ways to do it in one way(n1) tothe number of ways to do it the second way (n2), and then subtract thenumber of ways to do the task in a way that is in both sets (n1 and n2).This is called the principle of inclusion-exclusion.

    21

  • 7/28/2019 Discrete mathematical structures Notes

    22/23

    11.5 Pigeonhole Principle

    Theorems Pigeonhole Principle. Ifk is a positive integer and k +1 or more objectare placed in k boxes, then there is at least one box containing two ormore objects.

    The Generalized Pigeonhole Principle If N objects are placed intok boxes, then there is at least one box containing at least N/k objects.

    Corollary

    A function f from a set with k + 1 or more elements to a set with kelements is NOT one-to-one.

    11.6 Permutations and CombinationsDefinitions

    A Combinatorial proof of an identity is a proof that uses countingarguments to prove that both sides of the identity count the same objectsbut in different ways.

    Theorems

    Ifn is a positive integer and r is an integer with 1 r n then there areP(n, r) = n(n 1)(n 2) . . . (n r + 1)

    r-permautations of a set with n distinct elements.

    The number of r-combinations of a set with n elements, where n is a non-negative integer and r is an integer with 0 r n equals

    C(n, r) =n!

    r!(n r)!Corollaries

    If n and r are integers with 0 r n then P(n, r) = n!(n r)!

    Let n and r be nonnegative integers with n n. ThenC(n, r) = C(n, n r)

    22

  • 7/28/2019 Discrete mathematical structures Notes

    23/23

    11.7 Binomial Coefficients

    Theorems The Binomial Theorem. Let x and y be variables, and let n be a non-negative integer. Then

    (s + y)n =n

    j=0

    n

    k

    xnjyj

    =

    n

    0

    xn +

    n

    1

    xn1y +

    n

    2

    xn2y2 + +

    n

    n 1

    xyn1 +

    n

    n

    yn

    Pascals Identity. Let n and k be positive integers with n k Thenn + 1

    k

    =

    n

    k 1

    +

    n

    k

    .

    Vandermondes Identity. Letm, n and r be nonnegative integers withr not exceeding either m or n, then

    m + n

    r

    =

    rk=0

    m

    r k

    n

    k

    Let n and r be nonnegative integers with r n, thenn + 1

    r + 1

    =

    nj=r

    j

    r

    Corollaries

    Let n be a nonnegative integer. Thenn

    k=0

    n

    k

    = 2n

    Let n be a postive integer. Thenn

    k=0

    (1)k

    n

    k

    = 0

    Let n be a nonnegative integer. Thenn

    k=0

    2k

    n

    k

    = 3n

    If n is a nonnegative integer, then2n

    n

    =

    nk=0

    n

    n k

    n

    k

    =

    nk=0

    n

    k

    2

    23