an urn contains six ball of each of the three colors: red, blue, and green. An urn contains six balls of each of the three colors: red, blue, green. Find the expected number of different colors obtained when three balls are drawn:
a. with replacement;
b. without replacement.
The correct answers are:
a: 19/9
b: 2.1912
I just don't know how to get to get to the answers.
Thanks for any help

We can also use recurrences, where A,B,C are the number of balls of three colors:
a)
\begin{align*}
  f(a,b,c) = \left\{\begin{matrix}
  3-\left(\lfloor\frac{a}{A}\rfloor + \lfloor\frac{b}{B}\rfloor+\lfloor\frac{c}{C}\rfloor\right)&   \text{if }A+B+C-(a+b+c) = 3\\ 
  \dfrac{a\cdot f(a-1,b,c)+b\cdot f(a,b-1,c)+c\cdot f(a,b,c-1)}{a+b+c} &  \text{otherwise}
\end{matrix}\right.
\end{align*}
b)
\begin{align*}
  f(a,b,c) = \left\{\begin{matrix}
  3-\left(\lfloor\frac{a}{A}\rfloor + \lfloor\frac{b}{B}\rfloor+\lfloor\frac{c}{C}\rfloor\right)&   \text{if }A+B+C-(a+b+c) = 3\\ 
  \dfrac{A\cdot f(a-1,b,c)+B\cdot f(a,b-1,c)+C\cdot f(a,b,c-1)}{A+B+C} &  \text{otherwise}
\end{matrix}\right.
\end{align*}
