This preview shows pages 1–4. Sign up to view the full content.
Combinatorics
10/4/11
Basic Counting Principles [KR, Section 6.1]
Product Rule
Example 2
: Chairs are labeled with a letter followed by a number in the range 1 to 100. How many Chairs can
be labeled distinctly? Or equivalently, how many ways are there to label a chair?
Example 0
: What is the number of ways to have a lunch if a lunch consists of a sandwich and a drink? There
are five distict types of sandwiches and three distinct types of drinks.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document Example 4
: How many distinct 7bit strings are possible?
Example 5
: License plates have 3 letters followed by 4 digits. What is the total number of distinct license plates?
Example 5'
: Suppose the letters may not be repeated in the above problem. Recalculate the number of distinct
license plates possible.
for i = 1 to 10 {
for j = 1 to 20 {
k++;
}
}
k = 10*20
k=0;
for i
1
= 1 to n
1
{
for i
2
= 1 to n
2
{
...
for i
p
= 1 to n
p
{
k++;
}
...
}
}
k = n
1
* n
2
* .
.. * n
p
Example 9
: Calculate the value of k after executing the following pseudo codes.
k =0;
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 03/21/2012 for the course CS 3333 taught by Professor Boppana during the Fall '11 term at The University of Texas at San Antonio San Antonio.
 Fall '11
 Boppana

Click to edit the document details