You are on page 1of 8

Name: Nguyn Thi Thnh t- MSSV:14111191

1. There are 18 math majors and 325 computer


science majors at a college.
a) In how many ways can two representatives be picked so that one is
a mathematics major and the other is a computer science major?
To pick one mathematic major we have 18 way, and to pick one
computer science we have 325 ways, so we have 18*325=5850
ways to make a combination from them
b) In how many ways can one representative be picked who is either a
mathematics major or a computer science major?
To pick one mathematic major we have 18 way, and to pick one
computer science we have 325 ways, so we have 18 + 325 = 343
ways to choose one of them.

16. How many strings are there of four lowercase


letters that have the letter x in them?
+The number of possible strings of four lowercase letters: 26^4
+the number of possible strings with no xs: 25^4
The result is 26^4 25^4=66351.

17. How many strings of ve ASCII characters contain


the character @ (at sign) at least once? [Note: There
are 128 different ASCII characters
We count all possible strings that use the 128 characters and
then exclude those strings that dont use @: 128^5 127^5 =
1321368961.

24. How many positive integers between 1000 and


9999 inclusive
a) are divisible by 9? Count the multiples of 9 in {1..9999} and
exclude those in {1..999}
[9999/9] [999/9] = 1000.
DHTH10ATT

Page 1

Name: Nguyn Thi Thnh t- MSSV:14111191


b) are odd? Do as above with 2 in place of 9 to count the odd :
9000/2=4500

c) have distinct digits


o 9 choices for first digit, 10-1=9 choices for second, 10-2 choices
for third, and 10-3 choices for 4th.
Answer = 9*9*8*7 =4536.
d) are not divisible by 3
o Count those that are divisible by three (9000/3) and then take the
complement
9000-(9000/3)=6000.
e) divisibly by 5 or 7
[9999/5 + 9999/7 9999/ (5*7)] [999/5 + 999/7 999/(5*7)] =
3142 313 = 2829.
f) are not divisible by either 5 or 7?
9000 2829 = 6171.
g) are divisible by 5 but not by 7?
[9999/5 - 9999/ (5*7)] [999/5 999/(5*7)] = (1999 285) (199
28) = 1714 171 = 1543.
h) are divisible by 5 and 7?
[9999/ (5*7)] [999/(5*7)] = 285 - 28 = 257.

32. How many strings of eight uppercase English


letters are there
a) if letters can be repeated?
DHTH10ATT

Page 2

Name: Nguyn Thi Thnh t- MSSV:14111191


We have: 26^8
b) if no letter can be repeated?
We have: 26*25*24*23*22*21*20*19
c) that start with X, if letters can be repeated?
The result is 26^7
d) that start with X, if no letter can be repeated?
We have: 25*24*23*22*21*20*19
e) that start and end with X, if letters can be repeated?
We have: 26^6
f) that start with the letters BO (in that order), if letters can be
repeated?
The result is 26^6
g) that start and end with the letters BO (in that order), if letters can be
repeated?
We have: 26^4
h) that start or end with the letters BO (in that order), if letters can be
repeated?
o If start with BO: 26^6
o If end with BO: 26^6
o If start and end with BO: 26^4
So The result is 26^6+26^6-26^4

46.In how many ways can a photographer at a


wedding arrange 6 people in a row from a group of 10
people where the bride and groom are among these 10
people, if
DHTH10ATT

Page 3

Name: Nguyn Thi Thnh t- MSSV:14111191


a) the bride must be in the picture.
o Pick the position of the bride: 6
o Place the remaining 5 people from left to right in the remaining
positions (use the product rule to do this): 9 . 8. 7 . 6 . 5
Overall answer is 6 . 9 . 8. 7 . 6 . 5.

b) both the bride and groom must be in the picture.


o Pick the position for the bride: 6
o Pick the position for the groom: 5
o Place the remaining 4 people from the remaining 8 in the
remaining 4 slots, from left to right: 8 . 7 . 6 . 5.
The overall answer is 6 . 5 . 8 . 7 . 6 . 5.

c) Exactly 1 of the bride & groom is in the picture?


o Pick either the bride or the groom: 2.
o Place that person in the picture: 6.
o Place remaining 5 from remaining 8 people:
P(8, 5) = 8 . 7 . 6 . 5 . 4=6720
So,The overall answer is 2 . 6 . 6720 = 80,640.

65. How many ways are there to arrange the letters a,


b, c, and d such that a is not followed immediately by
b?

DHTH10ATT

Page 4

Name: Nguyn Thi Thnh t- MSSV:14111191


