{"title":"优化矩阵链乘法的一种启发式算法","authors":"Lionel E. Deimel, Tempe Ann Lampe","doi":"10.1145/503506.503511","DOIUrl":null,"url":null,"abstract":"A consequence of the associative property of matrix multiplication is that the product of n matrices can be calculated in (n-1)! ways. Different choices for the multiplication sequence can cause the numbers of scalar multiplications required to vary by several orders of magnitude. The optimal ordering with respect to number of scalar multiplications can be found in O(n3) time using dynamic programming. A heuristic is presented which finds an optimal or nearly optimal strategy in O(n2) time in its most straightforward implementation. The problem is important in interpretation or code generation for languages which allow high-level manipulation of matrices.","PeriodicalId":258426,"journal":{"name":"ACM-SE 17","volume":"36 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1979-04-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"A heuristic for optimizing the multiplication of matrix chains\",\"authors\":\"Lionel E. Deimel, Tempe Ann Lampe\",\"doi\":\"10.1145/503506.503511\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"A consequence of the associative property of matrix multiplication is that the product of n matrices can be calculated in (n-1)! ways. Different choices for the multiplication sequence can cause the numbers of scalar multiplications required to vary by several orders of magnitude. The optimal ordering with respect to number of scalar multiplications can be found in O(n3) time using dynamic programming. A heuristic is presented which finds an optimal or nearly optimal strategy in O(n2) time in its most straightforward implementation. The problem is important in interpretation or code generation for languages which allow high-level manipulation of matrices.\",\"PeriodicalId\":258426,\"journal\":{\"name\":\"ACM-SE 17\",\"volume\":\"36 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1979-04-09\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"ACM-SE 17\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/503506.503511\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM-SE 17","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/503506.503511","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
A heuristic for optimizing the multiplication of matrix chains
A consequence of the associative property of matrix multiplication is that the product of n matrices can be calculated in (n-1)! ways. Different choices for the multiplication sequence can cause the numbers of scalar multiplications required to vary by several orders of magnitude. The optimal ordering with respect to number of scalar multiplications can be found in O(n3) time using dynamic programming. A heuristic is presented which finds an optimal or nearly optimal strategy in O(n2) time in its most straightforward implementation. The problem is important in interpretation or code generation for languages which allow high-level manipulation of matrices.