{"title":"从LZ77到行长编码Burrows-Wheeler变换,再回来","authors":"A. Policriti, N. Prezza","doi":"10.4230/LIPIcs.CPM.2017.17","DOIUrl":null,"url":null,"abstract":"The Lempel-Ziv factorization (LZ77) and the Run-Length encoded Burrows-Wheeler Transform (RLBWT) are two important tools in text compression and indexing, being their sizes $z$ and $r$ closely related to the amount of text self-repetitiveness. In this paper we consider the problem of converting the two representations into each other within a working space proportional to the input and the output. Let $n$ be the text length. We show that $RLBWT$ can be converted to $LZ77$ in $\\mathcal{O}(n\\log r)$ time and $\\mathcal{O}(r)$ words of working space. Conversely, we provide an algorithm to convert $LZ77$ to $RLBWT$ in $\\mathcal{O}\\big(n(\\log r + \\log z)\\big)$ time and $\\mathcal{O}(r+z)$ words of working space. Note that $r$ and $z$ can be \\emph{constant} if the text is highly repetitive, and our algorithms can operate with (up to) \\emph{exponentially} less space than naive solutions based on full decompression.","PeriodicalId":236737,"journal":{"name":"Annual Symposium on Combinatorial Pattern Matching","volume":"23 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-02-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"11","resultStr":"{\"title\":\"From LZ77 to the Run-Length Encoded Burrows-Wheeler Transform, and Back\",\"authors\":\"A. Policriti, N. Prezza\",\"doi\":\"10.4230/LIPIcs.CPM.2017.17\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The Lempel-Ziv factorization (LZ77) and the Run-Length encoded Burrows-Wheeler Transform (RLBWT) are two important tools in text compression and indexing, being their sizes $z$ and $r$ closely related to the amount of text self-repetitiveness. In this paper we consider the problem of converting the two representations into each other within a working space proportional to the input and the output. Let $n$ be the text length. We show that $RLBWT$ can be converted to $LZ77$ in $\\\\mathcal{O}(n\\\\log r)$ time and $\\\\mathcal{O}(r)$ words of working space. Conversely, we provide an algorithm to convert $LZ77$ to $RLBWT$ in $\\\\mathcal{O}\\\\big(n(\\\\log r + \\\\log z)\\\\big)$ time and $\\\\mathcal{O}(r+z)$ words of working space. Note that $r$ and $z$ can be \\\\emph{constant} if the text is highly repetitive, and our algorithms can operate with (up to) \\\\emph{exponentially} less space than naive solutions based on full decompression.\",\"PeriodicalId\":236737,\"journal\":{\"name\":\"Annual Symposium on Combinatorial Pattern Matching\",\"volume\":\"23 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2017-02-04\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"11\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Annual Symposium on Combinatorial Pattern Matching\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.4230/LIPIcs.CPM.2017.17\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Annual Symposium on Combinatorial Pattern Matching","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/LIPIcs.CPM.2017.17","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 11
摘要
Lempel-Ziv分解(LZ77)和运行长度编码Burrows-Wheeler变换(RLBWT)是文本压缩和索引中的两个重要工具,它们的大小$z$和$r$与文本自重复的数量密切相关。在本文中,我们考虑在与输入和输出成比例的工作空间内将两种表示转换成彼此的问题。让$n$为文本长度。我们表明$RLBWT$可以在$\mathcal{O}(n\log r)$时间和$\mathcal{O}(r)$工作空间的单词中转换为$LZ77$。反过来,我们提供了在$\mathcal{O}\big(n(\log r + \log z)\big)$时间和$\mathcal{O}(r+z)$字的工作空间中将$LZ77$转换为$RLBWT$的算法。请注意,如果文本高度重复,则$r$和$z$可以是\emph{常数},并且我们的算法可以使用(最多)\emph{指数级}的空间,而不是基于完全解压缩的简单解决方案。
From LZ77 to the Run-Length Encoded Burrows-Wheeler Transform, and Back
The Lempel-Ziv factorization (LZ77) and the Run-Length encoded Burrows-Wheeler Transform (RLBWT) are two important tools in text compression and indexing, being their sizes $z$ and $r$ closely related to the amount of text self-repetitiveness. In this paper we consider the problem of converting the two representations into each other within a working space proportional to the input and the output. Let $n$ be the text length. We show that $RLBWT$ can be converted to $LZ77$ in $\mathcal{O}(n\log r)$ time and $\mathcal{O}(r)$ words of working space. Conversely, we provide an algorithm to convert $LZ77$ to $RLBWT$ in $\mathcal{O}\big(n(\log r + \log z)\big)$ time and $\mathcal{O}(r+z)$ words of working space. Note that $r$ and $z$ can be \emph{constant} if the text is highly repetitive, and our algorithms can operate with (up to) \emph{exponentially} less space than naive solutions based on full decompression.