Counting. Often in CS we need to Enumerate/account for all possibilities of something, such as: generating passwords exhaustive testing of an algorithm Calculate a probability In general, there are two ways to count:
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
= n! / (a! b! …)
Your cards and my cards are separated by a divider
CARD CARDCARD / CARD
0 0 0 1 0
2 categories 1 divider that can go anywhere:
answer = C(5, 1) or C(5, 4).
CARD CARD / CARD CARD / CARD
0 0 1 0 0 1 0
3 categories 2 dividers that can go anywhere
Total = C(7, 2)
Note: their sizes must be 1 and 2.