SlideShare une entreprise Scribd logo
1  sur  39
Chapter 1
Fundamental principles of counting
陳彥良
中央大學資管系
1.1. The rules of sum and product
 The rule of sum: If a first task can be
performed in m ways, while a second task
can be performed in n ways, and the tasks
cannot be performed simultaneously, then
performing either task can be accomplished
in any one of m+n ways.
Ex 1.4
 The boss assigns 12 employees to two
committees.
 Committee A consists of five members.
 Committee B consists of seven members.
 If the boss speak to just one member
before making a decision, …?
 If he speak to one member of committee A
on the first day, and another member of
committee B on the second day, …?
The rule of product
 If a procedure can be broken down into first
and second stages, and if there are m
possible outcomes for the first stage and if,
for each of these outcomes, there are n
possible outcomes for the second stage,
then the total procedure can be carried out,
in the designated order, in mn ways.
Ex 1.6
 A license plate consists of two letters
followed by four digits.
 If no letter or digit can be repeated?
 If repetitions of letters and digits are
allowed?
 If repetitions of letters and digits are
allowed, how many of the plates have only
vowels (A, E, I, O, U) and even digits?
Ex 1.7
 In some simple computers, one-byte
address is used to identify the cells in main
memory.
 Some uses two-byte address.
 Some uses four-byte address.
 Some even uses eight-byte address.
1.2 Permutations
 Definition 1.1. n factorial is defined by (a)
0!=1; n!=n(n-1)(n-2)…(2)(1)
 Definition 1.2. Given a collection of n distinct
objects, any (linear) arrangement of these
objects is called a permutation of the
collection
 The number of permutations of size r from a
collection of n distinct objects is P(n,
r)=n!/(n-r)!.
Examples
 Ex 1.9. In a class of 10 students, five are to
be chosen and seated in a row for a picture.
How many such linear arrangements are
possible?
 Ex 1.10. If five letters are to be chosen from
COMPUTER, how many arrangements are
there?
Ex 1.11
 The number of arrangements of the four letters in BALL
is 12, not 24.
 2  (number of arrangements of the letters B, A, L, L) =
(number of arrangements of the letters B, A, L1, L2)
Ex 1.12
 How many of arrangements are there in all
nine letters in DATABASES.
 2!  3!  (number of arrangements of the
letters DATABASES) = (number of
arrangements of the letters D, A1, T, A2, B,
A3, S1, E, S2)
Permutation with repetition
 If there are n objects with n1
indistinguishable objects of a first type, n2
indistinguishable objects of a second type,…,
and nr indistinguishable objects of an rth
type, where n1+n2+…+nr=n, then there are
arrangements of the given n objects.
!
!...
!
!
2
1 r
n
n
n
n
Ex 1.14
 Determine the number of staircase paths
from (2,1) to (7,4), where each path is made
up of individual steps going one unit to the
right (R) or one unit upward (U).
 What does RURRURRU stands for?
 What does URRRUURR stands for?
 There are 8!/5!3!=56 possible paths.
Ex 1.16
 If six people are seated about a round table,
how many different circular arrangements
are possible, if arrangements are
considered the same when one can be
obtained from the other by rotation.
 6  (number of circular arrangements) =
(number of linear arrangements)
 Consequently, there are 6!/6=5!
arrangements.
Ex 1.17
 Suppose that the six people are three
married couples.
 We want to arrange the six people around
the table so that the sexes alternate.
 A female is placed first.
 The next position can be placed in three
ways.
 The answer is 32211=12.
1.3. Combinations : The binomial
theorem
 We start with 52 cards, and how many ways
are there that we can select three of these
cards, with no reference to order?
 (3!)(number of selections of size 3 from a
deck of 52 cards) = number of permutations
of size 3 for the 52 cards
 C(n, r)=P(n, r)/r!=n! / r!  (n-r)!
 C(n, r)= C(n, n-r)
Ex 1.19
 To win the grand prize for PowerBall one
must match five numbers selected from 1 to
49 inclusive and then must also match the
powerball, an integer from 1 to 42 inclusive.
 There are totally C(49,5) C(42, 1) =
80089128 combinations we can select the
six balls.
Ex 1.20
 If the student must answer any seven of ten
