# Using Non-Linear Difference Equations to Study Quicksort Algorithms

**Authors:** Yukun Yao

arXiv: 1905.00118 · 2020-02-27

## TL;DR

This paper employs non-linear difference equations and symbolic computation to analyze the running times of various Quicksort algorithm variants, providing explicit formulas and experimental results.

## Contribution

It introduces a novel approach using non-linear difference equations for detailed analysis of Quicksort variants, including explicit expectation and variance calculations.

## Key findings

- Explicit expressions for expectations and variances of comparisons and swaps.
- Monte Carlo experiments validate theoretical results.
- Discussion of limiting distributions for some variants.

## Abstract

Using non-linear difference equations, combined with symbolic computations, we make a detailed study of the running times of numerous variants of the celebrated Quicksort algorithms, where we consider the variants of single-pivot and multi-pivot Quicksort algorithms as discrete probability problems. With non-linear difference equations, recurrence relations and experimental mathematics techniques, explicit expressions for expectations, variances and even higher moments of their numbers of comparisons and swaps can be obtained. For some variants, Monte Carlo experiments are performed, the numerical results are demonstrated and the scaled limiting distribution is also discussed.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1905.00118/full.md

## Figures

1 figure with captions in the complete paper: https://tomesphere.com/paper/1905.00118/full.md

---
Source: https://tomesphere.com/paper/1905.00118