Submit Search
Upload
プログラミングで数を楽しむ:)
•
Download as PPTX, PDF
•
0 likes
•
898 views
S
Shoko Kondo
Follow
@shoko3168 MathPower 2016 発表内容 http://mathpower.sugakubunka.com/
Read less
Read more
Science
Slideshow view
Report
Share
Slideshow view
Report
Share
1 of 30
Download now
Recommended
Goji とレイヤ化アーキテクチャ
Goji とレイヤ化アーキテクチャ
Shiroyagi Corporation
Facebook bot(20160518)
Facebook bot(20160518)
Shoko Kondo
Digital in 2017 Global Overview
Digital in 2017 Global Overview
We Are Social Singapore
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Recommended
Goji とレイヤ化アーキテクチャ
Goji とレイヤ化アーキテクチャ
Shiroyagi Corporation
Facebook bot(20160518)
Facebook bot(20160518)
Shoko Kondo
Digital in 2017 Global Overview
Digital in 2017 Global Overview
We Are Social Singapore
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
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 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
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
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 Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
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...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
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 Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
More Related Content
Featured
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
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 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
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
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 Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
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...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
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 Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
Featured
(20)
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
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 2024
Social 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 2024
5 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
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 Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The 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...
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 Work
ChatGPT 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 Routes
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
プログラミングで数を楽しむ:)
1.
プログラミングで 数を楽しむ 2016.10.05 近藤 祥子 ~数学者のためのプログラム勉強会~
2.
ABOUT ME ▸ Hackers
Bar(ハッカー・週1) ▸ XTREME DESIGN(技術秘書) ▸ ダイヤモンドメディア(エンジニア) ▸ 元・証券会社(エンジニア) ▸ 元・ソシャゲ会社(エンジニア) ▸ @shoko3168 ▸ fb.com/shoko3168 六本木の バー 依頼主 プロジェクター
3.
まず遊んでみましょう
4.
例題1. より起きやすい事象はどっち?
5.
百万回のコイン投げ Q. コイン(※)を1000000回投げたとき, 表が出る回数 がちょうど500000回である確率と,
495000回 以下である確率とではどちらが大きいか, また, 大きいほ うは小さいほうの何倍ほどか. ※表が出る確率も裏が出る確率も1/2のコイン 岩沢宏和. "確率パズルの迷宮". 日本評論社, 2014, p.14
6.
ルールの確認 ▸コインを1回投げます ▸表だったら1カウント ▸100万回投げた後、カウントはいくつ? 正解発表します ▸ A. 「500000回表が出る」の方が発生しやすい ▸
B. 「表が495000回以下」の方が発生しやすい ▸ C. ちょうど同じ位
7.
正解は ▸A. ちょうど500000回表が出る 方が、はるかに起きやすい ▸ 更に、B.
495000回以下と比べると 天文学的に(1020倍ほど)大きい確率 > 495000 回以下500000回
8.
本当に?
9.
現状 495000回以下の 「出ない感」がピンと来ない 疑うわけではないけど・・・ 495000 回以下 天文学的確率
10.
実際にやってみよう × 1000000回 ×
10000回ぐらい 495000 回以下
11.
コンピュータにやらせてみよう
12.
簡単なプログラムを書きます
13.
プログラミング ソースコード 1000000回 コインを投げるよ コイン投げを 10000回試行するよ 495000 回以下 コイン投げた
14.
結果 1 495000 回以下 もうちょっと遊びます Excelにこの実行結果をはりつけて
15.
結果 2 495000 回以下 A.500000回ジャストは 10000回中4回出た
16.
他の遊び方
17.
例題2. フェルマーの最終定理
18.
3 以上の自然数 n
について、 xⁿ + yⁿ = zⁿ となる 1以上の自然数x、y、z の組が存在し ない 32+42=52 9 +16=25 1442+1652=2192 あるけど アリエナイ 1303+1353≠1673 1203+1553≠1763
19.
「あり得ない感」がピンと来ない 同じパターンで恐縮ですが・・・
20.
xⁿ + yⁿ
= zⁿ はなくても、 xⁿ + yⁿ = zⁿ±1~3 程度の誤差なら 大量にあったりするの? と初めて出会った時思い
21.
今度は1行で探してみる
22.
1~20くらいで探してみる
23.
[(x, y, z,
d)|d<-[-7..7],z<-[1..20], y<-[1..z-1], x<-[1..y], z^3+d==y^3+x^3] プログラミング ソースコード 許容誤差 zが取りうる範囲 https://tryhaskell.org/ Xが取りうる範囲Yが取りうる範囲知りたい条件 (フィルター)
24.
TRY HASKELL
25.
Λ [(x, y,
z, d)|d<-[-7..7],z<- [1..20], y<-[1..z-1], x<-[1..y], z^3+d==y^3+x^3] [(1,1,2,-6),(5,6,7,-2),(6,8,9,- 1),(9,10,12,1),(4,4,5,3)] 20まで探索しただけでも 意外とある!
26.
例題3. 初見の問題
27.
Twitterで流れてくる面白問題の答え合わせをしたり ※完全数:[6,28,496,8128...]
28.
つたえたかったこと ▸ 1つ1つの思いつきを全部シミュレーションしてい たら10万年あっても足りない! ▸ コンピュータがなかったら、コイン投げ続けるだけ の人生だった
29.
あまった時間で 作ったもの紹介
30.
Place your screenshot
here 素数百人一首 Place your screenshot here 素数判定&タイマー 挑戦者 求む 2時間で作ったシリーズ http://primedaifugo.xyz/carta 他の人の 判定表示 @shoko3168
Editor's Notes
100回ならコインを実際に投げたことはある
一般的な乱数生成機(メルセンヌツイスタ)でコイン投げを 数行で書けるから遊びで済む パラメータを微調整できる
この後、さっきのコードを元に別の遊び方をしてもOK ※10000回試したら4回出た
← 47961 → (135,138,172,-1), (-88) (+99)
一般的な乱数生成機(メルセンヌツイスタ)でコイン投げを 数行で書けるから遊びで済む パラメータを微調整できる
他の年数で試してみたり
Download now