[ Prev ]
2019-11-04

-- Oct 30 In-Class Exercise Thread
 1. isClothes(a) <- tShirts(a), jeans(a), NOT toys(a), a>= 300.
 
 2. Pairs(a,b) <-.
     Pairs(b,c) <-.
     Pairs(a,c) <-.
 
 3. R(x,y) <- Results(x,y), y>3
1. isClothes(a) <- tShirts(a), jeans(a), NOT toys(a), a>= 300. 2. Pairs(a,b) <-. Pairs(b,c) <-. Pairs(a,c) <-. 3. R(x,y) <- Results(x,y), y>3

-- Oct 30 In-Class Exercise Thread
1. MoreThanOneMultiple(x, y) <- BiggerOrEqual(x, y), x % y = 0, NOT Same(x, y).
 2.  Smaller(x, y) <- x < y.
    BIggerThanOne(1, x) <- x > 1.
     SmallerThanFive(y, 5) <- y < 5.
Note: #2 is not a Datalog
 3. 
 Pair(x, y) <- Smaller(x, y), y > 3
1. MoreThanOneMultiple(x, y) <- BiggerOrEqual(x, y), x % y = 0, NOT Same(x, y). 2. Smaller(x, y) <- x < y. BIggerThanOne(1, x) <- x > 1. SmallerThanFive(y, 5) <- y < 5. Note: #2 is not a Datalog 3. Pair(x, y) <- Smaller(x, y), y > 3
X