SlideShare a Scribd company logo
1 of 78
クイズ大会において
無作為性が検証可能な
ランダム組分けの手法
~ さらば 疑心暗鬼 ~
2018年9月9日
くさち
もくじ
• 大会の組分けの例
• 従来の組分け手法
• RAND関数
• 数式
• 新手法
• 新手法を用いた大会の流れ
• 新手法を用いる場合の注意
• Q&A
1
もくじ
• 大会の組分けの例
• 従来の組分け手法
• RAND関数
• 数式
• 新手法
• 新手法を用いた大会の流れ
• 新手法を用いる場合の注意
• Q&A
2
大会の組分けの例
参加者 9人を3組に分ける
主催者 は、参加者をランダムに分ける
3
主催者
大会の組分けの例
参加者 9人を3組に分ける
主催者 は、参加者をランダムに分ける
4
主催者
分けた
α組 β組 γ組
生じる疑念
5
参加者
γ組のAさん
生じる疑念
6
参加者
γ組のAさん
この組分けは
どうやって決めたの?
本当にランダム?
イカサマしてない
証拠はある?
• 大会の組分けの例
• 従来の組分け手法
• RAND関数
• 数式
• 新手法
• 新手法を用いた大会の流れ
• 新手法を用いる場合の注意
• Q&A
もくじ
7
• 大会の組分けの例
• 従来の組分け手法
• RAND関数
• 数式
• 新手法
• 新手法を用いた大会の流れ
• 新手法を用いる場合の注意
• Q&A
もくじ
8
組分け方A
ExcelのRAND関数で参加者に乱数を割り振る
9
# 名前 乱数
1 A ○ 0.028
2 B 0.862
3 C 0.224
4 D 0.253
5 E 0.912
6 F 0.542
7 G 0.779
8 H 0.341
9 I 0.704
主催者
組分け方A
ExcelのRAND関数で参加者に乱数を割り振る
10
# 名前 乱数
1 A ○ 0.028
2 B 0.862
3 C 0.224
4 D 0.253
5 E 0.912
6 F 0.542
7 G 0.779
8 H 0.341
9 I 0.704
# 名前 乱数
5 E 0.912
2 B 0.862
7 G 0.779
9 I 0.704
6 F 0.542
8 H 0.341
4 D 0.253
3 C 0.224
1 A ○ 0.028
並べ
替え
主催者
組分け方A
ExcelのRAND関数で参加者に乱数を割り振る
11
# 名前 乱数
1 A ○ 0.028
2 B 0.862
3 C 0.224
4 D 0.253
5 E 0.912
6 F 0.542
7 G 0.779
8 H 0.341
9 I 0.704
# 名前 乱数
5 E 0.912
2 B 0.862
7 G 0.779
9 I 0.704
6 F 0.542
8 H 0.341
4 D 0.253
3 C 0.224
1 A ○ 0.028
α組 β組 γ組
E B G
I F H
D C A ○
並べ
替え
組分け
主催者
組分け方A 主催者の説明
12
主催者
ExcelのRAND関数で乱数生成しました ○
組分け方A 主催者の説明
13
主催者
ExcelのRAND関数で乱数生成しました ○
本当にこれで組分けを決定したのか証拠がない
疑問
組分け方A こんなことも考えられる
主催者が繰り返し乱数生成することで
組分けを恣意的に変えられる
14
# 名前 乱数
1 A ○ 0.737
2 B ○ 0.773
3 C 0.142
4 D ○ 0.024
5 E 0.077
6 F 0.744
7 G 0.338
8 H 0.258
9 I 0.056
# 名前 乱数
2 B ○ 0.773
1 A ○ 0.737
6 F 0.744
7 G 0.338
8 H 0.258
3 C 0.142
5 E 0.077
9 I 0.056
4 D ○ 0.024
α組 β組 γ組
B ○ A ○ F
G H C
E I D ○
主催者
希望の
組分けに
なるまで
何回も
乱数生成
しよう
組分け方A こんなことも考えられる
主催者が繰り返し乱数生成することで
組分けを恣意的に変えられる
15
# 名前 乱数
1 A ○ 0.964
2 B ○ 0.772
3 C 0.302
4 D ○ 0.362
5 E 0.269
6 F 0.528
7 G 0.303
8 H 0.580
9 I 0.472
# 名前 乱数
1 A ○ 0.964
2 B ○ 0.772
8 H 0.580
6 F 0.528
9 I 0.472
4 D ○ 0.362
7 G 0.303
3 C 0.302
5 E 0.269
α組 β組 γ組
A ○ B ○ H
F I D ○
G C E
主催者
希望の
組分けに
なるまで
何回も
乱数生成
しよう
組分け方A こんなことも考えられる
主催者が繰り返し乱数生成することで
組分けを恣意的に変えられる
16
# 名前 乱数
1 A ○ 0.028
2 B ○ 0.862
3 C 0.224
4 D ○ 0.253
5 E 0.912
6 F 0.542
7 G 0.779
8 H 0.341
9 I 0.704
# 名前 乱数
2 B ○ 0.919
5 E 0.834
9 I 0.819
1 A ○ 0.663
7 G 0.572
6 F 0.312
4 D ○ 0.201
8 H 0.154
3 C 0.015
α組 β組 γ組
B ○ E I
A ○ G F
D ○ H C
主催者
希望の
組分けに
なるまで
何回も
乱数生成
しよう
• 大会の組分けの例
• 従来の組分け手法
• RAND関数
• 数式
• 新手法
• 新手法を用いた大会の流れ
• 新手法を用いる場合の注意
• Q&A
もくじ
17
組分け方B
参加者が数を提出し
主催者が決めた数式に代入して数を生成する
18
エントリーフォーム
名前
数a
数b
A
20
30
参加者 Aさん
組分け方B
19
主催者
参加者が数を提出し
主催者が決めた数式に代入して数を生成する
数式は
a ÷ b
組分け方B
20
# 名前 a b
1 A ○ 20 30
2 B ○ 2000 5
3 C 4 4
4 D ○ 9 8
5 E 1000 1
6 F 50 5
7 G 100 4
8 H 12 3
9 I 100 7
α組 β組 γ組
E B ○ G
I F H
D ○ C A ○
主催者
# 名前 a÷b
5 E 1000
2 B ○ 400
7 G 25
9 I 14.28
6 F 10
8 H 4
4 D ○ 1.25
3 C 1
1 A ○ 0.666
参加者が数を提出し
主催者が決めた数式に代入して数を生成する
数式は
a ÷ b
組分け方B 主催者の説明
21
主催者
参加者が提出した数字a, bを
事前に決めた数式に代入しました
数式は組分け後に公開しました
組分け方B 主催者の説明
22
主催者
参加者が提出した数字a, bを
事前に決めた数式に代入しました
数式は組分け後に公開しました
「事前から数式を決めていた」という証拠がない
疑問
組分け方B こんなことも考えられる
23
# 名前 a b
1 A ○ 20 30
2 B ○ 2000 5
3 C 4 4
4 D ○ 9 8
5 E 1000 1
6 F 50 5
7 G 100 4
8 H 12 3
9 I 100 7
α組 β組 γ組
B ○ E I
A ○ G F
D ○ H C
主催者
# 名前 a×b
2 B ○ 10000
5 E 1000
9 I 700
1 A ○ 600
7 G 400
6 F 250
4 D ○ 72
8 H 36
3 C 16
主催者が数式を変更することで
組分けを恣意的に変えられる
a ÷ b
だったけど
a × b
にしよう
組分け方B こんなことも考えられる
24
数を調整することで
参加者も組分けを操作できる
同じ組に入りたくないから
同じ数を提出しよう
いいよ
参加者 Aさん
Bさん
組分け方B こんなことも考えられる
25
数式が漏れるとヤバい
数式は a ÷ b だよ~
マジ?
主催者
Dさん
まとめると
従来の2手法では
主催者・参加者の意図が
組分けに影響する可能性がある
26
もくじ
• 大会の組分けの例
• 従来の組分け手法
• RAND関数
• 数式
• 新手法
• 新手法を用いた大会の流れ
• 新手法を用いる場合の注意
• Q&A
27
新手法
28
新手法
ハッシュ関数と未来値
による組分け法
29
新手法
ハッシュ関数と未来値
による組分け法
30
ハッシュ関数とは
あるデータを入力すると
決まった形のデータを出力する関数
31
ハッシュ関数とは
あるデータを入力すると
決まった形のデータを出力する関数
たとえば SHA-256というハッシュ関数に
“1” ”2” ”3”を入力すると
32
ハッシュ関数とは
SHA-256(“1”) =
6B86B273FF34FCE19D6B804EFF5A3F5747ADA4EAA22F1D49C01E52DDB7875B4B
SHA-256(“2”) =
D4735E3A265E16EEE03F59718B9B5D03019C07D8B6C51F90DA3A666EEC13AB35
SHA-256(“3”) =
4E07408562BEDB8B60CE05C1DECFE3AD16B72230967DE01F640B7E4729B49FCE
33
要するに
何かを入れると、何かが出てくる
違うものを入れると、全く違うものが出てくる
出力はランダムだが、同じものなら出力は変わらない
34
未来値とは
未来に決まる値のこと
(例:1週間後の日経平均株価の終値)
35
新手法の概要
乱数の代わりに
「未来値とエントリーNo.を組み合わせた文字列」を
ハッシュ関数に入力して得られる数で
組分けを行う
36
よく分からん という方へ
37
よく分からん という方へ
次のスライドから始まる
ハッシュ関数と未来値による組分け法
を採用した大会の流れを追ってみましょう
38
もくじ
• 大会の組分けの例
• 従来の組分け手法
• RAND関数
• 数式
• 新手法
• 新手法を用いた大会の流れ
• 新手法を用いる場合の注意
• Q&A
39
新手法を用いた大会の流れ
40
主催者
新手法を用いた大会の流れ
41
エントリー開始します!
主催者
新手法を用いた大会の流れ
42
エントリー開始します!
組分けについては
今年9月3日の日経平均株価終値と
エントリーNo.を組み合わせた文字列を
SHA-256に入力したときの出力を
昇順に並び替え
上位からα、β、γ、α…という順に分けます
主催者
新手法を用いた大会の流れ
43
たとえば
終値が20000円00銭の場合
エントリーNo.が1の人は
20000.001
という文字列を
ハッシュ関数に入力します
主催者
新手法を用いた大会の流れ
参加者 9人を3組に分ける
主催者 は、参加者をランダムに分ける
44
主催者
新手法を用いた大会の流れ
参加者 9人を3組に分ける
主催者 は、参加者をランダムに分ける
45
α組 β組 γ組
主催者
分けた
G
F
D
I
H
C
E
B
A
生じる疑念
46
参加者
γ組のAさん
生じる疑念
47
参加者
γ組のAさん
本当にランダム?
検証してみよう
組分けの検証
48
2018年9月3日の日経平均株価終値:22707円38銭
組分けの検証
49
# 名前 入力文字列
1 A 22707.381
2 B 22707.382
3 C 22707.383
4 D 22707.384
5 E 22707.385
6 F 22707.386
7 G 22707.387
8 H 22707.388
9 I 22707.389
2018年9月3日の日経平均株価終値:22707円38銭
組分けの検証
50
# 名前 入力文字列
1 A 22707.381
2 B 22707.382
3 C 22707.383
4 D 22707.384
5 E 22707.385
6 F 22707.386
7 G 22707.387
8 H 22707.388
9 I 22707.389
2018年9月3日の日経平均株価終値:22707円38銭
SHA-256
90D664…
E0421F…
D9A5EC…
D88604…
481CFE…
583624…
1580DD…
753FEF…
43E957…
SHA-256
90D664…
E0421F…
D9A5EC…
D88604…
481CFE…
583624…
1580DD…
753FEF…
43E957…
組分けの検証
51
# 名前 入力文字列
1 A 22707.381
2 B 22707.382
3 C 22707.383
4 D 22707.384
5 E 22707.385
6 F 22707.386
7 G 22707.387
8 H 22707.388
9 I 22707.389
2018年9月3日の日経平均株価終値:22707円38銭
昇順に
並べ替え中
組分けの検証
52
# 名前 入力文字列
7 G 22707.387
9 I 22707.389
5 E 22707.385
6 F 22707.386
8 H 22707.388
1 A 22707.381
4 D 22707.384
3 C 22707.383
2 B 22707.382
2018年9月3日の日経平均株価終値:22707円38銭
SHA-256
1580DD…
43E957…
481CFE…
583624…
753FEF…
90D664…
D88604…
D9A5EC…
E0421F…
SHA-256
1580DD…
43E957…
481CFE…
583624…
753FEF…
90D664…
D88604…
D9A5EC…
E0421F…
組分けの検証
53
# 名前 入力文字列
7 G 22707.387
9 I 22707.389
5 E 22707.385
6 F 22707.386
8 H 22707.388
1 A 22707.381
4 D 22707.384
3 C 22707.383
2 B 22707.382
2018年9月3日の日経平均株価終値:22707円38銭
組分け中
組分けの検証
54
α組 β組 γ組
G I E
F H A ○
D C B
組分けの検証
55
α組 β組 γ組
G
F
D
I
H
C
E
B
A
組分けの検証
56
各ハッシュ値は
2018年9月3日まで
誰も知らなかった
組分けの検証
57
各ハッシュ値は
2018年9月3日まで
誰も知らなかった
だから この組分けは
主催者の意図も
参加者の意図も
全く含んでいない
組分けの検証
58
つまり……
組分けの検証
59
つまり……
この組分けは
完全にランダムだ!
もくじ
• 大会の組分けの例
• 従来の組分け手法
• RAND関数
• 数式
• 新手法
• 新手法を用いた大会の流れ
• 新手法を用いる場合の注意
• Q&A
60
新手法を用いる場合の注意
この手法を用いる場合は
「ハッシュ値をどのように使用するか」を
事前に明確にする必要があります
(例:使用する関数、昇順に並べる、蛇腹に分ける)
61
新手法を用いる場合の注意
62
主催者
組分けしました
あっ蛇腹ね
新手法を用いる場合の注意
63
主催者
Aさん
エントリーが埋まってから
組分け方式を操作して
分け方を恣意的に
選んだのでは?
組分けしました
あっ蛇腹ね
新手法を用いる場合の注意
64
主催者
Aさん
エントリーが埋まってから
組分け方式を操作して
分け方を恣意的に
選んだのでは?
組分けしました
あっ蛇腹ね
事前に公表していない場合は
企画者の意図がないことを
証明できません
• 大会の組分けの例
• 従来の組分け手法
• RAND関数
• 数式
• 新手法
• 新手法を用いた大会の流れ
• 新手法を用いる場合の注意
• Q&A
もくじ
65
Q&A
「ここまで大ゲサなこと、する必要ある?」
66
A.
Q&A
「ここまで大ゲサなこと、する必要ある?」
67
普通はない
ですが、厳密にランダムだということを示すには
これくらいのことが必要だということです
A.
Q&A
「ハッシュ値が重複したらどうするの?」
68
A.
Q&A
「ハッシュ値が重複したらどうするの?」
69
重複しないようなハッシュ関数を選びましょう
たとえば、例で使用したSHA-256は
2018年9月現在 重複したという報告はありません
A.
Q&A
「SHA-256でも、重複したらどうするの?」
70
A.
Q&A
「SHA-256でも、重複したらどうするの?」
71
インターネット上か、Google本社で、こう叫んでくださいA.
Q&A
「SHA-256でも、重複したらどうするの?」
72
インターネット上か、Google本社で、こう叫んでください
専門家の人が飛んできます
(大会運営的には、エントリーNo.順で決めると良いと思います)
A.
「SHA-256の衝突を確認した!!」
Q&A
「(任意の人物)を疑っているのか?」
73
A.
Q&A
「(任意の人物)を疑っているのか?」
74
疑ってません
「主催者や参加者を疑え」という主張ではなく
「無作為性を証明するにはこうすればよい」という
学術的な考察です
A.
Q&A
「Q&Aに載ってない質問があるのですが……」
75
A.
Q&A
「Q&Aに載ってない質問があるのですが……」
76
絶賛受付中です
このスライドには間違いもあるはずなので
その指摘もおねがいします
A.
77
お わ り

More Related Content

Featured

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 

Featured (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

クイズ大会において無作為性が検証可能なランダム組分けの手法について