CS336f1015 - Lecture 15 CS336 Product r ule Suppose that a...

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

View Full Document Right Arrow Icon
10/25/10 1 Lecture 15 CS336 Basics of Counting 2 Basic Counting Principles Product rule: Suppose that a procedure can be broken down into a sequence of two tasks where there are n 1 ways to do the first task and n 2 ways of doing the second, then there are n 1 n 2 ways to do the procedure. Sum rule: If a task can be done either in n 1 ways or n 2 way then there are n 1 +n 2 ways to do the task. Permutation/Combinations How many ways are there of arranging… Permutations (order/ no repeat) How many ways are there of selecting at once Combination (No order/no repeat) Example How many bit strings of length n are there? Example How many bit strings of length 4 contain all 1’s? Example How many bit strings of length 4 contain at least one 0?
Image of page 1

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

View Full Document Right Arrow Icon
10/25/10 2 Example How many bit strings of length 4 begin or end with a 1? Example How many permutations of the letters of Texas are there? Example How many permutations of the letters of Texas have the vowels together? Example How many permutations of the letters of Texas do not have the vowels together? Example Given the set of r symbols {a 1 , …, a r }, how many different strings of length n exist that contain exactly one a 1 (allowing repetition)?
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ 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