Add recursive matrix chain order