## M4DD13 3 years ago Suppose you roll an eight-sided die two times hoping to get two numbers whose sum is even. What is the sample space? How many favorable outcomes are there?

1. across

This is not a computer science question. I recommend you ask it in the Mathematics section.

2. agdgdgdgwngo

Combinatorics is computer-sciency enough.

3. M4DD13

4. across

If you do a little number theory, you will realize that the sum of two even numbers and two odd numbers is always even. Therefore, you are looking at all the possibilities of obtaining two numbers of the same parity. The sample space of an 8-sided die rolled twice has a size of 64 outcomes. However, we are only interested in a specific subset of this sample space, namely, of numbers with the same parity. On your first roll, you can get anything, but you have two options: either an odd number or an even number. On your second roll, you are only interested in a number whose parity matches that of the first number. In the case of an 8-sided die, you will have 4 options. Hence, it is easy to see that you will have a sample space of 16 favorable outcomes.

5. agdgdgdgwngo
6. across

Oh, yes, I forgot to add the even parity. Hence, 16+16.