summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2016-04-24 21:34:35 +0200
committerAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2016-04-24 21:34:35 +0200
commit8c04e6a402aba2270aadc78fb44cfa8b3762d42c (patch)
tree566311608edf4a4e292d2eb22192143da44bcf38
parent77adbfbf6ff1923e913e4a29a7ec675c64c9a899 (diff)
CLP(R) exercises: Slovenian descriptions added.
-rw-r--r--prolog/problems/clp_r/bounding_box_3/sl.py13
-rw-r--r--prolog/problems/clp_r/center_3/sl.py14
-rw-r--r--prolog/problems/clp_r/linear_opt_3/sl.py17
-rw-r--r--prolog/problems/clp_r/max_sum_2/sl.py15
4 files changed, 59 insertions, 0 deletions
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 = '''\
+<p><code>bounding_box(Points, X1/Y1, X2/Y2)</code>: <code>X1/Y1</code> in <code>X2/Y2</code> sta spodnja-leva in zgornja-desna točka, ki definirata najmanjši pravokotnik, ki vsebuje vse točke v seznamu <code>Points</code>.
+<pre>
+?- 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.
+</pre>'''
+
+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 = '''\
+<p><code>center(Points, R, X/Y)</code>: <code>X/Y</code> je točka v seznamu točk <code>Points</code>, ki je za največ <code>R</code> oddaljena od vseh ostalih točk v seznamu.</p>
+<pre>
+?- 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.
+</pre>'''
+
+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 = '''\
+<p>Množica točk v ravnini je podana z naslednjimi neenačbami:</p>
+<ul>
+ <li>0 ≤ <code>X</code> ≤ 5,</li>
+ <li><code>Y</code> ≥ 0,</li>
+ <li><code>X</code> + <code>Y</code> ≤ 7,</li>
+ <li><code>X</code> + 2*<code>Y</code> ≥ 4 ter</li>
+ <li><code>Y</code> ≤ <code>X</code> + 5.</li>
+</ul>
+<p>Predikat <code>linear_opt(X, Y, MaxE)</code> naj vrne točko (<code>X</code>, <code>Y</code>) v kateri ima izraz <code>E = -0.4*X + 3.2*Y</code> največjo vrednost.</p>'''
+
+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 = '''\
+<p><code>max_sum(List, Max)</code>: <code>Max</code> je največja možna vsota dveh sosednih elementov v seznamu <code>List</code>.</p>
+<pre>
+?- 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.
+</pre>'''
+
+hint = {}