0% found this document useful (0 votes)
186 views

Stat Fundamentals Counting Principles

1. The additive rule and multiplicative rule can be used to decompose counting problems into simpler dependent or independent counts. 2. The additive rule sums independent counts while the multiplicative rule takes the product of dependent counts. 3. The inclusion-exclusion principle is used when counts overlap to avoid double counting by subtracting the number of overlapping elements.

Uploaded by

Edmar Alonzo
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
186 views

Stat Fundamentals Counting Principles

1. The additive rule and multiplicative rule can be used to decompose counting problems into simpler dependent or independent counts. 2. The additive rule sums independent counts while the multiplicative rule takes the product of dependent counts. 3. The inclusion-exclusion principle is used when counts overlap to avoid double counting by subtracting the number of overlapping elements.

Uploaded by

Edmar Alonzo
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Fundamental

principles of
counting
ENGR. EDMAR B. ALONZO
First Semester AY 2016-2017
Fundamental principles of
counting

Tree Diagram
Multiplicative Rule
Additive Rule
Permutations
Combinations
counting

Assume we have a set of objects


with certain properties
Counting is used to determine the
number of these objects
Examples:
Number of available phone numbers
with 7 digits in the local calling area
Number of possible match starters
(football, basketball) given the
number of team members and their
Tree diagrams

Tree: is a structure that consists of a


root, branches and leaves.
Can be useful to represent a counting
problem and record the choices we
made for alternatives. The count
appears on the leaf nodes.

Example:
What is the number of bit strings of
length 4 that do not have two consecutive
Tree diagrams

Example:
What is the number of bit strings of
length 4 that do not have two consecutive
ones.

Empty string

1 0
Tree diagrams
1. How many bit strings of length four do not have two
consecutive 1s?

2. A playoff between two teams consists of at most five


games. The first team that wins three games wins the
playoff. In how many different ways can the playoff
occur?

3. Suppose that I Love New Jersey T-shirts come in five


different sizes: S, M, L, XL, and XXL. Further suppose
that each size comes in four colors, white, red, green,
and black, except for XL, which comes only in red,
green, and black, and XXL, which comes only in green
and black. How many different shirts does a souvenir
shop have to stock to have at least one of each
Basic counting rules
Counting problems may be very hard, not
obvious
Solution: simplify the solution by
decomposing the problem

Two basic decomposition rules:


