{"title":"Ranking and unranking bordered and unbordered words","authors":"Daniel Gabric","doi":"10.1016/j.ipl.2023.106452","DOIUrl":null,"url":null,"abstract":"<div><p>A <em>border</em> of a word <em>w</em> is a word that is both a non-empty proper prefix and suffix of <em>w</em>. If <em>w</em> has a border, then it is said to be <em>bordered</em>; otherwise, it is said to be <em>unbordered</em>. The main results of this paper are the first algorithms to rank and unrank length-<em>n</em> bordered and unbordered words over a <em>k</em>-letter alphabet. We show that, under the unit-cost RAM model, ranking bordered and unbordered words can be done in <span><math><mi>O</mi><mo>(</mo><mi>k</mi><msup><mrow><mi>n</mi></mrow><mrow><mn>3</mn></mrow></msup><mo>)</mo></math></span> time using <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mo>)</mo></math></span> space, and unranking them can be done in <span><math><mi>O</mi><mo>(</mo><msup><mrow><mi>n</mi></mrow><mrow><mn>4</mn></mrow></msup><mi>k</mi><mi>log</mi><mo></mo><mi>k</mi><mo>)</mo></math></span> time using <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mo>)</mo></math></span> space.</p></div>","PeriodicalId":56290,"journal":{"name":"Information Processing Letters","volume":"184 ","pages":"Article 106452"},"PeriodicalIF":0.7000,"publicationDate":"2023-10-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information Processing Letters","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0020019023000959","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0
Abstract
A border of a word w is a word that is both a non-empty proper prefix and suffix of w. If w has a border, then it is said to be bordered; otherwise, it is said to be unbordered. The main results of this paper are the first algorithms to rank and unrank length-n bordered and unbordered words over a k-letter alphabet. We show that, under the unit-cost RAM model, ranking bordered and unbordered words can be done in time using space, and unranking them can be done in time using space.
期刊介绍:
Information Processing Letters invites submission of original research articles that focus on fundamental aspects of information processing and computing. This naturally includes work in the broadly understood field of theoretical computer science; although papers in all areas of scientific inquiry will be given consideration, provided that they describe research contributions credibly motivated by applications to computing and involve rigorous methodology. High quality experimental papers that address topics of sufficiently broad interest may also be considered.
Since its inception in 1971, Information Processing Letters has served as a forum for timely dissemination of short, concise and focused research contributions. Continuing with this tradition, and to expedite the reviewing process, manuscripts are generally limited in length to nine pages when they appear in print.