public class FourIslands extends ExampleFD
A tiny nation in the South Pacific contains four islands connected by bridges as shown (see below). Each of the four islands (Pwana, Quero, Rayou, and Skern) boasts a different primary export (alabaster, bananas, coconuts, and durian fruit) and a different tourist attraction (hotel, ice skating rink, jai alai stadium, and koala preserve). Can you find the name, export, and tourist attraction of each island on the map?
N W E *compass directions S
A, B, C, D are the islands
(A) -- (B) | | | | (C) -- (D)
(view with non-proportional font) 1. The island noted for its koala preserve is due south of Pwana.
2. The island with the largest alabaster quarry is due west of Quero.
3. The island with the resort hotel is due east of the one that exports durian fruit.
4. Skern and the island with the jai alai stadium are connected by a north-south bridge.
5. Rayou and the island that exports bananas are connected by an east-west bridge.
6. The islands noted for the South Pacific's largest ice skating rink and for the jai alai stadium are not connected by a bridge.
Determine: Island location -- Island name -- Export -- Tourist Attraction
ANSWER: Northwest, Pwana, durian fruit, ice skating rink Northeast, Skern, coconuts, hotel Southwest, Rayou, alabaster, koala preserve Southeast, Quero, bananas, jai alai stadium
|Constructor and Description|
|Modifier and Type||Method and Description|
It executes a program to solve this simple 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.