Solutions to problems from a 2nd year course on Logic Programming.
- Unification & Arithmetic (i.e. do the following expressions unify, if yes, what's the result?)
- Family Tree
- Animal Classification
- List Operations (Prolog predicates for list operations)
- Six Degrees of Bruce Campbell (finds if a given actor is within 6 degrees of separation of Bruce)
- Campbell Number (finds the minimum degrees of separation between an actor and Bruce)
- String Tokenizer
- Postfix Calculator
- Knapsack Problem (uses assert predicate, solves by brute-force)
- Logic Puzzle (uses Constraint Logic Programming with Finite Domains - clpfd)
- Palindromes (uses Definite Clause Grammars)
Earl E. Foxwell was my course instructor. He came up with the problems (or borrowed them from elsewhere). The problems are not my own, but the solutions are unless otherwise noted.
- Fix bugs & mistakes