06.03.2013 Views

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

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.

Object (board) ∧ Writes-on ( X, board, Time ) ∧ Teacher (X)<br />

→Equal (Time, classhour).<br />

2. A Teacher is a person who writes on a board during classhour.<br />

In Predicate Logic, the above sentence is written as<br />

∀ X ( Person(X) ∧ Writes-on (X, board, classhour) → Teacher (X) )<br />

3. A student is a person who sits on a bench during classhour.<br />

In Predicate Logic, the above sentence can be written as<br />

∀Y ( Person (Y) ∧ Sits-on (Y, bench, Time) ∧ Equal (Time, classhour) →<br />

Student (Y) )<br />

4. If at least one person sits on a bench in classhour <strong>and</strong> a second person<br />

writes on the board at the same time then time = classhour.<br />

In Predicate Logic, the above expression can be described by<br />

∃ Y ( ( Person (Y) ∧ Sits-on (Y, bench, classhour )) ∧<br />

∃ X (Person (X) ∧ Writes-on (X, board, Time)) → Equal (Time, classhour) )<br />

The above 4 statements can be written in PROLOG language as follows:<br />

1. Equal (Time, classhour) :-<br />

Object (board),<br />

Writes-on (X, board, Time),<br />

Teacher (X).<br />

2. Teacher (X) :-<br />

Person (X),<br />

Writes-on (X, board, classhour).<br />

3. Student (Y) :-<br />

Person (Y),<br />

Sits-on (Y, bench, Time),<br />

Equal (Time, classhour).<br />

4. Equal (Time, classhour) :-<br />

Person (Y),

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

Saved successfully!

Ooh no, something went wrong!