Homework 2

CHE 116: Numerical Methods and Statistics

1/25/2018


1. Combinations and Permutations

  1. [1 point] How many ways can you rearrange the sequence A, B, C?
  2. [1 point] How many ways can you rearrange the letters in the word 'shelter'?
  3. [2 points] How many ways can you rearrange the letters in the word 'sufficient'?
  4. [2 points] You are at DiBella's making a sandwich. They have 20 possible toppings. How many sandwich's are possible? Assume that the order in which toppings are applied doesn't matter.
  5. [5 points] DiBella's has a new policy that you cannot have more than 5 toppings. Now how many sandwich's are possible?
  6. [5 points] You are playing a video game where two teams compete in a 6 versus 6 format. The teams select characters from a set of 100 possible characters and the same character cannot appear on either team (all 12 are unique). How many unique match-ups (6 v 6 combinations) are possible? Note: the teams are indistinguishable. If you exchange the 6 characters between the two teams it's still the same match-up.

1.1

$$ 3! = 6 $$

1.2

Divide by $2$ to account for redundancy in the letter 'e' $$ \frac{7!}{2} = 2520 $$

1.3

$$ \frac{10!}{2\times2} = 907200 $$

1.4

can start at 0 or 1, if you believe no toppings are valid sandwhiches. Changes answer by 1 $$ \sum_{i=0}^{20} \frac{20}{i!(20 - i)!} = 2^{20} = 1048576 $$

1.5

$$ \sum_{i=0}^5 \frac{20}{i!(20 - i)!} = 21700 $$

1.6

$$ \frac{100!}{12!(100 - 12)!} \times\frac{12!}{2\times6!\times6!} = 485294525611295400 $$

2. Scheduling

Use your ability to compute combinations and permutations to calculate number of possible schedules.

  1. [1 point] You have 8 chores to do this weekend. How many ways can you complete the chores?
  2. [2 points] Your friend is now helping you do the chores. Each chore takes exactly one hour, is unique, and you both want to be completed within 4 hours. How many ways can you complete the chores?
  3. [5 points] Another friend has come to help you do chores. Now you decide that the chores should be complete within 3 hours. How many ways can you complete the chores?

2.1

$$ 8! = 40320 $$

2.2

$$ 8! = 40320 $$

2.3

You must fill all 9 hours of possible chore time, so there is an extra "gap" chore

$$ 9! = 362880 $$

3. Probability

  1. [1 point] Using the above graph, take all possible paths from the root (node A) to at least one other node to be the sample space. What is that sample space? An example of on path would be ACF.

  2. [1 point] What is the probability of one of the paths?

  3. [2 points] Take a random variable $L$ to be the length (number of nodes) of the paths. What is $P(L = 3)$?

  4. [2 points] Take the random variable $C$ to be $1$ when a path contains node C and $0$ otherwise. What is $P(C = 1)$?

  5. [2 points] What is $P(C = 1, L = 3)$?

  6. [2 points] What about $P(C = 1 \, | \, L = 3)$?

  7. [5 points] Write out all possible paths with $L = 3$ and mark as bold those which have $C = 1$. Use this as justification for your answer to 3.6.

  8. [3 points] Are random variables C and L independent?

  9. [3 points] Define a third random variable, D, to indicate if node D is in the path. Are D and C conditionally independent of L?

3.1

$$ \{AB, AC, AD, ABE, ABF, ACF, ADG, ABFH, ACFH\} $$

3.2

$$ \frac{1}{\left|Q\right|} = \frac{1}{9} $$

3.3

Take $n$ to be the number of samples with $L = 3$ $$ P(L = 3) = \frac{n}{\left|Q\right|} = \frac{4}{9} $$

3.4

$$ P(C = 1) = \frac{3}{9} $$

3.5

How many samples have $C = 1$ and $L = 3$ simultaneously?

$$ \frac{1}{9} $$

3.6

$$ P(C = 1 \,|\, L = 3) = \frac{P(C = 1, L = 3)}{P(L = 3)} = \frac{1}{9}\frac{9}{4} = \frac{1}{4} $$

3.7

  • ABE
  • ABF
  • ACF
  • ADG

There are 4 possibilities when $L = 3$ and only one contains $C$, hence the probability is $1 / 4$

3.8

No, because

$$ P(C = 1 \,|\, L = 3) = \frac{1}{4} $$$$ P(C = 1) = \frac{3}{9} $$$$ P(C = 1\,|\, L = 3) \neq P(C = 1) $$

3.9

Does $$ P(C = c, D = d\,|\, L = l) = P(C = c\,|\,L = l) \times P( D = d \,|\,L = l) $$

for all possible $c, d, l$?

No, for example

$$ P(C = 1, D = 1 \,|\, L = 3) = 0 $$

but

$$ P(C = 1 \, |\, L = 3) P(D = 1\,|\,L = 3) = \frac{1}{4} \times \frac{1}{4}\neq 0 $$

In [ ]: