-2
$\begingroup$

In the following Program:

ide_drive       :- hard_drive, not scsi_drive. scsi_drive      :- hard_drive, not ide_drive. scsi_controller :- scsi_drive. hard_drive. 

The stable models are:

M1 = {hard_drive, ide_drive} M2 = {hard_drive, scsi_drive, scsi_controller} 

An stable model tells which atoms are true.

Why M1 and M2 are stable models of the given program?

  • 1
    Are you sure you asked this question in the proper forum? I'm not sure the proper venue for this question, but it looks like a computer science question.2012-02-09
  • 1
    Is this a maths question ?2012-02-09
  • 3
    Looks like Prolog syntax.2012-02-09

1 Answers 1

2

Let's call the variables $A,B,C,D$. So we are given $$ \begin{align*} A &\leftrightarrow D \land \lnot B \\ B &\leftrightarrow D \land \lnot A \\ C &\leftrightarrow B \\ D & \end{align*} $$

So $D$ must be true. Also, $C = B$. The program simplifies to $A \leftrightarrow \lnot B$. So exactly one of $A,B$ is true. If $A$ is true then $B,C$ are false, and conversely, if $A$ is false then $B,C$ are true. So the "stable models" are $$ \{A,D\}, \quad \{B,C,D\}. $$

  • 0
    An incomprehensible question with a neat, well-written answer. Service above and beyond the call of duty. Well done.2012-02-09
  • 0
    How sure are you that the `:-` stands for $\leftrightarrow$ here? In ordinary logic programming it usually means $\leftarrow$.2012-02-10
  • 0
    Henning, you're right. It works even with $\leftarrow$. Though in this case you'd need to define stable models differently, so that $\{A,C,D\}$ is not one.2012-02-10