questions….
 If the student must answer three questions
from the first five and four questions from
the last five….
 If the student must answer seven of ten
questions, where at least three are selected
from the first five…..
Ex 1.23
 The number of arrangements of the letters
in TALLAHASSEE is 11!/ 3! 2! 2! 2! 1!
1!=831600
 How many of them have no adjacent A’s?
 The answer is C(9, 3)  (8!/ 2! 2! 2! 1! 1!)=84
 5040=423360. (Why)
Ex 1.24
 alphabet ={0, 1, 2},
 A string x=x1x2…xn is made up from a prescribed
alphabet symbols
 the weight of a string wt(x)= x1+x2+…+xn
 Among the 310 strings of length 10, how many
have even weight?
 A string has even weight if and only if the number
of 1’s in the string is even.
 Number of 1’s can be 0, 2, 4, 6, 8, 10
 210 + C(10, 2)28+C(10, 4)26+C(10, 6)24+C(10,
8)22+C(10, 10)
Ex 1.25
 Suppose that we draw five cards from a standard
deck of 52 cards.
a) In how many ways can we have a hand with no clubs?
C(39, 5)
b) In how many ways can we have a hand with at least
one club? C(52, 5)-C(39, 5)
c) The same question as in (b), but we compute in
another way. C(13, 1)C(51, 4)
d) an over-counting problem occurs in part (c), why over-
counting?
e) Another way to get the result of (b): C(13, 1)C(39, 4) +
C(13,2)C(39, 3) + C(13, 3)C(39, 2) + C(13, 4)C(39, 1)
+ C(13,5)
The Binomial Theorem
 If x and y are variables and n is a positive
integers, then we have
 the coefficient of x5y2 in (x+y)7 is C(7, 5)=21
 the coefficient of x5y2 in (2x-3y)7 is C(7, 5)25(-
3)2=6048
Multinomial Theorem
Ex 1.27
 what is coefficient of x2y2z3 in the expression
of (x+y+z)7?
 what is coefficient of x2y3z2w5 in the
expression of (x+2y-3z+2w+5)16?
1.4. Combinations with repetition
 Ex: seven students are to buy one of the
following c, h, t, f.
Observation
 When we wish to select , with repetition, r of n
distinct objects, we find that we are considering
all arrangements of r x’s and n-1 |’s and that
their number is
 Consequently, the number of combinations of n
objects taken r at a time, with repetition, is C(n+r-1,
r).
Examples
 A donut shop offers 20 kinds of donut. How
many ways can we select a dozen donuts?
C(20+12-1, 12)=C(31, 12)
 In how many ways can we distribute seven
bananas and six oranges among four
children so that each child receives at least
one banana? C(6,3)C(9, 6)
Ex 1.33
 Determine all integer solutions to the
equation
x1+x2+x3+x4=7 where xi0 for i=1~4
 Each nonnegative integer solution
corresponds to a selection, with repetition,
of size 7 from a collection of size 4.
 So, there are C(4+7-1, 7)=120 solutions.
observation
 The following are equivalent
 The number of integer solutions of the equation
x1+x2+…+xn=r, xi0, 1in
 The number of selections, with repetition, of
size r from a collection of size n
 The number of ways r identical objects can be
distributed among n distinct containers
Examples
 In how many ways can we distribute 10
white marbles among six distinct containers?
 C(6+10-1, 10)=3003
 How many nonnegative solutions are there
to the equation x1+x2+x3+x4+x5+x6<10.
 x1+x2+x3+x4+x5+x6+x7=10, where x7>0 and xi0.
 y1+y2+y3+y4+y5+y6+y7=9, where yi0
 C(7+9-1, 9)=5005
Ex 1.37
 Determine the number of compositions of m,
where m is a positive integer.
 Let m be 7.
 For one summand, there is only one C(6, 6).
 For two summands, w1+w2=7 where wi>0 
x1+x2=5 where xi0  C(2+5-1, 5)=C(6,5)
 For three summands, w1+w2+w3=7 where wi>0 
x1+x2+x3=4 where xi0  C(3+4-1, 4)=C(6,4)
 For each positive m, there are 2m-1 compositions.
