ไฟล์:Birthdaymatch.svg
ไม่รองรับเนื้อหาของหน้าในภาษาอื่น
หน้าตา
จากวิกิพีเดีย สารานุกรมเสรี
ขนาดของตัวอย่าง PNG นี้ของไฟล์ SVG นี้: 720 × 540 พิกเซล ความละเอียดอื่น: 320 × 240 พิกเซล | 640 × 480 พิกเซล | 1,024 × 768 พิกเซล | 1,280 × 960 พิกเซล | 2,560 × 1,920 พิกเซล
ดูภาพที่มีความละเอียดสูงกว่า ((ไฟล์ SVG, 720 × 540 พิกเซล, ขนาดไฟล์: 291 กิโลไบต์))
รูปภาพหรือไฟล์เสียงนี้ ต้นฉบับอยู่ที่ คอมมอนส์ รายละเอียดด้านล่าง เป็นข้อความที่แสดงผลจาก ไฟล์ต้นฉบับในคอมมอนส์
|
ความย่อ
คำอธิบายBirthdaymatch.svg |
English: In probability theory, the birthday problem or birthday paradox concerns the probability that, in a set of n randomly chosen people, some pair of them will have the same birthday. By the pigeonhole principle, the probability reaches 100% when the number of people reaches 367 (since there are 366 possible birthdays, including February 29). However, 99% probability is reached with just 57 people, and 50% probability with 23 people. These conclusions are based on the assumption that each day of the year (except February 29) is equally probable for a birthday.
The mathematics behind this problem led to a well-known cryptographic attack called the birthday attack, which uses this probabilistic model to reduce the complexity of cracking a hash function. |
วันที่ | |
แหล่งที่มา | งานของตัว |
ผู้สร้างสรรค์ | Guillaume Jacquenot |
SVG genesis InfoField | ไฟล์ภาพกราฟิกส์เวกเตอร์ W3C ตรวจสอบแล้วมีข้อผิดพลาดในไฟล์นี้ สร้างขึ้นโดยใช้ Matplotlib |
รหัสต้นฉบับ InfoField | Python code# -*- coding: utf-8 -*-
#
# Script to generate in English and French, graphs for the
# birthday problem.
# More precisely, it generates two SVG files representing the
# probability of no match of two identical birthday one the same
# wrt the number of person in the considered group.
#
# **************************************************************
# http://en.wikipedia.org/wiki/Birthday_problem
# From Wikipedia, the free encyclopedia:
# In probability theory, the birthday problem or birthday
# paradox concerns the probability that, in a set of n
# randomly chosen people, some pair of them will have the
# same birthday. By the pigeonhole principle, the probability
# reaches 100% when the number of people reaches 367
# (since there are 366 possible birthdays, including February
# 29). However, 99% probability is reached with just 57 people,
# and 50% probability with 23 people. These conclusions are
# based on the assumption that each day of the year (except
# February 29) is equally probable for a birthday.
#
# The mathematics behind this problem led to a well-known
# cryptographic attack called the birthday attack, which
# uses this probabilistic model to reduce the complexity
# of cracking a hash function.
#
# Text under the
# Creative Commons Attribution-ShareAlike License
# **************************************************************
#
# Implementation:
# To ensure numerical accuracy, one evaluates the log10 of the
# probabibity of no match. This allows to converts the
# probability formula from a product formula to a sum formula.
#
#
# Guillaume Jacquenot
# 2013/03/10
import matplotlib.pyplot as plt
from matplotlib import rc
rc('font',**{'family':'serif','serif':['Palatino'],'size':14})
rc('text', usetex=True)
import numpy as np
def BirthdaymatchComputationLog10():
'''
This function evaluates the log10 probability of no
match for the birthday paradox.
This ensures no approximation on the result.
$\log _{10} \left( {\bar p(n)} \right) =
\sum\limits_{i = 365 + 1 - n}^{365}
{\log _{10} \left( i \right)}
- n\log _{10} \left( {365} \right)$
'''
n=np.arange(1,365)
nR=np.arange(365,1,-1)
p=np.cumsum(np.log10(nR))-n*np.log10(365)
return n,p
def BirthdaymatchGenerateTitle(logTitle=False):
if logTitle:
title='$\\log _{10} \\left( {\\bar p(n)} \\right)\
= \\sum\\limits_{i = 365 + 1 - n}^{365}\
{\\log _{10} \\left( i \\right)}\
- n\\log _{10} \\left( {365} \\right)$'
else:
title='$\\bar p(n) = \\frac{365!}{365^n\
\\left( {365 - n} \\right)!}$'
return title
def Birthdaymatch(\
labels={'xlabel':'Number of people',\
'ylabel':'Probability of no match',\
'title':'Birthday paradox'},\
outputFilename = r'Birthdaymatch.svg'):
n,p = BirthdaymatchComputationLog10()
fig, ax = plt.subplots()
plt.plot(n,p,c='k', linestyle='-')
plt.grid(True, ls='-', c='#a0a0a0')
plt.xlabel(labels['xlabel'])
plt.ylabel(labels['ylabel'])
plt.title(labels['title']+' - '+BirthdaymatchGenerateTitle())
fig.canvas.draw()
labels = [item.get_text() for item in ax.get_yticklabels()]
labels = [label[1:] if label.startswith('$') else label for label in labels]
labels = [label[0:-1] if label.endswith('$') else label for label in labels]
labels = ['$10^{'+label+'}$' for label in labels]
ax.set_yticklabels(labels)
plt.savefig(outputFilename)
Birthdaymatch()
Birthdaymatch(\
labels={'xlabel':u"Nombre de personnes",\
'ylabel':u"Probabilit\\'e de non correspondance",\
'title':u"Paradoxe des anniversaires"},\
outputFilename = r'Birthdaymatch_FR.svg')
|
การอนุญาตใช้สิทธิ
ข้าพเจ้า ในฐานะผู้ถือลิขสิทธิ์ของภาพหรือสื่อนี้ อนุญาตให้ใช้ภาพหรือสื่อนี้ภายใต้เงื่อนไขต่อไปนี้
ไฟล์นี้อยู่ภายใต้สัญญาอนุญาต ครีเอทีฟคอมมอนส์ แบบแสดงที่มา-อนุญาตแบบเดียวกัน 3.0 ต้นฉบับ
- คุณสามารถ:
- ที่จะแบ่งปัน – ที่จะทำสำเนา แจกจ่าย และส่งงานดังกล่าวต่อไป
- ที่จะเรียบเรียงใหม่ – ที่จะดัดแปลงงานดังกล่าว
- ภายใต้เงื่อนไขต่อไปนี้:
- แสดงที่มา – คุณต้องให้เกียรติเจ้าของงานอย่างเหมาะสม โดยเพิ่มลิงก์ไปยังสัญญาอนุญาต และระบุหากมีการเปลี่ยนแปลง คุณอาจทำเช่นนี้ได้ในรูปแบบใดก็ได้ตามควร แต่ต้องไม่ใช่ในลักษณะที่แนะว่าผู้ให้อนุญาตสนับสนุนคุณหรือการใช้งานของคุณ
- อนุญาตแบบเดียวกัน – หากคุณดัดแปลง เปลี่ยนรูป หรือต่อเติมงานนี้ คุณต้องใช้สัญญาอนุญาตแบบเดียวกันหรือแบบที่เหมือนกับสัญญาอนุญาตที่ใช้กับงานนี้เท่านั้น
รายการที่แสดงอยู่ในไฟล์นี้
ประกอบด้วย
\u0e21\u0e35\u0e25\u0e34\u0e02\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e4c<\/a>"}},"text\/plain":{"th":{"P6216":"\u0e21\u0e35\u0e25\u0e34\u0e02\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e4c"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P6216 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
Creative Commons Attribution-ShareAlike 3.0 Unported<\/a>\u00a0\u0e2d\u0e31\u0e07\u0e01\u0e24\u0e29<\/sup>"}},"text\/plain":{"th":{"P275":"Creative Commons Attribution-ShareAlike 3.0 Unported"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P275 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
10 มีนาคม 2013
\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e14\u0e31\u0e49\u0e07\u0e40\u0e14\u0e34\u0e21\u0e42\u0e14\u0e22\u0e1c\u0e39\u0e49\u0e2d\u0e31\u0e1b\u0e42\u0e2b\u0e25\u0e14<\/a>"}},"text\/plain":{"th":{"P7482":"\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e14\u0e31\u0e49\u0e07\u0e40\u0e14\u0e34\u0e21\u0e42\u0e14\u0e22\u0e1c\u0e39\u0e49\u0e2d\u0e31\u0e1b\u0e42\u0e2b\u0e25\u0e14"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P7482 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
media type อังกฤษ
image/svg+xml
\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14<\/a>"}},"text\/plain":{"th":{"":"\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":13414952,\"id\":\"Q13414952\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"th":{"P459":"SHA-1<\/a>\u00a0\u0e2d\u0e31\u0e07\u0e01\u0e24\u0e29<\/sup>"}},"text\/plain":{"th":{"P459":"SHA-1"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P4092 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
checksum อังกฤษ
68b9c96e2a245296ec08bbfe7963536985e6cf9e
data size อังกฤษ
297,936 ไบต์
540 พิกเซล
720 พิกเซล
ประวัติไฟล์
คลิกวันที่/เวลาเพื่อดูไฟล์ที่ปรากฏในขณะนั้น
วันที่/เวลา | รูปย่อ | ขนาด | ผู้ใช้ | ความเห็น | |
---|---|---|---|---|---|
ปัจจุบัน | 02:39, 11 มีนาคม 2556 | 720 × 540 (291 กิโลไบต์) | Gjacquenot | User created page with UploadWizard |
หน้าที่มีภาพนี้
หน้าต่อไปนี้ โยงมาที่ภาพนี้:
การใช้ไฟล์ข้ามโครงการ
วิกิอื่นต่อไปนี้ใช้ไฟล์นี้:
- การใช้บน en.wikipedia.org
- การใช้บน fa.wikipedia.org
- การใช้บน fr.wikisource.org
- การใช้บน ml.wikipedia.org
- การใช้บน sq.wikipedia.org
- การใช้บน tr.wikipedia.org
ข้อมูลเกี่ยวกับภาพ
ภาพนี้มีข้อมูลเพิ่มเติม ซึ่งส่วนใหญ่มาจากกล้องดิจิตอลหรือสแกนเนอร์ที่สามารถเก็บข้อมูลดังกล่าวไว้รวมกับภาพได้ ถ้าภาพนี้ถูกปรับปรุงแก้ไขหรือเปลี่ยนแปลงจากเดิม ข้อมูลบางอย่างจะยังคงไม่เปลี่ยนแปลงเหมือนภาพที่ถูกปรับปรุงแก้ไขนั้น
ความกว้าง | 576pt |
---|---|
ความสูง | 432pt |
เข้าถึงจาก "https://th.wikipedia.org/wiki/ไฟล์:Birthdaymatch.svg"