[ Prev ]
2018-11-05

-- Oct 31 In-Class Exercise
1. A(x, y) <- B(x, y), NOT C(x, y), x < y.
2. A(1, 2) <- .
A(1, 3) <- .
A(2, 3) <- .
B(x, y) <- A(x, y), y > 2
(Edited: 2018-11-05)
1. A(x, y) <- B(x, y), NOT C(x, y), x < y. <br /> 2. A(1, 2) <- . <br /> A(1, 3) <- . <br /> A(2, 3) <- . <br /> B(x, y) <- A(x, y), y > 2

-- Oct 31 In-Class Exercise
P(x,y) <- Q(x,y,z), NOT R(x,y,z), x<y
P(1, 2)
P(1, 3)
P(2, 3)
Q(x, y) <- P(x, y), y > 2
P(x,y) <- Q(x,y,z), NOT R(x,y,z), x<y <br> P(1, 2)<br> P(1, 3)<br> P(2, 3)<br> Q(x, y) <- P(x, y), y > 2

-- Oct 31 In-Class Exercise
A(x,y) <- B(x,y,z), NOT C(x,y, z), x < y
 <(1, 2)
 <(1, 3)
 <(2, 3)
 SELECT(x, y) :- <(x, y), <(2, y).
(Edited: 2018-11-05)
A(x,y) <- B(x,y,z), NOT C(x,y, z), x < y <(1, 2) <(1, 3) <(2, 3) SELECT(x, y) :- <(x, y), <(2, y).

-- Oct 31 In-Class Exercise
Ryan Moore Give an example of a rule involving negation and an arithmetic atom which is safe:
 A(x,y) := B(x,y), NOT y>1
 <(1,2).
 <(1,3).
 <(2,3).
Q(x,y) := <(x,y), <(2,y).
Ryan Moore Give an example of a rule involving negation and an arithmetic atom which is safe: A(x,y) := B(x,y), NOT y>1 <(1,2). <(1,3). <(2,3). Q(x,y) := <(x,y), <(2,y).

-- Oct 31 In-Class Exercise
A(n, m) <- B(n, m), NOT C(n, m), n < m
Order Pair Problem: A(2, 3) <- . A(1, 2) <- . A(1, 3) <- . B (n, m) <- A(n, m), m>2
A(n, m) <- B(n, m), NOT C(n, m), n < m Order Pair Problem: A(2, 3) <- . A(1, 2) <- . A(1, 3) <- . B (n, m) <- A(n, m), m>2
2018-11-08

-- Oct 31 In-Class Exercise
1.
FreeProducts(name, price) <- Products(name, price), price == 0.00
ProprietaryProducts(name, price) <- Products(name, price), NOT FreeProducts(name, price)

2.
P(1, 2)
P(1, 3)
P(2, 3)
select(x, y) <- P(x, y), y > 2
(Edited: 2018-11-08)
1.<br> FreeProducts(name, price) <- Products(name, price), price == 0.00<br> ProprietaryProducts(name, price) <- Products(name, price), NOT FreeProducts(name, price)<br> <br> 2.<br> P(1, 2)<br> P(1, 3)<br> P(2, 3)<br> select(x, y) <- P(x, y), y > 2<br>
2018-11-19

-- Oct 31 In-Class Exercise
A(x,y) <- B(x,y,z), NOT C(x), y > z
Less(1,3) <-. Less(1,2) <-. Less(2,3) <-.
Pair(x,y) <- Less(x,y) , y > 2.
A(x,y) <- B(x,y,z), NOT C(x), y > z Less(1,3) <-. Less(1,2) <-. Less(2,3) <-. Pair(x,y) <- Less(x,y) , y > 2.
X