L02_MoreCounting

# L02_MoreCounting - 1-1COMP170Discrete Mathematical Toolsfor...

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 Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

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.

Unformatted text preview: 1-1COMP170Discrete Mathematical Toolsfor Computer ScienceDiscrete Math for Computer ScienceK. Bogart, C. Stein and R.L. DrysdaleSection 1.2, pp. 9-19More CountingVersion 2.0: Last updated, JUL 19, 2007Slidesc2005 by M. J. Golin and G. Trippen2-11.2 Counting Lists,Permutations, and Subsets•Using the Sum and Product Principles•Lists and Functions•The Bijection Principle•k-Element Permutations of a Set•k-Element Subsets of a SetBinomial Coefficients3-1Some 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?3-2Some 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?3-3Some 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?4-1The 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?4-2The 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)4-3The 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.4-4The 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?5-1A 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.

### Page1 / 143

L02_MoreCounting - 1-1COMP170Discrete Mathematical Toolsfor...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online