

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Plane; Class: Discrete Structures; Subject: Computer Science; University: University of Maryland; Term: Unknown 1989;
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


In this set of answers, I have taken the value to an actual integer. You will not need to do this on the exam for these larger numbers because calculators are not allowed, and I don’t want to spend time testing if you know how to multiply. I have done it here so that if you used a different method, it should still evaluate to reach the same integer value.
a. How many integers are between 5 and 125 (inclusive)? ANSWER: 125 − 5 + 1 = 121 b. How many integers are between 5 and 125 (inclusive) which are divisible by 3? ANSWER: 2 ∗ 3 , 3 ∗ 3 , ..., 40 ∗ 3 , 41 ∗ 3 = 6, 9 , ..., 120 , 123 41 − 2 + 2 = 40 c. How many integers are between 5 and 125 (inclusive) which are divisible by 5? ANSWER: 1 ∗ 5 , 2 ∗ 5 , ..., 24 ∗ 5 , 25 ∗ 5 = 5, 10 , ..., 120 , 125 25 − 1 + 1 = 25 d. How many integers are between 5 and 125 (inclusive) which are divisible by both 3 and 5? ANSWER: 1 ∗ 15 , 2 ∗ 15 , ..., 7 ∗ 15 , 8 ∗ 15 = 15, 30 , 105 , 120 8 − 1 + 1 = 8 e. How many integers are between 5 and 125 (inclusive) which are divisible by either 3 or 5? ANSWER: n(A ∪ B) = n(A) + n(B) − n(A ∩ B) = 40 + 25 − 8 = 57 f. How many integers are between 5 and 125 (inclusive) which are divisible by neither 3 nor 5? ANSWER: Total number - number that are divisible = n(U ) − n(A ∪ B) = 121 − 57 = 64 g. How many integers are between 5 and 125 (inclusive) which are divisible by 3 but not divisible by 5? ANSWER: number divisible by 3 - number of those that are divisible by 5 = n(A) − n(A ∩ B) = 40 − 8 = 32
a. How many different ways can you select two dogs to take for a walk at the same time? ANSWER:
( 6 2
) = (^) 4!2!6! = 15 b. How many different ways can you select two dogs to take for a walk at the same time assuming you can’t handle 2 big dogs at the same time? ANSWER: Partition and use Addition Rule Two non-big dogs + One big and one non-big dog( 4 2
)
( 2 1
)( 4 1
) = 6 + 8 = 14 c. How many different ways can you assign the dogs all to leashes (assuming you have 6 leashes in 6 different colors)? ANSWER: Steps and use multiplication rule Select the leash for the first dog = 6 ∗ Select the leash for the second dog = 5 ∗ ... ∗ Select the leash for the last dog = 1 = 6!
d. How many different ways can you assign the dogs all to leashes (assuming you have 6 leashes in 6 different colors), but also assuming you have only two leashes that can handle the big dogs? ANSWER: Steps and use the multiplication rule Select the leashes for the big dogs ∗ Select the leashes for the other dogs = 2! ∗ 4! = 2 ∗ 24 = 48 e. How many different ways can you divide the dogs up for walking among your 3 volunteers – assuming each volunteer must walk 2 dogs each? ANSWER: Steps and use the multiplication rule Select the dogs for the first walker ∗ select the dogs for the second walker ∗ select the dogs for the third walker =
( 6 2
)( 4 2
)( 2 2
) = 15 ∗ 6 ∗ 1 = 90 f. How many different ways can you line up the dogs (single file) for a dog show? ANSWER: Linear permutation of all 6 dogs = 6! = 720 g. How many different ways can you line up the dogs (single file) for a dog show assuming the large dogs must come first, followed by the mediup then the small dogs? ANSWER: Multiplication rule of the Linear permutations for the individual sizes = 2! ∗ 1! ∗ 3! = 2 ∗ 1 ∗ 6 = 12 h. How many different ways can you create a line in the dog show of four finalists? ANSWER: r-Permutation : P (6, 4) = (^) (6−6!4)! = 6! 2! = 7202 = 360 i. How many different ways can you distribute the 15 doggie treats you have (assuming the doggie treats are indistinguishable)? (note: it can be that one dog gets all of the treats - you are not trying to distribute them evenly.) ANSWER: 15 indistinguishable doggie treats into 6 categories (15+(6−1))! 15!(6−1)! =^
20! 15!5! = 15504 j. How many diffent ways can you assign them to the 4 run areas at your kennel? (note: these “runs” are distinguishable, but you could be assinging them all to the same run or as evenly as possible.) ANSWER: 6 distinguishable dogs into 4 distinguishable runs number of ways for each dog to select one of the four runs Dog 1 has 4 runs to select from, dog 2 has 4 runs to select from ..., Dog 6 has 4 runs to select from = 4^6 = 3096 k. Assuming you have 6 collars (6 different colors) and 6 leashes (6 different colors), how many ways can you assign the collars and leashes to your six dogs so they can go for a walk? ANSWER: Use the multiplication rule with the two individual steps of assigning collars and then assigning leashes. = 6! ∗ 6! = 720^2 = 518400 l. Assuming you have 5 families interested in adopting dogs, how many different ways can the dogs be given to those families? (note: you are assuming there is no personal preference taken into account.) ANSWER: r-Permutation of assigning 5 of the 6 dogs to distinguishable families = P (6, 5) = (^) (6−6!5)! = 6! 1! = 6! = 720
m. Assuming all of your dogs are male, and the neighbor’s dog turns out to be pregnant, how many different ways could your dogs be the father of her puppies? ANSWER: Select the one of your dogs that is the father =
( 6 1
) = 6 If you want to assume it may be another dog from somewhere else (none of yours are the father this is just one more possibility =
( 7 1
) = 7