{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,8,21]],"date-time":"2026-08-21T19:26:54Z","timestamp":1787340414639,"version":"build-2736575974"},"reference-count":72,"publisher":"Society for Industrial & Applied Mathematics (SIAM)","issue":"1","funder":[{"name":"Millennium Nucleus, Chile","award":["ICM\/FIC RC130003"],"award-info":[{"award-number":["ICM\/FIC RC130003"]}]},{"DOI":"10.13039\/501100002850","name":"Fondo Nacional de Desarrollo Cient\u00edfico y Tecnol\u00f3gico","doi-asserted-by":"publisher","award":["1-140796"],"award-info":[{"award-number":["1-140796"]}],"id":[{"id":"10.13039\/501100002850","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["SIAM J. Comput."],"published-print":{"date-parts":[[2017,1]]},"abstract":"<jats:p>Let $\\mathcal D$ be a collection of $D$ documents, which are strings over an alphabet of size $\\sigma$, of total length $n$. We describe a data structure that uses linear space and reports $k$ most relevant documents that contain a query pattern $P$, which is a string of length $p$ packed in $p\/\\log_\\sigma n$ words, in time $O(p\/\\log_\\sigma n+k)$. This is optimal in the RAM model in the general case where $\\log D = \\Theta(\\log n)$, and involves a novel RAM-optimal suffix tree search. Our construction supports an ample set of important relevance measures, such as the number of times $P$ appears in a document (called term frequency), a fixed document importance, and the minimal distance between two occurrences of $P$ in a document. When $\\log D = o(\\log n)$, we show how to reduce the space of the data structure from $O(n\\log n)$ to $O(n(\\log\\sigma+\\log D+\\log\\log n))$ bits, and to $O(n(\\log\\sigma+\\log D))$ bits in the case of the popular term frequency measure of relevance, at the price of an additive term $O(\\log^\\varepsilon_\\sigma n)$ in the query time, for any constant $\\varepsilon&gt;0$. We also consider the dynamic scenario, where documents can be inserted and deleted from the collection. We obtain linear space and query time $O(p(\\log\\log n)^2\/\\log_\\sigma n+\\log n + k\\log\\log k)$, whereas insertions and deletions require $O(\\log^{1+\\varepsilon} n)$ time per symbol, for any constant $\\varepsilon&gt;0$. Finally, we consider an extended static scenario where an extra parameter $\\mathtt{par}(P,d)$ is defined, and the query must retrieve only documents $d$ such that $\\mathtt{par}(P,d)\\in [\\tau_1,\\tau_2]$, where this range is specified at query time. We solve these queries using linear space and $O(p\/\\log_\\sigma n + \\log^{1+\\varepsilon} n + k\\log^\\varepsilon n)$ time, for any constant $\\varepsilon&gt;0$. Our technique is to translate these top-$k$ problems into multidimensional geometric search problems. As a bonus, we describe some improvements to those problems.<\/jats:p>","DOI":"10.1137\/140998949","type":"journal-article","created":{"date-parts":[[2017,2,8]],"date-time":"2017-02-08T09:04:42Z","timestamp":1486544682000},"page":"80-113","source":"Crossref","is-referenced-by-count":18,"title":["Time-Optimal Top-$k$ Document Retrieval"],"prefix":"10.1137","volume":"46","author":[{"given":"Gonzalo","family":"Navarro","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Yakov","family":"Nekrich","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"351","published-online":{"date-parts":[[2017,2,8]]},"reference":[{"key":"atypb1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01940874"},{"key":"atypb2","doi-asserted-by":"crossref","unstructured":"S. Alstrup, T. Husfeldt, and T. Rauhe,\n                      Marked ancestor problems\n                      , in Proceedings of the 39th IEEE Annual Symposium on Foundations of Computer Science (FOCS), IEEE Computer Society, Los Alamitos, CA, 1998, pp. 534-544.","DOI":"10.1109\/SFCS.1998.743504"},{"key":"atypb3","doi-asserted-by":"publisher","DOI":"10.1016\/S0022-0000(05)80047-9"},{"key":"atypb4","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1995.1090"},{"key":"atypb5","doi-asserted-by":"publisher","DOI":"10.1145\/1236457.1236460"},{"key":"atypb6","first-page":"372","author":"Anh V.","year":"2006","journal-title":"New York"},{"key":"atypb7","first-page":"85","author":"Apostolico A.","year":"1985","journal-title":"Berlin"},{"key":"atypb8","doi-asserted-by":"publisher","DOI":"10.1137\/S009753970240481X"},{"key":"atypb9","unstructured":"R. Baeza-Yates and B. Ribeiro-Neto,\n                      Modern Information Retrieval\n                      , 2nd ed., Addison-Wesley, New York, 2011."},{"key":"atypb10","first-page":"427","author":"Belazzougui D.","year":"2010","journal-title":"Berlin"},{"key":"atypb11","doi-asserted-by":"publisher","DOI":"10.1145\/2635816"},{"key":"atypb12","doi-asserted-by":"publisher","DOI":"10.1016\/j.jda.2012.07.005"},{"key":"atypb13","first-page":"152","author":"Bender M.","year":"2002","journal-title":"Berlin"},{"key":"atypb14","first-page":"88","author":"Bender M.","year":"2000","journal-title":"Berlin"},{"key":"atypb15","doi-asserted-by":"publisher","DOI":"10.1145\/28869.28873"},{"key":"atypb16","first-page":"173","author":"Brodal G.","year":"2009","journal-title":"Berlin"},{"key":"atypb17","first-page":"1","author":"Chan T.","year":"2011","journal-title":"New York"},{"key":"atypb18","doi-asserted-by":"publisher","DOI":"10.1137\/0217026"},{"key":"atypb19","doi-asserted-by":"publisher","DOI":"10.1137\/S0097539700370539"},{"key":"atypb20","doi-asserted-by":"crossref","unstructured":"M. Crochemore and W. Rytter,\n                      Jewels of Stringology\n                      , World Scientific, Singapore, 2002.","DOI":"10.1142\/4838"},{"key":"atypb21","first-page":"194","author":"Culpepper S.","year":"2010","journal-title":"Berlin"},{"key":"atypb22","first-page":"289","author":"Dietz P.","year":"1993","journal-title":"Berlin"},{"key":"atypb23","first-page":"365","author":"Dietz P.","year":"1987","journal-title":"New York"},{"key":"atypb24","doi-asserted-by":"crossref","unstructured":"M. Farach,\n                      Optimal suffix tree construction with large alphabets\n                      , in Proceedings of the 38th Annual Symposium on Foundations of Computer Science (FOCS), IEEE Computer Society, Los Alamitos, CA, 1997, pp. 137-143.","DOI":"10.1109\/SFCS.1997.646102"},{"key":"atypb25","first-page":"20","volume":"3","author":"Ferragina P.","year":"2007","journal-title":"Algorithms"},{"key":"atypb26","first-page":"160","author":"Fischer J.","year":"2015","journal-title":"Switzerland"},{"key":"atypb27","doi-asserted-by":"publisher","DOI":"10.1137\/090779759"},{"key":"atypb28","doi-asserted-by":"publisher","DOI":"10.1142\/S0129054196000117"},{"key":"atypb29","doi-asserted-by":"publisher","DOI":"10.1145\/828.1884"},{"key":"atypb30","first-page":"135","author":"Gabow H. N.","year":"1984","journal-title":"New York"},{"key":"atypb31","doi-asserted-by":"publisher","DOI":"10.1016\/j.tcs.2012.08.004"},{"key":"atypb32","doi-asserted-by":"crossref","unstructured":"T. Gagie, G. Navarro, and S. J. Puglisi,\n                      New algorithms on wavelet trees and applications to information retrieval\n                      , Theoret. Comput. Sci., 426-427 (2012), pp. 25-41.","DOI":"10.1016\/j.tcs.2011.12.002"},{"key":"atypb33","first-page":"24","author":"Gog S.","year":"2015","journal-title":"Philadelphia"},{"key":"atypb34","first-page":"841","author":"Grossi R.","year":"2003","journal-title":"Philadelphia"},{"key":"atypb35","doi-asserted-by":"publisher","DOI":"10.1137\/S0097539702402354"},{"key":"atypb36","doi-asserted-by":"crossref","unstructured":"D. Gusfield,\n                      Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology\n                      , Cambridge University Press, Cambridge, 1997.","DOI":"10.1017\/CBO9780511574931"},{"key":"atypb37","doi-asserted-by":"publisher","DOI":"10.1016\/j.jda.2010.08.003"},{"key":"atypb38","first-page":"173","author":"Hon W.-K.","year":"2012","journal-title":"Berlin"},{"key":"atypb39","first-page":"341","author":"Hon W.-K.","year":"2013","journal-title":"NJ"},{"key":"atypb40","doi-asserted-by":"publisher","DOI":"10.1145\/2590774"},{"key":"atypb41","doi-asserted-by":"crossref","unstructured":"W.K. Hon, R. Shah, and J. Vitter,\n                      Space-efficient framework for top-$k$ string retrieval problems\n                      , in Proceedings of the 50th IEEE Annual Symposium on Foundations of Computer Science (FOCS), IEEE Computer Society, Los Alamitos, CA, 2009, pp. 713-722.","DOI":"10.1109\/FOCS.2009.19"},{"key":"atypb42","first-page":"401","author":"Karpinski M.","year":"2011","journal-title":"Philadelphia"},{"key":"atypb43","unstructured":"D. Knuth,\n                      The Art of Computer Programming, Vol. 3: Sorting and Searching\n                      , Addison-Wesley, Reading, MA, 1973."},{"key":"atypb44","first-page":"351","author":"Konow R.","year":"2013","journal-title":"NJ"},{"key":"atypb45","first-page":"242","author":"Larsen K. G.","year":"2014","journal-title":"Switzerland"},{"key":"atypb46","doi-asserted-by":"publisher","DOI":"10.1016\/j.tcs.2007.07.013"},{"key":"atypb47","first-page":"67","author":"Matias Y.","year":"1998","journal-title":"Berlin"},{"key":"atypb48","doi-asserted-by":"publisher","DOI":"10.1145\/321941.321946"},{"key":"atypb49","doi-asserted-by":"publisher","DOI":"10.1137\/0214021"},{"key":"atypb50","doi-asserted-by":"crossref","unstructured":"I. Munro,\n                      Tables\n                      , in Proceedings of the 16th Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS), Lecture Notes in Comput. Sci. 1180, Springer, Berlin, 1996, pp. 37-42.","DOI":"10.1007\/3-540-62034-6_35"},{"key":"atypb51","first-page":"657","author":"Muthukrishnan S.","year":"2002","journal-title":"New York"},{"key":"atypb52","doi-asserted-by":"publisher","DOI":"10.1145\/2535933"},{"key":"atypb53","first-page":"1066","author":"Navarro G.","year":"2012","journal-title":"New York"},{"key":"atypb54","doi-asserted-by":"publisher","DOI":"10.1016\/j.tcs.2012.11.031"},{"key":"atypb55","first-page":"3","volume":"19","author":"Navarro G.","year":"2014","journal-title":"ACM J. Exp. Algorithmics"},{"key":"atypb56","doi-asserted-by":"publisher","DOI":"10.1016\/j.tcs.2014.05.005"},{"key":"atypb57","doi-asserted-by":"publisher","DOI":"10.1142\/S0218195909002800"},{"key":"atypb58","unstructured":"M. H. Overmars,\n                      The Design of Dynamic Data Structures\n                      , Lecture Notes in Comput. Sci. 156, Springer, Berlin, 1983."},{"key":"atypb59","doi-asserted-by":"publisher","DOI":"10.1016\/0020-0190(81)90093-4"},{"key":"atypb60","doi-asserted-by":"publisher","DOI":"10.1002\/(SICI)1097-4571(199610)47:10<749::AID-ASI3>3.0.CO;2-2"},{"key":"atypb61","doi-asserted-by":"publisher","DOI":"10.1145\/2000807.2000821"},{"key":"atypb62","first-page":"84","author":"Ru\u017ei\u0107 M.","year":"2008","journal-title":"Berlin"},{"key":"atypb63","doi-asserted-by":"publisher","DOI":"10.1007\/s00224-006-1198-x"},{"key":"atypb64","doi-asserted-by":"publisher","DOI":"10.1016\/j.jda.2006.03.011"},{"key":"atypb65","first-page":"803","author":"Shah R.","year":"2013","journal-title":"Berlin"},{"key":"atypb66","doi-asserted-by":"publisher","DOI":"10.1137\/0222070"},{"key":"atypb67","doi-asserted-by":"publisher","DOI":"10.1016\/j.jcss.2004.04.003"},{"key":"atypb68","doi-asserted-by":"publisher","DOI":"10.1016\/j.ipl.2013.03.012"},{"key":"atypb69","doi-asserted-by":"publisher","DOI":"10.1007\/BF01206331"},{"key":"atypb70","first-page":"205","author":"V\u00e4lim\u00e4ki N.","year":"2007","journal-title":"Berlin"},{"key":"atypb71","doi-asserted-by":"crossref","unstructured":"P. Weiner,\n                      Linear pattern matching algorithm\n                      , in Proceedings of the 14th Annual IEEE Symposium on Switching and Automata Theory, IEEE Computer Society, Northridge, CA, 1973, pp. 1-11.","DOI":"10.1109\/SWAT.1973.13"},{"key":"atypb72","doi-asserted-by":"publisher","DOI":"10.1145\/1132956.1132959"}],"container-title":["SIAM Journal on Computing"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/epubs.siam.org\/doi\/pdf\/10.1137\/140998949","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,8,21]],"date-time":"2026-08-21T18:34:06Z","timestamp":1787337246000},"score":1,"resource":{"primary":{"URL":"https:\/\/epubs.siam.org\/doi\/10.1137\/140998949"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2017,1]]},"references-count":72,"journal-issue":{"issue":"1","published-print":{"date-parts":[[2017,1]]}},"alternative-id":["10.1137\/140998949"],"URL":"https:\/\/doi.org\/10.1137\/140998949","relation":{},"ISSN":["0097-5397","1095-7111"],"issn-type":[{"value":"0097-5397","type":"print"},{"value":"1095-7111","type":"electronic"}],"subject":[],"published":{"date-parts":[[2017,1]]}}}