1 / 14

Breadth First Search (BFS)

Breadth First Search (BFS). As’ad Djamalilleil http://kampusku.uni.me asad.kom@gmail.com. Breadth First Search (BFS). BFS dapat diartikan sebagai “pencarian melebar diutamakan”

dorian-yang
Download Presentation

Breadth First Search (BFS)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Breadth First Search (BFS) As’ad Djamalilleil http://kampusku.uni.me asad.kom@gmail.com

  2. Breadth First Search (BFS) • BFS dapat diartikan sebagai “pencarian melebar diutamakan” • Pencarian ini menggunakan pohon/graph yang dapat berupa linked-list, dimana setiap node/simpulnya adalah sebuah state/keadaan • Root/akar dari pohon adalah initial state dimana pencarian dilakukan hingga ditemukannya goal state pada salah satu node

  3. Contoh Kasus Ember Air • Ruang Masalah • x = 1, 2, 3 atau 4 (isi ember 4 galon) • y = 1, 2 atau 3 (isi ember 3 galon) • Initial State  (0,0) • Menyatakan jumlah air kedua ember (x,y) masih kosong • Goal State  (n,2) • Ember x berisi berapa pun, y berisi 2 galon

  4. 0,0 Initial State  Level 1

  5. 0,0 Initial State  Level 1 4,0 0,3 Level 2

  6. 0,0 Level 1 4,0 0,3 Level 2 Level 3 4,3 0,0 3,0 4,3 0,0 1,3

  7. 0,0 Level 1 4,0 0,3 Level 2 Level 3 4,3 0,0 3,0 4,3 0,0 1,3 0,3 4,0 4,0 0,3 4,3 0,3 1,0 4,0 4,0 3,3 0,3 0,3 4,0 4,0 0,3 Level 4

  8. 0,0 Level 1 4,0 0,3 Level 2 Level 3 4,3 0,0 3,0 4,3 0,0 1,3 0,3 4,0 4,0 0,3 4,3 0,3 1,0 4,0 4,0 3,3 0,3 0,3 4,0 4,0 0,3 Level 4 4,2 Level 5 dan seterusnya …..

  9. 0,0 Level 1 4,0 0,3 Level 2 Level 3 4,3 0,0 3,0 4,3 0,0 1,3 0,3 4,0 4,0 0,3 4,3 0,3 1,0 4,0 4,0 3,3 0,3 0,3 4,0 4,0 0,3 Level 4 4,2 Level 5 dan seterusnya …..

  10. Solusinya

  11. Tugas 2 • Buatlah pohon penyelesaian untuk masalah koin pada Tugas 1 dengan menggunakan metode BFS • Jawaban di-upload paling lambat 3 minggu depan

More Related