首页 | 本学科首页   官方微博 | 高级检索  
     


The analysis of Range Quickselect and related problems
Authors:Conrado Martí  nezHelmut Prodinger
Affiliation:
  • a Departament de Llenguatges i Sistemes Informàtics, Unversitat Politècnica de Catalunya, E-08034 Barcelona, Spain
  • b Institut für Diskrete Mathematik und Geometrie, Technische Universität Wien, Wiedner Hauptstr. 8-10/104, 1040 Wien, Austria
  • c Department of Mathematics, University of Stellenbosch, 7602 Stellenbosch, South Africa
  • Abstract:Range Quickselect, a simple modification of the well-known Quickselect algorithm for selection, can be used to efficiently find an element with rank k in a given range [i..j], out of n given elements. We study basic cost measures of Range Quickselect by computing exact and asymptotic results for the expected number of passes, comparisons and data moves during the execution of this algorithm.The key element appearing in the analysis of Range Quickselect is a trivariate recurrence that we solve in full generality. The general solution of the recurrence proves to be very useful, as it allows us to tackle several related problems, besides the analysis that originally motivated us.In particular, we have been able to carry out a precise analysis of the expected number of moves of the pth element when selecting the jth smallest element with standard Quickselect, where we are able to give both exact and asymptotic results.Moreover, we can apply our general results to obtain exact and asymptotic results for several parameters in binary search trees, namely the expected number of common ancestors of the nodes with rank i and j, the expected size of the subtree rooted at the least common ancestor of the nodes with rank i and j, and the expected distance between the nodes of ranks i and j.
    Keywords:Quickselect   Hoare&rsquo  s Find   Moves   Range Quickselect   Binary search trees   Average-case analysis
    本文献已被 ScienceDirect 等数据库收录!
    设为首页 | 免责声明 | 关于勤云 | 加入收藏

    Copyright©北京勤云科技发展有限公司  京ICP备09084417号