Home

Awesome

P-99: Ninety-Nine Prolog Problems (Mort's Solutions)

Summary

This is the working repository of my (Mort Yao's) solutions to the Ninety-Nine Prolog Problems by Werner Hett.

Some adaptations existed for a variety of programming languages (Prolog, Lisp, Haskell, Scala, OCaml and Python). They are quite worth reading if you are interested in solutions written in one specific language of these. (See References)

This repo is where I put my own solutions and is intended to be multilingual. So far I'm only working on solutions in Ruby; implementations in more languages will be added in the future.

Feedback is very appreciated (especially if you find a solution is incorrect). You may report issues here on GitHub.

Overview

  1. Lists (Problems 01 ~ 28)
  2. Arithmetic (Problems 31 ~ 41)
  3. Logic and codes (Problems 46 ~ 50)
    • Solutions in Ruby: [46] [48] [49] [50]
  4. Binary trees (Problems 54A ~ 69)
  5. Multiway trees (Problems 70B ~ 73)
  6. Graphs (Problems 80 ~ 89)
  7. Miscellaneous problems (Problems 90 ~ 99)

(NOTE: Though the problems number from 1 to 99, there are some gaps and some additions marked with letters. There are actually only 88 problems.)

Getting Started

To view and run these solutions, no extra dependencies are needed. (inevitably you'll need a "standard" programming environment for that language)

To generate viewable HTML documents of all problems and solutions (in all available programming languages), these dependencies in relatively recent versions are required:

References

Licensing

The source code here is in the Public Domain.