Matrix Chain Multiplication Problem