[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-82136-en":3,"doc-seo-82136-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},82136,1099514067438,"River Wang","https://ap-avatar.wpscdn.com/avatar/100002539ee87300030?x-image-process=image/resize,m_fixed,w_180,h_180&k=1780474512215547542",8,"Research & Report","Improved Lower Bounds of the Time Complexity of Shellsort","The paper develops a framework for analyzing Shellsort runtime via a parametrized complex-variable mapping p(N,σ,z)=∑_{i=1}^N σ(i)z^i from a permutation σ. Each swap is treated as an operation transforming permutations and changing the potential function. For Tokuda’s gap sequence, the worst-case number of swaps is proven to be at least Ω(N^1.26), extending to any strictly decreasing gap sequence whose gaps remain within bounded distance from a rational geometric sequence. The work also derives necessary structural constraints for gap sequences that achieve O(N log^c N), forcing worst-case costs of Ω(log N/log log N) terms of order Ω(N/(log log N)^c).","arXiv :2607 .08997v 1 [ cs .DS] 10 Jul 2026  \nImproved lower bounds of the time complexity of shellsort  \nZhenghan Zang  \nAbstract  \nIn this paper we develop the framework of using a parametrized mapping [σ(1),σ(2), ··· ,σ (n)] 7→σ(1)z + σ(2)z2 + ··· σ (n)zn to perform runtime analysis on Shellsort. In particular, we show that the worst-case time complexity of Shellsort using Tokuda’s sequence [5] is at least Ω(N1.26 ) with a generalisation of this result to any strictly decreasing gap sequence where each term at most a fixed distance away from a rational geometric sequence, and we also show that strictly decreasing gap sequences giving worst-case Shellsort time complexities of O(N logc N) must have Ω(log N/log log N)  \nterms of order Ω(N/(log log N)c ) .  \n1 Introduction  \nSince its introduction by Shell in [1], the time complexity of Shellsort has been a long standing problem in computer science. For the past few decades, many of the most important works on the runtime analysis of Shellsort have been done using combinatorial and number theoretic methods. In [2], Pratt showed that Shellsort using any gap sequence which approximates a geometric progression with integer coefficients has worst case time Ω(N3/2) as well as constructing a famous gap sequence consisting of numbers of the form 2p 3q which gives both worst case and average time of Θ(N(log N)2 ), yet this sequence is seldomly used in practical implementations due to its inefficiency to compute which comes from its high gap density. In [4], it is proven that Shellsort using any static gap sequence has worst case time at least Ω(N(log N/log log N)2 ), a bound which has been later improved to Ω(N(log N)2 /log log N) . For many years, studying the Frobenius coin problem or some variant of it have been the standard approach when it comes to runtime analysis of Shellsort.  \nHowever, research based on this seems to have reached a bottleneck in recent years due to the computational intractability of the solutions to the Frobenius problem when given large sets of arguments and also that it isn’t a good enough representation of Shellsort. Since then the focus of researches on Shellsort has shifted to empirically looking for gap sequences that perform well in practical scenarios, with sequences being proposed such as Tokuda’s sequence introduced in [5] which consists of numbers of the form ⌊(9 · (9/4)k − 4)/5⌋ . However, no version of Shellsort using one of these emperically derived gap sequences has any known individually proven nontrivial lower/upper bound.  \nWe now introduce a new mechanism to perform runtime analysis on Shellsort which uses a parameterized mapping that takes a permutation σ of the numbers 1 , 2 , ··· , N and returns an expression about a complex variable z (see definition 2, section 1.1) . Our focus is the effects the swaps performed when running Shellsort have on the value of this potential function, by viewing each swap as an operation taking one permutation to another. This approach bypasses many of the issues faced by Frobenius-based approaches. We begin by making the following definitions.  \n1.1 Notations  \nIn this paper, denote by N any positive integer greater than 1 and we assume that we perform Shellsorton an array of size N which contains each of 1 , 2 , ··· , N exactly once. When given N, denote L a (strictly) decreasing gap sequence with the first term less than N and σ a permutation of 1 , 2 , ··· , N , and let id be the identity permutation where id (i) = i for all 1 ≤ i ≤ N. Also for a real number r , denote by ||r|| the distance from r to the nearest integer.  \nDefinition 1 . We define T(N,σ, L) as the number of swaps needed to sort the array [σ(1),σ(2), ··· ,σ (N)] using shellsort with gap sequence L.  \nDefinition 2 . For any complex number z, we define the potential of the permutation σ with respect to z as the polynomial  \nN  \np (N,σ, z) =X σ(i)zi  \ni=1  \nDefinition 3 . We call an operation defined on any permutation σ a swap if it returns","cbCaisNg2jicOiXJ","https://ap.wps.com/l/cbCaisNg2jicOiXJ","pdf",286589,3,1,6,"English","en",105,"# Abstract\n# Introduction\n## Notations\n# Main Results","[{\"question\":\"How does the paper analyze Shellsort using a potential function?\",\"answer\":\"It defines a polynomial potential p(N,σ,z)=∑ σ(i)z^i for a permutation σ and analyzes how the swaps performed by Shellsort change this potential. Swaps are modeled as operations between permutations, enabling a swap-based lower-bound argument.\"},{\"question\":\"What worst-case lower bound is proved for Shellsort with Tokuda’s sequence?\",\"answer\":\"For Tokuda’s strictly decreasing gap sequence, the paper proves the worst-case time complexity is at least Ω(N^1.26).\"},{\"question\":\"What constraints are required for gap sequences that yield O(N log^c N) worst-case time?\",\"answer\":\"The paper shows that strictly decreasing gap sequences producing worst-case O(N log^c N) must satisfy additional growth/structure conditions, implying a worst-case lower bound contribution of Ω(N/(log log N)^c) terms multiplied by at least Ω(log N/log log N).\"}]",1784178393,15,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"improved-lower-bounds-of-the-time-complexity-of-shellsort","",{"@graph":36,"@context":85},[37,53,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,50],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":20},"https://docshare.wps.com/document/research-report/",{"item":51,"name":13,"@type":43,"position":52},"https://docshare.wps.com/document/improved-lower-bounds-of-the-time-complexity-of-shellsort/82136/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":24,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-20","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"How does the paper analyze Shellsort using a potential function?","Question",{"text":75,"@type":76},"It defines a polynomial potential p(N,σ,z)=∑ σ(i)z^i for a permutation σ and analyzes how the swaps performed by Shellsort change this potential. Swaps are modeled as operations between permutations, enabling a swap-based lower-bound argument.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"What worst-case lower bound is proved for Shellsort with Tokuda’s sequence?",{"text":80,"@type":76},"For Tokuda’s strictly decreasing gap sequence, the paper proves the worst-case time complexity is at least Ω(N^1.26).",{"name":82,"@type":73,"acceptedAnswer":83},"What constraints are required for gap sequences that yield O(N log^c N) worst-case time?",{"text":84,"@type":76},"The paper shows that strictly decreasing gap sequences producing worst-case O(N log^c N) must satisfy additional growth/structure conditions, implying a worst-case lower bound contribution of Ω(N/(log log N)^c) terms multiplied by at least Ω(log N/log log N).","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":92},[93,97,101,105,110,114,119,122,127,130,134],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":22,"doc_module":4,"doc_module_name":46,"category_name":111,"show_sort_weight":112,"slug":113},"Technology",50,"technology",{"id":115,"doc_module":4,"doc_module_name":46,"category_name":116,"show_sort_weight":117,"slug":118},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":120,"slug":121},30,"research-report",{"id":123,"doc_module":4,"doc_module_name":46,"category_name":124,"show_sort_weight":125,"slug":126},9,"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":46,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":131,"doc_module":4,"doc_module_name":46,"category_name":132,"show_sort_weight":131,"slug":133},10,"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":46,"category_name":136,"show_sort_weight":106,"slug":137},19,"General","general"]