The correct answer is $\boxed{\left\{ \frac{1}{2}, 2 \right\}}$.
The mean of a probability density function is given by:
$$\mu = \int_0^\infty x f(x) dx$$
In this case, we have:
$$\mu = \int_0^\infty x \frac{k x^n e^{-x}}{2} dx = \frac{k}{2} \int_0^\infty x^{n+1} e^{-x} dx$$
We can use the substitution $u = x$ to evaluate this integral:
$$\mu = \frac{k}{2} \int_0^\infty u^{n+1} e^{-u} du = \frac{k}{2} \Gamma(n+2)$$
where $\Gamma(x)$ is the Gamma function.
We are given that $\mu = 3$, so we have:
$$3 = \frac{k}{2} \Gamma(n+2)$$
We can solve this equation for $k$ to get:
$$k = 2 \Gamma(n+2)$$
The mean of an exponential distribution is $\mu = 1$, so we have:
$$1 = \frac{k}{2} \Gamma(n+2)$$
We can solve this equation for $n$ to get:
$$n = -1$$
Therefore, the values of {k, n} are $\boxed{\left\{ \frac{1}{2}, 2 \right\}}$.
Here is a brief explanation of each option:
- Option A: $\left\{ \frac{1}{2}, 1 \right\}$. This option is incorrect because the mean of an exponential distribution is $\mu = 1$, but the mean of the distribution in the question is $\mu = 3$.
- Option B: $\left\{ \frac{1}{4}, 2 \right\}$. This option is incorrect because the mean of an exponential distribution is $\mu = 1$, but the mean of the distribution in the question is $\mu = 3$.
- Option C: $\left\{ \frac{1}{2}, 2 \right\}$. This option is correct because the mean of an exponential distribution is $\mu = 1$, and the mean of the distribution in the question is $\mu = 3$.
- Option D: $\left\{ 1, 2 \right\}$. This option is incorrect because the mean of an exponential distribution is $\mu = 1$, but the mean of the distribution in the question is $\mu = 3$.