Posts

Showing posts from December, 2020

Basics of Counting

Sum Rule If sets A and B are disjoint sets(the sets which have no common element in them), then  |A⋃B|=|A| + |B|  For example: a class has 43 girls and 54 boys total of the class=43+54=97 Product Rule If set A and set B the cartesian product is : A*B={(a,b)| a  ∈ A and b  ∈ B} if |A| =n and |B| = m then |A*B|=n*m for example: A={a,b} and B={c,d}   A*B={(a,c),(a,d),(b,c),(b,d)}  Examples on counting: 1. how many password satisfy the following requirements: it should be 6 to 8 characters long. starts with a letter. case sensitive. other characters: digits or letters. solution: first we will find the six character password as: =52*62*62*62*62*62 { here first 52 is for 26 small letters and 26 for capital letters, other 5 times 62 are for digits(10) and letters(52=26+26)} =52*62⁵ second for seven characters password as: =52*62* 62*62*62*62*62{ here one extra 62 is multiplied according to the 1st case it is for the seventh characters} = 52*62⁶ last for eight...