ExamplesJaCoP
Class BlueberryMuffins

java.lang.Object
  extended by ExamplesJaCoP.Example
      extended by ExamplesJaCoP.BlueberryMuffins

public class BlueberryMuffins
extends Example

It solves a simple logic puzzle about blueberry muffins.

Author:
Radoslaw Szymanek 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

Field Summary
 
Fields inherited from class ExamplesJaCoP.Example
cost, search, store, vars
 
Constructor Summary
BlueberryMuffins()
           
 
Method Summary
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 ExamplesJaCoP.Example
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlueberryMuffins

public BlueberryMuffins()
Method Detail

model

public void model()
Description copied from class: Example
It specifies a standard way of modeling the problem.

Specified by:
model in class Example

main

public static void main(java.lang.String[] args)
It executes the program solving this puzzle.

Parameters:
args - no arguments are read.