10.06.2013 Views

Logica Matematica Corso di Laurea in Informatica ... - Mbox.dmi.unict.it

Logica Matematica Corso di Laurea in Informatica ... - Mbox.dmi.unict.it

Logica Matematica Corso di Laurea in Informatica ... - Mbox.dmi.unict.it

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.3. FORME NORMALI CONGIUNTIVE 103<br />

Esempio 4.3.5. Trasformare la forma normale <strong>di</strong>sgiuntiva (p ∧ ¬q) ∨ (¬p ∧ q)<br />

<strong>in</strong> forma normale congiuntiva:<br />

Il primo congiunto si trasforma <strong>in</strong><br />

il secondo <strong>in</strong><br />

qu<strong>in</strong><strong>di</strong> la proposizione <strong>in</strong><br />

(p ∧ ¬q) ∨ (¬p ∧ q)<br />

(p ∨ (¬p ∧ q)) ∧ (¬q ∨ (¬p ∧ q)).<br />

(p ∨ ¬p) ∧ (p ∨ q),<br />

(¬q ∨ ¬p) ∧ (¬q ∨ q),<br />

(p ∨ ¬p) ∧ (p ∨ q) ∧ (¬q ∨ ¬p) ∧ (¬q ∨ q),<br />

da cui si possono ancora elim<strong>in</strong>are le tautologie, ottenendo<br />

(p ∨ q) ∧ (¬q ∨ ¬p).<br />

Non è detto che questo proce<strong>di</strong>mento, che ha il mer<strong>it</strong>o <strong>di</strong> far vedere la<br />

term<strong>in</strong>azione del comp<strong>it</strong>o, se lo si segue come filo d’Arianna, sia sempre il più<br />

efficiente; può essere utilmente <strong>in</strong>tegrato con l’applicazione <strong>in</strong> <strong>it</strong><strong>in</strong>ere dell’elim<strong>in</strong>azione<br />

delle ripetizioni, e con l’elim<strong>in</strong>azione delle tautologie dalle congiunzioni,<br />

e della contrad<strong>di</strong>zioni dalle <strong>di</strong>sgiunzioni, ogni volta che sia possibile;<br />

sono utili le leggi <strong>di</strong> assorbimento ed equivalenze come ¬(A → B) ≡ A ∧ ¬B; <br />

oppure ci sono scorciatoie come quando, volendo mirare a una forma congiuntiva,<br />

si <strong>in</strong>contra una sottoproposizione della forma (A ∧ B) ∨ (C ∧ B) che<br />

conviene rimpiazzare <strong>di</strong>rettamente con (A ∨ C) ∧ B.<br />

Esempio 4.3.6. Trasformare (¬p∧q)∨(¬q∧¬p) <strong>in</strong> forma normale congiuntiva.<br />

Con la <strong>di</strong>stributiv<strong>it</strong>à (e la commutativ<strong>it</strong>à) si ottiene sub<strong>it</strong>o<br />

¬p ∧ (q ∨ ¬q)<br />

e qu<strong>in</strong><strong>di</strong> ¬p. Applicando <strong>in</strong>vece l’algor<strong>it</strong>mo forma normale si ottiene<br />

((¬p ∧ q) ∨ ¬q) ∧ ((¬p ∧ q) ∨ ¬p).<br />

Il secondo congiunto è equivalente a ¬p per assorbimento; il primo è equivalente<br />

a (¬p ∨ ¬q) ∧ (q ∨ ¬q), qu<strong>in</strong><strong>di</strong> a ¬p ∨ ¬q, e <strong>in</strong> def<strong>in</strong><strong>it</strong>iva<br />

(¬p ∨ ¬q) ∧ ¬p,<br />

che per l’assorbimento è equivalente a ¬p. Questa seconda strada è più lunga,<br />

ma è proposta solo per illustrare l’effetto delle varie mosse possibili.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!