File:PlotDelta.gif

From formulasearchengine
Jump to navigation Jump to search
Original file (800 × 400 pixels, file size: 39 KB, MIME type: image/gif, 0.1 s)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Template:Infobox Algorithm

In computer science, introselect (short for "introspective selection") is a selection algorithm that is a hybrid of quickselect and median of medians which has fast average performance and optimal worst-case performance. Introselect is related to the introsort sorting algorithm: these are analogous refinements of the basic quickselect and quicksort algorithms, in that they both start with the quick algorithm, which has good average performance and low overhead, but fall back to an optimal worst-case algorithm (with higher overhead) if the quick algorithm does not progress rapidly enough. Both algorithms were introduced by David Musser in Template:Harv, with the purpose of providing generic algorithms for the C++ Standard Library which had both fast average performance and optimal worst-case performance, thus allowing the performance requirements to be tightened.[1]

Algorithms

Introsort achieves practical performance comparable to quicksort while preserving O(n log n) worst-case behavior by creating a hybrid of quicksort and heapsort. Introsort starts with quicksort, so it achieves performance similar to quicksort if quicksort works, and falls back to heapsort (which has optimal worst-case performance) if quicksort does not progress quickly enough. Similarly, introselect combines quickselect with median of medians to achieve worst-case linear selection with performance similar to quickselect.

Introselect works by optimistically starting out with quickselect and only switching to the worst-time linear algorithm if it recurses too many times without making sufficient progress. The switching strategy is the main technical content of the algorithm. Simply limiting the recursion to constant depth is not good enough, since this would make the algorithm switch on all sufficiently large lists. Musser discusses a couple of simple approaches:

  • Keep track of the list of sizes of the subpartitions processed so far. If at any point k recursive calls have been made without halving the list size, for some small positive k, switch to the worst-case linear algorithm.
  • Sum the size of all partitions generated so far. If this exceeds the list size times some small positive constant k, switch to the worst-case linear algorithm. This sum is easy to track in a single scalar variable.

Both approaches limit the recursion depth to k ⌈log n⌉ = O(log n) and the total running time to O(n).

The paper suggested that more research on introselect was forthcoming, but the author retired in 2007 without having published any such further research.

References

43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro. Template:Refbegin

Template:Refend

Summary

Description
English: This plot illustrates normalized fluctuations of the prime-counting function on the logarithmic scale.

The red line represents Δ-function, while the blue curve represents similar function where is replaced by , so one can compare the fluctuations with the difference between and .

The image was built by Droog_Andrey using Wolfram Mathematica 7.0 as follows:

LogLinearPlot[{(PrimePi[x] - RiemannR[x] + 1/Log[x] - ArcTan[Pi/Log[x]]/Pi)*Log[x]/Sqrt[x], (LogIntegral[x] - RiemannR[x] + 1/Log[x] - ArcTan[Pi/Log[x]]/Pi)*Log[x]/Sqrt[x]}, {x, 1, Exp[14]}, PlotPoints -> 10000, PlotRange -> All, PlotStyle -> {Red, Blue}, AxesOrigin -> {1, 0}, AspectRatio -> 1/2, AxesStyle -> Thick, TicksStyle -> Directive[Thick, Bold, 16]]
Date 4 May 2007 (original upload date)
Source Transferred from en.wikipedia to Commons.
Author Droog Andrey at English Wikipedia

Licensing

Public domain This work has been released into the public domain by its author, Droog Andrey at English Wikipedia. This applies worldwide.
In some countries this may not be legally possible; if so:
Droog Andrey grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

Original upload log

The original description page was here. All following user names refer to en.wikipedia.
Date/Time Dimensions User Comment
2011-01-01 15:39 800×400× (39780 bytes) Droog Andrey
2011-01-01 15:30 1440×720× (91313 bytes) Droog Andrey
2008-08-29 17:03 800×480× (47370 bytes) Droog Andrey ==Summary== This plot illustrates normalized fluctuations of the [[prime-counting function]] <math>\pi(x)</math> on the logarithmic scale. The red curve represents [[Prime-counting function#Formulas_for_prime-counting_functions|delta function]], while th
2007-05-04 06:59 800×480× (18505 bytes) Droog Andrey This plot illustrates normalized fluctuations of the [[prime counting function]] <math>\pi(x)</math> on the logarithmic scale. The red curve represents [http://en.wikipedia.org/wiki/Prime_counting_function#Formulas_for_prime_counting_functions Delta func

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current04:13, 16 May 2016Thumbnail for version as of 04:13, 16 May 2016800 × 400 (39 KB)wikimediacommons>OgreBot(BOT): Reverting to most recent version before archival

There are no pages that use this file.