Methods of Transforming Formulas into Normal Forms

6.3 Methods of Transforming Formulas into Normal Forms

In introducing the resolution method we have neglected a very important issue which concerns its practical application. In AI systems we apply the resolution method to formulas, which are expressed in special forms called normal forms. In this section we will transform FOL formulas in order to obtain formulas in conjunctive normal

form . 13 Before a formula gets into such a final form, it has to be transformed into

a series of temporary forms, which are the result of normalizing operations. These operations are based on rules of FOL. Now, we present these operations and the forms related to them in an intuitive way. 14

Firstly, a formula is transformed into negation normal form. The transformation consists of eliminating logical operators of implication (⇒) and equivalence (⇔) and then moving negation operators so that they occur immediately in front of atomic formulas. For example, the formula:

∀ x[¬student(x) ⇒ [¬on _leave(x) ∧ ¬∃y(attends(x, y) ∧ course(y))]], (6.29) after eliminating the implication operator is transformed into the following form:

∀ x[¬¬student(x) ∨ [¬on _leave(x) ∧ ¬∃y(attends(x, y) ∧ course(y))]], (6.30)

13 In the previous section, we have made use of the fact that the starting formula ( 6.19 ) was already in conjunctive normal form.

14 The rules of formula normalization are discussed in detail in monographs on the mathematical foundations of computer science, which are listed at the end of this chapter in a bibliographical

note.

6.3 Methods of Transforming Formulas into Normal Forms 77 and after moving negation operators it is transformed into the following negation

normal form: ∀ x[student(x) ∨ [¬on _leave(x) ∧ ∀y(¬attends(x, y) ∨ ¬course(y))]].

(6.31) Then, formula ( 6.31 ) is transformed into prenex normal form, by moving all the

quantifiers to the front of it, which results the following formula: ∀ x∀y[student(x) ∨ [¬on _leave(x) ∧ (¬attends(x, y) ∨ ¬course(y))]].

(6.32) As we can see, in the case of our formula all variables are inside scopes of universal

quantifiers. Thus, the quantifiers are, somehow, redundant and we can eliminate them, 15 arriving at the following formula:

student(x) ∨ [¬on _leave(x) ∧ (¬attends(x, y) ∨ ¬course(y))]. (6.33)

A certain problem related to quantified variables can appear when we move quan- tifiers to the front of formulas. We discuss it with the help of the following example. Let a formula be defined as follows:

(6.34) One can easily see that the first variable y (after the quantifier ∀) “is different” from

∀ x[∀y[P(x, y) ∨ Q(x, y)] ∧ ∃y[R(y) ∨ S(y, x)]].

the second y (after the quantifier ∃). Therefore, before we move quantifiers to the front of the formula we have to rename variables so that they are distinct. 16 Thus,

we transform formula ( 6.34 ) to the following formula: ∀ x[∀y[P(x, y) ∨ Q(x, y)] ∧ ∃z[R(z) ∨ S(z, x)]].

(6.35) In our considerations above we have said that universal quantifiers can be elim-

inated after moving quantifiers to the front of the formula. And what should be done with existential quantifiers, if they occur in a formula? If existential quantifiers

occur in a formula, we make use of the method developed by Skolem 17 [276], called Skolemization . We define this method in an intuitive way with the following example. Let a formula be of the following form:

∀ x[ ¬likes _baroque_music(x)∨ ∃ y( likes _music_of (x, y) ∧ baroque_composer(y))].

(6.36) 15 We can just keep in mind that they are at the front of the formula.

16 After moving quantifiers to the front we do not see which quantifier concerns which part of a conjunction.

17 Thoralf Albert Skolem—a professor of mathematics at the University of Oslo. His work, which concerns mathematical logic, algebra, and set theory (Löwenheim-Skolem theorem) is of great

importance in the mathematical foundations of computer science.

78 6 Logic-Based Reasoning The second part of the disjunction says that there is such a person y that a person x

likes music composed by y and y is a baroque composer. If so, then—according to Skolemization—we can define a function F, which ascribes this (favorite) baroque composer to x, i.e., F(x) = y. Now, if we replace y with F(x), then we can eliminate

the existential quantifier ∃y in formula ( 6.36 ). 18 Thus, we can transform formula ( 6.36 ) into the following formula:

∀ x[ ¬likes _baroque_music(x)∨

(6.37) In the general case, we can formulate Skolemization in the following way:

( likes _music_of (x, F(x)) ∧ baroque_composer(F(x)))].

• analyze successive quantifiers left-to-right, • if an existential quantifier of the form ∃y is preceded by universal quantifiers:

∀ x 1 ,∀ x 2 ,...,∀ x n , then introduce a unique function F(x 1 , x 2 ,..., x n ) , replace all occurrences of the variable y with the function F(x 1 , x 2 ,..., x n ) , and remove ∃y, • if an existential quantifier of the form ∃y is not preceded by any universal quantifier, then introduce a constant a, replace all occurrences of the variable z with the constant a, and remove ∃z.

The function F(x 1 , x 2 ,..., x n ) is called the Skolem function. The constant a is called the Skolem constant. At the end of this section let us come back to our previous example concerning a student. We have transformed the formula into a form without quantifiers ( 6.33 ). We can transform formula ( 6.33 ) into Conjunctive Normal Form, CNF. 19 Our formula in the CNF form is expressed as a conjunction of disjunctions in the following way:

( student(x) ∨ ¬on _leave(x))∧ ( student(x) ∨ ¬attends(x, y) ∨ ¬course(y)).

(6.38) The Conjunctive Normal Form is the final result of our normalization operations.

Dokumen yang terkait

Hubungan pH dan Viskositas Saliva terhadap Indeks DMF-T pada Siswa-siswi Sekolah Dasar Baletbaru I dan Baletbaru II Sukowono Jember (Relationship between Salivary pH and Viscosity to DMF-T Index of Pupils in Baletbaru I and Baletbaru II Elementary School)

0 46 5

Institutional Change and its Effect to Performance of Water Usage Assocition in Irrigation Water Managements

0 21 7

The Effectiveness of Computer-Assisted Language Learning in Teaching Past Tense to the Tenth Grade Students of SMAN 5 Tangerang Selatan

4 116 138

the Effectiveness of songs to increase students' vocabuloary at second grade students' of SMP Al Huda JAkarta

3 29 100

The effectiveness of classroom debate to improve students' speaking skilll (a quasi-experimental study at the elevent year student of SMAN 3 south Tangerang)

1 33 122

Kerjasama ASEAN-China melalui ASEAN-China cooperative response to dangerous drugs (ACCORD) dalam menanggulangi perdagangan di Segitiga Emas

2 36 164

The Effect of 95% Ethanol Extract of Javanese Long Pepper (Piper retrofractum Vahl.) to Total Cholesterol and Triglyceride Levels in Male Sprague Dawley Rats (Rattus novergicus) Administrated by High Fat Diet

2 21 50

Factors Related to Somatosensory Amplification of Patients with Epigas- tric Pain

0 0 15

The Concept and Value of the Teaching of Karma Yoga According to the Bhagavadgita Book

0 0 9

Pemanfaatan Permainan Tradisional sebagai Media Pembelajaran Anak Usia Dini untuk Mengembangkan Aspek Moral dan Bahasa Anak Utilization of Traditional Games as Media Learning Early Childhood to Develop Aspects of Moral and Language Children Irfan Haris

0 0 11