Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soimort/p99
P-99: Ninety-Nine Prolog Problems (Mort's Solutions)
https://github.com/soimort/p99
Last synced: 2 months ago
JSON representation
P-99: Ninety-Nine Prolog Problems (Mort's Solutions)
- Host: GitHub
- URL: https://github.com/soimort/p99
- Owner: soimort
- Created: 2012-05-01T19:47:53.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-05-09T07:34:06.000Z (over 12 years ago)
- Last Synced: 2024-10-14T12:25:35.305Z (3 months ago)
- Language: Ruby
- Size: 109 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# P-99: Ninety-Nine Prolog Problems (Mort's Solutions)
## Summary
This is the working repository of my ([Mort Yao](http://www.soimort.org/)'s) solutions to the [Ninety-Nine Prolog Problems](https://sites.google.com/site/prologsite/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](https://github.com/soimort/p99/issues/new).
## Overview
1. Lists (Problems 01 ~ 28)
* Solutions in __Ruby__:
[[01](https://github.com/soimort/p99/blob/master/ruby/01.rb)]
[[02](https://github.com/soimort/p99/blob/master/ruby/02.rb)]
[[03](https://github.com/soimort/p99/blob/master/ruby/03.rb)]
[[04](https://github.com/soimort/p99/blob/master/ruby/04.rb)]
[[05](https://github.com/soimort/p99/blob/master/ruby/05.rb)]
[[06](https://github.com/soimort/p99/blob/master/ruby/06.rb)]
[[07](https://github.com/soimort/p99/blob/master/ruby/07.rb)]
[[08](https://github.com/soimort/p99/blob/master/ruby/08.rb)]
[[09](https://github.com/soimort/p99/blob/master/ruby/09.rb)]
[[10](https://github.com/soimort/p99/blob/master/ruby/10.rb)]
[[11](https://github.com/soimort/p99/blob/master/ruby/11.rb)]
[[12](https://github.com/soimort/p99/blob/master/ruby/12.rb)]
[[13](https://github.com/soimort/p99/blob/master/ruby/13.rb)]
[[14](https://github.com/soimort/p99/blob/master/ruby/14.rb)]
[[15](https://github.com/soimort/p99/blob/master/ruby/15.rb)]
[[16](https://github.com/soimort/p99/blob/master/ruby/16.rb)]
[[17](https://github.com/soimort/p99/blob/master/ruby/17.rb)]
[[18](https://github.com/soimort/p99/blob/master/ruby/18.rb)]
[[19](https://github.com/soimort/p99/blob/master/ruby/19.rb)]
[[20](https://github.com/soimort/p99/blob/master/ruby/20.rb)]
[[21](https://github.com/soimort/p99/blob/master/ruby/21.rb)]
[[22](https://github.com/soimort/p99/blob/master/ruby/22.rb)]
[[23](https://github.com/soimort/p99/blob/master/ruby/23.rb)]
[[24](https://github.com/soimort/p99/blob/master/ruby/24.rb)]
[[25](https://github.com/soimort/p99/blob/master/ruby/25.rb)]
[[26](https://github.com/soimort/p99/blob/master/ruby/26.rb)]
[[27](https://github.com/soimort/p99/blob/master/ruby/27.rb)]
[[28](https://github.com/soimort/p99/blob/master/ruby/28.rb)]
2. Arithmetic (Problems 31 ~ 41)
* Solutions in __Ruby__:
[[31](https://github.com/soimort/p99/blob/master/ruby/31.rb)]
[[32](https://github.com/soimort/p99/blob/master/ruby/32.rb)]
[[33](https://github.com/soimort/p99/blob/master/ruby/33.rb)]
[[34](https://github.com/soimort/p99/blob/master/ruby/34.rb)]
[[35](https://github.com/soimort/p99/blob/master/ruby/35.rb)]
[[36](https://github.com/soimort/p99/blob/master/ruby/36.rb)]
[[37](https://github.com/soimort/p99/blob/master/ruby/37.rb)]
[[38](https://github.com/soimort/p99/blob/master/ruby/38.rb)]
[[39](https://github.com/soimort/p99/blob/master/ruby/39.rb)]
[[40](https://github.com/soimort/p99/blob/master/ruby/40.rb)]
[[41](https://github.com/soimort/p99/blob/master/ruby/41.rb)]
3. Logic and codes (Problems 46 ~ 50)
* Solutions in __Ruby__:
[[46](https://github.com/soimort/p99/blob/master/ruby/46.rb)]
[[48](https://github.com/soimort/p99/blob/master/ruby/48.rb)]
[[49](https://github.com/soimort/p99/blob/master/ruby/49.rb)]
[[50](https://github.com/soimort/p99/blob/master/ruby/50.rb)]
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)
* __Ruby__: ruby 1.9
To generate viewable HTML documents of all problems and solutions (in all available programming languages), these dependencies in relatively recent versions are required:
* __Ruby__ and Gems: __rake__, __liquid__, __rdiscount__
* __pygments__
* __bash__ (in Windows `rake` must run in a MSYS shell)## References
* [P-99: Ninety-Nine Prolog Problems](https://sites.google.com/site/prologsite/prolog-problems)
* [L-99: Ninety-Nine Lisp Problems](http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/funcional/L-99_Ninety-Nine_Lisp_Problems.html)
* [H-99: Ninety-Nine Haskell Problems](http://www.haskell.org/haskellwiki/H-99:_Ninety-Nine_Haskell_Problems)
* [S-99: Ninety-Nine Scala Problems](http://aperiodic.net/phil/scala/s-99/)
* [99 Problems in OCaml](http://www.christiankissig.de/cms/index.php/en/programming/28-ocaml/28-99-problems-in-ocaml)
* [99 Problems in Python](http://wiki.python.org/moin/ProblemSets/99%20Prolog%20Problems%20Solutions)## Licensing
The source code here is in the __Public Domain__.