In probability theory, the Chinese restaurant process is a discrete-time stochastic process, analogous to seating customers at tables in a restaurant. Imagine a restaurant with an infinite number of circular tables, each with infinite capacity. Customer 1 sits at the first table. The next customer either sits at the same table as customer 1, or the next table. This continues, with each customer choosing to either sit at an occupied table with a probability proportional to the number of customers already there (i.e., they are more likely to sit at a table with many customers than few), or an unoccupied table. At time n, the n customers have been partitioned among m ≤ n tables (or blocks of the partition). The results of this process are exchangeable, meaning the order in which the customers sit does not affect the probability of the final distribution. This property greatly simplifies a number of problems in population genetics, linguistic analysis, and . The restaurant analogy first appeared in a 1985 write-up by David Aldous, where it was attributed to Jim Pitman (who additionally credits Lester Dubins). For any positive integer , let denote the set of all partitions of the set . The Chinese restaurant process takes values in the infinite Cartesian product . The value of the process at time is a partition of the set , whose probability distribution is determined as follows. At time , the trivial partition is obtained (with probability one). At time the element "" is either: added to one of the blocks of the partition , where each block is chosen with probability where is the size of the block (i.e. number of elements), or added to the partition as a new singleton block, with probability . The random partition so generated has some special properties. It is exchangeable in the sense that relabeling does not change the distribution of the partition, and it is consistent in the sense that the law of the partition of obtained by removing the element from the random partition is the same as the law of the random partition .