1 / 17

Pertemuan 6 Using Predicate logic

Pertemuan 6 Using Predicate logic. Matakuliah : T0264/Inteligensia Semu Tahun : Juli 2006 Versi : 2/1. Learning Outcomes. Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : << TIK-99 >> << TIK-99>>. Outline Materi. Materi 1 Materi 2 Materi 3 Materi 4 Materi 5. Input :

lynch
Download Presentation

Pertemuan 6 Using Predicate logic

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. Pertemuan 6Using Predicate logic Matakuliah : T0264/Inteligensia Semu Tahun : Juli 2006 Versi : 2/1

  2. Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : • << TIK-99 >> • << TIK-99>>

  3. Outline Materi • Materi 1 • Materi 2 • Materi 3 • Materi 4 • Materi 5

  4. Input : Premis atau Fakta Output : Inferensi atau Konklusi PROSES LOGIKA (LOGIC PROCESS) 5. USING PRDICATE LOGIC Logika merupaka bentuk representasi Terdapat 2 jenis penalaran : • Penalaran Deduktif : Penalaran dimulai dari rpinsip umum untuk mendapatkan kesimpulan yang lebih khusus. • Penalaran Induktif : Penalaran dimulai dari fakta-fakta khsusus untuk mendapatkan kesimpulan umum.

  5. Operator • Operator AND symbol  • Operator OR symbol  • Operator NOT symbol  • Operator For All symbol  • Operator There Exists symbol  • Operator Implication (jika-maka) symbol  • Operator Equivalent (jika dan hanya jika) symbol 

  6. 5.1 Representing Simple Facts in Logic Representing Simple Facts in Logic It is raining. RAINING It is sunny. SUNNY It is windy. WINDY If it is rainning, then it is not sunny. RAINING  SUNNY

  7. A Predicate Logic Example • Marcus was a man. • man(Marcus) • Marcus was a Pompeian. • Pompeian(Marcus) • All Pompeian were Romans. • x : Pompeian (x) Roman(x) • Caesar was a ruler. • ruler(Caesar) • All Romans were either loyal to Caesar or hated him • x : Roman(x) loyalto(x,Caesar) hate(x,Caesar) • Everyone is loyal to someone. • x : y : loyalto (x,y)

  8. A Predicate Logic Example • People only try to assassinate rulers they aren’t loyal to • x : y : person(x) ruler(y) • tryassassinate(x,y) loyalto(x,y) • Marcus tried to assassinate Caesar. • tryassassinate (Marcus, Caesar) • All men are people. • x : man(x)person(x)

  9. An Attempt to Prove loyalto(Marcus,Caesar)

  10. Contoh lain Predicate Logic • Chandra adalah seorang mahasiswa • Chandra masuk jurusan Informatika • Setiap mahasiswa Informatika pasti mahasiswa Fasilkom • Algoritma adalah matakuliah yang sulit • Setiap mahasiswa Fasilkom pasti akan suka Algoritma atau membencinya • Setiap mahasiswa pasti menyukai suatu matakuliah • Mahasiswa yang tidak pernah hadir kuliah pada matakuliah slit, maka mereka pasti tidak suka terhadap matakuliah tersebut • Chandra tidak pernah hadir paka matakuliah Algoritma

  11. Bentuk Predicate Logic • mahasiswa (Chandra) • Informatika (Chandra) • x : informatika(x)  Fasilkom(x) • sulit(Algoritma) • x : Fasilkaom(x)  suka(x,Algoritma)  benci(x,Algoritma) • x :x : suka(x,y) • x : y : mahasiswa(x)  sulit(y)  hadir(x,y)  suka(x,y) 8. hadir(Chandra,Algoritma)

  12. suka(Chandra,Algoritma) (7) mahasiswa(Chandra) sulit(Algoritma) hadir(Chandra,Algoritma) (1) sulit(algoritma) hadir(Chandra,Algoritma) (4) hadir(Chandra,Algoritma) (8) Apakah Chandra suka mtakuliah Algoritma

  13. 5.2 Representing Instance and Isa Relationships • Class membership is represented with unary predicates (such as Roman), each of which correspond to a class. Asserting that P(x) is true is equivalent to asserting that x is an instance (or element) of P. • Three Ways of Representing Class Membership • man(Marcus) • Pompeian(Marcus) • x : Pompeian(x) Roman(x) • ruler(Caesar) • x:Roman(x)  • loyalto(x,Caesar) hate(x,Caesar)

  14. Representing Instance and Isa Relationships • instance(Marcus,man) • instance(Marcus,Pompeian) • x : instance(x,Pompeian) instance(x,Roman) • instance(Caesar,ruler) • x : instance(x, Roman) loyalto(x,Caesar) hate(x,Caesar) • instance(Marcus,man) • instance(Marcus,Pompeian) • isa(Pompeian,Roman) • instance(Caesar,ruler) • x : instance(x,Roman) loyalto(x,Caesar) hate(x,Caesar) • x:y:z: instance(x,y)  isa(y,z) instance(x,z)

  15. 5.3 Computable Functions and Predicates A Set of Facts about Marcus • man (Marcus) • Pompeian(Marcus) • born(Marcus,40) • x :man(x) mortal(x) • erupted(volcano,79)  x : [Pompeian(x) died(x,79)] • x: t1: t2: mortal(x)  born(x,t1)  gt(t2- t1,150) dead(x,t2) • now = 1991 •  x: t:[alive(x,t) dead(x,t)]  [dead(x,t) alive(x,t)] •  x: t1:t2: died(x,t1)  gt(t2,t1) dead(x,t2)

  16. One Way of Proving That Marcus Is Dead

  17. << CLOSING>> End of Pertemuan 6 Good Luck

More Related