Download Section3.2

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Approximations of π wikipedia , lookup

Large numbers wikipedia , lookup

Positional notation wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Ethnomathematics wikipedia , lookup

Arithmetic wikipedia , lookup

Elementary mathematics wikipedia , lookup

Addition wikipedia , lookup

Risk aversion (psychology) wikipedia , lookup

Transcript
Combinatorics is a branch of mathematics that deals
with counting. Counting is important:
Chapter 3. Sets & Combinatorics
Section 3.2
e.g.
How much money I have?
What’s the size of my computer memory?
Counting
How may elements (integers) are between i and j?
How many combinations to arrange 3 numbers?
……
1
2
e.g.
A child can choose one jellybean out of
jellybeans(red, black), and one gummy bear out of three
gummy bears(yellow, green, white). How many different
sets of candy can the child have?
2 stages:
Y: R, Y
R
G: R, G
W: R, W
choose
jellybean
n1 outcomes for 1st event,
n2 outcomes for 2nd event.
Then there are n1 * n2 outcomes for
the sequence of the 2 events.
e.g.
choose
gummy bear
Y: B, Y
G: B, G
W: B, W
B
3
4
10 toppings available in a pizza store, and the customer
can choose any # of toppings, how many different pizza
the store can make?
Addition principle:
If A and B are disjoint events with n1 and n2
possible outcomes, respectively, then the total #
of outcomes for event A or B = n1 + n2.
Toppings
1
choose it
or w/o it
OR :
2
2
*
2
3
*
2
The last part of your phone # contains 4 digits.
How many four-digit numbers are there?
(Select a password of 4 digits, how many
possible passwords?)
9933, 1982, 2017, 1016, 0007, …
10 * 10 * 10 * 10 = 10,000 different numbers
outcomes
∴6 outcomes
e.g.
Multiplication principle:
…
*
…
10
*
e.g.
2 = 210
=1,024
A customer wants to buy a vehicle from a dealer.
The dealer has 23 autos and 14 trucks in stock.
How many selections the customer have?
23 + 14 = 37
10
10
10
10
C10
0 + C1 + C 2 + C 3 + ...C10 = 1,024
(In Section 3.4 Permutations and Combinations)
5
6
1
e.g.
decision tree:
| A ∪ B | = |A| + |B| if A and B are disjoint sets.
e.g.:
use x, y and z to construct strings of length 3.
How many strings do not have a z following y.
In general, | A ∪ B | = |A| + |B| - | A ∩ B |
| A – B | = |A| - | A ∩ B |
x
(In Section 3.3 Principle of Inclusion and Exclusion)
e.g.
x y
How many four-digit number begin with a 4 or 5?
2 disjoint cases:
numbers begin with 4 = 1*10*10*10=1000
x
y
3
z x
+
y
2
x
+
y
3
z
y
z
y
x
zx
y
+ 3
x
z x
y
+
2 +
x
z
x
y
3
z
y
+
y
2 +
x
y
z
3
= 21
numbers begin with 5 = 1000
The answer is 1000 + 1000 = 2000
7
8
2