Let’s start with the basic rules of counting.
THE PRODUCT RULE: “Suppose that a procedure can be broken down into a sequence of two tasks. If there are n1 ways to do the first task and for each of these ways of doing the first task, there are n2 ways to do the second task, then there are n1n2 ways to do the procedure.”
THE SUM RULE: “If a task can be done either in one of n1 ways or in one of n2 ways, where none of the set of n1 ways is the same as any of the set of n2 ways, then there are n1 +n2 ways to do the task.”
The definitions were taken from the textbook Discrete Mathematics and its applications by Rosen.
a) In how many ways can two representatives be picked so that one is a mathematics major and the other is a computer science major?
The key to answering this type of exercise is to find out what rule one can use: the product rule or the sum rule.
Let’s examine this case. We must pick two representatives so one is a mathematics major and the other is a computer science major.
Let’s simplify this problem a bit. Imagine we 2 mathematics majors (the first one and the second one) and 2 computer science majors.
If we pick the first mathematics major, we can then choose any of the two computer science majors. If we pick the second mathematics major, then we can pick any of the two computer science majors.
From the explanation above, we can see that we have n1 (2) ways to do the first task (picking a mathematics major). Also, for each of the n1 ways, we have n2 (2) ways of doing the second task (picking a computer science major. This is exactly the definition of the product rule, so we apply it.
Answer:
There are 5850 (18 x 325) ways of picking two representatives so that one is a mathematics major and the other is a computer science major.
b) In how many ways can one representative be picked who is either a mathematics major or a computer science major?
Similarly to the first exercise, we analyze the second one.
We can pick either one mathematics major or a computer science major. If we write it in the way that the rules (product and sum) are stated, we can say that the task (choosing one representative) can be done either in n1 ways (picking a mathematics major) or in n2 ways (picking a computer science major, and none of the set of n1 ways is the same as any of the set of n2 ways.
From that description, we can easily see that we must apply the sum rule.
Answer:
One representative who is either a mathematics major or a computer science major can be picked in 343 (18+325) ways.
Related exercises:
- How many bit strings of length n, where n is a positive integer, start and end with 1s?
- An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building?
- How many bit strings of length ten both begin and end with a 1?
- How many different three-letter initials can people have?