Ex 1.39
 Analyze the number of
iterations in the loops
 The print statement is
executed for 1kji20.
 Any selection a, b, c
(abc) of size 3, with
repetitions allowed, from
the list of 1~20 results in
one correct solution.
 The answer is C(20+3-1, 3)
= C(22, 3) = 1540.
1.5. The Catalan numbers
 The number of ways we can go from (0, 0) to (5, 5)
through rectangles without passing through line
y=x
 The path must start with an R, end with a U, and
the number of R’s at any point must equal or
exceed the number of U’s.
 A bad path with 5 R’s and 5 U’s can be
transformed to a path with 4 R’s and 6 U’s.
 RUU*URRRUURRUU*RUUURRU
 Any arrangement of 4 R’s and 6 U’s can be
mapped to a bad path
 RURRUUU*UUR RURRUUU*RRU
The Catalan numbers
Ex 1.43
 In how many ways can one arrange three -
1’s and three 1’s so that all six partial sums
are nonnegative? b3
 Given four 1’s and four 0’s, there are b4
ways to list eight symbols so that in each
list the number of 0’s never exceeds the
number of 1’s.
 There are b3 ways to parenthesize x1x2x3x4

Contenu connexe

Similaire à counting principle.ppt

Permutations and-combinations-maths
Permutations and-combinations-mathsPermutations and-combinations-maths
Permutations and-combinations-mathsMurugan Iron
 
Upcat math 2014 solution
Upcat math 2014 solutionUpcat math 2014 solution
Upcat math 2014 solutionMark Garrido
 
Class 10 Cbse Maths 2010 Sample Paper Model 2
Class 10 Cbse Maths 2010 Sample Paper Model 2Class 10 Cbse Maths 2010 Sample Paper Model 2
Class 10 Cbse Maths 2010 Sample Paper Model 2Sunaina Rawat
 
Math project core the MSW ( 1 )
Math project core the MSW ( 1 )Math project core the MSW ( 1 )
Math project core the MSW ( 1 )Khalid Al Hanaei
 
Question bank -xi (hots)
Question bank -xi (hots)Question bank -xi (hots)
Question bank -xi (hots)indu psthakur
 
Tenth class-state syllabus-model paper-em-ts-maths
Tenth class-state syllabus-model paper-em-ts-mathsTenth class-state syllabus-model paper-em-ts-maths
Tenth class-state syllabus-model paper-em-ts-mathsNaukriTuts
 
QUANTITAIVE APTITUDE.pptx
QUANTITAIVE APTITUDE.pptxQUANTITAIVE APTITUDE.pptx
QUANTITAIVE APTITUDE.pptxAshwiniMore57
 
Successful Minds,Making Mathematics number patterns &sequences Simple.
Successful Minds,Making Mathematics number patterns &sequences Simple.Successful Minds,Making Mathematics number patterns &sequences Simple.
Successful Minds,Making Mathematics number patterns &sequences Simple.Thato Barry
 
Asso5411
Asso5411Asso5411
Asso5411Maethus
 
cbse class 12 math question paper
cbse class 12 math question papercbse class 12 math question paper
cbse class 12 math question paperPady Srini
 
Cbse Class 12 Maths Sample Paper 2012-13
Cbse Class 12 Maths Sample Paper 2012-13Cbse Class 12 Maths Sample Paper 2012-13
Cbse Class 12 Maths Sample Paper 2012-13Sunaina Rawat
 
Nbhm m. a. and m.sc. scholarship test 2006
Nbhm m. a. and m.sc. scholarship test 2006Nbhm m. a. and m.sc. scholarship test 2006
Nbhm m. a. and m.sc. scholarship test 2006MD Kutubuddin Sardar
 
Class 10 Cbse Maths 2010 Sample Paper Model 3
Class 10 Cbse Maths 2010 Sample Paper Model 3 Class 10 Cbse Maths 2010 Sample Paper Model 3
Class 10 Cbse Maths 2010 Sample Paper Model 3 Sunaina Rawat
 
Arithmetic Sequence and Arithmetic Series
Arithmetic Sequence and Arithmetic SeriesArithmetic Sequence and Arithmetic Series
Arithmetic Sequence and Arithmetic SeriesJoey Valdriz
 