With "a" in the 1st position:
acbd , acdb ,adbc , adcb
With "a" in the 2nd position:
bacd , badc ,cadb , dacb
With "a" in the 3rd position:
bcad ,bdac , cbad , dbac
With "a" in the 4th position:
bcda ,bdca ,cbda ,cdba ,dbca , dcba

there are 18 ways


4/A bowl contains 10 red balls and 10 blue balls. A
woman selects balls at random without looking at
them.
a) How many balls must she select to be sure of having at least 3 balls
of the same color?
Suppose that the colors are the pigeonholes, and the balls are
the pigeons. We want to know the minimum value N such that
N/2 = 3. The smallest such N is 5
b) b) How many balls must she select to be sure of having at least
three blue balls?
In the worst case, she may choose all 10 red first, and then 3
blue balls. So she must select 13 balls.

14. a) Show that if seven integers are selected from


the rst 10 positive integers there must be at least
two pairs of these integers with the sum 11.
We group integers 1, 2, , 10 (pigeons) into five subsets
(pigeonholes) of two integers each, each subset adding up to
11: [1, 10], [2, 9], [3, 8], [4, 7], [5, 6]. Then by the
generalized pigeonhole principle at least [7/5] = 2 pairs of
these integers will be in the same box, i.e. will be added up to
11
b) Is the conclusion in (a) true if six integers are selected rather
than 7?

DHTH10ATT

Page 5

Name: Nguyn Thi Thnh t- MSSV:14111191


No, the set {1, 2,3,4,5, and 6} has just 5+6 =11.

4.Let S = {I, 2, 3, 4, 5}.


a) List all the 3-permutations of S.
o
o
o
o
o
o
o
o
o
o

123
124
125
134
135
145
234
235
245
345

(132
(142
(152
(143
(153
(154
(243
(253
(254
(354

213
214
215
314
315
415
324
325
425
435

231
241
251
341
351
451
342
352
452
453

312
412
512
413
513
514
423
523
524
534

321)
421)
521)
431)
531)
541)
432)
532)
542)
543)

P(3,5) = 5!/(5-3)! = 5!/2! = 5 * 4 * 3 * 2 * 1 / 2 * 1 = 60


b) How many 3-combinations of S are there? List 5 of them.
o
o
o
o
o
o
o
o
o
o

123
124
125
134
135
145
234
235
245
345
C(3,5) = 5!/ 3! *(5-3)! = 5!/3! * 2! = 5 * 4 * 3 * 2 * 1 / 3 * 2 *
1 * 2 * 1 = 10

14.How many bit strings of length 12 contain


a) exactly 3 1s?

DHTH10ATT

Page 6

Name: Nguyn Thi Thnh t- MSSV:14111191


If there are exactly three 1s, then there are C(3,12)= 220 ways to
place them into the bit string. Since this is a bit string, once the
1s have been placed the string is fully specified
b) at most three 1s?
Now, there are either 0, 1, 2, or 3 ones. Since those cases are
disjoint, we can sum the counts, for C(0,12) + C(1,12) + C(2,12)
+ C(3,12) = 1 + 12 + 66 + 220 = 299 such strings
c) at least thee 1s?
If there are at least three 1s, wed have to sum over a lot of cases
to use the technique of part (b). Itd be much easier to subtract
off the cases that we arent interested in. There are 212 = 4096
bit strings of length 12, of which we dont care about the ones
with 0 ones (1 case), 1 one (12 cases), or 2 ones (66 cases).
There are 4096 1 12 66 = 4017 bit strings of length 12
with at least three 1s.
d) an equal number of 0s and 1s?
If there are an equal number of 0s and 1s, there are 6 of each.
There are C(6,12)= 924 such bit strings

16) How many subsets with an odd number of


elements does a set with 10 elements have?
o We have to choose 1,3,5,7, or 9 elements of the 10 to be in our
subset.
There are C(1,10) + C(3,10) + C(5,10) + C(7,10) + C(9,10)
ways to do this.

22) How many permutations of ABCDEFGH contain


a) the string ED?
Think of ED as a single symbol. The number of arrangements of A, B, C,
ED, F, G, H is 7!.
b) the string CDE?
DHTH10ATT

Page 7

Name: Nguyn Thi Thnh t- MSSV:14111191


The number of arrangements of A, B, CDE, F, G, H is 6!
c) the strings BA and FGH?
The number of arrangements of BA, C, D, E, FGH is 5!
d) the strings AB, DE, and GH?
The number of arrangements of AB, DE, C, F, GH is 5!
e) the strings CAB and BED?
The number of arrangements of CABED, F, G, H is 4!
f) the strings BCA and ABF?
There are 0 permutations of these letters that contain both BCA and
ABF, since A comes before B in ABF, and after B in BCA.

DHTH10ATT

Page 8

You might also like