A random permutation is a random ordering of a set of objects, that is, a permutation-valued random variable. The use of random permutations is often fundamental to fields that use randomized algorithms such as coding theory, cryptography, and simulation. A good example of a random permutation is the shuffling of a deck of cards: this is ideally a random permutation of the 52 cards. One method of generating a random permutation of a set of size n uniformly at random (i.e., each of the n! permutations is equally likely to appear) is to generate a sequence by taking a random number between 1 and n sequentially, ensuring that there is no repetition, and interpreting this sequence (x1, ..., xn) as the permutation shown here in two-line notation. This brute-force method will require occasional retries whenever the random number picked is a repeat of a number already selected. This can be avoided if, on the ith step (when x1, ..., xi − 1 have already been chosen), one chooses a number j at random between 1 and n − i + 1 and sets xi equal to the jth largest of the unchosen numbers. A simple algorithm to generate a permutation of n items uniformly at random without retries, known as the Fisher–Yates shuffle, is to start with any permutation (for example, the identity permutation), and then go through the positions 0 through n − 2 (we use a convention where the first element has index 0, and the last element has index n − 1), and for each position i swap the element currently there with a randomly chosen element from positions i through n − 1 (the end), inclusive. It's easy to verify that any permutation of n elements will be produced by this algorithm with probability exactly 1/n!, thus yielding a uniform distribution over all such permutations.

About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.
Related lectures (2)
GLM II
Explores GLM II, covering hypothesis testing, F-tests, multiple comparisons, and enriching the model to account for imaging artifacts.
Stream Ciphers: Buteforce Inversion Algorithms
Explores stream ciphers, buteforce inversion algorithms, key recovery games, and attacks in cryptography.
Related publications (9)

Permutation-based Decoding of Reed-Muller Codes in Binary Erasure Channel

Rüdiger Urbanke, Kirill Ivanov

In this paper, we consider the problem of decoding Reed-Muller (RM) codes in binary erasure channel. We propose a novel algorithm, which exploits several techniques, such as list recursive (successive cancellation) decoding based on Plotkin decomposition, ...
IEEE2019

Geomedicine: opportunities of using spatial information to move toward more precision in public health - spatial approaches and clusters: an introduction for clinicians

Stéphane Joost, Idris Guessous

In this presentation we introduce basic knowledge about the use of located health data to detect clusters of disease prevalence. Most often, geographic maps are produced to represent health data. Medical information is transmitted through thematic chorop ...
2017

Limits on Sparse Support Recovery via Linear Sketching with Random Expander Matrices

Volkan Cevher, Jonathan Mark Scarlett

Linear sketching is a powerful tool for the problem of sparse signal recovery, having numerous applications such as compressive sensing, data stream computing, graph sketching, and routing. Motivated by applications where the \emph{positions} of the non-ze ...
2016
Show more
Related people (1)
Related concepts (1)
Permutation
In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or process of changing the linear order of an ordered set. Permutations differ from combinations, which are selections of some members of a set regardless of order. For example, written as tuples, there are six permutations of the set {1, 2, 3}, namely (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), and (3, 2, 1).

Graph Chatbot

Chat with Graph Search

Ask any question about EPFL courses, lectures, exercises, research, news, etc. or try the example questions below.

DISCLAIMER: The Graph Chatbot is not programmed to provide explicit or categorical answers to your questions. Rather, it transforms your questions into API requests that are distributed across the various IT services officially administered by EPFL. Its purpose is solely to collect and recommend relevant references to content that you can explore to help you answer your questions.