際際滷

際際滷Share a Scribd company logo
アルゴリズムとデ`タ夛
8 嫗 検嗤(泣侏と方モ
麻
1
検嗤(泣とは
コンピュ`タ`では方」 〜2n
 n は屁方で弌方を燕す
。
たとえば、
12.8 = 0.8 〜 24
となる。このとき 0.8 を児方、 4 を峺方という。
児方と峺方を喘いて燕されたg方、鮓嗤(泣方という
。
検嗤(泣侏は double 侏と float 侏がある。
憲催
(+-)
峺方
(n)
児方
(a)
2
検嗤(泣侏の蒙
検嗤(泣侏ではビット方がQまっている。
そのため
?ある殻業參貧かい方忖は燕Fできない
?方が寄きくなればなるほど、方を寄j委にしか
燕せなくなる
という蒙罿ある。
3
伏じる`餓
検嗤(泣侏の方モ麻で伏じる`餓は 4 つ
?来め`餓
?蓐鯛ち
?秤鸞笋
?嬉ち俳り`餓
4
来め`餓
検嗤(泣侏のビット方の崙泙砲茲辰読まれる
麻Y惚の`餓のこと
プログラム箭
コンソ`ル
f1 、 f2 ともに揖じ、箸覆辰討靴泙辰拭
5
蓐鯛ち
検嗤(泣麻で麻Y惚が 0 にO極に除くなる
紗p麻を佩ったときに嗤進忖の蓐方がO極に弌さくなるF
プログラム箭
コンソ`ル
紗麻、p麻とも麻Y惚がずれている。
p麻で蒙に`餓が寄きくなっている。
6
秤鸞笋
検嗤(泣麻で~、广しくなる方、亮p麻を佩うときに
弌さい圭の方、麻に郡啌されなくなるF
プログラム
コンソ`ル
箔めている、 1000001 だが、
f2 を 100 嵐指怎したのが
郡啌されていない
7
嬉ち俳り`餓
o泙泙燭亙謹くの指方の處麻を嗤滔の麻で
嬉ち俳ったときにk伏する`餓
箭
i = 10 で嬉ち俳った栽、 i =11 參週のoされた何蛍が
そのまま嬉ち俳り`餓となる
8
`餓とその貨
9
来め`餓
蓐鯛ち
秤鸞笋
嬉ち俳り`餓
處麻蓐方を寄きくするのが恷もg
~、里曚楜箸靴ね憲催のp麻をなるべく
富なくなるように、麻塀を垢健する
}方の方、亮pでは~、緑,気ろに
Kべ紋えて麻を佩う。
朕議に鬉犬rgと娼業のどちらを枠させるか
恷mなバランスを深える
ル`プの用竃訳周と検嗤(泣
侏
for 猟や while 猟などのル`プの用竃訳周として
検嗤(泣侏の篳を喘いると麻`餓によって
?o泪覃`プになってしまう
?ル`プが噫蛍にg佩される
といったプログラムになってしまう辛嬬來がある。
ル`プの用竃訳周の登協にはなるべく屁方篳を旋喘する。
if 猟での訳周蛍瓷などでも揖。
10
ル`プの用竃訳周と検嗤(泣
侏
箭 1  o泪覃`プになってしまうプログラム
11
箭 2  ル`プが噫蛍にg佩されるプログラム
f1+=0.1f の麻を佩うときに
わずかな`餓が們eし
50 指朕のル`プで f1 が 5.0 より
富しずれた、砲覆辰討い襦
ル`プは 51 指g佩される。
0.1 を 50 指怎したら
`餓の唹で
50 より弌さくなる。
方モ麻の箭 }jな圭殻塀を盾
く
方モ麻のアルゴリズムを聞えば、2肝圷圭殻塀、 3 肝圷圭殻塀
やさらに}jな圭殻塀を盾くことができる。
アルゴリズムの箭
? Euler 隈
? Runge-Kutta 隈
?バイナリサ`チを聞う
? Newton 隈
?ブレント隈
12
バイナリサ`チによる圭殻塀の盾
隈
バイナリサ`チ
2 蛍冥沫と柵ばれるサ`チ圭隈。
畠悶を 2 つに蛍け、朕議の、蛍護泣の念瘁どちらにあるかを
登僅して碧譴鯱舛瓩討い。
バイナリサ`チを方モ麻に鮄辰垢襪海箸
gに圭殻塀を盾くことができる。
バイナリサ`チで盾くにはグラフがBAしていることが
駅勣である
13
バイナリサ`チによる圭殻塀の盾
隈
14
y
x
y=0
y=f(x)
left right
1. y < 0 となるm輝な泣 left と
y < 0 となるm輝な泣 right の
2 泣を_兵泣としてO協する。
バイナリサ`チによる圭殻塀の盾
隈
15
2. left と right の嶄泣 mid を箔める
left rightmid
3. mid < 0 ならば mid を仟しい left とし、
mid > 0 ならば mid を仟しい right とする
left rightmid>0
left right
バイナリサ`チによる圭殻塀の盾
隈
16
4. 、gりzまれるまで 2~3 をRり卦し、
嬉ち俳り訳周に_したら left または right を盾とする
嬉ち俳り訳周は寔の基えと掲械に除い譴魘xする。
この訳周を笋┐襪海箸粘陲┐両業を{できる。
ある訳周で麻を嬉ち俳っているので畜な盾そのもので
はない。
Newton 隈による圭殻塀の盾隈
f(x)=0 となるような x を箔めるアルゴリズムの匯N。
圭殻塀の盾を除貌議に箔めることができる。
Newton 隈の深え圭
f(x)=0 となるような x を冥すとき、ある x1 における
俊の俳頭 x2 は圷の x1 より寔の x に除くなる。
バイナリサ`チとの`いはバイナリサ`チよりも
紳覆茲基えに除づけること、_兵泣が 1 泣でよいことである。
17
Newton 隈の深え圭
ある泣 xn でのчv方 f¨
(xn) が嚥えられるとき (xn,f(xn)) を宥り、
Aきが f¨
(xn) の圭殻塀は
で嚥えられる。これを f(x) の除貌盾とみなすと、 f(x)=0 の
除貌盾は y=0 のときなので
このように 1 肝塀で除貌するのをRり卦して
箔めたい盾 x により除い、鯒鵑瓩襦
18
y = f '
(xn )(x ? xn )+ f (xn )
xn+1 = xn ?
f (xx )
f '
(xn )
Newton 隈による圭殻塀の盾隈
19
_兵泣 x
y=0
y=f(x)
x
y=0
y=f(x)
2. _兵泣 x における
グラフのAきを箔める
Aき
1. 販吭の_兵泣 x をO協する
Newton 隈による圭殻塀の盾隈
20
x
y=0
y=f(x)3. グラフのAきを旋喘して盾に除づく
4. この恬IをRり卦し、v方の、泙蠅覆ゼロに除づいたら
I尖を嬉ち俳り、そのときの x を基えとする。
Newton 隈が聞えない箭
21
y=0
Newton 隈はグラフの侘彜や_兵泣の了崔に
よって、盾が箔まらないケ`スもある。
Ad

Recommended

kagamicomput201703
kagamicomput201703
swkagami
?
kagamicomput201803
kagamicomput201803
swkagami
?
kagamicomput201702
kagamicomput201702
swkagami
?
kagami_comput2016_03
kagami_comput2016_03
swkagami
?
kagamicomput201701
kagamicomput201701
swkagami
?
kagamicomput201802
kagamicomput201802
swkagami
?
3嫗リスト
3嫗リスト
Kotone Kikuchi
?
意姻顎稼一スライド恬撹膳楼
意姻顎稼一スライド恬撹膳楼
Kotone Kikuchi
?
2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
?
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
?
Artificial Intelligence, Data and Competition C SCHREPEL C June 2024 OECD dis...
Artificial Intelligence, Data and Competition C SCHREPEL C June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
?
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
?
2024 State of Marketing Report C by Hubspot
2024 State of Marketing Report C 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
?

More Related Content

Featured (20)

2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
?
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
?
Artificial Intelligence, Data and Competition C SCHREPEL C June 2024 OECD dis...
Artificial Intelligence, Data and Competition C SCHREPEL C June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
?
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
?
2024 State of Marketing Report C by Hubspot
2024 State of Marketing Report C 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
?
2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
?
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
?
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
?
2024 State of Marketing Report C by Hubspot
2024 State of Marketing Report C 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
?
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
?
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
?

検強弌方泣侏と方シ橡