CS336f1015

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

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

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?

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

View Full Document
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)?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern