Graph’s algorithm
description
Transcript of Graph’s algorithm
![Page 1: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/1.jpg)
Graph’s algorithmGraph’s algorithmGraph’s algorithmGraph’s algorithmนำ��เสนำอโดย
นำ�ยปองส ทธิ์ � โพธิ์ คุ�ณ ม.6/7 เลขท�� 17นำ�ยสรวิ ศ ไพบู�ลย ร!ตนำ�กร ม.6/7 เลขท�� 21
![Page 2: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/2.jpg)
เสนำออ.ธิ์รรมนำ�ญ ผุ�ยรอด
![Page 3: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/3.jpg)
OutlineOutline
•Dijkstra • Prim
} algorithm
![Page 4: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/4.jpg)
Dijkstra’s Algorithm
![Page 5: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/5.jpg)
Edsger Wybe Dijkstra (1930 – 2000)
Dijkstra’s algorithm
![Page 6: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/6.jpg)
ประวั�ติ�
Edsger Wybe Dijkstra (1930 – 2000) เป&นำนำ!กวิ ทย�ศ�สตร ด'�นำคุอมพ วิเตอร (computer science ) ช�วิเนำเธิ์อแลนำด เข�ได'ร!บูร�งวิ!ล ACM Turing ด'�นำก�รเข�ยนำโปรแกรมในำป+ 1972 และเป&นำอ�จ�รย พ เศษด'�นำคุอมพ วิเตอร ท�� University of Texas at Austin ต!/งแต0ป+ 1984 จนำถึ2ง 2002 โดยก0อนำหนำ'�นำ�/ไม0นำ�นำ เข�ได'ร!บูร�งวิ!ลจ�กสม�คุม ACM (association for computing machinery) จ�กบูทคุวิ�มเก��ยวิก!บูก�รคุวิ�มถึ�กต'องแม0นำย��ของข!/นำตอนำวิ ธิ์�
ข! /นำตอนำวิ ธิ์�หนำ2�งท��ม�ช4�อเส�ยงของเข� คุ4อ Dijkstra algorithm ซึ่2�งใช'อธิ์ บู�ยเส'นำท�งท��ส! /นำท��ส�ดท��ผุ0�นำจ�ดท�กจ�ดในำกร�ฟ
Dijkstra’s algorithm
![Page 7: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/7.jpg)
ขั้�นติอนวั�ธี�
A
EG
C
DF
B4 6
5
7 5
5
4
3 73
4
เร �มต'นำ
A
Dijkstra’s algorithm
![Page 8: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/8.jpg)
เล4อก B
ขั้�นติอนวั�ธี�
A
EG
C
DF
B4 6
5
5
4
3 73
4
B
5
7
Dijkstra’s algorithm
![Page 9: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/9.jpg)
ขั้�นติอนวั�ธี�
A
EG
C
DF
B
5
7 5
5
4
3 73
4
B
F
4 6
เล4อก F
Dijkstra’s algorithm
![Page 10: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/10.jpg)
ขั้�นติอนวั�ธี�
A
EG
C
DF
B
5
7 5
5
4
3 73
4
B
F
4 6
D
เล4อก D
Dijkstra’s algorithm
![Page 11: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/11.jpg)
ขั้�นติอนวั�ธี�
A
EG
C
DF
B
5
7 5
53 73
4
B
F
4 6
D
เล4อก EE
4
Dijkstra’s algorithm
![Page 12: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/12.jpg)
A
EG
C
DF
B
5
7 5
53 73
4
B
F
4 6
D
เล4อก C
E
C
4
ขั้�นติอนวั�ธี�Dijkstra’s algorithm
![Page 13: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/13.jpg)
ขั้�นติอนวั�ธี�
A
EG
C
DF
B
5
7 5
53 73
4
B
F
4 6
D
E
C
4G
เล4อก G
Dijkstra’s algorithm
![Page 14: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/14.jpg)
ขั้�นติอนวั�ธี�
A
EG
C
DF
B
5
7 5
53 73
4
B
F
4 6
D
E
C
4G
Dijkstra’s algorithm
![Page 15: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/15.jpg)
การประยุ�กติ�ใช้�
Dijkstra’s Algorithm เป&นำข!/นำตอนำวิ ธิ์�ท��ใช'ในำก�รห�เส'นำท�งท��ส! /นำท��ส�ด ท��ใช'เวิล�ในำก�รคุ'นำห�เส'นำท�งท��ส! /นำท��ส�ดนำ'อย และม�ข!/นำตอนำวิ ธิ์�ท��ไม0ย�0งย�กซึ่!บูซึ่'อนำม�กจนำเก นำไป และเร�ส�ม�รถึเอ� dijkstra’s algorithm ม�ประย�กต ใช'ในำง�นำต0�งๆได' ไม0วิ0�จะเป&นำก�รคุ'นำห�เส'นำท�งท��ส! /นำท��ส�ดบูนำแผุนำท��หร4อไปประย�กต ใช'ในำง�นำท�งด'�นำ network และป8ญห�ก�รเด นำท�งของพนำ!กง�นำข�ย (saleman problem) ได'เป&นำต'นำ
Dijkstra’s algorithm
![Page 16: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/16.jpg)
ต!วิอย0�งเพ �มเต
Prim’s algorithm
![Page 17: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/17.jpg)
Vojtěch Jarník (1897 - 1970)
Prim’s algorithm
![Page 18: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/18.jpg)
ประวั�ติ�
Vojtěch Jarník (1897 - 1970) เป&นำนำ!กคุณ ตศ�สตร ช�วิเช9ก ส�ข�หล!กของเข�คุ4อก�รศ2กษ�ทฤษฎี�จ��นำวินำและก�รวิ เคุร�ะห เช งคุณ ตศ�สตร ผุลง�นำด'�นำคุณ ตศ�สตร ท��ส��คุ!ญคุ4อ ก�รพ ส�จนำ ผุลของ lattice point problems
ในำด'�นำคุอมพ วิเตอร เข�คุ'นำพบูข!/นำตอนำวิ ธิ์�ในำก�รแก'ป8ญห� Minimum spanning tree ท��ม�ช4�อวิ0� Jarnik’s algorithm ในำภ�ยหล!งเปล��ยนำช4�อเป&นำ prim’s algorithm
Prim’s algorithm
![Page 19: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/19.jpg)
ขั้�นติอนวั�ธี�Prim’s algorithm
![Page 20: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/20.jpg)
การประยุ�กติ�ใช้�
Prim’s algorithm เป&นำข!/นำตอนำวิ ธิ์�ในำก�รห�แนำวิเด นำของกร�ฟ spanning tree ท��ม�ผุลรวิมของเส'นำเช4�อมท!/งหมดนำ'อยท��ส�ดในำแนำวิเด นำท!/งหมดของกร�ฟ ข!/นำตอนำวิ ธิ์�นำ�/ส�ม�รถึนำ��ไปประย�กต ใช'ก!บูก�รแก'ป8ญห�หร4อสร'�งปร ศนำ� รวิมไปถึ2งก�รห�เส'นำท�งท��ส! /นำท��ส�ด หร4อใช'ทร!พย�กรนำ'อยท��ส�ด ต!วิอย0�งของปร ศนำ�ท��อ�ศ!ยข!/นำตอนำวิ ธิ์�นำ�/คุ4อ ปร ศนำ�เข�วิงกต
Prim’s algorithm
![Page 21: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/21.jpg)
เอกสารอ�างอ�ง• http://www-b2.is.tokushima-u.ac.jp/~ikeda/suuri/maxflow/
MaxflowApp.shtml
• http://staff.buu.ac.th/~phong/Data_Struct/Dijkstra%20Shotest%20Paht%20Algorithm-2.ppt
• http://www.adeptis.ru/vinci/m_part7.html
• http://www-b2.is.tokushima-u.ac.jp/~ikeda/suuri/main/index.shtml
• http://en.wikipedia.org/wiki/Prim's_algorithm
• http://www.archiv.cas.cz/english/foto/jarnikv.htm
![Page 22: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/22.jpg)
![Page 23: Graph’s algorithm](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813ac0550346895da2cff7/html5/thumbnails/23.jpg)