Top Banner

of 16

Language of Mathematics

Apr 06, 2018

Download

Documents

D.R. Singh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/3/2019 Language of Mathematics

    1/16

    Module 2: Language of Mathematics

    Theme 1: Sets

    A set is a collection of objects. We describe a set by listing all of its elements (if this set is finite and

    not too big) or by specifying a property that uniquely identifies it.

    Example 1: The set

    of all decimal digits is

    But to define a set of all even positive integers we write:

    where

    is a natural number

    The last definition can be also written in another form, namely:

    is an even natural number

    In the rest of this course, we shall either write

    property describing

    or

    property describing

    ,

    where

    or

    should be read as such as. Both are used in discrete math, however, we prefer the former.

    This notation is called the set builder.

    Let

    be a set such that elements

    belong to it. We shall write

    if

    is an element of

    . If

    does notbelong to

    we denote it as

    .

    Uppercase letters are usually used to denote sets. Some letters are reserved for often used sets such

    as the set of natural numbers

    (i.e., set of all counting numbers), the set of integers

    (i.e., positive and negative natural numbers together with zero), and

    the set of rational numbers which are ratios of integers, that is,

    . A

    set with no elements is called the empty (or null) set and is denoted as .

    The set

    is said to be a subset of

    if and only if every element of

    is also an element of

    .

    We shall write

    to indicate that

    is a subset of

    .

    Example 2: The set is a subset of . Actually, in this case is a proper

    subset of

    , and we write it as

    . By proper we mean that there exits at least one element of

    that is notan element of

    (in our example such elements are

    , or

    or

    ).

    Two sets

    and

    are equal if and only if they have the same elements. We will subsequently

    make this statement more precise. For example, the sets

    and

    are

    equal since order does not matter for sets. When the sets are finite and small, one can verify this

    1

  • 8/3/2019 Language of Mathematics

    2/16

    by listing all elements of the sets and comparing them. However, when sets are defined by the set

    builder it is sometimes harder to decide whether two sets are equal or not. For example, is the set

    (i.e., solutions of this weird looking equation

    , where

    )

    equal to

    ? Therefore, we introduce another equivalent definition:

    if whenever

    , then

    and whenever , then . The last statement can be written as follows:

    if and only if

    (1)

    (To see this, one can think of two real numbers

    and

    that are equal; to prove this fact it suffices to

    show that

    and

    .) This equivalence is very useful when proving some theorems regarding

    sets.

    If

    is finite, then the number of elements of

    is called its cardinality and denoted as

    , that

    is,

    number of elements in A

    A set is said to be infinite if it has an infinite number of elements. For example, the cardinality of

    is

    , while

    is an infinite set.

    The set ofall subsets of a given set

    is called the power set and denoted

    .

    Example 3: If

    , then there are

    subsets of

    , namely:

    Thus the cardinality of

    is

    .

    Now, we shall prove our first theorem about sets.

    Theorem 1. If

    , then

    .

    Proof:1 The set has elements and we can name them any way we want. For example,

    . Any subset of

    , say

    , contains some elements form

    . We can list these

    elements or better we can associate with every element

    an indicator

    which is set to be

    if

    and zero otherwise. More formally, for every subset

    of

    we construct an indicator

    with understanding that

    if and only if the

    th element of

    belongs to

    ; other-

    wise we set

    . For example, for

    , the identifier of

    is

    since

    is not

    an element of

    (i.e.,

    ) while

    , that is,

    and

    . Observe that every set of

    has a unique indicator

    . Thus counting the number of indicators will give us the

    desired cardinality of

    . Since

    can take only two values, and there are

    possibilities the totalnumber of indicators is

    , which is the cardinality of

    . This completes the proof.

    The Cartesian product of two sets

    and

    , denoted by

    , is the set oforderedpairs

    where

    and

    , that is,

    and

    1This proof can be omitted in the first reading.

    2

  • 8/3/2019 Language of Mathematics

    3/16

    A B

    U

    A B

    A

    B

    U

    A B

    A

    U

    B

    U

    B

    B U B=A B

    Figure 1: Venn diagrams for the union, intersection, difference, and complementary set.

    Example 4: If and , then

    In general, we can consider Cartesian products of three, four, or

    sets. If

    , then an element

    of

    is called an

    -tuple.We now introduce set operations. Let

    and

    be two sets. We define the union

    , the

    intersection

    , and the difference

    , respectively, as follows:

    or

    and

    and

    Example 5: Let and , then

    We say that

    and

    are disjoint if

    , that is, there is no element that belongs to both

    sets.

    3

  • 8/3/2019 Language of Mathematics

    4/16

    Sometimes we deal with sets that are subsets of a (master) set

    . We will call such a set the

    universal set or the universe. One defines the complement of the set , denoted as , as

    .

    We can represent visually the union, intersection, difference, and complementary set using Venn

    diagrams as shown in Figure 1, which is self-explanatory.

    When and are disjoint, the cardinality of is the sum of cardinalities of and , that

    is,

    (provided

    ). This identity is not true when

    and

    are not disjoint,

    since the intersection part would be counted twice!. To avoid this, we must subtract

    yielding

    The above property is called the principle of inclusion-exclusion. An astute reader may want to

    generalize this to three and more sets. For example, consider the sets from Example 5. Note that

    , while

    ,

    and

    , thus

    .

    We have already observed some relationships between set operations. For example, if

    , then

    , but

    . There are more to discover. We list these identities

    in Table 1.

    Table 1: Set Identities

    Identity Name

    Identity Laws

    Domination laws

    Idempotent laws

    Complementation laws

    Commutative laws

    Associative laws

    Distributive laws

    De Morgans laws

    We will prove several of these identities, using different methods. We are not yet ready to use

    sophisticated proof techniques, but we will be able to use either Venn diagrams or the the principle

    4

  • 8/3/2019 Language of Mathematics

    5/16

    expressed in (1) (i.e., to prove that two sets are equal it suffices to show that one set is a subset of

    the other and vice versa). The reader may want to use Venns diagram to verify all the identities of

    Table 1.

    Example 6: Let us prove one of the identities, say De Morgans law, showing that

    and

    . First suppose

    which implies that

    . Hence,

    or

    (observe this by drawing the Venn diagram or referring to the logical de Morgan laws discussed in

    Module 1). Thus,

    or

    which implies

    . This shows that

    .

    Suppose now that

    , that is,

    or

    . This further implies that

    or

    .

    Hence

    , and therefore

    . This proves

    , and completes the proof

    of the De Morgan law.

    Exercise 2A: Using the same arguments as above prove the complementation law.

    5

  • 8/3/2019 Language of Mathematics

    6/16

    Theme 2: Relations

    In Theme 1 we defined the Cartesian product of two sets

    and

    , denoted as

    , as the set of

    ordered pairs

    such that

    and

    . We can use this to define a (binary) relation

    .

    We say that

    is a binary relation from

    to

    if it is a subset of the Cartesian product

    . If

    , then we write

    and say that

    is related to

    .

    Example 7: Let

    and

    . Define the relation

    as

    divides

    where by divides we mean with zero remainder. Then

    We now define two important sets for a relation, namely, its domain and its range. The domain

    of

    is defined as

    and

    for some

    while the range of

    is the set

    and

    for some

    In words, the domain of

    is composed of all

    for which there is

    such that

    . The set of

    all

    such that there exists

    is the range of

    .

    Example 8: In Example 7 the domain of is the set while the range is . Observe

    that domain of

    is a subset of

    while the range is a subset of

    .

    There are several important properties that are used to classify relations on sets. Let

    be a

    relation on the set

    . We say that:

    is reflexive if

    for every

    ;

    is symmetric if

    implies

    for all

    ;

    is antisymmetric if

    and

    implies that

    ;

    is transitive if

    and

    implies

    for all

    .

    Example 9: Consider

    and let

    . Observe that

    the relation

    is:

    notreflexive since

    ;

    notsymmetric since for example

    but

    ;

    6

  • 8/3/2019 Language of Mathematics

    7/16

    notantisymmetric since

    and

    but

    ;

    nottransitive since

    and

    , but

    .

    On the other hand, consider this relation

    . The

    relation

    is reflexive, transitive, but not symmetric, however, its antisymmetric, as easy to check.

    Exercise 2B: Let

    . Is the following relation

    reflexive, symmetric, antisymmetric, or transitive?

    Relations are used in mathematics and in computer science to generalize and make more rigorous

    certain commonly acceptable notion. For example,

    is a relation that defines equality between

    elements.

    Example 10: Let

    be the set of rational numbers, that is, ratios of integers. Then

    means

    that

    has the same value as

    . For example,

    . The relation

    partitions the set of all

    rational numbers

    into subsets such every subset contains all numbers that are equal. Observe that

    is reflexive, symmetric and transitive. Indeed,

    ,

    is the same as

    , and finally if

    and

    , then

    . Such relations are called equivalence relations and they play important

    role in mathematics and computer science.

    A relation

    that is reflexive, symmetric, and transitive is called an equivalence relation on the

    set

    . As we have seen above, the relation

    divides (actually, partitions) the set of all rational

    numbers into disjointsets that cover the the whole set of rational numbers. Let us generalize this. For

    an equivalence relation

    we define the equivalence set for any

    denoted by

    as follows

    In words,

    is the set ofall elements such that and are related by . This is a special set,

    as we formally explain below. Informally, the two different equivalence sets

    and

    are disjoint and

    the whole set

    is partitioned into disjoint equivalence sets (i.e.,

    is the sum of disjoint equivalence

    sets).

    More formally, observe that if

    , then

    . Indeed, let

    . We shall prove that

    , hence

    . Thus

    and from

    and transitivity we conclude that

    , hence

    , as needed. In a similar manner we can prove that

    which proves that

    .

    Clearly if

    , then

    (by definition of

    ). The latter can be expressed in a different, but

    logically equivalent, manner: If

    , then

    (this is an example of counterpositive

    argument discussed in Module 1: Basic Logic). We should conclude that the set can be partitioned

    into disjoint subsets

    such that every element of

    belongs to exactly one equivalence class

    . In

    other words, the set

    7

  • 8/3/2019 Language of Mathematics

    8/16

    is a partition of

    .

    There is one important example of equivalence classes, called congruence class, that we must

    discuss.

    Example 11: Fix a number

    that is a positive integer (i.e., a natural number). Let

    be the set of all

    integers. We define a relation on by if is divisible by , that is, there is an integer

    such that

    . We will write

    for

    , or more often

    . Such

    a relation is also called congruence modulo n. For example,

    since

    , but

    since

    is not divisible by

    .

    It is not difficult to prove that

    is reflexive, symmetric and transitive. Indeed,

    since

    . If

    , then

    since

    implies

    . Finally,

    let

    and

    . That is,

    and

    . Then

    ,

    hence

    .

    Since

    is an equivalence relation, we can define equivalence classes which are called congruence

    classes. From the definition we know that

    for some

    Example 12: Congruence classes modulo

    are

    In words, an integer belongs to one of the above classes because when dividing by

    the remainder is

    either

    or

    or

    or

    or

    , but nothing more than this.

    We have seen before that the relation

    was generalized to the equivalence relations. Let us do

    the same with well known

    relation. Notice that it defines an order among of real number. Let now

    if

    and

    . Clearly, this relation is reflexive and transitive because

    and if

    and

    , then

    . It is definitely notsymmetric since

    doe snot imply

    unless

    . Actually, it is easy to see that it is antisymmetric since if

    and

    , then

    . Wecall such relations partial orders. More precisely, a relation

    on a set

    is partial order if

    is

    reflexive, antisymmetric, and transitive.

    Example 13: Let if divides (evenly) for . This relation is reflexive and transitive as

    we saw in Example 11. It is not symmetric (indeed,

    divides

    but not the other way around). Is it

    antisymmetric? Let

    divides

    and

    divides

    , that is, there are integers

    and

    such that

    8

  • 8/3/2019 Language of Mathematics

    9/16

    and

    . That is,

    , hence

    . Since

    we must have

    .

    Thus

    is antisymmetric.

    A reflexive, antisymmetric, and transitive relation

    is called partial order (not just an order or

    total order) since for

    it may happen that neither

    nor

    . In Example 13 we see

    that

    and

    . If for all

    we have either

    or

    , then

    defines a

    total order. For example, the usual ordering of real numbers defines a total ordering, but pairs of real

    numbers in a plane define only a partial order.

    9

  • 8/3/2019 Language of Mathematics

    10/16

    Theme 3: Functions

    Functions are one of the most important concepts in mathematics. They are also special kinds of

    relations. Recall that a relation

    from

    to

    is a subset of the Cartesian product

    . Recall

    also that the domain of

    is the set of

    such that there exists

    related to

    through

    , that is,

    . For relations it is not important that for every

    there is

    related to

    by

    . Moreover, it is

    legitimate to have two

    s, say

    and

    such that

    and

    for some

    . These two properties

    are eliminated in the definition of a function. More formally, we define a function denoted as

    from

    to

    as a relation from

    to

    having two additional properties:

    1. The domain of

    is

    ;

    2. If

    and

    , then

    .

    The last item means that if there is an

    such that it is related to

    and

    , then

    must be equal to

    . In other words, there is no

    that has two different values of

    related to it.

    We shall use lowercase letters

    ,

    ,

    , etc. to denote functions. Furthermore, when

    we shall

    write it as

    . Finally, we will also use another standard notation for functions, namely:

    Functions are also called mappings or transformations.

    The second property of the function definition is very important, so we characterize it in another

    way. Consider a relation

    on

    and

    . Define

    Observe that

    is a set. It may be empty, may contain one element or many elements. When

    is

    a function, then

    is not empty for every

    and in fact it contains exactly one element that is

    called an image of

    . More generally, the image of

    denoted as

    for a function

    is

    defined as

    for some

    In other words,

    is a subset of

    for which there is

    such that

    . For example in

    Figure 2 the image of

    is

    .

    Example 14: (a) Consider the relation

    from

    to

    . It is a function since every

    has exactly one image in

    . In fact,

    ,

    and

    . Figure 2 shows a graphical representation of this function.

    (b) The relation

    is not a function since

    and

    have the same

    image

    .

    10

  • 8/3/2019 Language of Mathematics

    11/16

    1

    2

    3

    a

    b

    c

    d

    Figure 2: The function

    defined in Example 14.

    x

    321-1-2-3

    8

    6

    4

    2

    x

    321-1-2-3

    8

    6

    4

    2

    (a) (b)

    Figure 3: Plots of two functions: (a)

    ; (b)

    .

    Functions are often represented by mathematical formulas. For example, we can write

    for every real

    , or more formally

    or

    To visualize such functions we often graph them in the

    coordinates where

    .

    Example 15: In Figure 3 we draw the functions

    and

    . Both functions

    are defined on the set of reals

    which is the domain for both functions. Since

    and

    hence the range of

    is the set of nonnegative reals while for

    it is the set of positive reals. That is,

    and

    .

    Exercise 2C: What is the image of

    for

    ? What about the image of

    over the

    function

    ?

    11

  • 8/3/2019 Language of Mathematics

    12/16

    There are some functions occurring so often in computer science that we must briefly discuss

    them here. The first function, the modulus operator, we already studied in Example 11. We say

    that

    is equal to the remainder when

    is divided by

    (we, of course, implicitly assume that

    , i.e.,

    and

    are integers). We recall that

    is equivalent to

    used

    before. For example, and .

    We shall write this function as

    with the understanding that

    is the remainder of the division

    . The domain of such a function is

    the set of integers, while the image (or range) is the set of natural numbers. In fact, we can restrict the

    range of

    to the set

    because the remainder of any division by

    must be an integer

    between

    and

    .

    The other important and often used functions are the floor and ceiling of a real number. Let

    , then

    the greatest integer less than or equal to

    the least integer greater than or equal to

    For example,

    Finally, we introduce some classes of functions as we did with relations. Consider the function

    shown in Figure 3(a). We have

    , that is, there are two values of

    that

    are mapped into the same value of

    (or with the same image). This is an example of a function that is

    not one-to-one or injective. We say that a function

    from

    to

    is one-to-one or injective if there

    are

    such that if

    , then

    . In other words, for one-to-one function

    for each

    there is at most one

    with

    . The function in Figure 3(b) is one-to-one,

    as easy to see.

    Example 16: Consider

    from

    to

    . This function is injective.

    How to know weather a function is one-to-ne or not? We provide some conditions below. We

    first introduce increasing and decreasing functions. A function

    is increasing (non-

    decreasing) if ( ) whenever for all . For example, the

    12

  • 8/3/2019 Language of Mathematics

    13/16

    function

    is increasing in the domain

    (cf. Figure 3(b)). Similarly, a function

    is decreasing (non-increasing) if (

    ) whenever for all

    . For

    an increasing (decreasing) function the bigger the value of

    is, the bigger (smaller) the value of

    will be.

    The function

    plotted in Figure 3(a) is neither increasing or decreasing in the domain

    . However, it is a decreasing function for all negative reals and increasing in the set of all positive

    reals.

    In Example 16 we have

    . A function

    from

    to

    such that

    is said to be onto

    or surjective function.

    Example 17: Let

    be such that

    , where

    is the set of positive real

    numbers. Clearly,

    , thus it is onto

    . But if we define

    with

    , then such a function is not surjective.

    A function

    that is both injective and surjective is called a bijection. The function in

    Example 16 is a bijection while the function in Example 17 is not. For a bijection we can define an

    inverse function as

    that is,

    and

    switch their roles. Observe that we do not need to have bijection in order to define

    the inverse since: (i) the domain of the inverse function is

    and by the definition of a function, for

    every

    there must be

    such that

    ; (ii) There must be only one

    such that

    and this is guaranteed by the requirement that

    is one-to-one function.

    Example 18. Let

    be such that

    . This is not a one-to-one function. Let us

    restrict the domain

    to the set of nonnegative reals

    and we do the same with the

    range, that is,

    . Now

    has an inverse function defined on

    which

    is

    .

    Finally, we define the composition of two functions. Let

    and

    Then for every

    we find

    , but for such

    we compute

    . The resulting

    function is called the composition of and and is denoted as .

    Example 19: Let

    Then

    Example 20: Let

    and

    . The composition

    .

    13

  • 8/3/2019 Language of Mathematics

    14/16

    Theme 4: Sequences, Sums, and Products

    Sequences are special functions whose domain is the set of natural numbers

    or

    , that is,

    is a sequence. We shall write

    to denote an

    element of a sequence, where the letter

    in

    can be replaced by any other letter, say

    or

    .Since a sequence

    is a set we often write it as

    or simply

    .

    Example 21: Let

    for

    . That is, the sequence

    starts with

    If

    , then the sequence begins with

    Finally,

    looks like

    We can create another sequence from a given sequence

    by selecting only some terms. For

    example, we can take very second term of the sequence

    , that is,

    . This amounts

    to restricting the domain to a subset of natural numbers. If we denote this subset as

    , then we

    can denote such a sequence (subsequence) as

    . Another way of denoting a subsequence is

    where

    is a subsequence of natural numbers, that is,

    . It is usually

    required that

    , that is,

    is an increasing sequence.There is one important subsequence that we often use. Namely, define

    .

    Sometimes, we shall denote such a sequence as

    .

    Example 22: Let

    . The first terms are

    . Take every second term to produce

    a sequence that starts

    . We can write it as

    or as

    .

    Sequences are important since they are very often used in computer science. They are frequently

    used in sums and products that we discuss next. Consider a (sub)sequence

    and add all the elements to yield

    To avoids the dots

    we have a short hand notation for such sums, namely

    14

  • 8/3/2019 Language of Mathematics

    15/16

    In the above, we use different indices of summation

    ,

    or

    since they do not matter. What matters

    is the lower bound

    and the upper bound

    of the index of summation, and the sequence

    itself.

    In a similar manner we can define the product notation. For the above case instead of writing

    we simply write

    Example 23: Here are some examples:

    Exercise 2D: Find

    1.

    .

    2.

    .

    We have to learn how to manipulate sums and products. Observe that

    In the above we change the index of summation from

    to

    . We obtained exactly the same

    sum

    . In general, when we change index

    to, say

    for some

    , we must change the lower summation index from

    to

    , the upper

    summation index from

    to

    , and

    must be replaced by

    .

    Example 24: This is the most sophisticated example in this module, however, it is important that the

    reader understands it. We consider a special sequence called the geometric progression. It is defined

    as follows: Fix

    and define

    for

    . This sequence begins with

    Let us now consider the sum of the first

    terms of such a sequence, that is,

    (2)

    15

  • 8/3/2019 Language of Mathematics

    16/16

    Can we find a simple formula for such a sum? Consider the following chain of implications

    where the second line follows from the change of the index summation

    , in the third line we

    factor

    in front of the sum, while in the last line we replaced

    by

    as defined in (2). Thus

    we prove that

    from which we find

    :

    as long as

    . Therefore, the complicated sum as in (2) has a very simple closed-form solution

    given above. An unconvinced reader may want to verify on some numerical examples that these two

    formulas give the same numerical value.

    16