Professional Documents
Culture Documents
BASIC Counting Principles: P Vanchinathan
BASIC Counting Principles: P Vanchinathan
P Vanchinathan
P Vanchinathan ()
Basic Counting
1/5
Product Rule for Counting If a procedure involves two independent steps, and if there are m ways of doing the rst step and n ways for the second step, then there are totally m n ways for the whole procedure. This rule is also applicable when there are more than two steps. Example 1 Counting 4-digit numbers that are multiples of 5. This is a 4-step process, constructing one digit in each step. The leftmost digit: any one from 1 to 9 The next 2 digits: any one from 0 to 9. The last digit (rightmost): 0 or 5, So the answer is 9 10 10 2 = 1800.
P Vanchinathan ()
Basic Counting
2/5
Example 2 Counting Number of Passwords. Conditions on the passwords Password should be 3-character length. Should use alphabets (small and capital are dierent), numerals 0 to 9 and underscore, (totally 63 characters). First character should be an alphabet At least one character should be a digit or an underscore Use another principle of counting: Sum rule: when there are many types which exclude each other then add the number of possibilities from each type.
P Vanchinathan ()
Basic Counting
3/5
Type 1 password: Second character is an alphabet Type 2 password: Second character is a digit or an underscore. Counting Type 1: First step 52 ways (small and capital letters). Same for second step. Third step avoids alphabets: 11 ways. So 52 52 11 = 29744 ways Counting Type 2: First step 52 ways. Second step 11 ways. Third step 63 ways. So 52 11 63 = 36036 Sum rule is applicable ( type 1 and type 2 are mutually exclusive). So totally 29744 + 36036 = 65780 passwords are possible.
P Vanchinathan ()
Basic Counting
4/5
Exercise
Count the number of passwords possible with same conditions but one dierence: length should be from 6 to 9 characters.
P Vanchinathan ()
Basic Counting
5/5