Skip to content

carrrina/zebra-puzzle-prolog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

zebra-puzzle-prolog

Solving a logical popular puzzle in Prolog.

Five teams from 5 California colleges (SJSU, De Anza, Foothill, UC Berkeley and UC Santa Cruz) are participating in a hackathon.

Each team has a team lead: Alex, Justin, Nicole, Tammy and Steven.

Each team is using a different programming language: Haskell, Java, JavaScript, Python and C++.

Each team has chosen a different color for the T-shirts they are wearing during the hackathon: blue, red, green, orange and purple.

Five companies are sponsoring these teams: Apple, Facebook, Google, IBM and Amazon.

The results are not out yet but the following information has been leaked:

  1. The team wearing blue placed ahead of the team wearing purple.
  2. The team wearing orange placed ahead of the team programming in Haskell.
  3. The team sponsored by IBM came in third.
  4. The team programming in Python placed ahead of the team wearing blue.
  5. The team wearing red did not place first.
  6. The team sponsored by Google placed ahead of the team wearing blue.
  7. The team programming in Haskell placed ahead of the team programming in JavaScript.
  8. The last team used C++.

We also know that:

  1. Tammy goes to SJSU.
  2. Alex will only program in Java.
  3. Justin's team is sponsored by Amazon.
  4. The SJSU team is sponsored by Facebook.
  5. The Foothill team is sponsored by IBM.
  6. Nicole's team is sponsored by Google.
  7. The Foothill team programs in JavaScript.
  8. The Berkeley team is wearing orange.
  9. The team sponsored by Apple is wearing red.
  10. The UC Santa Cruz team is wearing purple.
  11. The SJSU team is wearing blue.

About

Solving a logical popular puzzle in Prolog.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages