Class BlueberryMuffins
- java.lang.Object
-
- org.jacop.examples.fd.ExampleFD
-
- org.jacop.examples.fd.BlueberryMuffins
-
public class BlueberryMuffins extends ExampleFD
It solves a simple logic puzzle about blueberry muffins.- Version:
- 4.7
Logic Puzzle: Blueberry Muffins
Description :
Daniel made a dozen blueberry muffins on Friday night -- and by the timehe was ready for brunch on Saturday, there were only two left. The other ten had been snitched by his housemates, all of whom had gotten up early because they had to work on Saturday. The fourhousemates include two men named Bill and Mark, and two women named Calla and Lynn; last names are Ellis, Ingham, Oakley, and Summers, and their differing professions are dogcatcher, flautist, secretary, and zookeeper. Can you discover each one's full name, profession, and number of muffins snitched?
1. Each housemate snitched a different number of muffins from one to four. 2. Bill and Ellis snitched a total of six muffins. 3. The secretary (who is a woman) snitched more than the dogcatcher. 4. Mark snitched two more than Summers did. 5. The flautist snitched twice as many as Ms. Oakley did. 6. Calla's last name isn't Ingham.
Solution:
Calla Oakley dogcatcher 1 muffin Bill Summers flautist 2 muffins Lynn Ingham secretary 3 muffins Mark Ellis zookeeper 4 muffins
-
-
Constructor Summary
Constructors Constructor Description BlueberryMuffins()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
It executes the program solving this puzzle.void
model()
It specifies a standard way of modeling the problem.-
Methods inherited from class org.jacop.examples.fd.ExampleFD
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
-
-
-
-
Method Detail
-
model
public void model()
Description copied from class:ExampleFD
It specifies a standard way of modeling the problem.
-
main
public static void main(java.lang.String[] args)
It executes the program solving this puzzle.- Parameters:
args
- no arguments are read.
-
-