{"id":252053,"date":"2026-07-13T01:43:23","date_gmt":"2026-07-12T22:43:23","guid":{"rendered":"https:\/\/1kitap1.com\/en\/an-introduction-to-string-algorithms-carl-kingsford-1\/"},"modified":"2026-07-13T01:43:23","modified_gmt":"2026-07-12T22:43:23","slug":"an-introduction-to-string-algorithms-carl-kingsford-1","status":"publish","type":"post","link":"https:\/\/1kitap1.com\/en\/an-introduction-to-string-algorithms-carl-kingsford-1\/","title":{"rendered":"An Introduction To String Algorithms &#8211; Carl Kingsford (1)"},"content":{"rendered":"<figure style=\"text-align:center;margin:0 auto 1.5em;\"><img decoding=\"async\" src=\"https:\/\/1kitap1.com\/en\/wp-content\/uploads\/2026\/07\/7647c9e898e065aa.jpg\" alt=\" - Unknown book cover\" style=\"max-width:300px;width:100%;height:auto;box-shadow:0 4px 12px rgba(0,0,0,.25);border-radius:4px;\"\/><\/figure>\n<p>They have the nice property that, asymptotically, they take linear space in the string they contain. The suffix tree of T takes space O(|T|), but the big-O notation hides a lot of overhead: we have to maintain node structures, with pointers to encode the edges, plus some numbers on each edge. When dealing with really large strings, even a factor of 10 bigger than T could be a significant problem.<\/p>\n<p>That raises the question whether we can get a lot of the benefits of suffix trees without all that overhead. That is the goal of suffix arrays [Manber and Myers, 1990, 1993]. 16.1 Suffix tree operations in less space Imagine that you write down all the suffixes of a string T of length t. The ith suffix is the one that begins at position i.<\/p>\n<p>Now imagine that you sort all these suffixes and then write down the starting position of each suffix in an array in their sorted order. This is the suffix array. For example, suppose T = \u201cbanana$\u201d, and we\u2019ve sorted the suffixes: 6 $ 5 a$ 3 ana$ 1 anana$ 0 banana$ 4 na$ 2 nana$ . (16.1) The numbers to the left are the indices of these suffixes.<\/p>\n<p>The suffix array is the array of these numbers. (16.2) This array can be computed in a straightforward way by sorting the suffixes directly. This takes O(t2 log t) time because each comparison of two suffixes takes O(t) time. In fact, the suffix array can be constructed in O(t) time, which we will see in Chapter 17. 16.2 Suffix array \u2194suffix tree Definition 16.1 (Suffix Array). The suffix array SA(S) of a string S is a permutation of the integers {0, . . .<\/p>\n<p>, |S| \u22121}, where SA(S)[i] is the starting position of the alphabetically ith suf- fix. That is, if we sort all the suffixes of S, SA(S)[i] is the starting location of the suffix that occurs at position i in that sorted list. \u25a0 It\u2019s often handy to have an auxiliary array called the \u201cLCP\u201d array around. Each successive suffix in this order matches the previous one in some number of letters.<\/p>\n<p>(Maybe zero letters.) This is recorded in the longest common prefix array, or the LCP array.<\/p>\n<blockquote>\n<p>Copyright \u00a9 2026 Carl Kingsford Princeton University Press is committed to the protection of copyright and the intellectual property our authors entrust to us. Copyright promotes the progress and integrity of knowledge created by humans. By engaging with an authorized copy of this work, you are supporting creators and the global exchange of ideas. As this work is protected by copyright, any reproduction or distribution of it in any form for any purpose requires permission; permission requests should be sent to permissions@press.princeton.edu. Ingestion of any IP for any AI purposes is strictly prohibited.<\/p>\n<p>Published by Princeton University Press 41 William Street, Princeton, New Jersey 08540 99 Banbury Road, Oxford OX2 6JX press.princeton.edu GPSR Authorized Representative: Easy Access System Europe &#8211; Mustam\u00e4e tee 50, 10621 Tallinn, Estonia, gpsr.requests@easproject.com All Rights Reserved ISBN 9780691274539 ISBN (e-book) 9780691274546 Library of Congress Control Number: 2025948270 British Library Cataloging-in-Publication Data is available Editorial: Hallie Stebbins and Chloe Coy Production Editorial: Mark Bellis Text and Jacket Design: Wanda Espa\u00f1a Production: Erin Suydam Publicity: William Pagdatoon Copyeditor: Lor Campbell Gehret This book has been composed in Minion Pro Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 To Jessica, Henry, and Teddy Contents Preface xvii 1 Introduction 1 1.1 What are strings?<\/p>\n<p>1 1.2 Why study string algorithms? 1 1.3 What are our goals?<\/p>\n<\/blockquote>\n<p><em>This is a short excerpt from the opening of &ldquo;&rdquo; by Unknown, quoted for review and introduction purposes. All rights belong to the copyright holders.<\/em><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/1kitap1.com\/en\/an-introduction-to-string-algorithms-carl-kingsford-1\/#Book_Information\" >Book Information<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/1kitap1.com\/en\/an-introduction-to-string-algorithms-carl-kingsford-1\/#Reading_Word_Statistics\" >Reading &amp; Word Statistics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/1kitap1.com\/en\/an-introduction-to-string-algorithms-carl-kingsford-1\/#Most_Frequent_Words\" >Most Frequent Words<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/1kitap1.com\/en\/an-introduction-to-string-algorithms-carl-kingsford-1\/#PDF_Download\" >PDF Download<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Book_Information\"><\/span>Book Information<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Unique ID:<\/strong> 7647c9e898e065aa<\/li>\n<li><strong>File Extension:<\/strong> .pdf<\/li>\n<li><strong>File Size:<\/strong> 12,195,600 bytes (11.631 MB)<\/li>\n<li><strong>Title:<\/strong> &#8211;<\/li>\n<li><strong>Author:<\/strong> Unknown<\/li>\n<li><strong>ISBN:<\/strong> 9780691274539, 9780691274546<\/li>\n<li><strong>Pages:<\/strong> 378<\/li>\n<li><strong>Language:<\/strong> English (en)<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Reading_Word_Statistics\"><\/span>Reading &amp; Word Statistics<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Estimated Reading Time:<\/strong> 634.25 minutes<\/li>\n<li><strong>Total Words:<\/strong> 126,849<\/li>\n<li><strong>Total Characters:<\/strong> 687,769<\/li>\n<li><strong>Average Words per Page:<\/strong> 335.58<\/li>\n<li><strong>Average Characters per Page:<\/strong> 1819.49<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Most_Frequent_Words\"><\/span>Most Frequent Words<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>string (709), algorithm (659), suffix (497), time (453), strings (382), node (336), tree (321), log (308), character (297), length (278), alignment (277), one (270), number (269), since (260), two (257), problem (249), using (246), set (227), array (225), characters (225), between (220), first (219), use (209), let (193), case (192), compute (188), values (185), edge (183), find (180), prefix (172), bwt (169), gap (168), also (168), path (168), nodes (167), start (166), position (163), every (161), bits (160), space (159), given (159), algorithms (156), edit (154), example (154), function (153), see (153), match (151), cost (149), chapter (148), edges (147), state (146), graph (145), need (143), new (142), sequence (135), following (134), optimal (132), row (131), distance (129), used (128), definition (123), probability (122), bit (122), notes (121), pattern (121), order (120), exercises (118), substring (115), search (114), trees (114), end (113), takes (113), now (111), rank (110), data (109), matrix (109), give (108), starting (105), next (104), many (103), block (103), matching (102), proof (101), graphs (101), computing (100), total (99), want (99), possible (98), store (96), theorem (95), value (95), alphabet (94), last (94), running (93), sequences (92), output (92), input (92), longest (91), suffixes (91), regular (90).<\/p>\n<h2><span class=\"ez-toc-section\" id=\"PDF_Download\"><\/span>PDF Download<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align:center;\"><a href=\"https:\/\/1kitap1.com\/en\/wp-content\/uploads\/2026\/07\/an-introduction-to-string-algorithms-carl-kingsford-1.pdf\" download rel=\"nofollow\" style=\"display:inline-block;background:#2271b1;color:#ffffff;padding:14px 36px;border-radius:6px;text-decoration:none;font-weight:bold;font-size:1.05em;\">&#11015;&#65039; PDF Download<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>They have the nice property that, asymptotically, they take linear space in the string they contain. The suffix tree of T takes space O(|T|), but the big-O notation hides a lot of overhead: we have to maintain node structures, with pointers to encode the edges, plus some numbers on each edge. When dealing with really [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":252051,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-252053","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-english"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/posts\/252053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/comments?post=252053"}],"version-history":[{"count":0,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/posts\/252053\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/media\/252051"}],"wp:attachment":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/media?parent=252053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/categories?post=252053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/tags?post=252053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}