{"title":"(min,+) matrix and vector products for inputs decomposable into few monotone subsequences","authors":"Andrzej Lingas , Mia Persson","doi":"10.1016/j.tcs.2025.115158","DOIUrl":null,"url":null,"abstract":"<div><div>We study the time complexity of computing the <span><math><mo>(</mo><mi>min</mi><mo></mo><mo>,</mo><mo>+</mo><mo>)</mo></math></span> matrix product of two <span><math><mi>n</mi><mo>×</mo><mi>n</mi></math></span> integer matrices in terms of <em>n</em> and the number of monotone subsequences the rows of the first matrix and the columns of the second matrix can be decomposed into. In particular, we show that if each row of the first matrix can be decomposed into at most <span><math><msub><mrow><mi>m</mi></mrow><mrow><mn>1</mn></mrow></msub></math></span> monotone subsequences and each column of the second matrix can be decomposed into at most <span><math><msub><mrow><mi>m</mi></mrow><mrow><mn>2</mn></mrow></msub></math></span> monotone subsequences such that all the subsequences are non-decreasing or all of them are non-increasing then the <span><math><mo>(</mo><mi>min</mi><mo></mo><mo>,</mo><mo>+</mo><mo>)</mo></math></span> product of the matrices can be computed in <span><math><mi>O</mi><mo>(</mo><msub><mrow><mi>m</mi></mrow><mrow><mn>1</mn></mrow></msub><msub><mrow><mi>m</mi></mrow><mrow><mn>2</mn></mrow></msub><msup><mrow><mi>n</mi></mrow><mrow><mn>2.569</mn></mrow></msup><mo>)</mo></math></span> time. On the other hand, we observe that if all the rows of the first matrix are non-decreasing and all columns of the second matrix are non-increasing or <em>vice versa</em> then this case is as hard as the general one. We also present six cases of the restrictions on the input integer matrices under which the problem of computing the <span><math><mo>(</mo><mi>min</mi><mo></mo><mo>,</mo><mo>+</mo><mo>)</mo></math></span> matrix product is equally hard as that of computing the minimum and maximum witnesses of Boolean matrix product.</div><div>Similarly, we also study the time complexity of computing the <span><math><mo>(</mo><mi>min</mi><mo></mo><mo>,</mo><mo>+</mo><mo>)</mo></math></span> convolution of two <em>n</em>-dimensional integer vectors in terms of <em>n</em> and the number of monotone subsequences the two vectors can be decomposed into. We show that if the first vector can be decomposed into at most <span><math><msub><mrow><mi>m</mi></mrow><mrow><mn>1</mn></mrow></msub></math></span> monotone subsequences and the second vector can be decomposed into at most <span><math><msub><mrow><mi>m</mi></mrow><mrow><mn>2</mn></mrow></msub></math></span> subsequences such that all the subsequences of the first vector are non-decreasing and all the subsequences of the second vector are non-increasing or <em>vice versa</em> then their <span><math><mo>(</mo><mi>min</mi><mo></mo><mo>,</mo><mo>+</mo><mo>)</mo></math></span> convolution can be computed in <span><math><mover><mrow><mi>O</mi></mrow><mrow><mo>˜</mo></mrow></mover><mo>(</mo><msub><mrow><mi>m</mi></mrow><mrow><mn>1</mn></mrow></msub><msub><mrow><mi>m</mi></mrow><mrow><mn>2</mn></mrow></msub><msup><mrow><mi>n</mi></mrow><mrow><mn>1.5</mn></mrow></msup><mo>)</mo></math></span> time. On the other, the case when both sequences of consecutive coordinates of the vectors are non-decreasing or both of them are non-increasing is as hard as the general case. Finally, we present six cases of the restrictions on the input integer vectors under which the problem of computing the <span><math><mo>(</mo><mi>min</mi><mo></mo><mo>,</mo><mo>+</mo><mo>)</mo></math></span> vector convolution is equally hard as that of computing the minimum and maximum witnesses of the Boolean vector convolution.</div></div>","PeriodicalId":49438,"journal":{"name":"Theoretical Computer Science","volume":"1037 ","pages":"Article 115158"},"PeriodicalIF":0.9000,"publicationDate":"2025-03-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Theoretical Computer Science","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0304397525000969","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0
Abstract
We study the time complexity of computing the matrix product of two integer matrices in terms of n and the number of monotone subsequences the rows of the first matrix and the columns of the second matrix can be decomposed into. In particular, we show that if each row of the first matrix can be decomposed into at most monotone subsequences and each column of the second matrix can be decomposed into at most monotone subsequences such that all the subsequences are non-decreasing or all of them are non-increasing then the product of the matrices can be computed in time. On the other hand, we observe that if all the rows of the first matrix are non-decreasing and all columns of the second matrix are non-increasing or vice versa then this case is as hard as the general one. We also present six cases of the restrictions on the input integer matrices under which the problem of computing the matrix product is equally hard as that of computing the minimum and maximum witnesses of Boolean matrix product.
Similarly, we also study the time complexity of computing the convolution of two n-dimensional integer vectors in terms of n and the number of monotone subsequences the two vectors can be decomposed into. We show that if the first vector can be decomposed into at most monotone subsequences and the second vector can be decomposed into at most subsequences such that all the subsequences of the first vector are non-decreasing and all the subsequences of the second vector are non-increasing or vice versa then their convolution can be computed in time. On the other, the case when both sequences of consecutive coordinates of the vectors are non-decreasing or both of them are non-increasing is as hard as the general case. Finally, we present six cases of the restrictions on the input integer vectors under which the problem of computing the vector convolution is equally hard as that of computing the minimum and maximum witnesses of the Boolean vector convolution.
期刊介绍:
Theoretical Computer Science is mathematical and abstract in spirit, but it derives its motivation from practical and everyday computation. Its aim is to understand the nature of computation and, as a consequence of this understanding, provide more efficient methodologies. All papers introducing or studying mathematical, logic and formal concepts and methods are welcome, provided that their motivation is clearly drawn from the field of computing.