Skip to content

GithubRealFan/SimplePrologProjecs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Two Simple Prolog Projects.

Suko

Every day, The Times newspaper publishes a Suko puzzle. Readers are challenged to place the digits 1 to 9 in the cells of a grid so that numbers in four white circles are the sums of the digits in the cells surrounding them, and the numbers in the three coloured circles are the sums of the digits in the cells of the same colour. Suko 3566 of Thursday 12th August 2022, and its solution are shown in Figure 1.

image

sample input and output:

Input: suko( 15, 14, 26, 23 , [0,1,2,3], 16 , [4,6,7], 17 , [5,8], 12 , GRID ).

Output: GRID = [1, 2, 4, 9, 3, 5, 6, 8, 7]

The Bearings’ Trait

At Teaser Tor trig. point I found a geocaching box. The three-figure compass bearings (bearing 000 = north, 090 = east, etc.) from there to the church spires at Ayton, Beeton and Seaton were needed to decode the clue to the next location. Each spire lay in a different compass quadrant (eg. 000 to 090 [sic] is the North-East quadrant). Curiously, each of the numerals 1 to 9 occurred in these bearings and none of the bearings were prime values. Given the above, if you chose one village at random to be told only its church spire’s bearing, it might be that you could not calculate the other two bearings with certainty, but it would be more likely that you could. Give the three bearings in ascending order.

sample input and output:

Input: acceptable( 169, 247, 358 )

Output: true

Releases

No releases published

Packages

No packages published

Languages