Multiplicative rule A count decomposes
into a sequence of dependent counts (each
element in the first count is associated with
all elements of the second count)
Additive rule A count decomposes into a
set of independent counts (elements of
MULTIPLICATIVE rule

A count can be broken down into a sequence of


dependent counts each element in the first
count is associated with all elements of
the second count
Example: Assume an auditorium with a seat
labeled by a letter and numbers in between 1 to
50 (e.g. A23).
We want the total number of seats in the
auditorium.
26 letters and 50 numbers. How to count?
One solution: write down all seats
MULTIPLICATIVE rule

Example: Assume an auditorium with a


seat labeled by a letter and numbers in
between 1 to 50 (e.g. A23). We want the
total number of seats in the auditorium.
26 letters and 50 numbers.

A better solution?
For each letter there are 50 numbers
So the number of seats is 26*50 = 1300
MULTIPLICATIVE rule

If a count of elements can be broken down into a


sequence of dependent counts where the first
count yields n1 elements, the second n2 elements,
and kth count nk elements, by the product rule the
total number of elements is:
n = n1*n2*...*nk

Example: How many different bit strings of length


7 are there?
E.g. 1011010
Is it possible to decompose the count problem?
Yes.
MULTIPLICATIVE rule

Example: How many different bit strings of


length 7 are there?
E.g. 1011010
Is it possible to decompose the count
problem and if yes how?
Yes.
Count the number of possible assignments to
bit 1
For the first bit assignment (say 0) count
assignments to bit 2
Total assignments to first 2 bits: 2*2=4
MULTIPLICATIVE rule

Example: How many different bit strings of


length 7 are there?
E.g. 1011010
Is it possible to decompose the count problem
and if yes how?
Yes.
Count the number of possible assignments to
bit 1
For the first bit assignment (say 0) count
assignments to bit 2
For the specific first two bits count
MULTIPLICATIVE rule

Example: How many different bit strings of


length 7 are there?
E.g. 1011010
Gives a sequence of n dependent counts and
by the product rule we have:
n = 2* 2 * 2 * 2 * 2 * 2 *2 = 27
n = 128
MULTIPLICATIVE rule

Example:
Number of available phone numbers
with 7 digits in the local calling area.
N = 107
= 10000000

ATM Password with 4 combinations


N = 104 = 10000
MULTIPLICATIVE rule
1. A new company with just two employees, Sanchez and
Patel, rents a floor of a building with 12 offices. How
many ways are there to assign different offices to
these two employees?
2. The chairs of an auditorium are to be labeled with an
uppercase English letter followed by a positive integer
not exceeding 100. What is the largest number of
chairs that can be labeled differently?
3. There are 32 microcomputers in a computer center.
Each microcomputer has 24 ports. How many different
ports to a microcomputer in the center are there?
4. How many different license plates can be made if each
plate contains a sequence of three uppercase English
letters followed by three digits (and no sequences of
ADDITIVE rule

A count decomposes into a set of independent


counts
elements of counts are alternatives, they do
not depend on each other

Example:
You need to travel in between city A and B. You
can either fly, take a train, or a bus. There are 12
different flights in between A and B, 5 different
trains and 10 buses. How many options do you
have to get from A to B?
We can take only one type of transportation and
ADDITIVE rule

We can take only one type of


transportation and for each only
one option. The number of options:
n = 12+5+10
Sum rule:
n = number of flights + number of
trains + number of buses
ADDITIVE rule

If a count of elements can be broken


down into a set of independent
counts where the first count yields
n1 elements, the second n2
elements, and kth count nk
elements, by the sum rule the total
number of elements is:

n = n1 + n2 + ...+ nk
ADDITIVE rule
1. Suppose that either a member of the
mathematics faculty or a student who is a
mathematics major is chosen as a
representative to a university committee. How
many different choices are there for this
representative if there are 37 members of the
mathematics faculty and 83 mathematics
majors and no one is both a faculty member
and a student?
2. A student can choose a computer project from
one of three lists. The three lists contain 23,
15, and 19 possible projects, respectively. No
INCLUSION-EXCLUSION
PRINCIPLE
Used in counts where the decomposition yields
two dependent count tasks with overlapping
elements
If we used the sum rule some elements would be
counted twice
Inclusion-exclusion principle: uses a sum rule and
then corrects for the overlapping elements.

We used the principle for the cardinality of the


set union.
|A B|=|A|+|B|-|A B|
INCLUSION-EXCLUSION
PRINCIPLE
Example:
How many bitstrings of length 8 start either
with a bit 1 or end with 00?
It is easy to count strings that start with 1:
How many are there? 27
It is easy to count the strings that end with
00.
How many are there? 26
Is it OK to add the two numbers to get the
answer?
27 +26
INCLUSION-EXCLUSION
PRINCIPLE
Example:
How many bitstrings of length 8 start either
with a bit 1 or end with 00?
No. Overcount. There are some strings that
can both start with 1 and end with 00. These
strings are counted in twice.
How to deal with it? How to correct for
overlap?
How many of strings were counted twice? 25
(1xxxxx00)
Thus we can correct for the overlap simply by
INCLUSION-EXCLUSION
PRINCIPLE
Example:
A computer company receives 350 applications
from computer graduates for a job planning a
line of new Web servers. Suppose that 220 of
these applicants majored in computer science,
147 majored in business, and 51 majored both
in computer science and in business. How many
of these applicants majored neither in computer
science nor in business?
|A1 A2|=|A1|+|A2||A1 A2|

You might also like