public class Flowers extends ExampleFD
Each of four women in our office was delighted to receive a floral delivery at her desk this month. Each of the women (Emma, Kristin, Lynn, and Toni) received flowers from her husband (Doug, Justin, Shane, or Theo) for a different special occasion. Each bouquet consisted of a different type of flower, and each was delivered during the first four weeks of February. From the following clues, can you match each woman with her husband and determine the date on which each woman received flowers, the occasion for the flowers, and the type of flowers in each bouquet?
Calendar for February
Mon Tue Wed Thu Fri - 1 2 3 4 7 8 9 10 11 14 15 16 17 18 21 22 23 24 25
1. No two women received flowers on the same day of the week, and no two received flowers during the same week.
2. The woman who received flowers for Valentine's Day had them delivered on either Friday the 11th or Monday the 14th.
3. Emma received flowers one day later in the week than the woman who received flowers to celebrate a promotion.
4. Lynn received flowers either the week before or the week after the woman who received violets.
5. Justin's wife received flowers on either Monday the 7th (in which case she is the one who received white roses) or on Thursday the 24th (in which case she is the woman who received flowers to celebrate her birthday).
6. Theo's wife didn't receive flowers exactly eight days before the woman who received chrysanthemums.
7. Toni's husband is either Doug or Shane.
8. One woman received either chrysanthemums or white roses for her wedding anniversary.
9. Kristin received flowers on either Tuesday the 1st (in which case she is the one who received daisies) or Friday the 18th (in which case she received them from Doug).
10. Shane's wife received flowers during the second week of the month.
Determine: woman, husband, date, occasion, type of flowers
|Constructor and Description|
|Modifier and Type||Method and Description|
It executes the program which solves this logic puzzle.
It specifies a standard way of modeling the problem.
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
public void model()
public static void main(String args)
args- no argument is used.
Copyright © 2018. All rights reserved.