0% found this document useful (0 votes)
19 views3 pages

Test3 Sol

This document contains the questions and solutions for a test on combinatorics and probability. There are 3 problems involving binomial coefficients and factorials. The remaining problems involve counting the number of strings of letters that satisfy certain conditions, such as containing or not containing certain letters, repeating letters, and the position of letters. The solutions use techniques like the product rule, sum rule, binomial coefficients, and factorials.

Uploaded by

Muhammad Hanif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views3 pages

Test3 Sol

This document contains the questions and solutions for a test on combinatorics and probability. There are 3 problems involving binomial coefficients and factorials. The remaining problems involve counting the number of strings of letters that satisfy certain conditions, such as containing or not containing certain letters, repeating letters, and the position of letters. The solutions use techniques like the product rule, sum rule, binomial coefficients, and factorials.

Uploaded by

Muhammad Hanif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CPSC 1820 – TEST 3 March 16, 2011

Name Student number

TOTAL MARKS: 50
TOTAL TIME: 50 minutes

Problem 1: [10 pts] Let n ∈ N. Use induction to prove the following equality.

1 · 1! + 2 · 2! + . . . + n · n! = (n + 1)! − 1

Solution:
Basis step:
Let n = 1.

1 · 1! = 2! − 1
↔1 = 2 − 1 = 1 true.

Inductive step:
Let k ∈ N. Assume 1 · 1! + 2 · 2! + . . . + k · k! = (k + 1)! − 1.
We need to show that

1 · 1! + 2 · 2! + . . . + k · k! + (k + 1) · (k + 1)! = (k + 2)! − 1.

1 · 1! + 2 · 2! + . . . + k · k! + (k + 1) · (k + 1)! =(k + 1)! − 1 + (k + 1) · (k + 1)!


=(k + 1)! · (1 + (k + 1)) − 1
=(k + 1)! · (k + 2) − 1
=(k + 2)! − 1.

Problem 2: [30 pts] For this question, suppose the English alphabet has 26 letters, of which 6 are
vowels (a,e,i,o,u,y). Answer the following questions by writing expressions involving powers and factorials, as
in 268 , 8!, etc. How many strings of 8 English letters are there ...

a) if no letters repeat?

Solution:
26!
P (26, 8) = 18!

b) if letters can be repeated?

Solution:
268

Page 1 of 3
CPSC 1820 – TEST 3 March 16, 2011

c) that start with letter “x” and no letters repeat?

Solution:
25!
P (25, 7) = 18!

d) that start with letter “x” or start with letter “y” and letters can repeat? Explain.

Solution:
2 · 267 (sum rule, disjoint sets)

e) that start with letter “x” or end with letter “y” and no letters repeat? Explain. Hint: do not count
“x******y” twice.

Solution:
Number of strings that start with “x” and end with “y” are P (24, 6) (6 positions between “x” and “y” to
be filled from the alphabet excluding “x” and “y”). These strings are counted twice when we use the sum
rule. The number of strings starting with “x” is the same as the number of strings ending with “y” and is
P (25, 7).
The answer is 2P (25, 7) − P (24, 6).

f) that contain substring “abc” and no letters repeat? Explain.

Solution:
Consider “abc” as one object. There are 23 letters left to be distributed among 5 positions, in P (23, 5) ways.
For each such distribution, we can place “abc” among the 5 positions in 6 ways, so the answer is 6 · P (23, 5).

g) that start with a vowel, if letters can be repeated? Explain.

Solution:
The product rule works here. There are 6 choices for the first letter, and 26 choices for the remaining
positions, so the answer is 6 · 267 .

h) that contain exactly 5 “x” and 3 “y”? (“x” and “y” are the only letters in the word) Explain.

Solution:
We are actually counting binary strings since there are only two possible characters. Choose the position
8!
for the “y” in C(8, 3) ways and put “x” in the remaining spots, so the answer is C(8, 3) = 3!·5! .

i) that contain no vowels and letters can be repeated? Explain.

Solution:
Product rule. No vowels means we choose from an alphabet of 20 letters, and the answer is 208 .

j) that contain at least one vowel and letters can be repeated? Explain. Hint: use the answer to the previous
question.

Solution:
The total number of words from the first question is 268 and from the previous question there are 208 words
without vowels, so the answer to this question is 268 − 208 .

k) that contain exactly one vowel and letters can be repeated? Explain. Hint: choose the position of the vowel
first, then fill the vowel position and remaining positions appropriately.

Solution:

Page 2 of 3
CPSC 1820 – TEST 3 March 16, 2011

Choose the position for the vowel first. There are 8 choices. Once the position is fixed, the vowel can be
chosen in 6 ways. The remaining 7 positions can be filled in 207 ways. The answer is 8 · 6 · 207 .

l) that contain exactly two vowels and no letters repeat? Explain.

Solution:
Choose the positions for the vowels in C(8, 2) ways. Once the position is fixed, we fill the vowels in P (6, 2)
ways since letters cannot repeat. The remaining 6 positions are filled with consonants in P (20, 6) ways.
Answer C(8, 2) · P (6, 2) · P (20, 6).

m) that contain all the vowels and no letters repeat? Explain. Hint: choose the position of the consonants
first, then fill with characters.

Solution:
There are 6 vowels and 2 consonants. Choose the position of the consonants first in C(8, 2) ways, then select
the consonants in P (20, 2) ways and then permute the vowels in 6! ways. Answer: C(8, 2) · P (20, 2) · 6!.

n) in which vowels and consonants alternate and no letters repeat? Explain. (example: abecidof OR bacedifo,
...) Hint: fix the positions of the vowels and consonants first, then fill them with characters appropriately.

Solution:
There are two possible alternating sequences of vowels and consonants as in the example illustrated. For one
sequence, choose the vowels first in P (6, 4) ways then the consonants in P (20, 4) ways. Answer: 2 · P (6, 4) ·
P (20, 4).

o) in which vowels and consonants alternate and letters can be repeated? Explain.

Solution:
Similar to above, there are two possible sequences. For one sequence, there are 64 ways to place the vowels
and 204 ways to choose the consonants. Answer: 2 · 64 · 204 .

Problem 3: [5 pts] Write the coefficient of x5 y 7 in (x + y)12 .

Solution:
12!
C(12, 5) = 5!·7!

Problem 4: [5 pts] Write the coefficient of x9 in (2 − x)19 .

Solution:
19!
−210 C(19, 9) = −210 9!·10! .

FINAL SCORE (out of 50)

Page 3 of 3

You might also like