blob: 58530a93bc76f46c3958b4c2f2a7d860db9ecb1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# coding=utf-8
id = 159
name = 'linear_opt/3'
slug = 'linear optimization'
description = '''\
<p>A set of points in the plane is defined by the inequalities</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 and</li>
<li><code>Y</code> ≤ <code>X</code> + 5.</li>
</ul>
<p>The predicate <code>linear_opt(X, Y, MaxE)</code> should return the point (<code>X</code>, <code>Y</code>) where the expression <code>E = -0.4*X + 3.2*Y</code> has the largest value.</p>'''
hint = {}
|