ExamplesJaCoP
Class MasterClass

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

public class MasterClass
extends Example

It solves a logic puzzle about singing women.

Author:
Zbigniew Danielczyk, Mariusz Jedrzejko, and Radoslaw Szymanek The great mezzo-soprano Flora Nebbiacorno has retired from the international opera stage, but she still teaches master classes regularly. At a recent class, her five students were one soprano, one mezzo-soprano, two tenors, and one bass. (The first two voice types are women's, and the last two are men's). Their first names are Chris, J.P., Lee, Pat, and Val -- any of which could belong to a man or a woman - - and their last names are Kingsley, Robinson, Robinson (the two are unrelated but have the same last name), Ulrich, and Walker. Can you find the order in which these five sang for the class, identifying each by full name and voice type? 1. The first and second students were, in some order, Pat and the bass. 2. The second and third students included at least one tenor. 3. Kingsley and the fifth student (who isn't named Robinson) were, in some order, a mezzo-soprano and a tenor. 4. Neither the third student, whose name is Robinson, nor Walker has the first name of Chris. 5. Ulrich is not the bass or the mezzo-soprano. 6. Neither Lee or Val (who wasn't third) is a tenor. 7. J.P. wasn't third, and Chris wasn't fifth. 8. The bass isn't named Robinson. Determine: Order -- First name -- Last name -- Voice

Field Summary
 
Fields inherited from class ExamplesJaCoP.Example
cost, search, store, vars
 
Constructor Summary
MasterClass()
           
 
Method Summary
static void main(java.lang.String[] args)
          It executes the program to solve this simple logic 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

MasterClass

public MasterClass()
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 to solve this simple logic puzzle.

Parameters:
args - no arguments is used.