This problem looks similar to matrix chain multiplication but I am unable to figure out the unique states. Please help me!
Not Able To Get The Approach/Intuition for this problem
To solve this problem you need 2 arrays. Suppose the max number of elements possible in the array is N.
So one array is possible[N][N][3] (this 3 is for βaβ,βbβ and βcβ), so the state dp[i][j][k], where i<=j is used to store if its possible to reduce segment (i->j) to this character βkβ where k can be βaβ,βbβ or βcβ.
second array is dp[3][N], where 3 is again taken to represent every letter. And dp[i][j] represents the min length of string we can get if we reduce 'jβth character to βiβ( i can βaβ,βbβ or βcβ),
so the answer would be min(dp[0][N-1], dp[1][N-1], dp[2][N-1]).
If you want I can share the implementation.
I was able to solve the problem. Thanks a lot for the help. I am marking this doubt as βresolvedβ. Thanks again! 
I also thought on mcm but i got stuck in this question. Now even after reading the above solution I cannot figure out what to do plz can you explain or share the code.