P11, P18, P67: In Mathematica solution, changed x[[i]][[j]] to x[[i, j]].
P22, P26, P37, P39: Added Mathematica solution.
P40: Added Mathematica solution, simplified Java solution.