KTdCW Artificial Intelligence 2016/17 Practical Exercises - PART A Franz Wotawa Technische Universität Graz, Institute for Software Technology, Inffeldgasse 16b/2, A-8010 Graz, Austria, wotawa@ist.tugraz.at, WWW home page: http://www.ist.tugraz.at Version January 9, 2018 1 Introduction The following examples are for the Artificial Intelligence part of the practical exercises KTdCW WS2017/18. Solutions for the example have to be provided in hand-written form (!) on Wednesday, January 17th, 2018, 18:00, immediately before the beginning of the lecture in lecture hall i11. The solutions for the given examples will be discussed in this lecture. The sheets of paper where the solutions are written on have to be stapled and the name and Matrikel number of the student have to be indicated on the first page. In cases writing the solutions by hand is not possible a PDF file with the solution has to be send to Franz Wotawa (wotawa@ist.tugraz.at) on January 17th, 2018 not later than noon. Note that given the deadlines are strict! During the practical part students are asked to explain their solution at the black board of the lecture hall i11. In case a provided solution cannot be sufficiently explained, I will evaluate this part of the practical exercise as not provided! 1. Modeling: Example 1: Formalisieren Sie folgendes Wissen über Krankheiten: Eine Erkältung führt in der Regel zu folgenden Symptomen: Kratzen im Hals, Schmerzen beim Schlucken, beeinträchtiges Riechvermögen, erhöhte Temperatur, Kopfschmerzen, Gliederschmerzen. Eine Grippe führt in der Regel zu folgenden Symptomen: Reizhusten, Halsschmerzen, Kopfschmerzen, Gliederschmerzen, Übelkeit, Fieber. Eine bakterielle Lungenenzündung führt in der Regel zu folgenden Symptomen: Atemnot, Fieber, Schmerzen beim Einatmen. Eine virale Lungenenzündung führt in der Regel zu folgenden Symptomen: Kopfschmerzen, Gliederschmerzen, Husten, erhöhte Temperatur. Welche Krankheit hat jemand, wenn folgende Symptome vorliegen: Kopfschmerzen, erhöhte Temperatur? Berechnen Sie die abduktiven Diagnosen um diese Frage zu beantworten. Was müte man wissen um zwischen den berechneten Diagnosen unterscheiden zu können? Example 2: Formalize the following sentences in a way such that you can use abductive diagnosis to compute explanations why Tweety cannot fly. Usually birds can fly unless they are dead or have a broken wing. Tweety is a bird.
2 Example 3: Formulate the behavior of a digital inverter component (with an input x, an output y, and the behavior x y) in Horn Clause Propositional Logic, where we only are able to have rules of the form (a) a, (b) a 1... a n a n+1, or (c) (a 1... a n ). Make use of the idea to represent the fact that x is true (false) with a new proposition x t (x f). Do not forget to add axioms stating that x cannot be true and false at the same time. 2. ATMS Environments / Labels Computations: Example 4: Gegeben sind folgende ATMS Labels: {{A, B}, {A, C}, {E, F }} {{A}, {E}, {B, C}} Example 5: Gegeben sind folgende ATMS Labels: {{A}, {B, C, D}, {E}} {{A, D}, {A, B}, {B, C}} {{E, F }} Example 6: Gegeben sind folgende ATMS Labels: {{A, B}, {B, C, D}, {E, B}} {{A, D}, {A, B}, {B, C}} Angenommen Sie haben den NOGOOD mit Label {{B, C}}. Welche Environments des berechneten Labels müssen Sie entfernen? Welche Environments in den gegeben Labels wären in diesem Fall auch nicht in den entsprechenden Labels?
3 3. ATMS: Example 7: Given the following set of implications where A, B, C, D, E denote assumptions. Gegeben seine folgende Regeln wobei A, B, C, D, E Assumptions bezeichnen: 1. A c 2. B b c 3. A f 4. C c d 5. D e 6. c e d 7. d c 8. E d 9. d f 10. b (a) Compute all conflicting assumptions (if there are any) using the ATMS. For this purpose draw the corresponding graph representing the ATMS and propagate the vertex labels. Use the given order of rules for this purpose! (b) Compute the abductive explanation for d. Berechnen Sie die abduktive Diagnose/Erklärung für d. (c) Compute all minimal hitting sets for the sets of conflicting assumptions. Berechnen Sie alle minimalen Hitting Sets für das Label des Nogood-Knotens. Example 8: Gegeben seine folgende Regeln wobei A, B, C, D, E Assumptions und die anderen Zeichen Aussagen bezeichnen: 1. A a b d 2. B b nc ne 3. C d ne nf 4. C d e f 5. D e 6. E f 7. f nf 8. a 9. b 10. nc (a) Berechnen Sie die Labels für alle ATMS Knoten. Nehmen Sie dabei die gegebene Reihenfolge der Regeln an und bestimmen Sie die Änderungen der Labels während der Graph (10 Punkte).
4 (b) Berechnen Sie die abduktive Diagnose/Erklärung für d f (5 Punkte). (c) Berechnen Sie alle minimalen Hitting Sets für die berechnete abduktive Diagnose (5 Punkte). Example 9: Given the following set of implications where A, B, C, D, E denote assumptions. Gegeben seine folgende Regeln wobei A, B, C, D, E Assumptions bezeichnen: 1. A c1 d1 e1 2. A c0 e0 3. A d0 e0 4. B a0 c1 5. B a1 c0 6. C a0 d1 7. C a1 d0 8. D a0 9. E a1 10. c0 c1 11. d1 d0 (a) Compute all conflicting assumptions (if there are any) using the ATMS. For this purpose draw the corresponding graph representing the ATMS and propagate the vertex labels. Use the given order of rules for this purpose! (b) Compute the abductive explanation for e0. Berechnen Sie die abduktive Diagnose/Erklärung für e0. (c) Compute all minimal hitting sets for the sets of conflicting assumptions. Berechnen Sie alle minimalen Hitting Sets für das Label des Nogood-Knotens. Example 4: Given the following set of implications where A, B, C, D, E denote assumptions and the other letters proposition: Gegeben seine folgende Regeln wobei A, B, C, D, E Assumptions und die anderen Zeichen Aussagen bezeichnen: 1. A a 2. B b 3. a b d 4. d a 5. C c 6. D c d 7. E b 8. E c a 9. a b
5 10. D f (a) (10 points) Compute all conflicting assumptions (if there are any) using the ATMS. For this purpose draw the corresponding graph representing the ATMS and propagate the vertex labels. Use the given order of rules for this purpose! (b) (5 points) Compute the abductive explanation for b f. Berechnen Sie die abduktive Diagnose/Erklärung für b f. (c) (5 points) Compute all minimal hitting sets for the NOGOOD node. Berechnen Sie alle minimalen Hitting Sets für den NOGOOD Knoten.