I generated a transition probability matrix for a scenario where I throw five dice and set aside those dice that are sixes. Then, I throw the remaining dice and again set aside the sixes - then I repeat this procedure until I get all the sixes. $X_n$ here represents the number of dices that are sixes after n rolls.
$$\begin{pmatrix}\frac{5^5}{6^5} & \frac{3125}{6^5} & \frac{1250}{6^5} & \frac{250}{6^5} & \frac{25}{6^5} & \frac{1}{6^5}\\\ 0 & \frac{625}{6^4} & \frac{500}{6^4} & \frac{150}{6^4} & \frac{20}{6^4} & \frac{1}{6^4} \\\ 0& 0 & \frac{125}{6^3}& \frac{75}{6^3}& \frac{15}{6^3} & \frac{1}{6^3} \\\ 0 & 0& 0& \frac{25}{6^2}& \frac{10}{6^2}& \frac{1}{6^2}& \\ 0 & 0 & 0 & 0 & \frac{5}{6} & \frac{1}{6} \end{pmatrix}$$
I want to figure out how many turns it takes for me on average to get all sixes.
I'm not even sure where to start with this problem. Is it a right approach to write a program where I calculate $P^n$ and see when the 6th column all equals to 1?
Any pointers would be greatly appreciated.
Just a quick correction to your transition matrix...
$$P =\begin{pmatrix}\frac{5^5}{6^5} & \frac{3125}{6^5} & \frac{1250}{6^5} & \frac{250}{6^5} & \frac{25}{6^5} & \frac{1}{6^5}\\\ 0 & \frac{625}{6^4} & \frac{500}{6^4} & \frac{150}{6^4} & \frac{20}{6^4} & \frac{1}{6^4} \\\ 0& 0 & \frac{125}{6^3}& \frac{75}{6^3}& \frac{15}{6^3} & \frac{1}{6^3} \\\ 0 & 0& 0& \frac{25}{6^2}& \frac{10}{6^2}& \frac{1}{6^2}& \\ 0 & 0 & 0 & 0 & \frac{5}{6} & \frac{1}{6} \\ 0 & 0 & 0 & 0 & 0 & 1 \end{pmatrix} $$
and it only represents your transition probabilities on a single round of the game, not after n rolls.
One thing you can try doing is calculating
$$X_n = [1 \ 0 \ 0 \ 0 \ 0 \ 0] P^n = [p_{n,1} \ p_{n,2} \ p_{n,3} \ p_{n,4} \ p_{n,5} \ p_{n,6}]$$
The expected number of rounds played in this game would be given by
$$ S=1+\sum_{n=1}^\infty (p_{n,1}+p_{n,2}+p_{n,3}+p_{n,4}+p_{n,5}) $$
i.e. You're adding up all the elements in the first five columns for $n=1,2,3...$, since those represent the probability of still playing the game after n rounds. You can easily approximate $S$ using a spreadsheet. Calculating it analytically using this method might be tedious, but I would assume is definitely doable.