Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS344: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 20,21: Application of Predicate Calculus.

Similar presentations


Presentation on theme: "CS344: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 20,21: Application of Predicate Calculus."— Presentation transcript:

1 CS344: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 20,21: Application of Predicate Calculus

2 Application of Predicate Calculus Systematic Inferencing Knowledge Representation Puzzles -- Circuit Verification -- Robotics -- Intelligent DB

3 Circuit Verification Does the circuit meet the specs? Are there faults? are they locatable?

4 Example : 2-bit full adder C1X2X1YC2 00000 00110 01010 01101 10010 10101 11001 11111 X 1, X 2 : inputs; C 1 : prev. carry; C 2 : next carry; Y: output

5 K-Map 0101 1010 0001 11 10 x2x1 c1 Y 0 1

6 K-Map (contd..) 0010 0111 0001 11 10 x2x1 c1 0 1 C2

7 Circuit

8 Verification First task (most difficult)  Building blocks : predicates  Circuit observation : Assertion on terminals

9 Predicates & Functions Function–1signal(t)t is a terminal ; signal takes the value 0 or 1 Function–2type(x)x is a circuit element; type(x) takes the value AND, OR, NOT, XOR Predicate – 3connected(t1,t2)t1 is an output terminal and t2 is an input terminal Function-3In(n,x)n th input of ckt element x Function-4Out(x)Output of ckt element x

10 Alternate Full Adder Circuit

11 Functions type(X) : takes values AND, OR NOT and XOR, where X is a gate. in(n, X) : the value of signal at the n th input of gate X. out(X) : output of gate X. signal(t) : state at terminal t = 1/0 Predicates connected(t1,t2): true, if terminal t1 and t2 are connected

12 General Properties Commutativity: ∀ t 1,t 2 [connected(t 1,t 2 ) → connected(t 2,t 1 )] By definition of connection: ∀ t 1,t 2 [connected(t 1,t 2 ) → { signal(t 1 ) = signal(t 1 )}]

13 Gate properties 1. OR definition: 2. AND definition:

14 Gate properties contd… 1. XOR definition: 2. NOT definition:

15 Some necessary functions a. no_of_input(x), takes values from N. b. Count_ls(x), returns #ls in the input of X

16 Circuit specific properties Connectivity: connected(x 1, in(1,A 1 )), connected(x 1, in(2, A 1 )), connected(out(A 1 ), in(1, A 2 )), connected(c1, in(2, A 2 )), connected(y, out(A 2 )) … Circuit elements: type(A 1 ) = XOR, type(A 2 ) = XOR, type(A 3 ) = AND …


Download ppt "CS344: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 20,21: Application of Predicate Calculus."

Similar presentations


Ads by Google