Discrete.doc123

Embed Size (px)

Citation preview

  • 7/26/2019 Discrete.doc123

    1/73

    1. PART I: COMBINATORICS

    CHAPTER 1

    ELEMENTARY COUNTING PRINCIPLES

    1.1 Basic Counting Principles

    Combinatorial analysis is concerned with methods and principles of determining thenumber of logical possibilities of some event without necessarily listing and identifyingevery logical case.

    The study of permutations, combinations and partitions

    The study of intrinsic properties of a known configuration

    The investigation of unknown configuration

    Enumeration and listing of configuration

    Configuration arises when obects are distributed according to a certain predetermined

    constraints. The are two fundamental counting principles used throughout this section in order todevelop many other enumeration techni!ues.

    1.1.1 Addition principle (AP)

    If a first task E can be per formed in n(E)= r ways, while a second task F can be

    per formed in n(F)= t ways, and the two tasks (E and F) can not be accomplished

    simultaneously, then either task E or F can be performed in:

    n(EVF) = n(E)+n (F)= r + t ways

    This principle is sometimes referred to as the sum "ule.

    Examples

    1.!uppose there are " male and # female instructors teachin$ multi%ariable calculus in our colle$e In how many ways can a student choose a calculus instructor inorder to take the course&

    Solution# $ The student is faced with two tasks. The task of either%i& choosing a female calculus instructor or%ii& Choosing a male calculus instructor.

    'f E( the task of choosing a female instructor.and ) ( the task of choosing a male instructor,then

    n%E& ( * $$$ +umber of ways of doing task E, i.e., choosing a female instructor.

    1

  • 7/26/2019 Discrete.doc123

    2/73

    n%)& ( $$$ +umber or ways of doing task ), i.e., choosing a male instructor.-ince the tasks E and ) cannot be per formed simultaneously, then n%E)& / the numberof ways of accomplishing either task E or ), by addition principle %0P&, is #

    n%E)& ( n %E& n %)& ( *

    ( 2.Therefore, the student can choose one instructor teaching multivariable calculus in2 ways 333

    2.If ' is the task of choosin$ a positi%e composite number less than and * is the task of choosin$ a positi%e odd number less than , then ' can be performed in n(') = " ways since '= ",,-,./ 0he task * can be performed in n(*)= 1 ways, !ince * = , #, 1, 2, ./ 3owe%er, ' or * cannotbe accomplished in

    n(') + n(*) = "+1 =. ways

    This is because 4 is both a composite and an odd number less than 15. 6ence there is a possibility of performing the two tasks C and 7 simultaneously, which show that the

    addition Principle is not applicable.'n fact, C or 7 can be performed in only 8 / 1 ( 9 ways 333

    Generalization of AP

    -uppose a first task E1can be performed in n%E1& ( r1ways, a second task E:can beperformed in n%E:& ( r:ways, a third task E*can be performed in n%E*& ( r*ways, etc, andan nthtask Encan be performed in n%En& ( rnways. 'f no two of the tasks can be performedat the same time, then the number of ways in which any one of tasks E1 or E: orE* or$$$, orEn can be performed is#

    n%E1E: $$$ En& ( n %E1& n %E:& $$$ n %En&

    ( r1 r: $$$ rn

    ( =

    n

    i

    ir1

    1.1.2 Multiplication principle (MP)

    If an operation consists of two separate steps E and F, and if the first step E can

    be performed in n (E) = r ways and correspondin$ to each of these r ways , thereare n (F) = t ways of performin$ the second step F, then the entire operation can

    be performed in:

    n(E) 4 n(F) =rt different ways

    :

  • 7/26/2019 Discrete.doc123

    3/73

    0

    Examples

    1.5 room in a buildin$ has four doors that may be desi$nated as 6oor 5, 7, ' and 6 If a person is interested in enterin$ the room and lea%in$ it by a different door, then in

    how many possible ways can be fulfill his interest&

    Solution: - ohandle problems of this nature, it helps to have a T"EE ;'0

  • 7/26/2019 Discrete.doc123

    4/73

    @ * ( 1: ways of entering the room by a door and leaving by another.

    2. !uppose a bus line offers - routes between 8ew 9ork and os 5n$eles If a %isitor from 8ew 9ork $oes to os 5n$eles and then return by a different route, how many possible routes can the %isitor assume for the round trip&

    Solution# $ The round trip between +ew Aork and os 0ngles is the task %or theoperation&> and it is done in two stepssuppose>

    E1( choosing a route from +ew Aork to os 0nglesE: ( Choosing a route from os 0ngles back to +ew Aork

    Then>n %E1&( 9 and n %E:& ( 2

    +ow, by =P, there aren %E1& @ n %E:& ( 9@2 ( 8

    different ways %or routes& in which a visitor from +ew Aork goes to os 0ngles and getback by a different route.

    Generalization of MP

    'f an operation consists of n separate steps, of which a first step E1can be performed inn%E1& ( r1ways> following this, a second step E:can be performed in n%E:&( r:ways, and,following the :ndstep E:, a third step E*can be performed in n%E*&( r*ways, etc., andfollowing all the previous steps, an nth step En can be performed in n%En&( rnways, thenthe entire operation can be performed and completed in#

    n%E1&. n%E:&. n%E*&$$$ n%En& ( r1 r:r* $$$ rndifferent ways.

    !. !uppose a restaurant menu offers a choice of three soups, fi%e meat dishes, four desserts, and a choice of coffee, tea or milk In how many ways can one order a meal consistin$ of a soup, a meat dish, desert and a be%era$e&

    Solution

    6ere our operation is 7";E"'+< 0 =E0. This operation consists of separate steps.-uppose

    The first step E1( choosing a soupThe second step E:( choosing a meat dishThe third step E* ( Choosing a desert> andThe fourth step E( choosing a beverage

    Then>n%E1& ( *, n%E:& ( 8, n%E*& ( and n%E& ( * and by E=P, one can order a meal

    consisting of a soup, a meat dish, a dessert and a beverage in.n %E1& . n %E:&. n%E*&. n%E& ( * @ 8 @ @ * ( 195 possible ways 333'n order to establish these ideas clearly and profoundly it will be helpful to under

    take a few more illustrative e@amples.

  • 7/26/2019 Discrete.doc123

    5/73

    ".3ow many numerals, each with two di$its, can be formed from the fi%e di$its, ,;,#," and 1 so that no di$its are repeated&

    Solution

    To form numeral of two digits, we have to fill two places, the ten?s and the unit?s.

    0pparently, there are five ways of filling the ten?s place because any one of the digits1,:,*,, or 8 can be placed in this position. -ince no digit can be repeated, the unit?s placecan be filled with any one of the remaining four digits. )rom the multiplication rule, itfollows that the two places can be filled in 8 @ ( :5 ways, as shown beneath.

    1: 1* 1 18:1 :* : :8*1 *: * *81 : * 881 8: 8* 8

    #.In how many ways can fi%e books on different sub four books are left and there are four ways of placing the second bookon the shelf.> no matter which of the five books was used to fill the first place. The firsttwo places can, there fore, be filled in 8@ (:5 ways. +ow, there are three books yet to bearranged and any one of them can occupy th admit&

    Solution

    0ssuming that the computer makes no distinction between the upper case letters %0, B, C$$$, D& and the lower case letters %a, b, c, $$$, &, it follows that there are#

    : variable names consisting of a single letter. )or the variable names with asingle letter followed by a single digit, we have to fill two places> the first by a letter andthe second by a digit. There are : letters for the first place and 15 digits %5,1,:, $$$,4& forthe second place. Thus, from =P, we can form#

    : @ 15 ( :5 variable names consisting of a letter followed by a digit.Thus, the given version of B0-'C programming language, by addition principle

    %0P&, admits: :5 ( :9 variable names 333

    E$E%&'SES 1.1

    1. 0 salesman has eight shirts, suits and 15 ties. 6ow many different combinationsof a suit with a shirt and a tie can he wearF

    :. There are four different routes connecting city 0 to city B. 'n how many ways cana round trip be made from 0 to B and backF

    *. 0 businessman is planning to go from +ew Aork to Chicago with one stop$over atPittsburgh. 6e has a choice of a plane, a train, or a bus from +ew Aork and a

    8

  • 7/26/2019 Discrete.doc123

    6/73

    choice of train or bus from Pittsburgh. ;raw a tree diagram indicating thedifferent choices for making a complete trip to ChicagoF

    . )rom the digits :,*,,8, and 2, a two$digit numeral is formed so that no digit isrepeated. 6ow many such numerals are possibleF 7f these, how many are evennumbersF

    8. The nominations for officers of the mathematics association of Ethiopia consist offive candidates and three are to be elected. 'n how many ways can a president,-ecretary, and treasurer be electedF

    . 'n how many ways can five students be seated in a classroom with :5 disksF2. 6ow many three$digit numerals can be formed from the digits ,8,,2 and 9 if no

    digit is repeatedF9.

  • 7/26/2019 Discrete.doc123

    7/73

    k1 ( * H k( :.6ence kGn1 ( :G1:1(:8Therefore the minimum number of students in a class to be sure that three of themare in the same class is :8.

    :. !uppose a laundry ba$ consists of many red, white, and blue socks Find the

    minimum number of socks that one need to $rip in order to $et two pairs (foursocks) of the same color

    Solution#

    Pigeonhole# number of colors. That is, n ( *Pigeons# socks.Then, k1 ( .6ence k ( *kGn1 ( 15.Therefore one needs to grip at least socks of the same color

    Exercises 1.2#

    1. 'n =''TEC there are 8 departments for degree programs. )ind theminimum number of students to be sure that *5 of them are in thesame department.

    :. 'f a group of people come from five countries, how large must be toguarantee that three of them come from the same countryF

    *. 6ow large a group is needed to ensure that at least three havebirthdays in the same monthF

    . 6ow large a group is needed to ensure that at least three havebirthdays in the same week of a monthF

    8. 6ow large a group is needed to ensure that at least three havebirthdays in the same day of a weekF

    2

  • 7/26/2019 Discrete.doc123

    8/73

    1.! PE%MA'*+S

    'n this section, we will show that the multiplication rule %multiplication principle&provides a general method for finding the number of permutations of n different thingstaken r at a time. =any types of problems of permutations can be shortened by means of

    convenient symbols and formulas we now introduce.

    1.!.1. ,actorial +otations

    efinition 1:- The product of the first n consecutive positive integers is called n$factorialdenoted by nI and defined as#

    nI( 1@:@*@@ $$$ @%n$1&@ n ( n@%n$1&@ $$$@*@:@1

    +ote that#%i& I ( @8I %ii& 2I ( 2@I %iii& :55I ( :55@144I'n general>

    nI ( n%n$1&I

    'f n(5, then we define 5I (1.

    'n particular, observe that1I ( 1:I ( :@1(:*I ( *@:@1 ( I ( @*@:@1 ( :8I ( 8@@*@:@1 ( 1:5I ( @8@@*@:@1 ( 2:5

    2I ( 2@@8@@*@:@1 ( 855, etc.The factorial notation is very useful for representing large numbers of the type fre!uentlyencountered in the study of permutations and related topics.

    Self test exercises

    1. -how that 9@2@ (I8

    I9.

    :. -how that#

    %i&.%1@*@8@2@$$$@18&@ 9: (I9

    I1

    %ii& :1@::@:*@:@ $$$@ 5 ( 415: %1@*@8@2@ $$$@*4&.

    1.!.2. Permutation principles

    efinition 2:-0ny arrangement of r obects taken from a collection of n obects iscalled a permutation of n obects taken r at a time or an r$permutation of n obects.

    9

  • 7/26/2019 Discrete.doc123

    9/73

    +otation:The number of permutations %or possible arrangements in any order& of nobects taken r at a time is denoted by npr or p %n, r& fre!uently> where 5 r n.7ther notations are pn,,rand %n&r.

    Preposition 1 (Permutations without repeating obects&

    The number of permutations of n different obects taken r at a time, when none ofthe obects is repeated in an arrangement is#

    npr( n%n$1&%n$:&$$$ %n$r1& ( &I%

    I

    rn

    n

    Proof: -The proof follows directly from the multiplication principle. 0pparently, obectsare to be chosen from a collection of n obects one at a time. The first obects is selectedat random from a set of n distinct obects, the second from a set of %n$1& remainingobects, the third from a set of %n$:& remaining obects, and so on, until finally, the rth

    obect is chosen from the set of Jn$ %r$1&K ( %n$r1& remaining obects. )rom the

    multiplication principle, it follows that r obects are selected in#n%n$1& %n$:& $$$ %n$r1& ways

    But this product is, by definition, the number of permutation of n obects taken r at atime.Thus>npr( n%n$1& %n$:& L %n$r1&

    ( n%n$1& %n$:& $$$ %n$r1&.1:*...&1&%%

    1:*...&1&%%

    44rnrn

    44rnrn

    (1:*...&1&%%

    1:...&1&%&%1%...&:&%1%

    44rnrn

    44rnrnrnnnn

    +

    Clearly, the numerator is the product of the integers from n down to 1, while thedenominator is the product of the first %n$r& integers, so that

    &I%

    I

    rn

    npr

    n

    =

    &I%

    Ip

    &1%&:&%1%p

    r

    n

    r

    rn

    n

    orrnnnnn

    =

    +=

    Examples

    1.E%aluate: (a) -p1 (b) p"

    Solution: - %a& 9p8 ( 3332:5829I*

    I9

    &I89%

    I9===

    4444

    %b& p ( 333*5*8I:

    I

    &I%

    I===

    444

    4

  • 7/26/2019 Discrete.doc123

    10/73

    2. !ol%e for n in each of the followin$(a) np; = 1 (b)

    np# = ; n(Exercice)

    9nv2

    5&9&%2%

    58

    8

    8&I:%:&I$%n1&$n%n

    definition...8&I:%

    I8&%#

    :

    :

    :

    ===+

    =

    =

    =

    =

    =

    n

    nn

    nn

    nn

    n

    byn

    npa!olution

    n

    n ( $2 is reected since n + u M5N. Thus, the value of n( 9 333

    !.3ow many words> of three letters can be formed from the letters a,b,c,d, and e, usin$ each letter only once&

    Solution:--ince the letters a,b,c,d,e in different orders constitute different Owords, theresult is the number of permutations of five obects taken three at a time. Thus, byprinciple of permutation without repetition, there are#

    3335*8I:

    I8

    &I*8%

    8 *8 words44p ===

    =

    ".?hat is the number of ways in which si4 students be seated in a classroom with ;1 desks&Solution: -There are si@ students that are going to occupy si@ desks at a time. Thus, thereare si@ seats to fill and :8 desks to choose from. The result is the number of permeations

    of :8 different obects taken si@ at a time, i.e., n( :8 r( and

    333555,81:,1:2

    1:5:1:::*::8I14

    I:8

    &I:8%

    I:8

    :8

    ways

    44444p

    =

    ==

    =

    #.In how many ways can si4 pupils stand in a line or linearly arran$ed to pay their colle$e fees at the finance office counter&

    Solution: -This corresponds to the case r ( n in proposition 1. Thus the number ofpermutations of a set of si@ different obects, taken altogether is#

    Ip

    333ways2:51

    1:*8

    I5

    I

    &I%

    I

    =

    ===

    = 44444

    p

    %emar:-'n general, the number of permutations of n obects taken all at time %or takenaltogether& is#

    15

  • 7/26/2019 Discrete.doc123

    11/73

    Inpnn =

    .In how many ways can n married couples stand on a line alternatin$ man@woman@man@ A @woman& If no same se4 stands nei$hborly, find the number of arran$ements

    E$E%&'SE 1.!.1

    1. Evaluate each of the following

    %a& 9I %b& 8p8 %c& 4p: %d& np: %e&I8

    I1:

    :. -olve for n in each of the following. %a& np:( 8 %b& np*(:5n %c& np(99@ n$1p:

    *. -how that# %a& npr( n @ n$1pr$1

    %b&n

    pr(%n$r1&@n

    pr$1

    %c& npr( n$1pr r % n$1pr$1&

    . 6ow many Owords can be formed from the letters of the words#%a& -eatF %b&

  • 7/26/2019 Discrete.doc123

    12/73

    11. -even students are to take an e@amination, two in =athematics and five in othersubects. 'n how many ways can these seven students be seated in one row so thatthe two students taking the mathematics e@am do not sit togetherF

    1:. )our married couples have eight seats in a row for a certain show. 'n how manydifferent ways can they be seatedF Rhat is the number of seating arrangements if

    all the men are to sit together and all the women are to sit togetherF1*. 0n inspector visits si@ different machines during the day. 'n order to prevent theoperators from knowing when he will inspect, he varies the order of his visits. 'nhow many ways can this be accomplishedF

    Proposition 2%Permutations with obects repeated&

    The number of permutations of n different obects taken r at a time, when eachobect can be repeated any number of times in an arrangements is#

    n @ n @ L@ n ( nr, since n is used r$times as a factor.

    Examples

    1.5 multiple@choice test has Buestions with four possible answers for each Buestion 3ow many different sets of answers are possible&

    Solution: -6ere, n( and r( 155. Thus, the re!uired permutation is 155.

    2.In how many ways can fi%e priCes be $i%en away to four boys (a) ?hen each boy is eli$ible for all the priCes& (b) ?hen any boy may win all but one of the priCes&

    Solution: - %a& There are ways of giving away the first prie %to either boy1, boy:,boy*, or boy &. There are again four ways of disposing the second prie since it can begiven to any one of the four students> and so on. )inally, the 8 thprie can be disposed in ways. Thus, the re!uired number of permutations is 8( 15: 333

    %b& -ince there are only four possibilities in which a student may have all thepries, the number of permutations in this case is four less than that for case %a&, that is# 8$ ( 15: / ( 15:5 333

    !.3ow many positi%e numerals less than can be formed from the di$its ,,;,#,and " when di$its may be repeated&Solution: -There are three places to be filled and there are five choices for filling eachplace. 'n other words, n(8 r(*, and the number of possibilities is 8*. E@cluding thenumber 5, we have 8*$1(1: numerals less than 1555.".5 combination lock consists of four rin$s each marked with the fi%e di$its ,;,#," and 1 ?hat is the lar$est possible number of unsuccessful attempts in openin$ the lock if one tries to $uess the combination&

    Solution: -Each of the four rings can be set in a position in five ways. 6ere, n(8 andr(, so that the number of all positions in which rings can be set is#

    1:

  • 7/26/2019 Discrete.doc123

    13/73

    8(:8 ways.-ince one of these is the correct combination, then the largest possible number ofunsuccessful attempts in opening the lock is> then#

    8$1(:8$1(: ways 333

    ESE"C'-E 1.*.:

    1. )or the five obects denoted by a, b, c, d, and f, list all permutations of theseobects taken two at a time without repetition.

    :. There are three plumbers listed in a town telephone directory. 7n a certain-aturday evening, si@ residents of the town need a plumber. 'f each resident is freeto call any plumber and all of the plumbers are available, what is the ma@imumnumber of possible telephone calls that can be made by these si@ residentsF

    *. ! others are alike and of another kind, and so on, up to tothers alike and of still another kind such that p!$$$t ( n, is given by#

    1*

  • 7/26/2019 Discrete.doc123

    14/73

    II...I

    I&,...,,>%

    tBp

    ntBpnp =

    Proof: --uppose that m is the total number of the re!uired permutations. 'n any of thesearrangements, replace the p like obects by unlike letters, say a1a:, L , apdifferent fromany of the remaining obects. These p new letters can be arranged among themselves in pI

    new permutations, and if the corresponding changes are made in each of the ! like obectsand replaced by unlike letters b1, b:, L b!, then these letters can be permuted in !I ways.Thus, the total number of permutations would be#

    m @ pI @ !IProceeding along these lines %with all like obects in the collection&, the total number ofarrangements would be given by#

    m @ pI@ !I @ L @ tIBut the letters now are all different and n in number, and thus they may be arranged in nIpermutations. 6ence,

    m @ pI @ !I L@ tI ( nIThe re!uired number of permutations S is thus given by

    333II...I

    I

    tBp

    nm=

    Therefore, p %n> p, !, L, t& (II...I

    I

    tBp

    n

    Examples

    1.In how many ways can cars be placed in a stock car race if three of them are 'he%rolet, four are Fords, two are Dlymouths, and one is a 7uick&

    Solution:-6ere, n ( 15, p ( *, !(, r ( :, and t (1. The number of distinct arrangementsor permutations is given by#

    3331:5I1I:II*

    I15&1,:,,*>15% ==D

    2.3ow many si$nals can be $i%en usin$ fla$s of which two are red, fi%e are blue, and three are yellow&Solution: -Clearly, n(15, p (:, !( 8 and r(*. 6ence, the number of signals is#

    333:8:5

    *I8II:

    I15&*,8,:>15% ==D

    E$E%&'SE 1.!.!

    1. Twelve students are traveling to Boston in three cars such that three students arein car1, four in car :, and five in car *. 6ow many possible ways are there to dothisF

    1

  • 7/26/2019 Discrete.doc123

    15/73

    0

    B E

    C

    0

    'n how many waof the =?s togetherF

    &'%&/A% PE%MA'*+S

    )rom linear arrangements discussed so far, we know that five persons invited for dinnermay set themselves in a row in any of 8I( 1:5 different ways. The answer would bedifferent if the guests were to be seated around a circular table. ;enoting the guests bythe letters 0, B, C,;, and E, we assume that one of the possible ways in which the guestscan be seated around the circular table is as shown in fig. 1.: below$ which is thearrangement 0BC;E.

    -tarting with the letter B and reading in a counterclockwise direction, we get thearrangement BC;E0, shown in fig 1.*. But the arrangement in fig 1.*. can be obtainedby a simple clockwise rotation from the arrangement in fig.1.:. These two arrangementsare identical when regarded as a circular permutation, although, they are different lineararrangements, 'n similar manner starting with the different letters and reading them in acounter clockwise direction, the various possible seating arrangements so obtained may

    be e@pressed as#0BC;E BC;E0 C;E0B ;E0BC and E0BC;0lthough these are different linear permutations, note that they are the same whenregarded as a circular arrangement. Thus, a single circular permutation of the five lettersresults from five different linear permutations. 'f the re!uired number of circularpermutations of the 8 letters is C, then the total number of linear arrangements of thesepersons, represented by the five letters, is 8C. Re have established earlier that fivepersons can be seated in a linear arrangement, taken altogether, in 8p8(8I different ways.6ence,

    8 C(8I

    IC

    8

    I8

    8

    8IC

    ===

    4

    Thus, the number of ways in which five persons can be seated around a circular table isI. -imilarly, the number of circular arrangements%or permutations& of n persons is givenby#

    C( %n$1&I

    18

    ;

    B

    C

    ; E

    )igure 1.:

  • 7/26/2019 Discrete.doc123

    16/73

    This seems natural, for the seats are not numbered, there is no first or last seat at a roundtable, and the only essential feature to be considered is the neighbors, i.e., the position ofone person relative to the others sitting at the same table.

    'f one person, among the n, is fi@ed at random it follows that the remaining%n$1& / persons can be arranged among the selves in %n$1&I different ways. This approach

    also gives#

    C( %n$1&I

    as the number of circular permutations of n$persons . Thus the following proposition.

    Proposition "%Circular permutations&

    The number of permutations of n obects around a circle, taken altogether, is given by#C( %n$1&I

    Examples

    1. In how many ways can ei$ht $ents ($entlemen) and ei$ht ladies be seated for around@ table conference so that no two ladies sit to$ether&

    Solution: -The number of ways in which the eight gents can be seated at a round tableoccupying alternate seats is given by#C( %n$1&I ( %9$1&I( 2I RaysThen the ladies have a choice of eight remaining seats and this arrangement can becompleted in 9I different ways. +ow, using the fundamental principle of multiplication,we conclude that the re!uired number is#

    2I@ 9I ( 855 @ 5*:5( :5*,:1:,955 ways 333

    2.In how many ways can ei$ht $ents and se%en ladies be seated for a dinner around a circular table so that no two ladies sit to$ether&

    Solution: - Asit was in e@ample 1.::, the number of ways in which the eight gents canbe seated around the circular table is 2I Rays. +ow, the ladies have a choice of eightplaces so that no two ladies are together. Thus the sitting$ arrangement of the seven ladieson eight seats is, apparently, the permutations of 9 obects taken 2 at a time. Thearrangement of the ladies can, there fore, be completed in 9p2 ( 9I Rays. )rom thefundamental principle of multiplication, we conclude that the re!uired number of circularpermutation is

    C( 2I @ 9p2 ( :5*,:1:,955, ways 333

    !. (i) In how many ways can children sit in a merry $o@round relati%e to one another& (ii) In how many of this arran$ement shall some children ha%e different children in front of them& (3int: @ 0he merry@$o@round can re%ol%e in either direction)

    1

  • 7/26/2019 Discrete.doc123

    17/73

    Solution: -%i& Re have 15 children and hence n( 15. Thus the number of ways that thesechildren sit in a merry$go$round is the number of circular permutations given by#

    C( %n$1&I

    C( %15$1&I ( 4I (*:,995 ways 333

    %ii& -ome children will have different children in front of them in half theabove arrangements. That is, the re!uired number of circular permutations

    for this case is#

    3335,191:

    995,*C:

    I:

    I4

    :

    &I115%

    :ways

    c===

    =

    -ince the merry$go$round can be revolved in two different directions$clockwise orcounter clockwise.

    E$E%&'SE 1.!."

    1. 'n how many different ways can si@ ladies be seated at a round tableF

    :. 'n how many ways can four persons be seated at a round table so that all personsdo not have the same neighbors in any two arrangementsF

    *. 'n how many ways can si@ keys be placed on a key ringF. 'n how many ways can 1: persons form a Oring if three of them must be

    adacentF8. 'n how many ways can eight beads of different colors be arranged %a& in a

    necklaceF %b& in a rowF. 'n how many ways can eight children at a birthday party be seated at a round table

    if two of the children ask to be seated ne@t to each otherF2. %i& 'n how many ways can nine different television sets be arranged in a row so

    that no two particular sets are togetherF

    %ii& 'f there are five black$and$white and four color sets, in how many ways canthey be arranged in a circle so that no two color sets are togetherF

    9. 'n how many ways can 1: children at a birthday party be seated#a& 0round a circular tableFb& 0round a circular table such that some children have different neighborsFc& 7n the same side of a rectangular tableF

    4. There are five gentlemen and five ladies to dine at a round table. 'n how manyways can they be seated so that no two ladies are togetherF

    15. 'n how many ways can five gents and four ladies be arranged for a round$tableconference if no two ladies are in adacent seatsF

    1.". &*M0'+A'*+S

    'n previous sections, we obtained formulas which enabled us to count the number ofways in which r obects can be arranged in a row or a circle from a set of n differentobects. There are many problems that re!uire us to make a selection of r obects from theset of n obects without any regard to the Oorder.

    12

  • 7/26/2019 Discrete.doc123

    18/73

    'n a permutation, order is taken into consideration, while in combination

    problems> the order is of no significance.

    efinition: -0ny subset of r obects selected with complete disregard to their order froma collection of n different obects is called an r$combination of the n obects or a

    combination of n obects taken r at a time.The number of r$ combination of n obects is fre!uently denoted by either

    ( ) ornr

    ncr. The symbols, C%n,r&, Cn,r andn

    r' also appear in various te@ts.

    Examples

    1.Find the number of combinations of the four ob&I%I

    I

    rI

    p rn

    nrwherernr

    nnr

    ==

    19

  • 7/26/2019 Discrete.doc123

    19/73

    Proof: -+ote that ( )nr represents the number of combinations of n obects taken r at atime. Each such combination of r obects can be arranged in rI different ways. There fore,

    &%I nrr yields the total number of permutations of n obects taken r a time, or

    r

    nn

    r p&%I =rBy proposition 1.1 and dividing throughout by rI, we obtain#

    ( )&I%I

    I

    I rnr

    n

    r

    pr

    nn

    r ==

    2.In how many ways can a committee of fi%e be chosen from a $roup of members of an association&

    Solution:- )rom proposition 1, the number of possibilities of selecting five$personcommittee from a group of 15 association members is given by the formula %Rhere n( 15and r ( 8

    ( ) 333:8:1:*8

    29415

    &I815%I8

    I15158 ==

    =4444

    4444

    !.In how many ways can players be chosen from a $roup of # players if(a) the players are selected at random&(b) a particular player must be included&(c) a certain player must be e4cluded&

    Solution: -%a& The number of combinations of 1* players, taken 11 at a time, is given by#

    ( ) 333ways291:

    1:1*

    :II11

    I1*1*11 ===

    4

    4

    %b& 'f one particular player is always to be included, we need to select 15 more out of the remaining 1:. This can be accomplished in#

    ( ) 333ways1:111:

    :II15I1:1:15 ===

    44

    %c& 'f one player should be e@cluded from the team, we need a selection of 11players from the remaining group of 1:. Thus, the re!uired number of such

    combinations is#

    ( ) 3331:1

    1:

    1II11

    I1:1:11 ways===

    ". 0here are points in a plane, no three collinear 6etermine the number of strai$ht lines that can be formed by

  • 7/26/2019 Discrete.doc123

    20/73

    Solution: -The "epublicans can be chosen in ( )2: ways, while ;emocrats can beselected in any of the ( )4: ways. 0n application of the multiplication rule yields#

    ( ) ( ) 33328:1@*1:

    94

    1:

    2

    2II:

    I4

    8II:

    I24:

    2

    : ====4

    44

    4

    44

    . In how many ways can p + B ob

  • 7/26/2019 Discrete.doc123

    21/73

    Solution%self test e@ercise&

    &omplementar5 &ominations

    Two combinations r

    nand

    s

    nare said to be complementary combinations if srn +=

    .

    %emars

    Two complementary combinations are e!ual. That is

    r

    n

    (., nr

    rn

    n

    e.g. ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ).>>> 2,2

    *

    2

    8

    2

    :

    2

    C

    2

    1

    2

    2

    2

    5 ====

    0 finite set with n$elements has

    r

    n

    subsets each with r$elements.

    Exercise 1."

    1. Evaluate#

    %a& ) ) )155441:

    15

    9

    * %c&%b&

    :. -olve for n#

    %a& ( ) ( ) *8%b&18 n*: ==n

    *. -how that#

    %a& ( ) ( ) ( ) ( ) ( )11n

    r%b&+

    =+= n

    r

    n

    r

    n

    rn

    n

    r

    . 6ow many committees of five representatives can be formed from a group of 15personsF

    :1

  • 7/26/2019 Discrete.doc123

    22/73

    8. 0n electric circuit may possibly fail at 15 stages. 'f it is found that it has now failed ate@actly four stages, in how many ways could this happenF

    . +ine people are to travel in two cars, five in one and four in the other. 6ow many ways are there to do thisF2. 0 salesman?s wife plans to accompany her husband on a sales trip to Cleveland. -he

    has four coats and si@ dresses in her cardboard, find the number of ways in which shecan choose three coats and three dresses for the trip.9. 0 college freshman finds that he must take 1: hours of mathematics. 'f there are 1:

    three$hour courses offered, then in how many ways can the student satisfy the college?s re!uirementsF4. 'n how many ways can four persons be selected from five married couples if

    %a& the selection must consist of two women and two menF%b& 0 husband and wife cannot both be selectedF

    15. 'n how many ways can a 15 !uestion True3)alse e@amination be answered if youmake the same number of answers true as you do falseF

    11. 0 poker hand is a set of five cards selected from a standard deck of 8: cards. Rhat is

    the number of possible poker hands that contain#%a& e@actly one aceF%b& a pair of kingsF%c& three cards of the same denominationF%d& three cards of the same denomination and a pair of kingsF

    1:. 'n how many ways can a committee of three be chosen from four "epublicans andfour ;emocrats if

    %a& all are e!ually eligibleF%b& the committee must consist of two democrats and one "epublicanF%c& there must be at least one member from each partyF

    1*. 0 bag contains five white and seven black marbles. 'f five marbles are drawntogether, how many different drawings are possible if

    %a& the marbles may be of any colorF%b& there must be e@actly three white marblesF%c& the marbles must be of the same colorF

    1. Ten persons are going on a field trip for a history course in three cars that will hold:, *, and 8 persons, respectively. 'n how many ways could they go on the tripF

    1. 'n how many ways can four red balls be drawn from an urn if%a& the urn contains si@ red ballsF%b& the urn contains only four red ballsF%c& the urn contains four red, three white and two black ballsF

    12. There are three offices available for a staff of 1:. The first office can accommodatethree persons, and the second and third offices can take four and five persons,respectively. 6ow many different assignments of the staff are possibleF

    19. 'n how many ways can a bridge deck be dealt to four players 0, B, C, and ;, giving1* cards eachF 6ow is your answer affected if instead of distributing the cards to theplayers, you arrange them in four heaps of 1* cards each and the players canchoose the set of 1* cards in any order they likeF

    14. 'n how many ways can nine accounts be assigned to three different salesmen so thateach one gets three accountsF Rhat is the number of possibilities if the same

    ::

  • 7/26/2019 Discrete.doc123

    23/73

    salesman can not be assigned to one particular pair of accountsF:5. 'n how many ways can 18 parcels be placed in three bags, each bag containing five

    parcelsF Rhat is the number of possibilities if there are two heavy parcels that cannot be placed in the same bagF

    :1. 'n how many ways can one partition a set of sie n into r ordered subsets so that the

    first subset has sie k1, the second subset has k:, and so on, and the rth

    subset hassie kr, given that k1 k:L kr( nF 6ow is the partition affected if k1( k:( L(kr F::. 0 businessman has invited :1 of his customers for dinner on a )riday evening. 6e has decided to place si@ guests at one round table, eight at another round table, and the

    remaining seven are to be seated at a third circular table. 'n how many ways can hecomplete the seating arrangementF

    1.#. 6E 0'+*M'A/ 6E*%EM

    The !uantities ( )nr are called binomial coefficients because of the fundamentalrole these !uantities play in the formulation of the binomial theorem. E@pansions ofpositive integral powers of %ab&n, where n(5,1,:, L, are of fre!uent occurrence inalgebra and are beginning to appear in all phases of mathematics. =oreover, e@pansionsof this nature are important because of their close relationship with the binomialdistribution studied in statistics and related fields. Re shall, therefore, under take asystematic development of the formula that produces such e@pansions.

    7f course, the following identities, for e@ample, could be established by directmultiplication#

    %a b&5 (1%a b&1( ab%a b&:( a: :ab b:

    %a b&*( a**a:b *ab: b*.%a b&( a a*b a:b: ab* b

    %a b&8( a8 8ab 15a*b:15a:b* 8ab b8

    %a b& ( aa8b 18ab: :5a*b* 18a:b ab8 b8.+ote that as we continue e@panding larger and larger powers of %ab&, several

    patterns emerge, leading to a part of the solution. The following patterns may be evidentfrom the above process of multiplication#

    %a& The coefficients of the first and last terms are both 1.%b& There are n1 terms in the e@pansion of %ab&n.%c& The e@ponent of a starts with n and then decrease by 1 until the e@ponent of a

    has decreased to 5 in the last term, and e@ponent of b is 5 in the first term andthen continues to increase by 1 with the e@ponent of b is n in the last term.

    %d& The sum of the e@ponents of a and b in a given term is n.

    %emar: - The binomial theorem gives the coefficient of terms in the e@pansion of

    powers of binomial e@pressions. Binomial e@pression is an e@pression which contains

    two terms.

    Proposition(The Binomial Theorem&

    :*

  • 7/26/2019 Discrete.doc123

    24/73

    'f n, r are non$negative integers, where 5 r n, then

    , n yields the above assertion.

    &orollar5 1. )rom proposition above, with a(1, it follows that#

    ( ) ( ) ( ) ( ) ( ) ( ) .......&1% **::15 nnnrn

    r

    nnnnn bbbbbb +++++++=+

    &orollar5 2. Rith a(b(1 in proposition above, it follows that#

    ( ) ( ) ( ) ( ) ( )....&11%: *:1n

    5n

    n

    nnnnn +++++=+=

    &orollar5 !.Rith a(1 and b($1 in proposition above, we have#

    ( ) ( ) ( ) ( ) ( ) ( ) ( ).&1%...&K1%1J5 8*:1nn

    nnnnnnno

    n ++++=+= )or even values of n, corollary * yields#

    ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) .:...... 118*1:5 =++++=++++ nnnnnnnnnnn

    :

  • 7/26/2019 Discrete.doc123

    25/73

    Examples

    1 E4pand (4+;y)2

    Solution:-

    ( ) ( ) ( ) ( ) ( )( ) ( ) ( ) ( ) ( ) 333.1:992:85:9591

    &:%&:%&:%:&:%&:%&:%:

    28:**:82

    22

    2

    2

    8:2

    8

    *2

    *2

    *

    :82

    :

    2

    1

    22

    5

    2

    y4yy4y4y4y4y44

    yy4y4y4y4y4y44y4

    +++++++=

    +++++++=+

    %emar#

    The calculation of the coefficients is simplified by making use of the complementary

    combinations

    ( )

    = rnn

    n

    r

    .

    'n the preceding e@ample, we needed to calculate only up to ( )2* and then recogniethat ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ).>>> 2,

    2

    *

    2

    8

    2

    :

    2

    C

    2

    1

    2

    2

    2

    5 ====

    2.E4pand (+;4)

    Solution: -etting n(, a(1 and b(:@ in corollary 1, we have#

    ( ) ( ) ( ) ( ) ( ) ( ) ( )33314::51551:1

    .&:%&:%&:%&:%&:%&:%&:1%

    8*:

    8

    8

    *

    *

    :

    :

    1

    5

    444444

    4444444

    ++++++=

    ++++++=+

    !.E4pand (@#4)"

    Solution:Rith n ( , a (1 and b($*@ in corollary 1, we get%1$*@&( J1%$*@&K.

    ( ) ( ) ( ) ( ) ( )( )

    3339115981:1

    *&*%&*%%$*@&

    *:

    *

    *

    :

    :

    1

    5

    4444

    444

    ++=

    ++++=

    !.E4pand (;4+#y)1

    Solution: -etting n ( 8, a ( :@ and b(*y in proposition 1.8.1 we have#

    ( ) ( ) ( ) ( )( ) ( )

    333:*9151592:5:5*:

    &*%&:&%:%

    :&:&%%&:%&:%&*%&:%&:%&*:%

    8*::*8

    88

    8

    8

    *:8

    *

    :*8

    :

    8

    1

    88

    5

    8

    y4yy4y4y44

    yy4

    y4y4y44y4

    +++++=

    ++

    +++=+

    :8

  • 7/26/2019 Discrete.doc123

    26/73

    ". Gsin$ the proposition, find the numerical %alue of (")

    :

  • 7/26/2019 Discrete.doc123

    27/73

    Solution: -et n (15, a(1 and b( 5.5 in corollary 1, then

    ( ) ( ) ( ) ( )( )

    ( )

    3331.249

    ...5529.552:.5.51

    5.5...&5.5%1:5&5.5%8&5.5%8&5.5%151

    5.5...&5.5%&5.5%&5.51%

    15*:

    1515

    15

    *15

    :

    15

    1

    15

    5

    15

    ++++=++++++=

    ++++=+

    This e@ample %E@ample & may serve as a practical illustration of the BinomialTheorem. "efer to the e@ample given beneath.

    %emar#

    The %r1&stterm in the binomial e@pansion of %ab&nis given by#

    ( ) .1 rrnnrr ba0 + =

    #. ?ithout an actual e4pansion, find the thterm of (;4@y)

    Solution:Qsing the above remark, we have#

    ( ) ( )( )

    333::5

    .:II4

    I11

    :%$1&

    y$%:@&

    4:

    4:

    4::411

    4

    44$1111

    415

    y4

    y4

    y4

    0

    =

    =

    =

    =

    .Find the middle term in the e4pansion of151

    44 without e4pandin$ it

    Solution:

    -ince n(15, it follows that there are 11 terms in the binomial e@pansion of15

    1

    44 .

    0ccordingly, the thterm represents the middle term. Thus,

    ( ) 333:8:&%:8:@

    1$ 818

    8

    81515

    8 ==

    = 4440

    .Find the two middle terms in the e4pansion of4

    :

    1:

    aa

    Solution: -Rith n( 4, there are 15 terms in this e@pansion. The two middle terms are,then, the 8thand th, given by T8and T.

    ( )

    ( ) 333*:

    *

    15:

    a$&%1a1:

    1$%:a&T

    333

    *

    :8&*:%1:

    1%:a&

    115

    8

    :4

    8

    1*9

    8

    :84

    8

    aa

    aa

    aa0

    =

    =

    =

    =

    =

    =

    :2

  • 7/26/2019 Discrete.doc123

    28/73

    9. Find the term independent of 4 (ie, the constant term) in the e4pansion of

    1:

    : 1:

    44

    Solution:$ et the %r1&stterm be the term independent of @. Thus, we have

    ( )

    ( ) ( )( ) rrr

    rrr

    r

    r

    r

    rr

    4

    44

    0

    *:1:r1:

    ::r$1:1:

    1::1:

    1

    :.%$1&

    1%:&

    @

    1$&%:@

    +

    =

    =

    =

    't is evident that Tr1will be independent of @ if :$*r ( 5 , that is, r ( 9. Thus, T4is this term which is given by#

    ( ( ( ) 33324:51:%$1& 1:9

    91:

    94 ===0

    E$E%&'SE 1.#

    1. E@pand the following#%a& %*a:b& %b& %*a@$by&8 %c& %1$@&2

    %d& %1:@&9 %e& %@$:y& %f&11

    1

    44

    :. Rithout the actual computations, evaluate the following#( ) ( ) ( ) ( ) ( )( ) ( ) ( ) ( ) ( ) ( )

    ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )....&%

    &%

    &%

    28*:1

    n

    5

    8

    8

    8

    8

    *

    8

    :

    8

    1

    8

    5

    *

    :

    1

    5

    n

    n

    nnnnnnn

    c

    b

    a

    +++++++++

    +++++

    ++++

    *. Qsing the binomial Theorem %or formula&, find appro@imations for the following.

    %a& %1.55& %b& %1.58&8 %c& %5.449& %d& %5.49&.

    . )ind in -implified forms#%a& the 8thterm in the e@pansion of %@$y&1:

    %b& the 1*thterm in the e@pansion of .:

    1:

    :

    +

    44

    %c& the two middle terms in the e@pansion of %1:@&1*

    %d& the middle term in the e@pansion of %$8@&85

    8. )ind the coefficient of#%a& @8in the e@pansion of %@@$*&12

    %b& @ in the e@pansion of % @$@:& 15

    %c& @n in the e@pansion of %1@&:n

    .Rithout e@panding, find the term involving @:yin the e@pansion of %:@*y&.

    :9

  • 7/26/2019 Discrete.doc123

    29/73

    2. =r. -mith plans to deposit 1555 in a saving account that pays percent interest compounded annually. 6ow much will he have in his account five years henceF

    9. 0 commercial bank 0 pays percent interest for savings and compounds it !uarterly,

    while another commercial bank B pays 2 percent interest on savings but compoundsit annually. 'f a customer wants a ma@imum return on his savings, in which bank should he deposit 15,555 he has recently inheritedF

    4. Three successive coefficients in the e@pansion of %1@&nare :,**5, and 18.;etermine the value of n.

    15. )ind the term independent of @ %i.e., the constant term& in the e@pansion of

    1:

    1

    +

    44 .

    1.. 6E '+&/S'*+-E$&/S'*+ P%'+&'P/E A+ E%A+GEME+S

    1..1. 6E P%'+&'P/E *, '+&/S'*+ A+ E$&/S'*+

    'n this section we develop and state a new counting techni!ue called the'nclusion$e@clusion Principle. E@amples will be used to develop the techni!ue and aswell as to further demonstrate how the principle is applied.

    Proposition 1# et 0,B and C be any finite sets. then#

    1. n%0 B& ( n%0&n%B&$n%0 B&:. n%0 &'7 (n%0&n%B&n%C&$n%0 B&$n%0 C&$ n%B C&n%0 B

    C&

    Proposition 2:et 0,B and C be any finite sets and Q a universal set. 'f n%Q& ( +, then#

    1. ( ) &%&K%&%JB0 57n7n5n8n ++= ( + $ n%0 B&:.

    ( ) %&K%&%&%J&K%&%&%JB0n 57n7'n5'n57n'n7n5n8' +++++=( + / n%0 B C&

    +ote: 7557and7575 '' ==

    :4

  • 7/26/2019 Discrete.doc123

    30/73

    Examples

    1. !uppose that in a $roup of students 1 takin$ mathematics, " takin$computer science, #1 takin$ information science, ; takin$ maths and computerscience, takin$ maths and information, takin$ computer science and

    information science and 1 takin$ alla. 3ow many students are takin$ at least one sub

  • 7/26/2019 Discrete.doc123

    31/73

    155N....,M1,:,*,in Q8or*bydivisble

    notthatintegers8*areThere...3338*

    8*155

    .K:5**J155&% :1

    ==

    +=++=''8

    efinition:)or r ", the greatest integer function in r %or simply the greatest

    integer in r& is denoted by r and defined as#

    r if r r (

    the largest integer smaller than r, if r is not an integer.

    )or instance, %i& 8 (8 %ii& *19 (9

    %iii& *

    19 ( $4. %iv& (*

    !.6etermine the number of positi%e inte$ers n where n and n is 8*0 di%isible

    by ;, #, or 1

    Solution: 7ur universal set Q( M1,:,*L,155N and n %Q&( + ( 155. )or n Q, letC1be the set of integers n divisible :.C:be the set of integers n divisible by *C*be the set of integers n divisible 8.

    6ere, we want to find &% *:1 '''8 the number of integers nQ which are notdivisible by :, *, or 8.

    =&% 1'8 :

    155 ( 85 +%C1C:& (

    155( 1

    *

    155&% : ='8 (

    *

    1** (** +%C1C*&(

    15

    155( 15

    =&% *'8 8155 ( :5( :5 + %C:C*& ( (

    18

    155(

    and + %C1C:C*& ( *5

    155( *.

    Then by proposition :#&%&K%&%&%J&K%&%&%J&% *:1*:*1:1*:1*:1 '''8''8''8''8'8'8'88'''8 +++++=

    we have>

    333:*K151JK:5**85J155&% *:1 =+++++='''8

    %These : integers are 1,2,11,1*,12,14,:*,:4,*1,*2,1,*,2,4,8*,84,1,2,21,2*,22,24, 9*,94,41,42.&

    The following proposition generalies Principle of 'nclusion and E@clusion for

    any finite number of conditionsProposition: %The Principle of 'nclusion and E@clusion)

    *1

  • 7/26/2019 Discrete.doc123

    32/73

  • 7/26/2019 Discrete.doc123

    33/73

    %d& The distinct arrangements of the numbers 1,:,*, so that 1 is not in the first place, : is not in the second place, * is not in the third place and is not in the fourth place are#

    :1* *1: 1:*:*1 *1: *1:

    :1* *:1 *:1The number of derangements of the numbers 1,:,*, taken altogether is then#; %& ( 4 333

    0t this point of our discussion, given any positive integer n let us look for arelation %or formula& that can be used to find the number of derangements, ;%n&, of thesen obects take altogether.

    2.In how many ways can we arran$e the numbers ,;,#, A, 2 so that none of the numbers are in their natural positions&

    Solution:

    Clearly, n ( 2 and the number of permutations of the numbers 1,:,*,,8, and 2taken all at a time is 2p2( 2Iet Ci, where i ( 1,:,*,,,8 or 2, be the condition that the number i is in its naturalposition. )or instance, C1is the condition that 1 is in the first place in a permutation> C:isthe condition that : is in the :ndplace in a permutation. The permutation 2:18* satisfiesthe conditions C:and C8.

    By definition, a derangement of 1,:,*, L, 2 is a permutation that satisfies none of

    the conditions Ci, 1i 2. Thus, the number of derangements of these seven numbers isevidentially>

    .....&...%&1%

    ....

    &K%...&%&%J

    &K%...&%&%J

    &K%...&%&J+%C$+

    &...C%&2%

    2:1

    2

    28:1*:1

    2*1:1

    2:1

    2:1

    DIE7y'''8

    '''8'''8'''8

    ''8''8''8

    '8'8

    ''86

    +

    ++++

    ++++

    +++==

    -ince the number of permutation of 1,:,*, L, ,2 taken altogether is +(2I, we need tocompute#

    +%C1&( the number of permutations of 1,:,L, 2 such that 1 is in the first placeregardless of the positions of the other numbers. That is, the

    numbers :,*,,L, 2 may or may not be in their natural place.

    Thus, we put 1 in the first place of the arrangements and permute the remaining si@numbers to obtain#

    + %C1& ( 1@@8@@*@:@1(I-imilarly>

    + %C:& (+ %C*&( L + %C2& ( ITo compute + %C1C :&, we hold 1 and : in the first and second places, respectively, andpermute the reaming five numbers and get#

    **

  • 7/26/2019 Discrete.doc123

    34/73

    + %C1C:& ( 8IProceeding along these lines, the number of permutation satisfying the specifiedcondition would be given by#

    + %C1C*& ( + %C1C&( L ( + %C1C2& L( + %CC2&( 8I+ %C1C:C*&( + %C1C:C&( L ( + %C1C:C2&( L ( +%C8CC2&(I

    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

    )inally>+ %C1C:C* L C2& (5I (1

    Thus, by the principle of inclusion and e@clusion, the number of derangements of thenumbers 1, :, *, L, 2 taken altogether is given by#

    ( ) ( ) ( ) ( ) ( ) ( ) ( )

    +++=

    +++=

    +++=

    I2

    1

    I

    1

    I8

    1

    I

    1

    I*

    1

    I:

    11$1I2

    .

    I2

    I2

    I

    I2

    I8

    I2

    I

    I2

    I*

    I2

    I:

    I2

    I1

    2I$I2

    I5I$1I:I$*II$8I$I2&2% 222

    2

    8

    2

    2

    *

    2

    :

    2

    16

    7bserve that>

    ( ) ( )I:

    I2I8

    8II:

    I2I8,

    1I

    I2I

    II1

    I2I 2:

    2

    1 =

    ==

    = and so on.

    )rom elementary calculus we find that the =aclaurin series for the e@ponentialfunction is given by#

    .I...I*I:

    @@1

    5

    :*:

    ==++++= n4

    n

    44e

    Thus

    ...I8

    1

    I

    1

    I*

    1

    I:

    111

    In

    %$1&

    5n

    n

    1 +++==

    =

    e

    To five places, e$1( 5.*299 and

    ,*29.5I2

    1....

    I

    1

    I*

    1

    I:

    111 =++

    Conse!uently, for k , k 2, e$1is a very good appro@imation to .I

    &1%

    5

    =

    k

    n

    n

    n

    Re can, therefore, use this value in e@ample 2and write#

    333&%e&I%2

    I2

    1

    I

    1

    I8

    1

    I

    1

    I*

    1

    I:

    11$1I2&2%

    1$=

    +++=6

    Proposition:

    *

  • 7/26/2019 Discrete.doc123

    35/73

    The number of derangements of n obects taken all at a time is given by#

    ( ) ( ) ( ) ( ) I5%$1&...I&*%$I:&$%nI1&$%n$In&% nn*n

    :

    n

    1

    n

    nnn6 +++= ore!uivalently>

    +++=I1%$1&...

    I81

    I1

    I*1

    I:1In&% n

    nn6

    'f n 2, then the number of derangements of the n obects, can be appro@imated by#; %n& ( %n I& e$1L )rom =aclaurin series for e$1

    Examples

    1. ?hile at a racetrack, alph bets on each of the ten horses in a race to come in accordin$ to how they are fa%ored In how many ways can they reach the finish line so that he loses all of his bets&

    Solution:

    "emoving the words Ohorses and racetrack from the problem, we really want toknow in how many ways we can arrange the numbers 1,:,* L, 15 so that 1 is not in thefirst place %its natural position&, : is not in the second place %its natural position&, L, and15 is not in the tenth place %its natural position&. Re already know that this is thederangements of the numbers 1,:,* L, 15. That is#

    ( ) ( ) ( ) ( )

    ( ) ( ) ( ) ( )

    333.e&%15I

    I15

    1...

    I*

    1

    I:

    11$115I

    I15

    I5...

    I15

    I2

    I15

    I9

    I15

    I41I15

    I5...I2$I9I4I15&...C%+&15%

    1$

    15

    15

    15

    *

    15

    :

    15

    1

    15

    15

    15

    *

    15

    :

    15

    115*:1

    +++=

    ++=

    +++== '''6

    2.5t the '@3 company De$$y has se%en books to be re%iewed, so she hires se%en peopleto re%iew them !he wants two re%iews per book, so the first week she $i%es each

    person one book to read and then redistributes the books at the start of the second week In how many ways can she make these two distributions so that she $ets two

    re%iews (by different people) of each book&

    *8

  • 7/26/2019 Discrete.doc123

    36/73

    Solution:

    -he can distribute the books in 2I ways the first weak. +umbering both the books and thereviewers %for the first weak& as 1,:,*, L, 2 for the second distribution she must arrangethese numbers so that none of them is in its natural position. -he can do this in

    ; %2& ways. By the rule of product, i.e., the principle of multiplication, she can make thetwo distributions in#

    ( ) ( ) ( ) ( )

    3333&%&I%2

    I2

    1...

    I

    1

    I*

    1

    I:

    11$1&I%2

    I2

    I5...

    I2

    I

    I2

    8I

    I2

    I$1I@2I2;%2&&I2%

    1:

    :

    22

    2*

    2:

    21

    wayse

    ++=

    +==

    E$E%&'S 1.

    1. There are 85 members in a club. 7f these 85 members, if 15 play tennis, 18 play chess,

    1: play badminton, 8 play both tennis and chess, play both tennis and badminton, *play chess and badminton, and : play all the three sports$badminton, chess and tennis.Then%a& 6ow many members of the club play none of the sportsF%b& 6ow many play at least one of the three sportsF

    :. ;etermine the number of positive integers n, where 1n :555, that are#%a& not divisible by :,*,or 8.%b& not divisible by :,*,8,or 2> and%c& not divisible by :,*, or 8, but are divisible by 2.

    *. )ind all real numbers @ such that

    %a& 2 @ ( 2@ %b& 2@ ( 2 %c& @2( @2 %d& @2 ( @ 2.. )ind the number of arrangements of a, b, c, L, @,y,, in which none of the patterns

    spin, game, path, or net occurs.

    8. ;etermine the number of positive integers n, where 1 n 1555, that are#%a& not divisible by 2 or 11.%b& divisible by at least one of the integers 2 or 11.

    . 'n how many ways can we devise a secret code by assigning to each letter of thealphabet a different letter to represent itF

    2. Rhen n balls, numbered 1,:,* L, n, are taken in succession from a container, a

    rencontre occurs if the mthball withdrawnis numberedm, 1 m n. )ind thenumber of ways of getting no rencontres of these n balls.

    9. 'n how ways can the integers 5,1,:,*, L, 4 be arranged in a line so that no even integer is in its natural positionF

    *

  • 7/26/2019 Discrete.doc123

    37/73

    CHAPTER 2

    RECURRENCERELATIONS

    2.1. 'ntroduction

    "ecursion involves recursive definition of an algorithm, a set or a se!uence in terms of

    itself. Rhen a recursive definition is used as a tool for solving combinatorial problems,

    an e!uation called recurrence relation is applied to represent present and future values on

    the basis of earlier or prior terms. 't is clear that in counting problems we analye a given

    situation and then e@press the result in terms of the results for certain smaller non$

    negative integers. 7nce the recurrence relation is determined, one can solve the e!uation

    at any nR$ non negative integer n. Rith access to a computer, such relation are highly

    valuable, especially if they cannot be solved e@plicitly. "ecurrence relations are the

    discrete counterparts to the continuous ideas of the ordinary differential e!uations.

    "ecurrence relations are also called difference e!uations or recurrence e!uations.

    Thus, this chapter is devoted to the study of recursively defined discrete functions and the

    solutions of recurrence relations associated to these recursively defined functions.

    2.2 6E +*'*+ *, SE7E+&ES

    &ountin89 enumeration and discreteprol

    -et of R in to a certain number set, then the range of f is called a se!uence. Byconvention, the elements of the range of the function f, i.e. the elements of the se!uenceare known as terms.

    Note# 0 se!uence is often called a discrete function or a numeric function

    +otations#

    %1& -ubscripted symbols of the form an, bn, fn, etc are used to denote the image of a whole number n under the se!uence f. 'f we select, say an to denote the image of

    nw under f, then an( f%n&, n( 5,1,:, L

    *2

  • 7/26/2019 Discrete.doc123

    38/73

    %:& Re use the notation MfnN=5n or simply MfnN to denote a se!uence f.

    'n other words,

    ManN=5n ( Mf5, f1, f:, $$$N ( the range of f %the se!uence f&.

    'f nw begins at some non negative integer k 1, then the notation ManN=kn is applied

    for the se!uence.

    Note:%1& 'f the domain of a se!uence Ma nN is the set of all non negative integers R, then ManN is called an infinite se!uence and if the domain is any finite non$empty subset of w, it is called a finite se!uence.

    %:& 'f the se!uence ManN ( Ma5, a1, a:, LN is#a. the set of integers, then ManN is called a se!uence of integers.b. the set of real numbers, then Man& is termed as a real se!uence.c. the set of comple@ numbers, then Man& is known as a comple@ se!uence.

    2.2.1 ME6*S *, ES&%'0'+G SE7E+&ES

    There are several methods of representing a se!uence and the most commonly

    used techni!ues are the following.a. Enumerating the first few terms of the se!uence. +ote that we list terms of

    the se!uence till a rule for telling the present and future values is observed.b. The second method is supplying a rule that defines a se!uence f as an

    e@plicit function a%n&, preferably written as an( f%n&, n 5. 't should be noted that an( f%n& depends upon n and only n.

    c. 0 techni!ue called recursive definition stated in terms of recurrence relationsand initial conditions may be used to describe the terms of a se!uence.

    Examples

    1. The numbers# 5,1,1,:,*,8,9,1*, L form a se!uence that begins with the two terms5 and 1. Each new term, there after, is a sum of the previous two terms. 0s weshall see later, the numbers in this se!uence are called the )ibonacci number.

    This description is called enumeration method.

    2. The se!uence ManN=5n where an( 8%*

    n& or simply M8%*n&N=5n represents the

    geometric se!uence 8,18,8,1*8,LThis description is called e@plicit method.

    !. 'f we denote the %n1&th )ibonacci number by fnwe have#

    fn ( fn$1 fn$:, n :, with f5( 5 and f1(1.This is called a recursive definition for the se!uence of )ibonacci numbers given

    in e@ample1

    The recursive definition for the )ibonacci se!uence is composed of two parts, namely, the

    e!uation# fn( fn$1 fn$:, n 5 and the values f5(5 and f1(1. These properties are enoyedby all other recursively defined se!uences.

    *9

  • 7/26/2019 Discrete.doc123

    39/73

    2.! %E&%S'E E,'+''*+ A+ %E&%%E+&E %E/A'*+S

    2.!.1 %ecursi;e efinition

    0 techni!ue of defining an algorithm, a set or a function in terms of itself by#

    %i&

  • 7/26/2019 Discrete.doc123

    40/73

    is not sufficient to define a uni!ue se!uence> we must also specify the values of someinitial terms. This is why in our definition of the )ibonacci se!uence, we set f5( 5 andf1(1 as initial conditions.

    "ecall that a recursive definition of a discrete function specifies one or moreinitial values and a rule for determining subse!uent terms from those that precede them.

    Rhen recursive definitions are applied to solve combinatorial problems, the e!uationinvolved in these definitions, which is employed for finding present terms from thepreceding once is called a recurrence relation.

    %ecurrence relation#0 recurrence relation for a se!uence ManN and a non negative integer no, is a formula thate@presses an in terms of one or more of the previous values a 5, a1, L , an$1 of the se!uence

    for all integers n n5.

    'nitial conditions:'nitial conditions, which are also called boundary conditions of therecurrence relation, are the values of one or more starting terms of the se!uence specified

    in the formao( k , a1( r, etc.

    for some constants k, r ". +ote that the computation of terms of a se!uence from therecurrence relation is initiated by the boundary conditions.

    Explicit se

  • 7/26/2019 Discrete.doc123

    41/73

    !. 6efine the number of permutations without repetition of n ob

  • 7/26/2019 Discrete.doc123

    42/73

    Thus, we conclude that# an( *an$:/ :an$:whenever an( :n1$1. Conse!uently the e@plicit

    se!uenceManN

    =1n where an( :n1$1 1n is a solution of the given recurrence

    relation. 333

    2. !how that the seBuence fn/ defined e4plicitly by fn= ;(@")n+# is a solution of the

    recurrence relation fn= @# fn@+" fn@;

    Solution#

  • 7/26/2019 Discrete.doc123

    43/73

    ( 5: ( : 333

    %b& Each time b is subtracted from a, the value of the function X is increased by 1. 6ence X %a,b& finds the !uotient when a is divided by b.%c& Rhen we divide 891 by 2, the !uotient will be 9*2. Thus, according to the

    conclusion drawn in part %b& above, we have#X %891,2& ( 9*2.

    E$E%&'SE 2.1

    %1&

  • 7/26/2019 Discrete.doc123

    44/73

    Rhere c5, c1, c:, L , ckare constants, is called a linear recurrence relation with constantcoefficients %""RCC&.

    Note: The relation in J1K is linear since each term fn fn$1, fn$:, L, fn$k. appear only in apower of degree one.

    *%E% *, %E&%%E+&E %E/A'*+'f the constants c5and ckin J1K are none ero, then relation J1K is known as the kth$ orderlinear recurrence relation with constant coefficients.

    Note# The phrase O kth/ order O mean that the present term fnof the relation depends onk previous terms, fn$1, fn$:, L, fn$k.

    Examples

    1. The )ibonacci se!uence defined by the recurrence relation# ) n( )n$1 )n$:, n : with the initial conditions )5( 5 and )1( 1 is linear second$order.2. yn$yn$1( 5, n V 1 with the boundary condition y1( *is a first$order linear

    recurrence relation with constant coefficients %""RCC of order$one&.!.aZ1/8ak ak$1$ ak$:( 0k15 defined for k *, together with the initial conditions

    a5(*

    2and a1( a:(8 is a third$order linear recurrence relation with constant

    coefficients %""RCC of order$three&.

    6*M*GE+E*S %E/A'*+

    The recurrence relation J1K is called a kth/ order linear >omo8eneousrecurrence relation

    with constant coefficients if and only if f%n&( 5 for all n R.

    +*+6*M*GE+E*S %E/A'*+

    The recurrence relation J1K is called a kth / order linear non>omo8eneous recurrencerelation with constant coefficients if and only if f%n& 5 for some n R. That is, therelation#

    cofn c1fn$1 c:fn$: L ckfn$k( f%n& 5 for some n R is termed as nonhomogeneousrecurrence relation with constant coefficients %+""RCC&.

    Note:+on homogeneous recurrence relation is also called 'n>omo8eneous"".

    Examples

    1. The relation# ak( 8ak$1, $ 9ak$:,k : with a5(8 and a1( : is a :nd/order 6""RCC,

    while ak( 8ak$1/ak$:ak$* k15, k * with a5( *2 and a1( a:(8 is a *rd/order

    +6""RCC.2. 'lassify the followin$ recurrence relations

    (a) fn=nfn@ (b) an= an@+ an@#(c) bn= bn@+; (d) !n= !n@;+ !n@"

    Solution:

  • 7/26/2019 Discrete.doc123

    45/73

    %a& fn( nfn$1is a first$order linear homogeneous recurrence relation with variable coefficients.%b& an( an$1 an$*is a third$order linear homogeneous recurrence relation with constant coefficients.%c& bn( bn$1 : is a first$order linear non homogeneous recurrence relation with constant

    coefficients.%d& -n( -n$: -n$is a fourth$order linear homogeneous recurrence relationwith constant coefficients.

    2.# S*/'+G /'+E% 6*M*GE+E*S %E&%%E+&E %E/A'*+S

    't is a common place to apply inductive and deductive reasoning in solving bothhomogeneous and non homogeneous linear recurrence relations. +ote that inductivereasoning is used for the purpose of suggesting a sound and reasonable solution to thegiven recurrence relation, while deductive reasoning is employed in proving that the

    suggested solution is correct. 'n addition to this, the following two properties regardingsolutions of linear recurrence relations play a vital roll.

    P%*PE%'ES *, S*/'*+S

    The solutions of a linear recurrence relation have two important properties which may bestated as follows.

    (1) Multiplication Propert5# =ultiplying any solution of a linear recurrence relationby a non$ero constant gives another solution

    (2)Addition Propert5# 0dding two or more solutions of a linear recurrence relationgives another solution.

    'n the following, we shall study a method of solving 1 st$order linear homogeneousrecurrence relations with constant coefficients and then use their solutions as springboardtowards the solutions of higher order linear homogenous relations.

    S*/'+G ,'%S *%E% /'+EA% 6*M*GE+E*S %E/A'*+S

    7ne method of solving a first$order linear homogeneous recurrence relation is anapplication of a repetitive procedure called "ECQ"-'7+ =ET67;. The followinge@ample may illustrate the recursion method, i.e., the procedure of reducing the termssuccessively to the initial values and then compute the value of the function at any nonnegative integer n from these base %or initial& values.

    Examples

    1.!ol%e the $eneral first@order linear homo$eneous with constant coefficients:

    an= r an@, n with an initial condition: a = c.

    +ote that the coefficient r and the initial value c are constants.

    Solution:Re solve this general 6""RCC of order one by recursion. To this end,observe that#

    8

  • 7/26/2019 Discrete.doc123

    46/73

    an( r an$1

    an$1( r an$:

    an$:( r an$*and so on.

    Thus, substituting these and similarly obtained formulas successively in the difference

    e!uation, we get#

    an ( an$1

    ( r %r an$:&

    ( r: an$:

    ( r:%r an$*&

    ( r*an$*

    ( LL.

    ( LL

    ( rkan$kL %for each k n&.

    ( LL

    ( rn$1an$ %n$1&

    ( rn$1a1

    ( rn$1%r a5&

    ( rna5

    ( crnL %since a5( c is given&.

    -o the solution of the given recurrence relation# an( ran$1, n

    1 and a5( c is thee@plicit function of n given by

    an( crnfor all n 5 333

    +ote that this solution# an(crn is called a 8eneral solutionbecause it contains thearbitrary constant c. =oreover the se!uence# an( r

    nalso solves the given "" and it iscalled the asic solution.

    GE+E%A/ S*/'*+

    0 solution anof a recurrence relation that involves arbitrary constants is called ageneral solution.

    0 solution of the form# an( rn

    , without the constant c, is called a basic solution.+'7E S*/'*+

    0 solution in which all the arbitrary constants in the general solution are replaced byspecific numbers is called a uni!ue solution of the recurrence relation#

    Note: 0 uni!ue solution should satisfy both the recurrence relation %""& and theinitial conditions %'C&. Thus, to determine the uni!ue solution, we use the initial

  • 7/26/2019 Discrete.doc123

    47/73

    conditions to evaluate the specific values of the arbitrary constants, other than thevalue of r, in the general solution.

    2

  • 7/26/2019 Discrete.doc123

    48/73

    2.et n be the number of memory locations referenced by a certain computer pro$ram !uppose that the al$orithm implemented by the pro$ram reBuires fn bytes of memory, where fndepends on n If fnis defined recursi%ely by:

    fn= "fn@, n ; and f=#

    0hen find the amount of bytes of memory reBuired to implement the al$orithm by the pro$ram for all n ;

    Solution:The problem is indeed a problem of solving the given recurrence relationand its initial condition.

    Met>od 1 (%ecursion Met>od)

    -tarting from the given "", we proceed by recursion or a repetitive procedure asfollows.

    fn( fn$1

    ( %fn$:& L -ince fn$1( fn$:

    ( :fn$:

    ( :%fn$*& L. -ince fn$: ( fn$*

    ( *fn$*

    ( L..

    ( n$kfn$k %for each k R and k n&

    ( LL

    ( n$1fn$%n$1& %where k (n$1&

    ( n$1f1

    ( n$1%*& L.. -ince f1(* is the given initial condition.

    ( *%&n$1

    Thus, the uni!ue solution to the recurrence relation is#

    fn( *%&n$1, n 1.

    Met>od 2

    The general solution obtained in e@ample1may be applied in solving the recurrencerelation at hand. 'n other words, suppose that the difference e!uation has a generalsolution of the form#

    fn( crn, n1.

    -ubstituting this formula in# fn( fn$1, we have

    Crn(crn$1

    1

    1

    1

    =

    n

    n

    n

    n

    cr

    cr

    cr

    cr

    9

  • 7/26/2019 Discrete.doc123

    49/73

    r (

    fn( c%&n.Qsing the initial condition# f1( *, where n(1, yields

    C%&1(f1(*

    c (*

    c (

    *.

    fn(

    *%&n ( *%&n$1

    Therefore, the uni!ue solution is#

    fn (*%&n$1n 1 333

    This agrees with the above solution obtained by recursion.

    !.5 bank pays K annual interest on sa%in$s, compoundin$ the interest monthly If 5to

    Lallo deposits M on the first day of Nay, how much will this deposit worth a yearlater&

    Solution:

    -ince the annual interest rate is [, the monthly rate is [8.51:

    [C= , which means that the

    monthly interest is .558.5155

    8.5=

    )or 5 n, 1:, let pndenote the amount of

    Pn( pn$1 5.558 pn$1for a 1 n 1: and p5( 1555 L. %G&

    represents the problem recursively. Rhat remains is, therefore, to solve this recurrencerelation with its initial condition.

    6ence, the relation in %G

    Pn( pn$1 5.558pn$1

    Pn( %15.558&pn$1

    Pn( %1.558& pn$1 , p5( 1555

    has the general solution# pn( %1.558&np5> which gives rise to the uni!ue solution#

    Pn( 1555 %1.558&n. L. %why F&

    Conse!uently, from the uni!ue solution, it is evident that

  • 7/26/2019 Discrete.doc123

    50/73

    E$E%&'SE 2.2

    1. )ind a recurrence relation which will be is satisfied by the se!uence Man&=5n

    formed from each of the following functions.

    %a& an(I18

    In%b& an( n

    :$n9.

    :. Rhich of the following recurrence relations are homogenous and which are non$homogeneousF Rhich are linear and non linearF Tell the order and describe thecoefficients %as constant or variable& in each case.

    %i& fn( nfn$1 %ii& an( an$1 an$* %iii&bn(bn$1 :

    %iv& sn( sn$: sn$ %v& 5 :1 =+ nnn yyy %vi& an( an$:

    %vii& 8nan :nan$1( :an$: %viii& an ( an$1 :n$2.

    %i@& a*n( 2a*n$1 %@& an (an$1 an$: %n$1&

    :.

    *. )or each of the following, determine the number of initial conditions that must beassigned so that a uni!ue se!uence is generated.%a& an( :an$1/ an$: %b& an$an$: an$* ( 5

    %c & an( an$1 :n %d& 8nan :nan$1( :an$1

    .

  • 7/26/2019 Discrete.doc123

    51/73

    %i& b:n1 ( 8b:n, n 5 and b5( :%ii& find b1:.

    4. The number of bacteria in a culture is 1555 and this number increase :85[ every: hours. Qse a recurrence relation to determine the number of bacteria presentafter one day %: hours&.

    15. 'f 0ddie chaltu invests 155 at [ interest compounded !uarterly, how manymonths must she wait for her money to doubleF

    11. )ind a15if a*n( 2a

    *n$1, n 1 and a5(*.

    2.. 6E SE&*+-*%E% %E&%%E+&E %E/A'*+

    0 typical second$order linear homogeneous recurrence relation with constant coefficients%6""RCC of order$two& has the form#

    c5an c1an$1 c:an$: ( 5, n :with accompanying boundary conditions e@pressed usually as#

    a5( k5and a1( k1where k5, k1,c5, c1, c:are constants with c5, c:5.

    2..1. S*/'+G 6*M*GE+E*S %E/A'*+ *, *%E% =*

    "ecall, from section :.8, that a first order linear homogeneous relation withconstant coefficients had a general solution# an( crn, where c and r are non$ero constants.

    Based on this work %regarding the first order case&, we shall seek a solution for thesecond$order homogeneous recurrence relation with constant coefficients, that assumesthe same form# an( crn.+ote that we are using inductive procedure to suggest a solution.

    +ow, consider the second$order 6""RCC#

    05an01an$1 0: an$: ( 5, n

    : L. %G&0ssume that this relation has a solution of the form#

    an( crn with c 5 and r 5.Then, observe that the two subse!uent terms are e@pressed as#

    an$1 ( crn$1 and an$: ( crn$:

    substituting these formulas into the e!uation %G&, we get#05 crn 01crn$1 0:crn$: ( 5

    crn$: J05r: 01r 0:K ( 5.;ividing throughout this last e!uation by crn$:5, we get a second$degree %or !uadratic&e!uation in r, which will be given by#

    05r: 01r 0: ( 5.

    Conse!uently, the discrete function ManN with an ( crn is a solution of the :nd / orderrecurrence relation#

    05an 01an$1 0:an$:( 5if and only if the number r is a solution of the :nd$degree e!uation#

    05r: 01r 0:( 5.

    2..2. &6A%&E%'S'& E7A'*+ A+ %**S

    81

  • 7/26/2019 Discrete.doc123

    52/73

    efinition#The characteristic e!uation of a homogeneous :nd$ order linear recurrence relation

    with constant coefficients#05an 01an$1 0:an$: ( 5.

    is the :nd$degree e!uation in r, which may be written as#

    05r:

    01r 0:( 5.The solutions r1and r:of the characteristic e!uation are called the characteristicroots of the recurrence relation.+ote# %1& the characteristic e!uation and characteristic roots are also called au@iliarye!uation and au@iliary roots, respectively.

    Example:find the characteristic eBuation of each of the followin$ recurrence relations fn= #fn@@;fn@;,n O ; with initial conditions: f=# and f;= 2; yn= yn@@ .yn@;, nO, y= 1 and y= #

    .Solutions:

    1.

  • 7/26/2019 Discrete.doc123

    53/73

    2. A/*G*%'6M ,*% S*/'+G /'+EA% 6*M*GE+E*S %E/A'*+ *,

    *%E% 1

    "ecall that the characteristic e!uation of the homogeneous kthorder linear relation#

    fn a1fn$1 a:fn$: a*fn$* L akfn$k( 5, n kis the kthdegree polynomial e!uation#

    rk a1rk$1 a:rk$:a*rk$* L ak$1r ak( 5.The solutions of this e!uation are called the characteristic roots of the recurrence relation.Example: Find the characteristic eBuation for each of the followin$ recurrence relations

    () "un+H 2un= (;) " un+H 2un + un@= (#) "un++ un@= (") yk+ ;yk@@ #yk@;@ yk@"=(1) sn= sn@+ " sn@"

    Solution:Table :.1 beneath gives the corresponding characteristic e!uation of each of thedifference e!uation above.

    +o. %ecurrence %elation &>aracteristic em for Sol;in8 6omo8enous %ecurrence %elations

    The essential steps for solving a linear homogeneous recurrence relation withconstant coefficients of any order are the following.

    -uppose that the given kthorder 6""RCC is#

    fn a1fn$1 a:fn$: a*fn$* L akfn$k( 5, n k.Then#Step1:Rrite the characteristic e!uation of the difference e!uation which is the kthdegree polynomial e!uation#

    rk a1rk$1 a:rk$: a*rk$* L ak$1r ak( 5.Step2:-olve the au@iliary e!uation found in step 1 and determine all the characteristic roots of this e!uation.Step!:Rrite the general solution of the difference e!uation based on any one of the following two cases. &ase (i): 'f there are k distinct characteristic roots, say r1, r:, r*, L , rk to the e!uation obtained in step 1, then the general solution is of the form#

    fn( 01r1n 0:r:n 0*r*n L 0krkn.

    8*

  • 7/26/2019 Discrete.doc123

    54/73

    &ase (ii):'f there is a root r of multiplicity m, : m k, for the au@iliary e!uation obtained in step 1, then the part of the general solution that involves the root r has the form#

    05rn 01nrn 0:n:rn L. 0m$1nm$1rn

    ( %05 01n 0:n: 0m$1n

    m$1& rn.

    'n addition to the repeated root r, if r1,r:, L., rk$mare the k$m remaining distinct roots,then the general solution is#

    fn( %05 01n 0:n: L 0m$1nm$1& rn c1r1n L ck$mrnk$m.Step"# Qse the boundary conditions to determine the constants 05, 01, $$$ , 0m$1, L c1, c:,L , ck$min the general solutions found in step * %i& or * %ii&.Step#:"eplace the specific values of the arbitrary constants obtained in step and write the uni!ue solution.

    Examples

    1. !ol%e the recurrence relationun+= "un, n O with the initial condition u= 1

    Solution# The characteristic e!uation of the recurrence relation is#r ( L since the au@iliary e!uation of a first order recurrence relation is alinear %1stdegree& e!uation.

    The characteristic root is then r ( . The general solution, for some constant 0, is# un( 0%r &n( 0%&n. To determine the arbitrary constant 0, use the initial condition u5(8. That is, for n

    (5, write# u5 ( 0%&5(8 0(8

    "eplacing the specific number 8 for the arbitrary constant 0, the uni!ue solutionof the given recurrence relation will be#

    Qn

    ( 8%&

    n

    , n

    5 333

    2. !ol%e the recurrence relation:

    an= ;an@+ an@;H ;an@#for n # with a= and a= a;=.

    Solution:

    Step1# Rriting characteristic e!uation.-ince an( :an$1 an$: $:an$*is a *rd$ order difference e!uation, its au@iliary e!uation is the*rd/ degree %or cubic& e!uation of the form#

    r*( :r: r$:

    r*/ :r:$ r : ( 5.

    Step2# ;etermine characteristic roots.7ne of the factors of the characteristic e!uation is %r$1& by inspection. Thus, theapplication of ordinary division gives#

    %r$1& % r:$r$:& ( 5

    %r$1& %r1& %r$:& ( 5 r1( 1, r:( $1 and r*( : are the characteristic roots. -o, the basic solutions are#r1n ( %1&n, r:n( %$1&nand r*n( :n.

    8

  • 7/26/2019 Discrete.doc123

    55/73

    Step!# Rrite a general solution.The linear combinations of the basic solutions yield the general solution#

    an( c1%1&n c:%$1&n c*%:&n

    an( c1 c:%$1&n c*%:&n.

    Step"# Qse the initial conditions to determine constants in the general solution.+ow, substituting the initial conditions a5( 5 and a1( a:( 1 in the general solution resultin the system of e!uations#

    c1 c: c*( 5c1/ c: :c*( 1c1 c: c*( 1.

    Qpon solving this system, we get#

    c1( 5, c:( .*

    1cand

    *

    1*=

    Step## Rrite the uni!ue solution.Thus, the uni!ue solution of the given recurrence relation is#

    an( [ ] 3335n,:&1%*

    1 1 + + nn

    +ote# The roots of a characteristic e!uation associated to a recurrence relation could becomple@ numbers. Even then, our methods are still valid, but the way the solutions of therecurrence relations are written is different. -ince an understanding of theserepresentations re!uires some background in comple@ numbers, we suggest that aninterested reader refer to a more advanced treatment of recurrence relations.

    !. !ol%e recurrence relationyn= yn@@ .yn@;, nO, with its initial conditions y= 1 and y= #

    Solution:

    Step1# Rriting characteristic e!uation.The au@iliary e!uation of the given recurrence relation is the second degree e!uation#

    r:( r / 4.

    r:$ r 4 ( 5

    Step2# ;etermine characteristic roots.

    %r$*&:

    ( 5 r (* is a repeated or a double characteristic root.Step!# Rrite a general solution.Thus, by case %ii& of step*, the general solution of the recurrence relation at hand is#

    yn( c %*&n dn %*&n.

    Step"# Qse the initial conditions to determine constants in the general solution.+ow, using the initial conditions, we get

    88

  • 7/26/2019 Discrete.doc123

    56/73

    y5( c%*&5 d%5& %*&5( 8y1( c%*&

    1 d%1& %*&1( *

    c ( 8 c ( 8*c *d ( * d( $.

    Step## Rrite the uni!ue solution.Thus, the e@plicit function of n that solves the given relation is#

    yn( 8%*&n $ n %*&n( %8$n& %*&nfor n 5 333

    Exercise 2.!

    %1&Rrite the characteristic e!uations and find the characteristic roots for each of thefollowing recurrence relations.

    %a& an( an$1 %b& an1 $ :an( 5 %c& f n: *fn1 :fn( 5%d& yn: yn1 yn(5 %e& f n:/2fn 1:fn$:( 5%f& gn:/ 9gn1 1gn( 5.

    %:& -olve the following recurrence relations.

    %a& an(8an$1an$:, n : with a5(1, a1( *.%b& :an:/11an1 8an( 5, n 5 with a5( :, a1( $9.%c& *an1( :an an$1, n 1, a5(2, a1( *%d& an/ an$1 4an$: ( 5, n :, a5(8, a1(1:.%e& an( 2an$1$ 15an$:, n :, a5(*, a1( 18.%f& 4an: 1:an1 an( 5, n 5, a5(1, a1( %g& an( *an$: :an$*, n *, a5( 1, a1( *, a:(2.

    %*& 'f a5( 5, a1( 1, a:( and a*( *2 satisfy the recurrence relation# an: ban1 can( 5,

    n 5 , where b and c are constants, then%a& find the constants b and c.

    %b& solve the recurrence relation.%& -olve the recurrence relation# a:n:/ 8a:n1 a:n( 5, n 5, a5( , a1( 1*.%8& 'f an( c1 c:%2&nfor n 5 is the general solution of the recurrence relation#

    an: ban1 can( 5, n 5, then determine the constants b and c.%& )ind a recurrence relation whose solution is#

    %a& yn( 0 %*&n B %$:&nfor some constants 0 and B.%b& f n( *%8&n

    %c& an( %0Bn& %&nfor some constants 0 and B.

    %2& 'f the recurrence relation# an c1an$1 c:an$:( 5 is satisfied by a5( 5, a1(1, a:( anda*( 1:, then solve for an.

    %9& %a& )ind a !uadratic polynomial e!uation in r whose characteristic roots are $1and 8.

    %b& )ind a linear homogenous recurrence relation with constant coefficients whosecharacteristic polynomial is the e!uation obtained in part %a&.

    %4& )ind the general solution of the following recurrence relations.%a& fn$ *fn$1$ 15fn$:(5 %b& f n: fn1 4fn( 5.%c& :fn :fn$1/ fn$:( 5. %d& f n:/*fn$1$ fn$:( 5.

    %15& )or n 5, let ancount the number of ways a se!uence of 1?- and :?- will sum to n.)or e@ample, a*( * since

    %a& 111 %b& 1: %c& :1 sum to *.

    8

  • 7/26/2019 Discrete.doc123

    57/73

    %1& )ind a recurrence relation for an.%:& -olve this recurrence relation.

    %11& -olve the following recurrence relations.

    %a& an an$1 ( 5, n 1, a5( %b& an( *an$1, n 1, a5( 1.

    %c& :an*( an: :an1/ an, n 5, a5( 5, a1( 1 and a:( :.%d& an an$1 1:an$: 9an$*( 5, n *, a5(5, a1(1and a:(:.%e& an* ( an: 9an1$ 1:an, n 5, a5( *, a1( $* and a:( :.%f& f n(fn$:/fn$*, n , f5( 1, f1( $: and f: ( and f* ($9.%g& an(*an$1$ *an$: an$*, n * a5( a1 (1 and a:(:.%h& an( an$1 an$:/ *5an$*, n * with initial conditions %a5, a1, a:& ( %$1,5,1&.

    %1:& %a& )ind a cubic polynomial e!uation whose roots are 8, $1 and *. %b& find a linear homogeneous recurrence relation with constant coefficients whose

    characteristic e!uation is the cubic e!uation found in part%a&.%c& )ind the initial conditions that can accompany the recurrence relation

    of part %b& if its solution is#%a& an ( 8n %b& an ( 8n %$1&n %c& an ( 8n : %$1&n/*n.%1*& 'f each of the discrete functions fn, gnand hnare solutions of rth$order linear

    homogenous recurrence relation with constant coefficients#an( k1an$1 k:an$: k*an$* L kran$r

    then prove that the function#sn( cfn dgn ehn

    for any constants c, d, and e is also a solution of this recurrence relation.%1& %a& Rhich of the following e!uations have multiple rootsF

    'n case there is a multiple root, find its multiplicity.%i& @:$1 ( 5 %ii& @: :@ 1 ( 5 %iii& @:@$ 1: ( 5

    %iv& @

    :

    /@4 (5 %v& @

    / :@

    :

    1 ( 5 %vi& @

    :@

    *

    /*@

    :

    $@ ( 5%vii& @*( @: 9@$1:. %viii& @* @:1:@9( 5%b& Rrite a linear homogeneous recurrence relation with constant coefficients whose

    corresponding characteristic e!uation is each e!uation in part %a&.

    2.3 /'+E% +*+6*M*GE+E*S %E&%%E+&E %E/A'*+S

    0 recurrence relation of the form#

    c5an c1an$1 c:an$: L ck an$k ( f%n&, n k.Rhere c5, c1, c:, L , ckare constants with c5, ck5 and f%n& 5 for some n R is calleda kth $order linear nonhomogeneous recurrence relation with constant coefficients

    %+""RCC of order k&.

    ME6*S *, S*/'+G +*+6*M*GE+E*S %E/A'*+S

    (1) >e Sustitution or 'nter;ention Met>od.

    The method of intervention or substitution in solving linear nonhomogeneousrecurrence relation uses the difference e!uation on the term a nto write the base value.

    82

  • 7/26/2019 Discrete.doc123

    58/73

    Then the e@pression of the base value is repeatedly substituted in the recurrence relationto find the values of the se!uence at larger and larger integers successively until an

    e@plicit formula for anin terms of n R is obtained. The e@plicit se!uence of n found inthis manner such that it describes the term anwill then be regarded as a solution of thenonhomogeneous recurrence relation at hand. -ome te@tbooks call this techni!ue as an

    'teration method of solving recurrence relations. Re now illustrate the method by the h