Adds matrix multiplication DP

With a hint of magic