Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Floyd-Rivest algorithm

Searching Algorithm

The Floyd-Rivest algorithm is a selection algorithm developed by Robert W. Floyd and Ronald L. Rivest that has an optimal expected number of comparisons within lower-order terms. It is functionally equivalent to quickselect but runs faster in practice on average, with an expected running time of linear order. It is a divide-and-conquer method: it draws a small random sample from the list, recursively selects two pivot elements from that sample so that the wanted element is expected to lie between them, partitions the rest of the list around the two pivots, and then recurses into the one part that must contain the kth smallest element. With a sample size of order n to the two thirds power times a log factor it reaches n plus min(k, n minus k) expected comparisons plus a lower-order term, and refining the pivots as it goes tightens that further. It was first presented in a 1973 Stanford University technical report, where it was called SELECT and paired with PICK, the median of medians method, and was then published in Communications of the ACM.

Facts
Time Complexity
Time Complexity (category)
Linear Time -- O(n) 1
Deterministic or Randomised
Randomised 1
Connections

Credited To

Source Floyd-Rivest algorithm (Wikipedia)
Ron Rivest, Pioneers
Source Floyd-Rivest algorithm (Wikipedia)

Invented

Source Floyd-Rivest algorithm (Wikipedia)
Ron Rivest, Pioneers
Source Floyd-Rivest algorithm (Wikipedia)

Uses Design Technique

Source Floyd-Rivest algorithm (Wikipedia)
Source Floyd-Rivest algorithm (Wikipedia)
Sources
1. Floyd-Rivest algorithm (Wikipedia)
  • Lead, expected time
    It has an expected running time of O(n)
  • Algorithm, sampling step
    Select a small random sample S from the list L.
  • In Group: Selection Algorithms, Lead
    the Floyd-Rivest algorithm is a selection algorithm developed by Robert W. Floyd and Ronald L. Rivest
  • Uses Design Technique: Divide and Conquer, Algorithm
    The Floyd-Rivest algorithm is a divide-and-conquer algorithm, sharing many similarities with quickselect.
  • Uses Design Technique: Randomized Algorithms, Algorithm, steps
    Select a small random sample S from the list L.
  • Invented: Ron Rivest, Lead
    developed by Robert W. Floyd and Ronald L. Rivest
  • Invented: Robert W. Floyd, Lead, co-author
    developed by Robert W. Floyd and Ronald L. Rivest
  • Credited To: Ron Rivest, Lead, authors
    developed by Robert W. Floyd and Ronald L. Rivest
  • Credited To: Robert W. Floyd, Lead, authors and credit
    developed by Robert W. Floyd and Ronald L. Rivest
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.