Lecture Week 17 which hleps in study for logic and
Lecture Week 17 which hleps in study for logic andLecture Week 17 which hleps in study for logic and
Lecture Week 17 which hleps in study for logic andmanishhmishra001
 

Similaire à counting principle.ppt (19)

Permutations and-combinations-maths
Permutations and-combinations-mathsPermutations and-combinations-maths
Permutations and-combinations-maths
 
Upcat math 2014 solution
Upcat math 2014 solutionUpcat math 2014 solution
Upcat math 2014 solution
 
Class 10 Cbse Maths 2010 Sample Paper Model 2
Class 10 Cbse Maths 2010 Sample Paper Model 2Class 10 Cbse Maths 2010 Sample Paper Model 2
Class 10 Cbse Maths 2010 Sample Paper Model 2
 
Math project core the MSW ( 1 )
Math project core the MSW ( 1 )Math project core the MSW ( 1 )
Math project core the MSW ( 1 )
 
Question bank -xi (hots)
Question bank -xi (hots)Question bank -xi (hots)
Question bank -xi (hots)
 
Tenth class-state syllabus-model paper-em-ts-maths
Tenth class-state syllabus-model paper-em-ts-mathsTenth class-state syllabus-model paper-em-ts-maths
Tenth class-state syllabus-model paper-em-ts-maths
 
Geo chapter01power point
Geo chapter01power pointGeo chapter01power point
Geo chapter01power point
 
QUANTITAIVE APTITUDE.pptx
QUANTITAIVE APTITUDE.pptxQUANTITAIVE APTITUDE.pptx
QUANTITAIVE APTITUDE.pptx
 
Ebook 1
Ebook 1Ebook 1
Ebook 1
 
Successful Minds,Making Mathematics number patterns &sequences Simple.
Successful Minds,Making Mathematics number patterns &sequences Simple.Successful Minds,Making Mathematics number patterns &sequences Simple.
Successful Minds,Making Mathematics number patterns &sequences Simple.
 
Asso5411
Asso5411Asso5411
Asso5411
 
cbse class 12 math question paper
cbse class 12 math question papercbse class 12 math question paper
cbse class 12 math question paper
 
Practice Test 2 Solutions
Practice Test 2  SolutionsPractice Test 2  Solutions
Practice Test 2 Solutions
 
Cbse Class 12 Maths Sample Paper 2012-13
Cbse Class 12 Maths Sample Paper 2012-13Cbse Class 12 Maths Sample Paper 2012-13
Cbse Class 12 Maths Sample Paper 2012-13
 
Nbhm m. a. and m.sc. scholarship test 2006
Nbhm m. a. and m.sc. scholarship test 2006Nbhm m. a. and m.sc. scholarship test 2006
Nbhm m. a. and m.sc. scholarship test 2006
 
Xii hy r
Xii hy rXii hy r
Xii hy r
 
Class 10 Cbse Maths 2010 Sample Paper Model 3
Class 10 Cbse Maths 2010 Sample Paper Model 3 Class 10 Cbse Maths 2010 Sample Paper Model 3
Class 10 Cbse Maths 2010 Sample Paper Model 3
 
Arithmetic Sequence and Arithmetic Series
Arithmetic Sequence and Arithmetic SeriesArithmetic Sequence and Arithmetic Series
Arithmetic Sequence and Arithmetic Series
 
Lecture Week 17 which hleps in study for logic and
Lecture Week 17 which hleps in study for logic andLecture Week 17 which hleps in study for logic and
Lecture Week 17 which hleps in study for logic and
 

Plus de RizaCatli2

highschoolcareerguidepresentation-120406110443-phpapp01.pptx
highschoolcareerguidepresentation-120406110443-phpapp01.pptxhighschoolcareerguidepresentation-120406110443-phpapp01.pptx
highschoolcareerguidepresentation-120406110443-phpapp01.pptxRizaCatli2
 
frequency distribution table.pptx
frequency distribution table.pptxfrequency distribution table.pptx
frequency distribution table.pptxRizaCatli2
 
