Docsity

CMSC 250: Homework 9 Solutions - Fall 2009 - Prof. Donald R. Perlis, Assignments of Discrete Structures and Graph Theory

Toggle sidebar
bg1
Fall 2009
CMSC 250: Homework 9 Solutions
Perlis
Due at the start of discussion section Wednesday, November 11, 2009.
Please staple your homeworks together if you use more than one page.
Problem 1. (1 point) Print your name ,
section number , and your TAโ€™s name .
Problem 2. (1 point) When is the second exam? |
Problem 3. (30 points) Evaluate each of the following: You may leave your results
unsimplified.
a. ๐’ซ ๐‘Ž, ๐‘ = โˆ…, ๐‘Ž , ๐‘ , ๐‘Ž, ๐‘
b. 1,2,3 ร— ๐‘Ž,๐‘,๐‘ โˆฉ ๐‘,๐‘‘,๐‘’ = 1, ๐‘ , 2, ๐‘ 3, ๐‘
c. 1,2,3,4,5 โˆช 1,3,5,7,9 = 7
d. The number of three digit numbers that do not contain the digit 0.
There are 9 digits that aren't 0, giving 93=729 numbers that don't have a 0.
e. The number of four letter strings that can be written using only letters from
"MACHINE". Each letter may be used only once in each string.
There are 7 letters in MACHINE, none of which are the same.
There are 7โˆ™6โˆ™5โˆ™4 = 840 different strings.
Problem 4. (20 points) Consider an integer ๐‘›, and its prime factorization ๐‘1
๐‘Ž1โˆ™ ๐‘2
๐‘Ž2โˆ™ ๐‘3
๐‘Ž3โ‹ฏ.
Write a formula in terms of ๐‘Ž๐‘– that gives the number of distinct positive divisors
(including 1 and ๐‘›) of ๐‘›. Explain your answer.
For each prime number ๐‘๐‘– in the prime factorization of ๐‘›, a divisor of ๐‘› may have 0 up to
and including ๐‘Ž๐‘– as the exponent of ๐‘๐‘– in its prime factorization. This means that for each
๐‘๐‘–, there are ๐‘Ž๐‘–+ 1 choices for the exponent in a divisor of ๐‘›. The total number of
positive divisors of ๐‘› is ๐‘Ž๐‘–+ 1
๐‘–=1 .
Problem 5. (15 points) Consider a string of the 26 letters of the English alphabet. Any letter
may appear any number of times, but never twice in a row. How many strings are there
of length ๐‘› for ๐‘› โ‰ฅ 2? Explain your answer.
Consider the ways to pick the each next letter of the string. The first letter can be
anything, so there are 26 ways to pick the first letter. The second letter can be anything
except the first letter, so there are 25 ways to pick the second letter. Similarly for each
letter after the second, there are 25 letters that can be used. This gives 26 โˆ™25๐‘›โˆ’1 as the
number of strings of length ๐‘›.
pf2

Partial preview of the text

Download CMSC 250: Homework 9 Solutions - Fall 2009 - Prof. Donald R. Perlis and more Assignments Discrete Structures and Graph Theory in PDF only on Docsity!

Fall 2009 CMSC 250: Homework 9 Solutions Perlis

Due at the start of discussion section Wednesday, November 11, 2009.

Please staple your homeworks together if you use more than one page.

Problem 1. (1 point) Print your name , section number , and your TAโ€™s name.

Problem 2. (1 point) When is the second exam? |

Problem 3. (30 points) Evaluate each of the following: You may leave your results unsimplified.

a. ๐’ซ ๐‘Ž, ๐‘ = โˆ…, ๐‘Ž , ๐‘ , ๐‘Ž, ๐‘

b. 1,2,3 ร— ๐‘Ž, ๐‘, ๐‘ โˆฉ ๐‘, ๐‘‘, ๐‘’ = 1, ๐‘ , 2, ๐‘ 3, ๐‘

c. 1,2,3,4,5 โˆช 1,3,5,7,9 = 7

d. The number of three digit numbers that do not contain the digit 0.

There are 9 digits that aren't 0, giving 93 = 729 numbers that don't have a 0.

e. The number of four letter strings that can be written using only letters from "MACHINE". Each letter may be used only once in each string.

There are 7 letters in MACHINE, none of which are the same. There are 7 โˆ™ 6 โˆ™ 5 โˆ™ 4 = 840 different strings.

Problem 4. (20 points) Consider an integer ๐‘›, and its prime factorization ๐‘ 1 ๐‘Ž^1 โˆ™ ๐‘ 2 ๐‘Ž^2 โˆ™ ๐‘ 3 ๐‘Ž^3 โ‹ฏ. Write a formula in terms of ๐‘Ž๐‘– that gives the number of distinct positive divisors (including 1 and ๐‘›) of ๐‘›. Explain your answer.

For each prime number ๐‘๐‘– in the prime factorization of ๐‘›, a divisor of ๐‘› may have 0 up to and including ๐‘Ž๐‘– as the exponent of ๐‘๐‘– in its prime factorization. This means that for each ๐‘๐‘– , there are ๐‘Ž๐‘– + 1 choices for the exponent in a divisor of ๐‘›. The total number of positive divisors of ๐‘› is (^) ๐‘–=1 ๐‘Ž๐‘– + 1.

Problem 5. (15 points) Consider a string of the 26 letters of the English alphabet. Any letter may appear any number of times, but never twice in a row. How many strings are there of length ๐‘› for ๐‘› โ‰ฅ 2? Explain your answer.

Consider the ways to pick the each next letter of the string. The first letter can be anything, so there are 26 ways to pick the first letter. The second letter can be anything except the first letter, so there are 25 ways to pick the second letter. Similarly for each letter after the second, there are 25 letters that can be used. This gives 26 โˆ™ 25 ๐‘› โˆ’^1 as the number of strings of length ๐‘›.

Problem 6. (15 points) Suppose that ๐‘Ž โˆˆ ๐ด and that ๐ด = 10. How many elements of the power set of ๐ด also contain ๐‘Ž? Explain your answer.

Half of the subsets of ๐ด will contain ๐‘Ž while the other half will not. Since ๐’ซ ๐ด = 2^10 , there must only be 210 2 = 2

(^9) = 512 such subsets.

Problem 7. (18 points) For a fundraiser, a student club sold hand dyed shirts. Without any dye, the shirts are white. The students could use three different colors of dye: red, blue, and yellow. By using mixing multiple dyes together, they could make more colors: purple (red and blue), orange (red and yellow), green (blue and yellow), and brown (all three dyes). A total of 100 shirts were sold. The students kept track of what color dyes were used to make the shirts that were sold:

55 shirts used at least the red dye. 40 shirts used at least the blue dye. 35 shirts used at least the yellow dye. 10 shirts used at least both the red and the blue dyes. 15 shirts used at least both the red and the yellow dyes. 20 shirts used at least both the blue and the yellow dyes. 5 shirts used all three dyes.

Fill in numbers in the 8 regions of the Venn diagram below. Don't forget to indicate the white shirts as well.

Used the red dye Used the blue dye

Used the yellow dye