ДискретнаяМатематика / Student Solutions Manual / chapter 7
.pdf7.4 Exercises
1.How many license plates can be made using two uppercase letters followed by a 3-digit number?
1. Use the Multiplication Principle. 26 26 10 10 10 = 676; 000
3.How many ways can one choose one right glove and one left glove from six pairs of di erent gloves without obtaining a pair?
3. Choose the right glove in one of 6 ways. After choosing the right glove, the left glove of that pair cannot be chosen as the left glove since the left glove must come from a di erent pair. Therefore, there are 5 choices for the left glove. By the Multiplication Principle the answer is 30.
5.Given the digits 1, 2, 3, 4, and 5, nd how many 4-digit numbers can be formed from them
(a) If no digit may be repeated
(b) If repetitions of a digit are allowed
(c) If the number must be even, without any repeated digit
(d) If the number must be even
5. (a) The rst digit can be any one of ve digits. Each successive digit can be chosen from a set of one less possible digits. 5 4 3 2 = 120
5. (b) When repetitions are allowed, there are ve choices for each digit. 5 5 5 5 = 625
5. (c) Number must end with 2 or 4. Choose last digit rst. 2 4 3 2 = 48
5. (d) Must end with either 2 or 4. The remaining digits can be any of the 5 digits since repetitions are not excluded. 2 5 5 5 = 250:
7.How many natural numbers greater than or equal to 1000 and less than 5400 have the properties
(a)No digit is repeated.
(b)The digits 2 and 7 do not occur.
7. (a) There are two cases: (i) the rst digit is 5 and (ii) the rst digit is one of 1, 2, 3, 4. The count for these two cases is: 1 5 8 7 + 4 9 8 7:
7. (b) There are two cases: (i) the rst digit is 5 and (ii) the rst digit is one of 1, 3, 4. The count for these two cases is: 1 4 6 5 + 3 7 6 5:
9.How many 6-digit numbers can be formed using f1, 2, . . . , 9g with no repetitions such that 1 and 2 do not occur in consecutive positions?
9. Count the total number of numbers that can be formed and then subtract the number of numbers that have 1 and 2 in consecutive positions. Consider S = ff1; 2g; 3; 4; 5; 6; 7; 8; 9g: The number of ways to choose four elements other than f1, 2g is 7 6 5 4: Now the pair f1, 2g can be inserted in any of ve locations. At each location f1, 2g is inserted, the values can appear as 12 or 21. Thus the total number with 1 and 2 appearing consecutively is 7 6 5 4 5 2: Subtract this number from the total number of ways a six digit number can be formed: 9 8 7 6 5 4:
11.How many positive integers less than 1,000,000 can be written using only the digits 7, 8, and 9? How many using only the digits 0, 8, and 9?
11.36; 36 1 as the only choice eliminated is all 0`s.
13.A palindrome is a string that reads the same forward as it reads backward. An example (if blanks and punctuation are ignored) is: A man, a plan, a canal, Panama. How many n-letter palindromes can be formed using the alphabet f0,1g?
13. For n even, the rst half of the digits in positions 1 i n=2 can be chosen in 2 ways each. The locations n i must have the same value. Therefore, there are 2n=2 possible palindromes of even length. For
n odd, the middle location can be lled in two ways after choosing therst (n 1)=2 digits giving 2bn=2c+1 + 2n=2.
15.How many ways can a computer system be con gured if there are k input devices, m processors, and n output devices. A con guration consists of an input device, a processor, and an output device connected for use together. If k is 3, m is 6, and n is 4, draw three possible system con gurations if every processor must be connected to at least one input device and two output devices.
15.Use the Multiplication Principle. kmn
17.A ag is to consist of six vertical stripes in yellow, green, blue, orange, brown, and red. It is not necessary to use all the colors. The same color may be used more than once. How many possible ags are there with no two adjacent stripes the same color?
17.6 55 { choose the colors for one stripe at a time starting with the top one and proceeding one stripe at a time towards the bottom of theag. The rst stripe can be colored with any of the six colors and each succeeding stripe that is colored may be colored with any of the colors but the one on the stripe immediately above it.
19.How many sequences of length n can be formed using the alphabet f0, 1g? Using the alphabet f0; 1; 2g? Using the alphabet f1; 2; : : : ; kg for k 2 N? How many possible words are there in the English language of length 13 at most? If a dictionary contains 500,000 words of length less than or equal to 13, what percentage of all words of length less than or equal to 13 does it contain?
19.
2n; 3n; kn; 2613; 500; 000app. 1:6 9 2613
21.A three out of ve series is a competition between two teams consisting of at most ve games and ending as soon as one of the two competing teams wins three games. How many di erent three out of ve series are possible? Two series are \di erent" if the sequence of winners and losers in one series is not the same as in the other series. Draw a tree to represent the possibilities.
21.
w |
w |
|
w |
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
l |
l |
l |
|
|
|
|
|
|
|
|
|||||
w |
w |
|
|
w |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
l |
l |
l |
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
w |
|
|
|
|
w |
|
|||||
|
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
w |
|
|
|
w |
l |
w |
|
l |
|
|||||||
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
w |
l |
l |
|
|
|
w |
|
l |
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
l |
|
|
|
|
|
|
l |
|
|
|
|
|
l |
A horizontal segment indicates a loss while the vertical segments indicate wins.
23.How many injective functions are there from S to T if jSj = n and jT j = m where n m?
23. Each of the n elements must go to a di erent element of T: m (m 1) (m n + 2) (m n + 1)
25.Find the number of paths from A to F in the following diagram with six letters. A path can only go through letters that are consecutive, either horizontally or vertically, and it goes only to the right or up at each step.
F |
|
|
|
|
E |
F |
|
|
|
D |
E |
F |
|
|
C |
D |
E |
F |
|
B |
C |
D |
E |
F |
A |
B |
C |
D |
E F |
Prove that a similar path with n letters has 2n 1 paths from the lower left corner to any letter in the right most position in a row.
25. At each stage the path can be continued either straight up or one step to the right. The steps can continue until one of the elements on the outer diagonal is reached. There are n 1 steps required to reach a diagonal so there are 2n 1 possible paths. In this case 25:
Internet Addresses{IPv4 and IPv6
The internet requires an address for each machine that is connected to it. The address space of the addressing architecture of Internet Protocol version 4 (IPv4) consists of a 32-bit eld. Since not every combination of bits can be used as an address, plans are underway to change the address space to a 128-bit eld in IPv6. The 32-bit IPv4 addresses are usually written in a form called dotted decimal. The 32-bit address is broken up into four 8-bit bytes and these bytes are then converted to their equivalent decimal form and separated by dots. For example,
10000000 |
00000011 |
00000010 |
00000011 |
is written as 128.3.2.3 which is obviously more readable. The 128-bit IPv6 addresses are divided into eight 16-bit pieces. Each 16-bit piece is converted to its equivalent hexadecimal value (each sequence of 4 bits is converted to one hexadecimal digit). The eight four character hexadecimal strings are separated by colons. It is not practical to list 128 bits and show the conversion to the nal IPv6 address form. As an example of what you might end up with, however, we show one IPv6 address: FEDC:BA98:7654:3210:FEDC:BA98:7654:3210.
27. Write the following IPv4 address in dotted decimal format:
01001010110010101000100011011101
where x1x2x3x4x5x6x7x8 as a binary number is the decimal number
x1 27 + x2 26 + x3 25 + x424 + x5 23 + x6 22 + x7 21 + x8 20
27. 72.202.136.221
29. What would the string
01001000111010100110100101110111
look like as the rst part of an IPv6 address.
29.48EA:6977
7.7Exercises
1.A \word" is a string of one or more lowercase letters. How many words can be formed using all the letters of the word hyperbola? In how many words will h and y occur together? In how many will h and y not occur together?
1. 9! = 362,880; 8! 2! = 80,640; 9! - 8! 2! = 282,240
3.A shelf has room for 10 books.
(a)Given an inventory of 25 books, how many years will it take to display all combinations of 10 books if the display is changed once a week?
(b)How many years will it take if the display is changed ve times a week? 3. (a) No. displays / No. weeks = C(25; 10)=52
3. (b) No. displays / No. changes = C(25; 10)=(5 52)
5.The English alphabet contains 26 letters, including ve vowels. In each case determine how many words of length ve are possible provided that:
(a)Words contain at most two distinct vowels
(b)Words contain at most one letter that is a vowel
(c)Words contain at least four distinct vowels
5. (a) For an i vowel word, choose the i vowels and then order them in all possible ways for the i places they appear in the word. 265 212C(5; 3)P (3; 3)P (2; 2) 21C(5; 4)P (4; 4)P (1; 1) P (5; 5)
5. (b) No. words - 2 vowel words - 3 vowel words - 4 vowel words - 5 vowel words = 265 213C(5; 2)2P (2; 2) 212C(5; 3)2P (3; 3)P (2; 2)
21C(5; 4)2P (4; 4)P (1; 1) P (5; 5)
5.(c) C(5; 4) C(5; 4) C(4; 4) C(26; 1)
7.A student has four examinations to write, and there are 10 examinations periods available. How many ways are there to schedule the examinations?
7. C(10; 4)P (4; 4) =5040
9.A student must answer 8 out of 10 questions on an exam.
(a)How many choices does the student have?
(b)How many choices does a student have if the rst three questions must be answered?
(c)How many choices does a student have if exactly four out of the rstve must be answered?
9.(a) C(10; 8)
9.(b) C(7; 5)
9.(c) C(5; 4) C(5; 4)
11.How many permutations are there for the 26 letters of the alphabet if theve vowels occur together?
11.P (22; 22)P (5; 5) = 22! 5!
13.Twelve-tone music requires that the 12 notes of the chromatic scale be played before any tone is repeated. How many di erent ways can the 12 tones be played? How long will it take to play all possible sequences of twelve tones if one sequence can be played in four seconds?
13.P (12; 12) =12!; No. days = No. tones /(15 60 24) = 22; 176 days.
15.A ra e has three prizes to award to 10,000 ticket holders. How many di erent ways can the prizes be distributed if no one can win more than one prize? If one person can win more that one prize?
15.If no one receives more than a single prize:
Assume the prizes are identical. In that case the answer is C(10000; 3): If the prizes are ranked by some priority, then there are P (10000; 3) ways to assign the prizes.
If someone receives two of the three prizes and all the prizes are the same, the answer is C(10; 000; 2) C(2; 1): If the prizes are di erent, the answer is C(10; 000; 2) C(3; 2) C(2; 1):
If someone receives all three prizes, the answer is C(10; 000; 1): The answer in this case is the same whether the prizes are the same or di erent.
17.How many ways are there to seat eight people at a round table? How many ways if Smith and Jones cannot be seated next to each other?
17. 7!; The unrestricted seating can be done in 7! ways. Pretend the two unwilling are seated in a single seat and complete the seating in 6! ways. The unwilling can be seated in two ways together. Now, subtract the number of disallowed seatings from the total number of seatings possible. 7! 2 6!
19.How many ways can n men and n women be seated at a round table if no two women are seated next to each other?
19. (n 1)! n! { consider this as two problems. The rst problem is to seat n women in n seats around a circular table. The second problem is the same, but now men are being seated. The idea is to ll every other seat with a women and then ll the in-between seats with men in n! possible ways.
21.Determine the number of ve-card poker hands with the following patterns:
(a)Four deuces (2's) and one other card
(b)Four of one value and one other card
(c)Two pairs (but not four of a kind) and one card with a di erent value
(d)Three cards of one value and two cards of a second value (this is called a full house)
(e)A straight ush (a straight with all the cards from one suit)
(f)A hand with ve di erent card values that is not a straight and is not a ush
(g)Three of one kind and two other cards with di erent values
21. (a) C(48; 1) = 48
21. (b) C(13; 1) C(48; 1) = 624
21. (c) C(13; 2)C(9; 2)2C(44; 1)
21. (d) C(13; 1) C(4; 3) C(12; 1) C(4; 2) = 3; 744
21. (e) C(10; 1) C(4; 1) = 40
21. (f) This is an example of using the principle of inclusion-exclusion for counting the number of hands than is a strait or a ush
no of cards with ve di erent values - (straits where the ve cards can be from di erent suits + hands all card from the same suit - straits with all cards from the same suit)
C(4; 1)5 C(13; 5) C(4; 1)5 C(10; 1) C(13; 5) C(4; 1) + C(10; 1) C(4; 1)
21.(g) C(4; 3) C(13; 1) C(4; 1)2 C(12; 2) = 54; 912
23.There are six points in a plane, no three of which are collinear. In how many ways can you draw a pair of triangles with the six points as vertices.
23. C(6; 3)=2 since choosing corners for one triangle automatically determines the corners of a second triangle.
25.Winning a state lottery is based on trying to guess which six randomly picked numbers in the set f1; 2;: 30g will be chosen. No repeats are allowed. Winning a second state lottery is based on trying to guess which six randomly picked numbers from the set f1; 2;: 38g will be chosen.
Winning a third state lottery is based on trying to guess 7 of 11 randomly picked numbers from the set of f1; 2;: 80g. How many possible winning combinations are there for each of these lotteries?
25.C(30; 6); C(38; 6); C(80; 11)C(11; 7)
27.How many ways can a committee of three men and two women be chosen from six men and four women? If Adam Smith and Abigail Smith will not serve on the same committee?
27. Choose men and then choose women. C(6; 3)C(4; 2); Neither Smith serves + Abigail serves + Adam serves = C(5; 3)C(3; 2) + C(5; 3)C(3; 1) + C(5; 2)C(3; 2)
29.Two committees of ve persons each must be chosen from a group of 375 people. If the committees must be disjoint, in how many ways can the committees be chosen? If the committees need not be disjoint, in how many ways can this be done?
29. If both committees are disjoint the answer is C(375; 5) C(370; 5): If both committees are not disjoint, the answer depends on how many members are common to both committees.
0 in common: C(375; 5) C(370; 5)
1 in common: C(375; 5) C(5; 1) C(370; 4)
2 in common: C(375; 5) C(5; 2) C(370; 3)
3 in common: C(375; 5) C(5; 3) C(370; 2)
4 in common: C(357; 5) C(5; 4) C(370; 1)
5 in common: C(375; 5) C(5; 5) C(370; 0)
The answer is the sum of all the possibilities for these six cases. The sum is C(375; 5) C(375; 5):
31.Solve the problem in Example 10 if the claim is that a di erent pizza can be ordered every day for three years.
31. 12 ingredients are needed.
Three years
Number of ingredients |
Number of pizzas |
1 |
2 |
2 |
4 |
3 |
8 |
4 |
16 |
5 |
32 |
6 |
63 |
7 |
120 |
8 |
219 |
9 |
382 |
10 |
638 |
11 |
1024 |
12 |
1586 |
|
|
|
|
33. How many ways are there for a person to travel from the southwest corner to the northeast corner of an m n grid? Enumerate all the ways possible if the grid is 5 3: How many ways are there if the grid is 10 10 and no move may take the person below the main diagonal (those positions that are k steps over and k steps up from the starting point where 1 k 10):
33. The number of ways to travel from the southwest corner of an m n grid to the northeast corner of the grid can be viewed as the paths from the lower left corner to the upper right corner that stay on horizontal or vertical lines between lattice points (points with both coordinates integers). The path must go up exactly n times and to the right exactly m times. The number is just the way to count the number of n+m sequences with n entries saying go up and m entries saying go right. The answer is C(n + m; )n: For the 5 by 3 grid the answer is C(5 + 3; 3) = 56: For the
10by 10 grid the answer is C(20; 10) = 19 17 13 11:
35.How many ways can 12 black pawns be placed on the black squares of an 8 8 Chess board? How many ways can 12 black pawns and 12 white pawns be placed on the black squares of an 8 8 chess board? Half the
64squares are black and half are red. No black(red) square shares an edge with a black(red) square.
35.Simply choose 12 of the squares as the pawns are indistinguishable among themselves. The answer is C(32; 12). Place the black pawns and then place the white pawns in the remaining squares. C(32; 12) C(20; 12)
37.How many ways can a committee be selected consisting of two Independents, two Republicans, and two Democrats if the choices are made from seven Independents, nine Republicans, and eight Democrats?
C hooseI Cnd:hooseR Cep:hooseD = Cem:(7; 2) C(9; 2) C(8; 2)
39.How many seven-digit sequences can be formed using the symbols f0,1,2,3g? 39. 47
41.(a) Which permutation of f1, 2, 3, 4, 5g follows 3 1 5 2 4 in the lexicographical ordering of the permutations of ve elements?
(b) Repeat the question for 4 -6 -1 -3 -7 -5 -2 as a permutation of f1, 2, . . . , 7g.
41. (a) 3-1-5-4-2
41.(b) 4-6-1-5-2-3-7
43.What is the 311th permutation of f1, 2, 3, 4, 5, 6, 7g relative the lexicographical ordering? Remember that the 311th is numbered 310 since therst element is numbered 0. What is the 2374th?
43. This is the permutation numbered 310 in the dictionary ordering: 1457632
This is the permutation numbered 2373 in the dictionary ordering: 4267351
45.A classroom has two rows of eight seats. There are 14 students in the class. Five students always sit in the front row, and four always sit in the back row. In how many ways can the students be seated?
45. C(8; 5) P (5; 5) C(8; 4) P (4; 4) C(7; 5) P (5; 5).
7.11 Exercises
1.How many permutations are there for the letters of the name Bathesheba? Solomon? Ahab? Your own name?
1. Use Theorem 1. 9!=(2!2!2!2!); 7!=3!; 4!=2!
3. How many words or strings of 12 letters can be formed from the symbols
a; a; a; a; b; b; b; b; b; b; b; b
provided that no two a's can occur together?
3. Line up the eight b's. Put a space at the beginning and the end of the list and an additional space between each pair of b's. There are nine spaces. Choose places for the a's in C(9; 4) ways.