COMBINATION WITH REPETITION.pptx
COMBINATION WITH REPETITION.pptxCOMBINATION WITH REPETITION.pptx
COMBINATION WITH REPETITION.pptxRizaCatli2
 
PRACTICE PPT.pptx
PRACTICE PPT.pptxPRACTICE PPT.pptx
PRACTICE PPT.pptxRizaCatli2
 
NLC LESSON 7.pptx
NLC LESSON 7.pptxNLC LESSON 7.pptx
NLC LESSON 7.pptxRizaCatli2
 
NLC-G8Lesson 3.pptx
NLC-G8Lesson 3.pptxNLC-G8Lesson 3.pptx
NLC-G8Lesson 3.pptxRizaCatli2
 
NLC-G8L1&2_CONSOLIDATION CAMP.pptx
NLC-G8L1&2_CONSOLIDATION CAMP.pptxNLC-G8L1&2_CONSOLIDATION CAMP.pptx
NLC-G8L1&2_CONSOLIDATION CAMP.pptxRizaCatli2
 
BOYLES LAW.pptx
BOYLES LAW.pptxBOYLES LAW.pptx
BOYLES LAW.pptxRizaCatli2
 
A School Role­­_ Mechanism in Shaping the Heart and Mind of the Learners_RBC....
A School Role­­_ Mechanism in Shaping the Heart and Mind of the Learners_RBC....A School Role­­_ Mechanism in Shaping the Heart and Mind of the Learners_RBC....
A School Role­­_ Mechanism in Shaping the Heart and Mind of the Learners_RBC....RizaCatli2
 
specialrighttriangles-110105173604-phpapp02 (1).pptx
specialrighttriangles-110105173604-phpapp02 (1).pptxspecialrighttriangles-110105173604-phpapp02 (1).pptx
specialrighttriangles-110105173604-phpapp02 (1).pptxRizaCatli2
 
mutually and nonmutually event.pptx
mutually and nonmutually event.pptxmutually and nonmutually event.pptx
mutually and nonmutually event.pptxRizaCatli2
 
Practice exercises.pptx
Practice exercises.pptxPractice exercises.pptx
Practice exercises.pptxRizaCatli2
 
PRACTICE PPT TRIGO.pptx
PRACTICE PPT TRIGO.pptxPRACTICE PPT TRIGO.pptx
PRACTICE PPT TRIGO.pptxRizaCatli2
 
UNION AND INTERSECTION USING VENN DIAGRAM.pptx
UNION AND INTERSECTION USING VENN DIAGRAM.pptxUNION AND INTERSECTION USING VENN DIAGRAM.pptx
UNION AND INTERSECTION USING VENN DIAGRAM.pptxRizaCatli2
 
kinds of permutation.pptx
kinds of permutation.pptxkinds of permutation.pptx
kinds of permutation.pptxRizaCatli2
 
CELL REPLICATION.pptx
CELL REPLICATION.pptxCELL REPLICATION.pptx
CELL REPLICATION.pptxRizaCatli2
 
joint variation.pptx
joint variation.pptxjoint variation.pptx
joint variation.pptxRizaCatli2
 
8_5 trapezoids-and-kites.ppt
8_5 trapezoids-and-kites.ppt8_5 trapezoids-and-kites.ppt
8_5 trapezoids-and-kites.pptRizaCatli2
 
Quadrilateral that are parallelogram.pptx
Quadrilateral that are parallelogram.pptxQuadrilateral that are parallelogram.pptx
Quadrilateral that are parallelogram.pptxRizaCatli2
 

Plus de RizaCatli2 (20)

highschoolcareerguidepresentation-120406110443-phpapp01.pptx
highschoolcareerguidepresentation-120406110443-phpapp01.pptxhighschoolcareerguidepresentation-120406110443-phpapp01.pptx
highschoolcareerguidepresentation-120406110443-phpapp01.pptx
 
frequency distribution table.pptx
frequency distribution table.pptxfrequency distribution table.pptx
frequency distribution table.pptx
 
COMBINATION WITH REPETITION.pptx
COMBINATION WITH REPETITION.pptxCOMBINATION WITH REPETITION.pptx
COMBINATION WITH REPETITION.pptx
 
