From 8c04e6a402aba2270aadc78fb44cfa8b3762d42c Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Sun, 24 Apr 2016 21:34:35 +0200 Subject: CLP(R) exercises: Slovenian descriptions added. --- prolog/problems/clp_r/bounding_box_3/sl.py | 13 +++++++++++++ prolog/problems/clp_r/center_3/sl.py | 14 ++++++++++++++ prolog/problems/clp_r/linear_opt_3/sl.py | 17 +++++++++++++++++ prolog/problems/clp_r/max_sum_2/sl.py | 15 +++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 prolog/problems/clp_r/bounding_box_3/sl.py create mode 100644 prolog/problems/clp_r/center_3/sl.py create mode 100644 prolog/problems/clp_r/linear_opt_3/sl.py create mode 100644 prolog/problems/clp_r/max_sum_2/sl.py (limited to 'prolog') diff --git a/prolog/problems/clp_r/bounding_box_3/sl.py b/prolog/problems/clp_r/bounding_box_3/sl.py new file mode 100644 index 0000000..81bfdbd --- /dev/null +++ b/prolog/problems/clp_r/bounding_box_3/sl.py @@ -0,0 +1,13 @@ +# coding=utf-8 + +name = 'bounding_box/3' +slug = 'najdi najmanjši pravokotnik okoli podanih točk' + +description = '''\ +

bounding_box(Points, X1/Y1, X2/Y2): X1/Y1 in X2/Y2 sta spodnja-leva in zgornja-desna točka, ki definirata najmanjši pravokotnik, ki vsebuje vse točke v seznamu Points. +

+?- bounding_box([4.5/2.3, 3.6/1.2, 6.7/0.1], X1/Y1, X2/Y2).
+  X1 = 3.6, Y1 = 0.1, X2 = 6.7, Y2 = 2.3.
+
''' + +hint = {} diff --git a/prolog/problems/clp_r/center_3/sl.py b/prolog/problems/clp_r/center_3/sl.py new file mode 100644 index 0000000..74f11b5 --- /dev/null +++ b/prolog/problems/clp_r/center_3/sl.py @@ -0,0 +1,14 @@ +# coding=utf-8 + +name = 'center/3' +slug = 'najdi središča' + +description = '''\ +

center(Points, R, X/Y): X/Y je točka v seznamu točk Points, ki je za največ R oddaljena od vseh ostalih točk v seznamu.

+
+?- center([1.0/1.1, 2.0/2.1, 3.0/3.1, 4.0/4.1], 4.0, X/Y).
+  X = 2.0, Y = 2.1 ;
+  X = 3.0, Y = 3.1.
+
''' + +hint = {} diff --git a/prolog/problems/clp_r/linear_opt_3/sl.py b/prolog/problems/clp_r/linear_opt_3/sl.py new file mode 100644 index 0000000..512c6b8 --- /dev/null +++ b/prolog/problems/clp_r/linear_opt_3/sl.py @@ -0,0 +1,17 @@ +# coding=utf-8 + +name = 'linear_opt/3' +slug = 'linearna optimizacija' + +description = '''\ +

Množica točk v ravnini je podana z naslednjimi neenačbami:

+ +

Predikat linear_opt(X, Y, MaxE) naj vrne točko (X, Y) v kateri ima izraz E = -0.4*X + 3.2*Y največjo vrednost.

''' + +hint = {} diff --git a/prolog/problems/clp_r/max_sum_2/sl.py b/prolog/problems/clp_r/max_sum_2/sl.py new file mode 100644 index 0000000..b73459e --- /dev/null +++ b/prolog/problems/clp_r/max_sum_2/sl.py @@ -0,0 +1,15 @@ +# coding=utf-8 + +name = 'max_sum/2' +slug = 'najdi največja sosedna elementa seznama' + +description = '''\ +

max_sum(List, Max): Max je največja možna vsota dveh sosednih elementov v seznamu List.

+
+?- max_sum([4.5, 3.6, 1.2, 6.7], Max).
+  Max = 8.1.
+?- max_sum([1.1, 1.2, -12.3, 8.8], Max).
+  Max = 2.3.
+
''' + +hint = {} -- cgit v1.2.1