Yuuki Yonemoto, Yuto Nakashima, Shunsuke Inenaga, H. Bannai
{"title":"空间高效的STR-IC-LCS计算","authors":"Yuuki Yonemoto, Yuto Nakashima, Shunsuke Inenaga, H. Bannai","doi":"10.48550/arXiv.2210.07979","DOIUrl":null,"url":null,"abstract":"One of the most fundamental method for comparing two given strings A and B is the longest common subsequence (LCS), where the task is to find (the length) of the longest common subsequence. In this paper, we address the STR-IC-LCS problem which is one of the constrained LCS problems proposed by Chen and Chao [J. Comb. Optim, 2011]. A string Z is said to be an STR-IC-LCS of three given strings A , B , and P , if Z is one of the longest common subsequences of A and B that contains P as a substring. We present a space efficient solution for the STR-IC-LCS problem. Our algorithm computes the length of an STR-IC-LCS in O ( n 2 ) time and O (( (cid:96) + 1)( n − (cid:96) + 1)) space where (cid:96) is the length of a longest common subsequence of A and B of length n . When (cid:96) = O (1) or n − (cid:96) = O (1), then our algorithm uses only linear O ( n ) space.","PeriodicalId":266155,"journal":{"name":"Conference on Current Trends in Theory and Practice of Informatics","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-10-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Space-Efficient STR-IC-LCS Computation\",\"authors\":\"Yuuki Yonemoto, Yuto Nakashima, Shunsuke Inenaga, H. Bannai\",\"doi\":\"10.48550/arXiv.2210.07979\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"One of the most fundamental method for comparing two given strings A and B is the longest common subsequence (LCS), where the task is to find (the length) of the longest common subsequence. In this paper, we address the STR-IC-LCS problem which is one of the constrained LCS problems proposed by Chen and Chao [J. Comb. Optim, 2011]. A string Z is said to be an STR-IC-LCS of three given strings A , B , and P , if Z is one of the longest common subsequences of A and B that contains P as a substring. We present a space efficient solution for the STR-IC-LCS problem. Our algorithm computes the length of an STR-IC-LCS in O ( n 2 ) time and O (( (cid:96) + 1)( n − (cid:96) + 1)) space where (cid:96) is the length of a longest common subsequence of A and B of length n . When (cid:96) = O (1) or n − (cid:96) = O (1), then our algorithm uses only linear O ( n ) space.\",\"PeriodicalId\":266155,\"journal\":{\"name\":\"Conference on Current Trends in Theory and Practice of Informatics\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-10-14\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Conference on Current Trends in Theory and Practice of Informatics\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.48550/arXiv.2210.07979\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Conference on Current Trends in Theory and Practice of Informatics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.48550/arXiv.2210.07979","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
One of the most fundamental method for comparing two given strings A and B is the longest common subsequence (LCS), where the task is to find (the length) of the longest common subsequence. In this paper, we address the STR-IC-LCS problem which is one of the constrained LCS problems proposed by Chen and Chao [J. Comb. Optim, 2011]. A string Z is said to be an STR-IC-LCS of three given strings A , B , and P , if Z is one of the longest common subsequences of A and B that contains P as a substring. We present a space efficient solution for the STR-IC-LCS problem. Our algorithm computes the length of an STR-IC-LCS in O ( n 2 ) time and O (( (cid:96) + 1)( n − (cid:96) + 1)) space where (cid:96) is the length of a longest common subsequence of A and B of length n . When (cid:96) = O (1) or n − (cid:96) = O (1), then our algorithm uses only linear O ( n ) space.