[TOC]
1. 概要
重み付き並び替え(Weighted Random Sampling)のアルゴリズムを2つ紹介して,それらが同値であることを証明する
2. 参考文献
基本,下記論文の要点を抜粋したものになります
タイトル(Title)
Weighted random sampling with a reservoir
著者(Author) Pavlos S. Efraimidis, Paul G. Spirakis
引用(Reference)
Pavlos S. Efraimidis, Paul G. Spirakis, Weighted random sampling with a reservoir, Information Processing Letters, Volume 97, Issue 5, 16 March 2006, Pages 181-185, ISSN 0020-0190, 10.1016/j.ipl.2005.11.003.
3. 証明
3.1. 定義(Weighted Random Sampling)
Def(WRS)
重み付き並び替え(Weighted Random Sampling 略してWRS)は以下のアルゴリズム(Algorithm D)によって定義される個の重みつきアイテムから重みが大きいものを優先して,個()を順序をつけて取り出す手法である.
Algorithm D
Input: A population of weighted items
Output: A set with a WRS of size
1:Repeat Step 2 and 3 for
2: The probability of to be selected is: 3: Randomly select an item amd insert it into
補足:とする
3.2. 定義(Algorithm A High level description)
Def(Algorithm A High level description)
Algorithm Aを定義してこれがWRSと等価であることを後に示していく.
Algorithm A
Input: A population of weighted items
Output: A WRS of size
1: For each , and
2:Select the items with the largest keys as a WRS
補足:
はが互いに独立に閉区間[0,1]上の一様分布に従うという意味である.
2.はが大きい順に個選ぶという意味
とする
3.3. 定義(記号)
:個のitemの任意の並び替え
:Algorithm がを出力する確率
:Algorithm がを出力する確率
3.4. Remark 2.
Algorithm Dにおいてが初めに選ばれる確率は. が初めに選ばれたもとでが2番目に選ばれる確率はであるので,
3.5. Proposition 3 (Algorithm AとDの同値性)
Let be independent random variables with uniform distribution in .
For each positive real (), let be the random variables . Then for any :
補足:
もし(*1)が成立するならとすることで,
となる.
(Proof)
に関する帰納法で示す.
任意のとに対してよりであることに注意してを以下のように定義する. また,の確率密度関数をとするとは分布関数の微分であるので, となる.
[1]のとき より(*1)は成立.
[2] ()のとき(1)が成立していると仮定する. であるので,(1)はの時でも成立.
3.6. Lemma 3.1
Let and be independent random variables with uniform distributions in .
Let and be the random variables, and where and are positive reals. Then
これはWRSが備えるべき性質が実際に成立することを示している.
(Proof)
のとき, である.また,である.は独立にの一様分布に従うので, であることに注意すると