This preview shows pages 1–11. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 11COMP170Discrete Mathematical Toolsfor Computer ScienceDiscrete Math for Computer ScienceK. Bogart, C. Stein and R.L. DrysdaleSection 1.2, pp. 919More CountingVersion 2.0: Last updated, JUL 19, 2007Slidesc2005 by M. J. Golin and G. Trippen211.2 Counting Lists,Permutations, and Subsets•Using the Sum and Product Principles•Lists and Functions•The Bijection Principle•kElement Permutations of a Set•kElement Subsets of a SetBinomial Coefficients31Some Simple Examples•The entry code to our office is 4 characters long whereeach character is a number between{...9}.e.g.,1012,2561.How many door codes are there?32Some Simple Examples•The entry code to our office is 4 characters long whereeach character is a number between{...9}.e.g.,1012,2561.How many door codes are there?•A computer system’s pasword must be 6 characters long,where each character is in{a...z,A...Z}.e.g.,abcdEF, DHrsAQ, Mickey.How many passwords are there?33Some Simple Examples•Hong Kong car plates are of the formL1L2D1D2D3D4where theLiare letters in{A...Z}and theDiare digits in{,...9}.e.g.,AB1234, EC1357.How many car plates are there?•The entry code to our office is 4 characters long whereeach character is a number between{...9}.e.g.,1012,2561.How many door codes are there?•A computer system’s pasword must be 6 characters long,where each character is in{a...z,A...Z}.e.g.,abcdEF, DHrsAQ, Mickey.How many passwords are there?41The entry code to our office is 4 characters longwhere each character is a number between{...9}.E.G.,1012,2561.How many door codes are there?42The entry code to our office is 4 characters longwhere each character is a number between{...9}.E.G.,1012,2561.How many door codes are there?A door code is of the formX1X2X3X4where,fori= 1,2,3,4,Xi∈ {,1,...,9}(∈meansis inoris a member of)43The entry code to our office is 4 characters longwhere each character is a number between{...9}.E.G.,1012,2561.How many door codes are there?A door code is of the formX1X2X3X4where,fori= 1,2,3,4,Xi∈ {,1,...,9}(∈meansis inoris a member of)There are10 possibilities forX110 possibilities forX210 possibilities forX310 possibilities forX4⇒10×10×10×10 = 104= 10,000possible door codes.44The entry code to our office is 4 characters longwhere each character is a number between{...9}.E.G.,1012,2561.How many door codes are there?A door code is of the formX1X2X3X4where,fori= 1,2,3,4,Xi∈ {,1,...,9}(∈meansis inoris a member of)There are10 possibilities forX110 possibilities forX210 possibilities forX310 possibilities forX4⇒10×10×10×10 = 104= 10,000possible door codes.Note; This is really theproduct principleWhat are the sets being used?51A computer system’s pasword must be 6 characters long,where each character is in{a...z,A...Z}....
View
Full
Document
This note was uploaded on 08/25/2010 for the course COMP COMP170 taught by Professor M.j.golin during the Spring '10 term at HKUST.
 Spring '10
 M.J.Golin
 Computer Science

Click to edit the document details