Let $A$ be a $55\times 55$ diagonal matrix with characteristic polynomial $(x-c_1)(x-c_2)^2(x-c_3)^3,\ldots ,(x-c_{10})^{10}$, where $c_1,c_2,\ldots ,c_{10}$ are all distinct. Let $V$ be the vector space of all $55\times 55$ matrices $B$ such that $AB=BA$. What is the dimension of $V$.
My Approach: Here the characteristic space associated with each characteristic value $c_1,c_2,...,c_{10}$ has dimension $1,2,3,...,10$ respectively. Therefore space generated by each characteristic vector has dimension $1+2+3+...+10=55$. Next I don't have any idea to proceed.
I'll do the much smaller case $$A=\pmatrix{c_1&0&0\\0&c_2&0\\0&0&c_2}$$ where $c_1\ne c_2$ which has characteristic polynomial $(x-c_1)(x-c_2)^2$. The $B$ that commute with $A$ are all $B$ of the form $$\pmatrix{*&0&0\\0&*&*\\0&*&*}.$$ These are the $B$ that preserve each of the eigenspaces of $V$. So the allowable $B$ in this example have dimension $5$.
Can you see how to adapt this idea to your case?