Loading ...
Sorry, an error occurred while loading the content.

First version AIMA chapter 8 (knowledge base) exercise 8.3 prolog programming

Expand Messages
  • chenyu468
    hello, 1. I am doing exercise 8.3. It is as follows: Encode the description of the 4-bit adder in figure 8.10 and pose the queries to verify that it is in fact
    Message 1 of 1 , Dec 10, 2003
    • 0 Attachment
      hello,
      1. I am doing exercise 8.3. It is as follows:
      Encode the description of the 4-bit adder in figure 8.10 and pose the
      queries to verify that it is in fact correct.

      My question is how to translate the following sentences into prolog
      rules.
      1. All t, (Signal(t) = On or Signal(t) = Off ) ^ (On is not Off).

      2. All t, (Signal(t) = 1 or Signal(t) = 0 )

      3. All x, Type(x) = Adder <==> Signal(Out(1,x)) = ( Signal(In(1,x))
      + Signal(In(2,x)) + Signal(In(3,x)) )/2 ^ Signal(Out(1,x)) = (Signal
      (In(1,x)) + Signal(In(2,x)) + Signal(In(3,x))) mod 2)

      4. For logic term ("Type(X) = Adder") should be translated into
      prolog fact "Type(X,Adder)" or not?

      Finally, I use "amzi! prolog" for exercise. Is it a good choice or
      not?

      Thank you for your attention.
      kind regards/chenyu
    Your message has been successfully submitted and would be delivered to recipients shortly.