sol10 - CS 330 Discrete Computational Structures Fall...

Info icon This preview shows pages 1–3. Sign up to view the full content.

CS 330 : Discrete Computational Structures Fall Semester, 2014 Assignment #10 Solutions Due Date: Sunday, Nov 23 Suggested Reading: Rosen Sections 6.1 - 6.3 These are the problems that you need to turn in. For more practice, you are encouraged to work on the other problems. Always explain your answers and show your reasoning. 1. [6 Pts] Elliott An ISU Computer Science shirt is sold in 9 colors, 5 sizes, striped or solid, and long sleeve or short sleeve. (a) How many different shirts are being sold? (b) What if the black and yellow shirts only come in short-sleeve and solid? Solution: (a)By the product rule there are 9 × 5 × 2 × 2 = 180 different types of shirt. (b)There are 7 × 5 × 2 × 2 = 140 different types of shirts whose color is not black or yellow, and there are 2 × 5 × 1 × 1 = 10 different types of shirts whose color is black or yellow. So the total shirts is 140 + 10 = 150. 2. [12 Pts] Elliott (a) How many different four-letter codes can there be? (b) What if letters cannot be repeated? (c) What if letters cannot be repeated, and one of the initials is K? (d) What if letters can be repeated and at least one of the initials is K? Solution: (a) By the product rule there are 26 4 = 456976 different four-letter codes. (b) If no letter is to be repeated, then there are 26 choices for the first initial, 25 choices for the second, 24 choices for the third, and 23 choices for the fourth. By the product rule, the answer is 26 × 25 × 24 × 23 = 358800 . (c) We can subtract the number of four-letter code strings without K in it and also without repeating from the number of four-letter initial strings without repeating. Thus the answer is 26 × 25 × 24 × 23 - 25 × 24 × 23 × 22 = 55200 . (d) We can subtract the number of four-letter code strings without K in it and also with repeating from the number of four-letter initial strings with repeating. Thus the answer is 26 4 - 25 4 = 66351 3. [6 Pts] Peter How many integers between 10000 and 99999, inclusive, are divisible by 5 or 7? Solution: There are b 99999 5 c-b 10000 - 1 5 c = 19999 - 1999 = 18000 numbers between 10000 and 99999 that are divisible by 5. Similarly, there are b 99999 7 10000 7 c = 14285 - 1428 = 12857 multiples of 7. We need to remove the numbers that are counted twice, which is any number that is a multiple of 5 and 7, or in other words, a multiple of 35. There are b 99999 35 c-b 10000 35 c = 2857 - 285 = 2572 of these. Thus, there are 18000 + 12857 - 2572 = 28285 integers between 10000 and 99999 that are divisible by 5 or 7. 4. [8 Pts] Peter How many ways can 10 friends line up if Ann, Beth and Chris have to stand next to each other (a) where Ann is ahead of Beth and Beth is ahead of Chris? Solution:
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Since Ann, Beth, and Chris must be adjacent to each other and in a particular order, once we have placed any one of the three we know where the other two must go in line.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '15
  • Soma Chaudhuri
  • ways, Polycephaly, Beth Chris

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern