public:t-622-arti-14-1:lab_3_-_csps
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
public:t-622-arti-14-1:lab_3_-_csps [2014/02/12 09:30] – stephan | public:t-622-arti-14-1:lab_3_-_csps [2024/04/29 13:33] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 6: | Line 6: | ||
each of whom prefers a different brand of cigarettes, a different drink, and a different pet. | each of whom prefers a different brand of cigarettes, a different drink, and a different pet. | ||
The five houses are arranged in a row (no house has more than 2 neighbors). | The five houses are arranged in a row (no house has more than 2 neighbors). | ||
- | # There are five houses. | + | - There are five houses. |
- | # The Englishman lives in the red house. | + | |
- | # The Spaniard owns the dog. | + | |
- | # Coffee is drunk in the green house. | + | |
- | # The Ukrainian drinks tea. | + | |
- | # The green house is immediately to the right of the ivory house. | + | |
- | # The Old Gold smoker owns snails. | + | |
- | # Kools are smoked in the yellow house. | + | |
- | # Milk is drunk in the middle house. | + | |
- | # The Norwegian lives in the first house. | + | |
- | # The man who smokes Chesterfields lives in the house next to the man with the fox. | + | |
- | # Kools are smoked in the house next to the house where the horse is kept. | + | |
- | # The Lucky Strike smoker drinks orange juice. | + | |
- | # The Japanese smokes Parliaments. | + | |
- | # The Norwegian lives next to the blue house. | + | |
Now, who drinks water? Who owns the zebra? | Now, who drinks water? Who owns the zebra? | ||
Line 31: | Line 31: | ||
===== Material ===== | ===== Material ===== | ||
- | * {{: | + | * {{: |
The project contains a Main class which sets up and solves the CSP, as well as some additional classes implementing the constraints. You need to implement a few parts in Main.java and a method in DifferByOneConstraint.java (if you need that constraint). To run the code simply run the Main class or use "ant run" on the terminal. | The project contains a Main class which sets up and solves the CSP, as well as some additional classes implementing the constraints. You need to implement a few parts in Main.java and a method in DifferByOneConstraint.java (if you need that constraint). To run the code simply run the Main class or use "ant run" on the terminal. |
/var/www/cadia.ru.is/wiki/data/attic/public/t-622-arti-14-1/lab_3_-_csps.1392197455.txt.gz · Last modified: 2024/04/29 13:32 (external edit)