PRACTICE PPT.pptx
PRACTICE PPT.pptxPRACTICE PPT.pptx
PRACTICE PPT.pptx
 
NLC LESSON 7.pptx
NLC LESSON 7.pptxNLC LESSON 7.pptx
NLC LESSON 7.pptx
 
NLC-G8Lesson 3.pptx
NLC-G8Lesson 3.pptxNLC-G8Lesson 3.pptx
NLC-G8Lesson 3.pptx
 
NLC-G8L1&2_CONSOLIDATION CAMP.pptx
NLC-G8L1&2_CONSOLIDATION CAMP.pptxNLC-G8L1&2_CONSOLIDATION CAMP.pptx
NLC-G8L1&2_CONSOLIDATION CAMP.pptx
 
charles.pptx
charles.pptxcharles.pptx
charles.pptx
 
BOYLES LAW.pptx
BOYLES LAW.pptxBOYLES LAW.pptx
BOYLES LAW.pptx
 
A School Role­­_ Mechanism in Shaping the Heart and Mind of the Learners_RBC....
A School Role­­_ Mechanism in Shaping the Heart and Mind of the Learners_RBC....A School Role­­_ Mechanism in Shaping the Heart and Mind of the Learners_RBC....
A School Role­­_ Mechanism in Shaping the Heart and Mind of the Learners_RBC....
 
specialrighttriangles-110105173604-phpapp02 (1).pptx
specialrighttriangles-110105173604-phpapp02 (1).pptxspecialrighttriangles-110105173604-phpapp02 (1).pptx
specialrighttriangles-110105173604-phpapp02 (1).pptx
 
mutually and nonmutually event.pptx
mutually and nonmutually event.pptxmutually and nonmutually event.pptx
mutually and nonmutually event.pptx
 
Practice exercises.pptx
Practice exercises.pptxPractice exercises.pptx
Practice exercises.pptx
 
PRACTICE PPT TRIGO.pptx
PRACTICE PPT TRIGO.pptxPRACTICE PPT TRIGO.pptx
PRACTICE PPT TRIGO.pptx
 
UNION AND INTERSECTION USING VENN DIAGRAM.pptx
UNION AND INTERSECTION USING VENN DIAGRAM.pptxUNION AND INTERSECTION USING VENN DIAGRAM.pptx
UNION AND INTERSECTION USING VENN DIAGRAM.pptx
 
kinds of permutation.pptx
kinds of permutation.pptxkinds of permutation.pptx
kinds of permutation.pptx
 
CELL REPLICATION.pptx
CELL REPLICATION.pptxCELL REPLICATION.pptx
CELL REPLICATION.pptx
 
joint variation.pptx
joint variation.pptxjoint variation.pptx
joint variation.pptx
 
8_5 trapezoids-and-kites.ppt
8_5 trapezoids-and-kites.ppt8_5 trapezoids-and-kites.ppt
8_5 trapezoids-and-kites.ppt
 
Quadrilateral that are parallelogram.pptx
Quadrilateral that are parallelogram.pptxQuadrilateral that are parallelogram.pptx
Quadrilateral that are parallelogram.pptx
 

Dernier

Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxAneriPatwari
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 

Dernier (20)

Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 

