

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


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