# Randomization

The history of mankind using the notion of *random* is widely reflected in gambling or insurance and in the fields of computer science as well through a number of analytic examples.

In the algorithm design, [randomization](/algorithm-notes/outline/overview-1.md#randomization) plays a pivot role in probabilistic algorithm designs in two ways of which we care about:

* Classic algoritm is feeded with randomly generated inputs, in other words, the *average* inputs are studied to offer [***average-case analysis***](/algorithm-notes/outline/asymptotic-analysis.md)
* [**Worst-case**](/algorithm-notes/outline/asymptotic-analysis.md) inputs are provided as always to the algorithm in the classical way, but processed in a random manner. The internal execution model dealing with randomization is a typical [**randomized algorithm**](/algorithm-notes/outline/overview-1/randomized-algorithms.md).

## Table of Contents

* [Discrete Probability](/algorithm-notes/outline/overview-1/discrete-probability.md) - probability analysis, indicator random variable and several statistics definitions covered.
* [Randomized Algorithms](/algorithm-notes/outline/overview-1/randomized-algorithms.md) - median-finding problem, ith order statistic finding problem are analyzed and solved randomly and deterministic.
* [Reservoir Sampling](/algorithm-notes/outline/overview-1/reservoir-sampling.md) - an introduction to a common technique in data processing.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cs-notes.gitbook.io/algorithm-notes/outline/overview-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