counting principle.ppt

  • 1. Chapter 1 Fundamental principles of counting 陳彥良 中央大學資管系
  • 2. 1.1. The rules of sum and product  The rule of sum: If a first task can be performed in m ways, while a second task can be performed in n ways, and the tasks cannot be performed simultaneously, then performing either task can be accomplished in any one of m+n ways.
  • 3. Ex 1.4  The boss assigns 12 employees to two committees.  Committee A consists of five members.  Committee B consists of seven members.  If the boss speak to just one member before making a decision, …?  If he speak to one member of committee A on the first day, and another member of committee B on the second day, …?
  • 4. The rule of product  If a procedure can be broken down into first and second stages, and if there are m possible outcomes for the first stage and if, for each of these outcomes, there are n possible outcomes for the second stage, then the total procedure can be carried out, in the designated order, in mn ways.
  • 5. Ex 1.6  A license plate consists of two letters followed by four digits.  If no letter or digit can be repeated?  If repetitions of letters and digits are allowed?  If repetitions of letters and digits are allowed, how many of the plates have only vowels (A, E, I, O, U) and even digits?
  • 6. Ex 1.7  In some simple computers, one-byte address is used to identify the cells in main memory.  Some uses two-byte address.  Some uses four-byte address.  Some even uses eight-byte address.
  • 7. 1.2 Permutations  Definition 1.1. n factorial is defined by (a) 0!=1; n!=n(n-1)(n-2)…(2)(1)  Definition 1.2. Given a collection of n distinct objects, any (linear) arrangement of these objects is called a permutation of the collection  The number of permutations of size r from a collection of n distinct objects is P(n, r)=n!/(n-r)!.
  • 8. Examples  Ex 1.9. In a class of 10 students, five are to be chosen and seated in a row for a picture. How many such linear arrangements are possible?  Ex 1.10. If five letters are to be chosen from COMPUTER, how many arrangements are there?
  • 9. Ex 1.11  The number of arrangements of the four letters in BALL is 12, not 24.  2  (number of arrangements of the letters B, A, L, L) = (number of arrangements of the letters B, A, L1, L2)
  • 10. Ex 1.12  How many of arrangements are there in all nine letters in DATABASES.  2!  3!  (number of arrangements of the letters DATABASES) = (number of arrangements of the letters D, A1, T, A2, B, A3, S1, E, S2)
  • 11. Permutation with repetition  If there are n objects with n1 indistinguishable objects of a first type, n2 indistinguishable objects of a second type,…, and nr indistinguishable objects of an rth type, where n1+n2+…+nr=n, then there are arrangements of the given n objects. ! !... ! ! 2 1 r n n n n
  • 12. Ex 1.14  Determine the number of staircase paths from (2,1) to (7,4), where each path is made up of individual steps going one unit to the right (R) or one unit upward (U).  What does RURRURRU stands for?  What does URRRUURR stands for?  There are 8!/5!3!=56 possible paths.
  • 13.
  • 14. Ex 1.16  If six people are seated about a round table, how many different circular arrangements are possible, if arrangements are considered the same when one can be obtained from the other by rotation.  6  (number of circular arrangements) = (number of linear arrangements)  Consequently, there are 6!/6=5! arrangements.
  • 15.
  • 16. Ex 1.17  Suppose that the six people are three married couples.  We want to arrange the six people around the table so that the sexes alternate.  A female is placed first.  The next position can be placed in three ways.  The answer is 32211=12.
  • 17.
  • 18. 1.3. Combinations : The binomial theorem  We start with 52 cards, and how many ways are there that we can select three of these cards, with no reference to order?  (3!)(number of selections of size 3 from a deck of 52 cards) = number of permutations of size 3 for the 52 cards  C(n, r)=P(n, r)/r!=n! / r!  (n-r)!  C(n, r)= C(n, n-r)
  • 19. Ex 1.19  To win the grand prize for PowerBall one must match five numbers selected from 1 to 49 inclusive and then must also match the powerball, an integer from 1 to 42 inclusive.  There are totally C(49,5) C(42, 1) = 80089128 combinations we can select the six balls.
  • 20. Ex 1.20  If the student must answer any seven of ten questions….  If the student must answer three questions from the first five and four questions from the last five….  If the student must answer seven of ten questions, where at least three are selected from the first five…..
  • 21. Ex 1.23  The number of arrangements of the letters in TALLAHASSEE is 11!/ 3! 2! 2! 2! 1! 1!=831600  How many of them have no adjacent A’s?  The answer is C(9, 3)  (8!/ 2! 2! 2! 1! 1!)=84  5040=423360. (Why)
  • 22. Ex 1.24  alphabet ={0, 1, 2},  A string x=x1x2…xn is made up from a prescribed alphabet symbols  the weight of a string wt(x)= x1+x2+…+xn  Among the 310 strings of length 10, how many have even weight?  A string has even weight if and only if the number of 1’s in the string is even.  Number of 1’s can be 0, 2, 4, 6, 8, 10  210 + C(10, 2)28+C(10, 4)26+C(10, 6)24+C(10, 8)22+C(10, 10)
  • 23. Ex 1.25  Suppose that we draw five cards from a standard deck of 52 cards. a) In how many ways can we have a hand with no clubs? C(39, 5) b) In how many ways can we have a hand with at least one club? C(52, 5)-C(39, 5) c) The same question as in (b), but we compute in another way. C(13, 1)C(51, 4) d) an over-counting problem occurs in part (c), why over- counting? e) Another way to get the result of (b): C(13, 1)C(39, 4) + C(13,2)C(39, 3) + C(13, 3)C(39, 2) + C(13, 4)C(39, 1) + C(13,5)
  • 24. The Binomial Theorem  If x and y are variables and n is a positive integers, then we have  the coefficient of x5y2 in (x+y)7 is C(7, 5)=21  the coefficient of x5y2 in (2x-3y)7 is C(7, 5)25(- 3)2=6048
  • 26. Ex 1.27  what is coefficient of x2y2z3 in the expression of (x+y+z)7?  what is coefficient of x2y3z2w5 in the expression of (x+2y-3z+2w+5)16?
  • 27. 1.4. Combinations with repetition  Ex: seven students are to buy one of the following c, h, t, f.
  • 28. Observation  When we wish to select , with repetition, r of n distinct objects, we find that we are considering all arrangements of r x’s and n-1 |’s and that their number is  Consequently, the number of combinations of n objects taken r at a time, with repetition, is C(n+r-1, r).
  • 29. Examples  A donut shop offers 20 kinds of donut. How many ways can we select a dozen donuts? C(20+12-1, 12)=C(31, 12)  In how many ways can we distribute seven bananas and six oranges among four children so that each child receives at least one banana? C(6,3)C(9, 6)
  • 30. Ex 1.33  Determine all integer solutions to the equation x1+x2+x3+x4=7 where xi0 for i=1~4  Each nonnegative integer solution corresponds to a selection, with repetition, of size 7 from a collection of size 4.  So, there are C(4+7-1, 7)=120 solutions.
  • 31. observation  The following are equivalent  The number of integer solutions of the equation x1+x2+…+xn=r, xi0, 1in  The number of selections, with repetition, of size r from a collection of size n  The number of ways r identical objects can be distributed among n distinct containers
  • 32. Examples  In how many ways can we distribute 10 white marbles among six distinct containers?  C(6+10-1, 10)=3003  How many nonnegative solutions are there to the equation x1+x2+x3+x4+x5+x6<10.  x1+x2+x3+x4+x5+x6+x7=10, where x7>0 and xi0.  y1+y2+y3+y4+y5+y6+y7=9, where yi0  C(7+9-1, 9)=5005
  • 33. Ex 1.37  Determine the number of compositions of m, where m is a positive integer.  Let m be 7.  For one summand, there is only one C(6, 6).  For two summands, w1+w2=7 where wi>0  x1+x2=5 where xi0  C(2+5-1, 5)=C(6,5)  For three summands, w1+w2+w3=7 where wi>0  x1+x2+x3=4 where xi0  C(3+4-1, 4)=C(6,4)  For each positive m, there are 2m-1 compositions.
  • 34.
  • 35. Ex 1.39  Analyze the number of iterations in the loops  The print statement is executed for 1kji20.  Any selection a, b, c (abc) of size 3, with repetitions allowed, from the list of 1~20 results in one correct solution.  The answer is C(20+3-1, 3) = C(22, 3) = 1540.
  • 36. 1.5. The Catalan numbers  The number of ways we can go from (0, 0) to (5, 5) through rectangles without passing through line y=x  The path must start with an R, end with a U, and the number of R’s at any point must equal or exceed the number of U’s.  A bad path with 5 R’s and 5 U’s can be transformed to a path with 4 R’s and 6 U’s.  RUU*URRRUURRUU*RUUURRU  Any arrangement of 4 R’s and 6 U’s can be mapped to a bad path  RURRUUU*UUR RURRUUU*RRU
  • 37.
  • 39. Ex 1.43  In how many ways can one arrange three - 1’s and three 1’s so that all six partial sums are nonnegative? b3  Given four 1’s and four 0’s, there are b4 ways to list eight symbols so that in each list the number of 0’s never exceeds the number of 1’s.  There are b3 ways to parenthesize x1x2x3x4