Autor Beitrag
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: Fr 25.12.09 18:56 
Auch wenn Bonuszahlungen dieses Jahr wirtschaftsbedingt ausfallen werden, darf sich der Weihnachtsmann immerhin über die Zahl 4304761169 auf seinem nächsten Gehaltszettel freuen :D .

Im Anhang findet sich das ausgefüllte Schema (txt, 8.03 KB) sowie eine Skizze (pdf, 87.27 KB) des angedachten Lösungsverfahrens. Anscheinend haben bei vielen aber auch simplere Ideen zum Ziel geführt, wie langweilig ;P .
Einloggen, um Attachments anzusehen!
_________________
>λ=
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 25.12.09 21:48 
Also, meine Lösung ist so einfach, wie genial: Wie erschlagen die Aufgabe mit einem linearen Gleichungssystem :mrgreen:

Jetzt bleiben da noch die Fragen:
1. Wie sehen die Gleichungen aus?
2. Wie behandelt man die dabei auftretenden Faktoren?

Hier mal meine (zusammengehackte) PHP-Lösung:
ausblenden volle Höhe Zusammengehackte PHP-Lösung:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
<?php

define('BLANK''___________');

$Schema = <<<VERDIENST
___________
___________ ___________
___________ ___________ ___________
___________  542353018  ___________ ___________
___________ ___________  270488136   266170472  ___________
___________ ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________ ___________ ___________   4263762   ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________   1859824   ___________   1610467
___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________   532656    ___________ ___________ ___________ ___________ ___________ ___________   466095      424991    ___________ ___________
___________   267918    ___________ ___________   264672    ___________ ___________ ___________ ___________ ___________ ___________ ___________   202462    ___________ ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________   116973    ___________ ___________ ___________ ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________    66410    ___________ ___________ ___________ ___________ ___________ ___________ ___________    49254    ___________
___________ ___________ ___________ ___________    33843    ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________    23357    ___________ ___________
___________    15428       16330    ___________ ___________ ___________ ___________ ___________    16581    ___________ ___________ ___________ ___________    13956    ___________ ___________ ___________    13900    ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________    8192     ___________ ___________    8407     ___________ ___________ ___________ ___________ ___________ ___________    7515     ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________    4056     ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________
   2114     ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________    1057     ___________
___________     526     ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________     510     ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________
___________     152     ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________     124     ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________     61      ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________     72      ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________ ___________     28      ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________     29      ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________
___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________     21      ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________     13      ___________ ___________ ___________
___________ ___________     16      ___________ ___________ ___________      9      ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ ___________      4           3      ___________ ___________ ___________ ___________ ___________     10      ___________ ___________
VERDIENST;

echo "Daten einlesen ...\r\n";
$Schema = explode("\r\n", $Schema);

$data = array();
foreach($Schema as $Level) {
    $dataLevel = array();
    while(!empty($Level)){
        $dataLevel[] = trim(substr($Level, 011));
        $Level = substr($Level, 12);
    } // while
    $data[] = $dataLevel;
}

$Schema = $data;

echo "Pre-Optimierung ...\r\n";
$blank = 0;
while($blank) {
    $blank--;

    $row = rand(0, count($Schema)-1);
    $col = rand(0, $row);
    
    $cell = $Schema[$row][$col];
    
    if(BLANK != $cell) {
        //Check if we can fill in below ...
        if($row < count($Schema)-1) {
            $c1 = $Schema[$row+1][$col];
            $c2 = $Schema[$row+1][$col+1];
        
            if(BLANK == $c1 && BLANK != $c2) {
                $c1 = $cell - $c2;
                $Schema[$row+1][$col] = $c1;
                $blank+=10;
            }

            if(BLANK != $c1 && BLANK == $c2) {
                $c2 = $cell - $c1;
                $Schema[$row+1][$col+1] = $c2;
                $blank+=10;
            }
        }
    } else {
        //Look if we can add from below ...
        if($row < count($Schema)-1) {
            $c1 = $Schema[$row+1][$col];
            $c2 = $Schema[$row+1][$col+1];
        
            if(BLANK != $c1 && BLANK != $c2) {
                $cell = $c1 + $c2;
                $Schema[$row][$col] = $cell;
                $blank+=10;
            }
        }

        //Look if we can conclude from above
        if(0 < $row) {
            //Left boundary check ...
            if(0 == $col) {
                $c1 = $Schema[$row-1][$col];
                $c2 = $Schema[$row][$col+1];
                if(BLANK != $c1 && BLANK != $c2) {
                    $cell = $c1 - $c2;
                    $Schema[$row][$col] = $cell;
                    $blank+=10;
                }
            } elseif ($col < $row) {
                $c1 = $Schema[$row-1][$col];
                $c2 = $Schema[$row][$col+1];
                if(BLANK != $c1 && BLANK != $c2) {
                    $cell = $c1 - $c2;
                    $Schema[$row][$col] = $cell;
                    $blank+=10;
                }

                $c1 = $Schema[$row-1][$col-1];
                $c2 = $Schema[$row][$col-1];
                if(BLANK != $c1 && BLANK != $c2) {
                    $cell = $c1 - $c2;
                    $Schema[$row][$col] = $cell;
                    $blank+=10;
                }
            } elseif ($col == $row) {
                $c1 = $Schema[$row-1][$col-1];
                $c2 = $Schema[$row][$col-1];
                if(BLANK != $c1 && BLANK != $c2) {
                    $cell = $c1 - $c2;
                    $Schema[$row][$col] = $cell;
                    $blank+=10;
                }
            }
            
        }
    }
    
}

echo "Optimierter Baum ...\r\n";

foreach($Schema as $Line) {
    foreach($Line as $Item) {
        printf('%11s ', $Item);
    }
    echo "\r\n";
}

echo "Gleichungssystem vorbereiten ...\r\n";

$vars = array();
$knowns = array();
$equ = array();
$maxline = count($Schema) - 1;

foreach($Schema as $row => $Line) {
    foreach($Line as $col => $Item) {
        $varid = count($vars);
        $vars[$varid] = array($row, $col);
        if (BLANK != $Item) {
            $knowns[$varid] = (int)$Item;
        }
        if($row < $maxline) {
            $c1 = ($row * ($row + 1)) / 2 + $col;
            $c2 = (($row + 1) * ($row + 2)) / 2 + $col;
            $c3 = (($row + 1) * ($row + 2)) / 2 + $col + 1;

            $equ[] = array($c1, $c2, $c3);
        }
    }
}

//Calc the size (number of knows + number of equations)
//Width = number of variables + 1

$equationLine = array_fill(0, count($vars) + 10);
$eqSys = array_fill(0, count($knowns) + count($equ), $equationLine);
$i = 0;
foreach($knowns as $id => $val) {
    $eqSys[$i][$id] = 1;
    $eqSys[$i][count($vars)] = $val;
    $i++;
}
foreach($equ as $id => $cond) {
    $eqSys[$i][$cond[0]] = 1;
    $eqSys[$i][$cond[1]] = -1;
    $eqSys[$i][$cond[2]] = -1;
    $eqSys[$i][count($vars)] = 0;
    $i++;
}

//var_dump($eqSys);
showSys($eqSys);

echo "Gleichungssystem lösen ...\r\n";
$data = SolveLES($eqSys);

foreach($data as $i => $l) {
    foreach($l as $j => $c) {
        $data[$i][$j] = round($c, 1);
        if(abs($data[$i][$j]) < 1) $data[$i][$j] = 0;
    }

}

showSys($data);

foreach($vars as $i => $v) {
    $Schema[$v[0]][$v[1]] = $data[$i][count($vars)];
}
foreach($Schema as $Line) {
    foreach($Line as $Item) {
        printf('%11s ', $Item);
    }
    echo "\r\n";
}

function showSys($A) {
    echo "\r\n";
    foreach($A as $l) {
        foreach($l as $c) {
            echo $c . " ";
        }
        echo "\r\n";
    }
}

function SolveLES($A) {
    // DONE -oBenBE -cMaths, Matrix : SolveLES reorganized and rebuilt
    // DONE -oBenBE -cBug, Maths, Matrix : AV in Eliminationszyklus

    $SY = count($A);
    $SX = count($A[0]);

//    If (($SY <= 0) || (($SX <> $SY + 1) && ($SX <> $SY))) {
//        //RaiseInvalidDim;
//        return array(1337);
//    }

    $Result = $A;

    //Elimination Cycle:
    $ActRow = 0;
    For ($ActCol = 0; $ActCol < $SY; $ActCol++) {
        If (abs($Result[$ActRow][$ActCol]) < 1E-4) {
              $Swapped = False;
            For ($ActRow2Swap = $ActRow + 1; $ActRow2Swap < $SY; $ActRow2Swap++) {
                If (abs($Result[$ActRow2Swap][$ActCol]) >= 1E-4) {
                    $tmp = $Result[$ActRow2Swap];
                    $Result[$ActRow2Swap] = $Result[$ActRow];
                    $Result[$ActRow] = $tmp;
                    $Swapped = True;
                    Break;
                }
            }

            If(!$Swapped)
                Continue;
        }

        For( $ActRow2Work = $ActRow + 1; $ActRow2Work < $SY; $ActRow2Work++) {
            If (abs($Result[$ActRow2Work][$ActCol]) >= 1E-4) {
                //MatrixRowSub($Result, $ActRow2Work, $ActRow, $Result[$ActRow2Work][$ActCol] / $Result[$ActRow][$ActCol]);
                $tmp = $Result[$ActRow2Work][$ActCol] / $Result[$ActRow][$ActCol];
                for($MRSWork = 0; $MRSWork < $SX; $MRSWork++) {
                    $Result[$ActRow2Work][$MRSWork] -= $Result[$ActRow][$MRSWork] * $tmp;
                }
            }
        }
            
        $ActRow++;
    }

    //Back Substitution Cycle:
    For ($ActRow = $SY - 1; $ActRow >= 0; $ActRow--) {
        For ($ActCol = $ActRow; $ActCol < $SX; $ActCol++) {
            If (abs($Result[$ActRow][$ActCol]) > 1E-4) {
                //MatrixRowDiv($Result, $ActRow, $Result[$ActRow][$ActCol]);
                $tmp = $Result[$ActRow][$ActCol];
                for($MRDWork = 0; $MRDWork < $SX; $MRDWork++) {
                    $Result[$ActRow][$MRDWork] /= $tmp;
                }

                If ($ActCol <> $SX - 1) {
                    For ($ActRow2Work = 0; $ActRow2Work < $ActRow; $ActRow2Work++) {
                        If ($Result[$ActRow2Work][$ActCol] <> 0) {
                            //MatrixRowSub($Result, $ActRow2Work, $ActRow, $Result[$ActRow2Work][$ActCol]);
                            $tmp = $Result[$ActRow2Work][$ActCol];
                            for($MRSWork = 0; $MRSWork < $SX; $MRSWork++) {
                                $Result[$ActRow2Work][$MRSWork] -= $Result[$ActRow][$MRSWork] * $tmp;
                            }
                        }
                    }
                }

                Break;
            }
        }
    }

    return $Result;
}

?>


Das Verstehen sei dem geneigten Leser überlassen ;-)

Zur Erklärung aber vielleicht soviel:

Ich ordne jedem Wichtel\Weihnachtsmann eine Variable zu. Zusätzlich merke ich mir, wo dieser im Original-Array steht (Anzeige später)

Nun stelle ich Gleichungen mit den Abhängigkeiten auf:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
w[0] - w[1] - w[2] = 0;

w[1] - w[3] - w[4] = 0;
w[2] - w[4] - w[5] = 0;

...


Davor trage ich aber für alle Wichtel, deren Gehalt bekannt ist dies auch als Gleichungen ein:

ausblenden Quelltext
1:
w[7] = Gehalt;					


Danach das Gleichungssystem linear erschlagen und die Lösungen zurück in die Gehaltsliste übertragen und den Kram ausgeben.

Auf Grund von Rundungsfehlern liefert PHP für die unteren Reihen ein wenig ungenaue Werte. Diese Rundungsfehler stören aber für die oberen Zahlen nicht, da diese auf Grund des frühen Auftauchens in den Gleichungen als erste ermittelt werden.

Um die genaue Lösung haben sich dann aber doch noch andere gekümmert: Wer etwas in der letzten Zeit aufgepasst hat, dürfte ggf. mitbekommen haben, dass Flamefire eine Erweiterung meiner BigNum2-Unit zum Verarbeiten von Vorzeichen geschrieben hat. Flamefire hat das entstandene Gleichungssystem nämlich mit BigNum2 erschlagen - einen Aufwand, den ich mir nicht antun wollte, da ich mit sehr hoher Wahrscheinlichkeit davon ausgehen konnte, das meine Lösung ausreichend genau war - für den Weihnachtsmann (Geizhals :mrgreen:)

Eine andere Lösung basiert auf linearer Optimierung. Das erklärt aber IMHO dessen Anwender am Besten ;-)

P.S.: SolveLES ist eine Portierung der gleichnamigen Funktion aus der Mathe-Bibliothek von Omorphia.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Fr 25.12.09 23:56 
Hm.. Gleichungen..
Hab mir einfach ne Software geschrieben, die den Baum durchrechnet, also lösbare Felder einträgt.
Danach hab ich einfach Werte in der unteren Reihe ausprobiert, und mir das Ergebnis angesehen ;)

Hatte nur leider keine Zeit mehr, das fertig zu machen :(

_________________
PROGRAMMER: A device for converting coffee into software.
Oliver Marx
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 80
Erhaltene Danke: 18

Win 7 Prof.
Delphi XE Prof.
BeitragVerfasst: Sa 26.12.09 01:22 
Hi,

ich wünsche euch allen frohe Weihnachten!

Meine Lösung basiert auf einer linearen Optimierungsstrategie: Integer Linear Programming. Eine ILP-Problembeschreibung besteht aus zwei Teilen: Der zu minimierenden Funktion und den Bedingungen. Der ILP-Solver sucht nun nach der Variablenbelegung, welche alle Bedingungen erfüllt und die zu minimierenden Funktion dabei minimiert.
Die Bedingungen haben dabei alle fogenden Aufbau:

ausblenden Quelltext
1:
2:
3:
Summe für i von 1 bis n (a[i]*x[i]) <= d
a[i] sind dabei reelle Zahlen und x[i] die ganzzahligen Variablen
d ist ebenfalls eine reelle Zahl


Die zu minimierende Funktion hängt ebenfalls von den ganzzahligen Variablen linear ab.

Zur Lösung dieser Paranuss habe ich folgende Variablenbenennung benutzt.

ausblenden Quelltext
1:
2:
3:
4:
5:
                    x_0_0
                x_0_1   x_1_1
            x_0_2   x_1_2   x_2_2
         ...     ...     ...     ...
  x_0_29     ...     ...     ...     x_29_29


Da es in diesem Fall nur eine Lösung gibt, bzw. gesucht ist, gibt es keine zu minimierende Funktion. Daher habe ich die Funktion f(x_0_0,...,f_29_29) = x_0_0 als zu minimierende Funktion gewählt.

Die Bedungungen lauten wie folgt:
x_i_(j+1) + x_(i+1)_(j+1) = x_i_j

Da allerdings das "=" Zeichen nicht erlaubt ist, benutzt man folgende Formulierung:
x_i_(j+1) + x_(i+1)_(j+1) <= x_i_j
-x_i_(j+1) - x_(i+1)_(j+1) <= -x_i_j

zusätzlich kommen die vorgegebenen Werte in diese Liste:

x_1_3 <= 542353018
-x_1_3 <= -542353018

Nun füttert man einen ILP-Solver mit diesen Informationen und erhält nach ca. 0,5 Sekunden die Lösung: 4304761169

ausblenden volle Höhe paranuss1.ilp
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:
746:
747:
748:
749:
750:
751:
752:
753:
754:
755:
756:
757:
758:
759:
760:
761:
762:
763:
764:
765:
766:
767:
768:
769:
770:
771:
772:
773:
774:
775:
776:
777:
778:
779:
780:
781:
782:
783:
784:
785:
786:
787:
788:
789:
790:
791:
792:
793:
794:
795:
796:
797:
798:
799:
800:
801:
802:
803:
804:
805:
806:
807:
808:
809:
810:
811:
812:
813:
814:
815:
816:
817:
818:
819:
820:
821:
822:
823:
824:
825:
826:
827:
828:
829:
830:
831:
832:
833:
834:
835:
836:
837:
838:
839:
840:
841:
842:
843:
844:
845:
846:
847:
848:
849:
850:
851:
852:
853:
854:
855:
856:
857:
858:
859:
860:
861:
862:
863:
864:
865:
866:
867:
868:
869:
870:
871:
872:
873:
874:
875:
876:
877:
878:
879:
880:
881:
882:
883:
884:
885:
886:
887:
888:
889:
890:
891:
892:
893:
894:
895:
896:
897:
898:
899:
900:
901:
902:
903:
904:
905:
906:
907:
908:
909:
910:
911:
912:
913:
914:
915:
916:
917:
918:
919:
920:
921:
922:
923:
924:
925:
926:
927:
928:
929:
930:
931:
932:
933:
934:
935:
936:
937:
938:
939:
940:
941:
942:
943:
944:
945:
946:
947:
948:
949:
950:
951:
952:
953:
954:
955:
956:
957:
958:
959:
960:
961:
962:
963:
964:
965:
966:
967:
968:
969:
970:
971:
972:
973:
974:
975:
976:
977:
978:
979:
980:
981:
982:
983:
984:
985:
986:
987:
988:
989:
990:
991:
992:
993:
994:
995:
996:
997:
998:
999:
1000:
1001:
1002:
1003:
1004:
1005:
1006:
1007:
1008:
1009:
1010:
1011:
1012:
1013:
1014:
1015:
1016:
1017:
1018:
1019:
1020:
1021:
1022:
1023:
1024:
1025:
1026:
1027:
1028:
1029:
1030:
1031:
1032:
1033:
1034:
1035:
1036:
1037:
1038:
1039:
1040:
1041:
1042:
1043:
1044:
1045:
1046:
1047:
1048:
1049:
1050:
1051:
1052:
1053:
1054:
1055:
1056:
1057:
1058:
1059:
1060:
1061:
1062:
1063:
1064:
1065:
1066:
1067:
1068:
1069:
1070:
1071:
1072:
1073:
1074:
1075:
1076:
1077:
1078:
1079:
1080:
1081:
1082:
1083:
1084:
1085:
1086:
1087:
1088:
1089:
1090:
1091:
1092:
1093:
1094:
1095:
1096:
1097:
1098:
1099:
1100:
1101:
1102:
1103:
1104:
1105:
1106:
1107:
1108:
1109:
1110:
1111:
1112:
1113:
1114:
1115:
1116:
1117:
1118:
1119:
1120:
1121:
1122:
1123:
1124:
1125:
1126:
1127:
1128:
1129:
1130:
1131:
1132:
1133:
1134:
1135:
1136:
1137:
1138:
1139:
1140:
1141:
1142:
1143:
1144:
1145:
1146:
1147:
1148:
1149:
1150:
1151:
1152:
1153:
1154:
1155:
1156:
1157:
1158:
1159:
1160:
1161:
1162:
1163:
1164:
1165:
1166:
1167:
1168:
1169:
1170:
1171:
1172:
1173:
1174:
1175:
1176:
1177:
1178:
1179:
1180:
1181:
1182:
1183:
1184:
1185:
1186:
1187:
1188:
1189:
1190:
1191:
1192:
1193:
1194:
1195:
1196:
1197:
1198:
1199:
1200:
1201:
1202:
1203:
1204:
1205:
1206:
1207:
1208:
1209:
1210:
1211:
1212:
1213:
1214:
1215:
1216:
1217:
1218:
1219:
1220:
1221:
1222:
1223:
1224:
1225:
1226:
1227:
1228:
1229:
1230:
1231:
1232:
1233:
1234:
1235:
1236:
1237:
1238:
1239:
1240:
1241:
1242:
1243:
1244:
1245:
1246:
1247:
1248:
1249:
1250:
1251:
1252:
1253:
1254:
1255:
1256:
1257:
1258:
1259:
1260:
1261:
1262:
1263:
1264:
1265:
1266:
1267:
1268:
1269:
1270:
1271:
1272:
1273:
1274:
1275:
1276:
1277:
1278:
1279:
1280:
1281:
1282:
1283:
1284:
1285:
1286:
1287:
1288:
1289:
1290:
1291:
1292:
1293:
1294:
1295:
1296:
1297:
1298:
1299:
1300:
1301:
1302:
1303:
1304:
1305:
1306:
1307:
1308:
1309:
1310:
1311:
1312:
1313:
1314:
1315:
1316:
1317:
1318:
1319:
1320:
1321:
1322:
1323:
1324:
1325:
1326:
1327:
1328:
1329:
1330:
1331:
1332:
1333:
1334:
1335:
1336:
1337:
1338:
1339:
1340:
1341:
1342:
1343:
1344:
1345:
1346:
1347:
1348:
1349:
1350:
1351:
1352:
1353:
1354:
1355:
1356:
1357:
1358:
1359:
1360:
1361:
1362:
1363:
1364:
1365:
1366:
1367:
1368:
1369:
1370:
1371:
1372:
1373:
1374:
1375:
1376:
1377:
1378:
1379:
1380:
1381:
1382:
1383:
1384:
1385:
1386:
1387:
1388:
1389:
1390:
1391:
1392:
1393:
1394:
1395:
1396:
1397:
1398:
1399:
1400:
1401:
1402:
1403:
1404:
1405:
1406:
1407:
1408:
1409:
1410:
1411:
1412:
1413:
1414:
1415:
1416:
1417:
1418:
1419:
1420:
1421:
1422:
1423:
1424:
1425:
1426:
1427:
1428:
1429:
1430:
1431:
1432:
1433:
1434:
1435:
1436:
1437:
1438:
1439:
1440:
1441:
1442:
1443:
1444:
1445:
1446:
1447:
1448:
1449:
1450:
1451:
1452:
1453:
1454:
1455:
1456:
1457:
1458:
1459:
1460:
1461:
1462:
1463:
1464:
1465:
1466:
1467:
1468:
1469:
1470:
1471:
1472:
1473:
1474:
1475:
1476:
1477:
min: x_0_0;

 x_0_1 + x_1_1 <=  x_0_0;
-x_0_1 - x_1_1 <= -x_0_0;
 x_0_2 + x_1_2 <=  x_0_1;
-x_0_2 - x_1_2 <= -x_0_1;
 x_1_2 + x_2_2 <=  x_1_1;
-x_1_2 - x_2_2 <= -x_1_1;
 x_0_3 + x_1_3 <=  x_0_2;
-x_0_3 - x_1_3 <= -x_0_2;
 x_1_3 + x_2_3 <=  x_1_2;
-x_1_3 - x_2_3 <= -x_1_2;
 x_2_3 + x_3_3 <=  x_2_2;
-x_2_3 - x_3_3 <= -x_2_2;
 x_0_4 + x_1_4 <=  x_0_3;
-x_0_4 - x_1_4 <= -x_0_3;
 x_1_4 + x_2_4 <=  x_1_3;
-x_1_4 - x_2_4 <= -x_1_3;
 x_2_4 + x_3_4 <=  x_2_3;
-x_2_4 - x_3_4 <= -x_2_3;
 x_3_4 + x_4_4 <=  x_3_3;
-x_3_4 - x_4_4 <= -x_3_3;
 x_0_5 + x_1_5 <=  x_0_4;
-x_0_5 - x_1_5 <= -x_0_4;
 x_1_5 + x_2_5 <=  x_1_4;
-x_1_5 - x_2_5 <= -x_1_4;
 x_2_5 + x_3_5 <=  x_2_4;
-x_2_5 - x_3_5 <= -x_2_4;
 x_3_5 + x_4_5 <=  x_3_4;
-x_3_5 - x_4_5 <= -x_3_4;
 x_4_5 + x_5_5 <=  x_4_4;
-x_4_5 - x_5_5 <= -x_4_4;
 x_0_6 + x_1_6 <=  x_0_5;
-x_0_6 - x_1_6 <= -x_0_5;
 x_1_6 + x_2_6 <=  x_1_5;
-x_1_6 - x_2_6 <= -x_1_5;
 x_2_6 + x_3_6 <=  x_2_5;
-x_2_6 - x_3_6 <= -x_2_5;
 x_3_6 + x_4_6 <=  x_3_5;
-x_3_6 - x_4_6 <= -x_3_5;
 x_4_6 + x_5_6 <=  x_4_5;
-x_4_6 - x_5_6 <= -x_4_5;
 x_5_6 + x_6_6 <=  x_5_5;
-x_5_6 - x_6_6 <= -x_5_5;
 x_0_7 + x_1_7 <=  x_0_6;
-x_0_7 - x_1_7 <= -x_0_6;
 x_1_7 + x_2_7 <=  x_1_6;
-x_1_7 - x_2_7 <= -x_1_6;
 x_2_7 + x_3_7 <=  x_2_6;
-x_2_7 - x_3_7 <= -x_2_6;
 x_3_7 + x_4_7 <=  x_3_6;
-x_3_7 - x_4_7 <= -x_3_6;
 x_4_7 + x_5_7 <=  x_4_6;
-x_4_7 - x_5_7 <= -x_4_6;
 x_5_7 + x_6_7 <=  x_5_6;
-x_5_7 - x_6_7 <= -x_5_6;
 x_6_7 + x_7_7 <=  x_6_6;
-x_6_7 - x_7_7 <= -x_6_6;
 x_0_8 + x_1_8 <=  x_0_7;
-x_0_8 - x_1_8 <= -x_0_7;
 x_1_8 + x_2_8 <=  x_1_7;
-x_1_8 - x_2_8 <= -x_1_7;
 x_2_8 + x_3_8 <=  x_2_7;
-x_2_8 - x_3_8 <= -x_2_7;
 x_3_8 + x_4_8 <=  x_3_7;
-x_3_8 - x_4_8 <= -x_3_7;
 x_4_8 + x_5_8 <=  x_4_7;
-x_4_8 - x_5_8 <= -x_4_7;
 x_5_8 + x_6_8 <=  x_5_7;
-x_5_8 - x_6_8 <= -x_5_7;
 x_6_8 + x_7_8 <=  x_6_7;
-x_6_8 - x_7_8 <= -x_6_7;
 x_7_8 + x_8_8 <=  x_7_7;
-x_7_8 - x_8_8 <= -x_7_7;
 x_0_9 + x_1_9 <=  x_0_8;
-x_0_9 - x_1_9 <= -x_0_8;
 x_1_9 + x_2_9 <=  x_1_8;
-x_1_9 - x_2_9 <= -x_1_8;
 x_2_9 + x_3_9 <=  x_2_8;
-x_2_9 - x_3_9 <= -x_2_8;
 x_3_9 + x_4_9 <=  x_3_8;
-x_3_9 - x_4_9 <= -x_3_8;
 x_4_9 + x_5_9 <=  x_4_8;
-x_4_9 - x_5_9 <= -x_4_8;
 x_5_9 + x_6_9 <=  x_5_8;
-x_5_9 - x_6_9 <= -x_5_8;
 x_6_9 + x_7_9 <=  x_6_8;
-x_6_9 - x_7_9 <= -x_6_8;
 x_7_9 + x_8_9 <=  x_7_8;
-x_7_9 - x_8_9 <= -x_7_8;
 x_8_9 + x_9_9 <=  x_8_8;
-x_8_9 - x_9_9 <= -x_8_8;
 x_0_10 + x_1_10 <=  x_0_9;
-x_0_10 - x_1_10 <= -x_0_9;
 x_1_10 + x_2_10 <=  x_1_9;
-x_1_10 - x_2_10 <= -x_1_9;
 x_2_10 + x_3_10 <=  x_2_9;
-x_2_10 - x_3_10 <= -x_2_9;
 x_3_10 + x_4_10 <=  x_3_9;
-x_3_10 - x_4_10 <= -x_3_9;
 x_4_10 + x_5_10 <=  x_4_9;
-x_4_10 - x_5_10 <= -x_4_9;
 x_5_10 + x_6_10 <=  x_5_9;
-x_5_10 - x_6_10 <= -x_5_9;
 x_6_10 + x_7_10 <=  x_6_9;
-x_6_10 - x_7_10 <= -x_6_9;
 x_7_10 + x_8_10 <=  x_7_9;
-x_7_10 - x_8_10 <= -x_7_9;
 x_8_10 + x_9_10 <=  x_8_9;
-x_8_10 - x_9_10 <= -x_8_9;
 x_9_10 + x_10_10 <=  x_9_9;
-x_9_10 - x_10_10 <= -x_9_9;
 x_0_11 + x_1_11 <=  x_0_10;
-x_0_11 - x_1_11 <= -x_0_10;
 x_1_11 + x_2_11 <=  x_1_10;
-x_1_11 - x_2_11 <= -x_1_10;
 x_2_11 + x_3_11 <=  x_2_10;
-x_2_11 - x_3_11 <= -x_2_10;
 x_3_11 + x_4_11 <=  x_3_10;
-x_3_11 - x_4_11 <= -x_3_10;
 x_4_11 + x_5_11 <=  x_4_10;
-x_4_11 - x_5_11 <= -x_4_10;
 x_5_11 + x_6_11 <=  x_5_10;
-x_5_11 - x_6_11 <= -x_5_10;
 x_6_11 + x_7_11 <=  x_6_10;
-x_6_11 - x_7_11 <= -x_6_10;
 x_7_11 + x_8_11 <=  x_7_10;
-x_7_11 - x_8_11 <= -x_7_10;
 x_8_11 + x_9_11 <=  x_8_10;
-x_8_11 - x_9_11 <= -x_8_10;
 x_9_11 + x_10_11 <=  x_9_10;
-x_9_11 - x_10_11 <= -x_9_10;
 x_10_11 + x_11_11 <=  x_10_10;
-x_10_11 - x_11_11 <= -x_10_10;
 x_0_12 + x_1_12 <=  x_0_11;
-x_0_12 - x_1_12 <= -x_0_11;
 x_1_12 + x_2_12 <=  x_1_11;
-x_1_12 - x_2_12 <= -x_1_11;
 x_2_12 + x_3_12 <=  x_2_11;
-x_2_12 - x_3_12 <= -x_2_11;
 x_3_12 + x_4_12 <=  x_3_11;
-x_3_12 - x_4_12 <= -x_3_11;
 x_4_12 + x_5_12 <=  x_4_11;
-x_4_12 - x_5_12 <= -x_4_11;
 x_5_12 + x_6_12 <=  x_5_11;
-x_5_12 - x_6_12 <= -x_5_11;
 x_6_12 + x_7_12 <=  x_6_11;
-x_6_12 - x_7_12 <= -x_6_11;
 x_7_12 + x_8_12 <=  x_7_11;
-x_7_12 - x_8_12 <= -x_7_11;
 x_8_12 + x_9_12 <=  x_8_11;
-x_8_12 - x_9_12 <= -x_8_11;
 x_9_12 + x_10_12 <=  x_9_11;
-x_9_12 - x_10_12 <= -x_9_11;
 x_10_12 + x_11_12 <=  x_10_11;
-x_10_12 - x_11_12 <= -x_10_11;
 x_11_12 + x_12_12 <=  x_11_11;
-x_11_12 - x_12_12 <= -x_11_11;
 x_0_13 + x_1_13 <=  x_0_12;
-x_0_13 - x_1_13 <= -x_0_12;
 x_1_13 + x_2_13 <=  x_1_12;
-x_1_13 - x_2_13 <= -x_1_12;
 x_2_13 + x_3_13 <=  x_2_12;
-x_2_13 - x_3_13 <= -x_2_12;
 x_3_13 + x_4_13 <=  x_3_12;
-x_3_13 - x_4_13 <= -x_3_12;
 x_4_13 + x_5_13 <=  x_4_12;
-x_4_13 - x_5_13 <= -x_4_12;
 x_5_13 + x_6_13 <=  x_5_12;
-x_5_13 - x_6_13 <= -x_5_12;
 x_6_13 + x_7_13 <=  x_6_12;
-x_6_13 - x_7_13 <= -x_6_12;
 x_7_13 + x_8_13 <=  x_7_12;
-x_7_13 - x_8_13 <= -x_7_12;
 x_8_13 + x_9_13 <=  x_8_12;
-x_8_13 - x_9_13 <= -x_8_12;
 x_9_13 + x_10_13 <=  x_9_12;
-x_9_13 - x_10_13 <= -x_9_12;
 x_10_13 + x_11_13 <=  x_10_12;
-x_10_13 - x_11_13 <= -x_10_12;
 x_11_13 + x_12_13 <=  x_11_12;
-x_11_13 - x_12_13 <= -x_11_12;
 x_12_13 + x_13_13 <=  x_12_12;
-x_12_13 - x_13_13 <= -x_12_12;
 x_0_14 + x_1_14 <=  x_0_13;
-x_0_14 - x_1_14 <= -x_0_13;
 x_1_14 + x_2_14 <=  x_1_13;
-x_1_14 - x_2_14 <= -x_1_13;
 x_2_14 + x_3_14 <=  x_2_13;
-x_2_14 - x_3_14 <= -x_2_13;
 x_3_14 + x_4_14 <=  x_3_13;
-x_3_14 - x_4_14 <= -x_3_13;
 x_4_14 + x_5_14 <=  x_4_13;
-x_4_14 - x_5_14 <= -x_4_13;
 x_5_14 + x_6_14 <=  x_5_13;
-x_5_14 - x_6_14 <= -x_5_13;
 x_6_14 + x_7_14 <=  x_6_13;
-x_6_14 - x_7_14 <= -x_6_13;
 x_7_14 + x_8_14 <=  x_7_13;
-x_7_14 - x_8_14 <= -x_7_13;
 x_8_14 + x_9_14 <=  x_8_13;
-x_8_14 - x_9_14 <= -x_8_13;
 x_9_14 + x_10_14 <=  x_9_13;
-x_9_14 - x_10_14 <= -x_9_13;
 x_10_14 + x_11_14 <=  x_10_13;
-x_10_14 - x_11_14 <= -x_10_13;
 x_11_14 + x_12_14 <=  x_11_13;
-x_11_14 - x_12_14 <= -x_11_13;
 x_12_14 + x_13_14 <=  x_12_13;
-x_12_14 - x_13_14 <= -x_12_13;
 x_13_14 + x_14_14 <=  x_13_13;
-x_13_14 - x_14_14 <= -x_13_13;
 x_0_15 + x_1_15 <=  x_0_14;
-x_0_15 - x_1_15 <= -x_0_14;
 x_1_15 + x_2_15 <=  x_1_14;
-x_1_15 - x_2_15 <= -x_1_14;
 x_2_15 + x_3_15 <=  x_2_14;
-x_2_15 - x_3_15 <= -x_2_14;
 x_3_15 + x_4_15 <=  x_3_14;
-x_3_15 - x_4_15 <= -x_3_14;
 x_4_15 + x_5_15 <=  x_4_14;
-x_4_15 - x_5_15 <= -x_4_14;
 x_5_15 + x_6_15 <=  x_5_14;
-x_5_15 - x_6_15 <= -x_5_14;
 x_6_15 + x_7_15 <=  x_6_14;
-x_6_15 - x_7_15 <= -x_6_14;
 x_7_15 + x_8_15 <=  x_7_14;
-x_7_15 - x_8_15 <= -x_7_14;
 x_8_15 + x_9_15 <=  x_8_14;
-x_8_15 - x_9_15 <= -x_8_14;
 x_9_15 + x_10_15 <=  x_9_14;
-x_9_15 - x_10_15 <= -x_9_14;
 x_10_15 + x_11_15 <=  x_10_14;
-x_10_15 - x_11_15 <= -x_10_14;
 x_11_15 + x_12_15 <=  x_11_14;
-x_11_15 - x_12_15 <= -x_11_14;
 x_12_15 + x_13_15 <=  x_12_14;
-x_12_15 - x_13_15 <= -x_12_14;
 x_13_15 + x_14_15 <=  x_13_14;
-x_13_15 - x_14_15 <= -x_13_14;
 x_14_15 + x_15_15 <=  x_14_14;
-x_14_15 - x_15_15 <= -x_14_14;
 x_0_16 + x_1_16 <=  x_0_15;
-x_0_16 - x_1_16 <= -x_0_15;
 x_1_16 + x_2_16 <=  x_1_15;
-x_1_16 - x_2_16 <= -x_1_15;
 x_2_16 + x_3_16 <=  x_2_15;
-x_2_16 - x_3_16 <= -x_2_15;
 x_3_16 + x_4_16 <=  x_3_15;
-x_3_16 - x_4_16 <= -x_3_15;
 x_4_16 + x_5_16 <=  x_4_15;
-x_4_16 - x_5_16 <= -x_4_15;
 x_5_16 + x_6_16 <=  x_5_15;
-x_5_16 - x_6_16 <= -x_5_15;
 x_6_16 + x_7_16 <=  x_6_15;
-x_6_16 - x_7_16 <= -x_6_15;
 x_7_16 + x_8_16 <=  x_7_15;
-x_7_16 - x_8_16 <= -x_7_15;
 x_8_16 + x_9_16 <=  x_8_15;
-x_8_16 - x_9_16 <= -x_8_15;
 x_9_16 + x_10_16 <=  x_9_15;
-x_9_16 - x_10_16 <= -x_9_15;
 x_10_16 + x_11_16 <=  x_10_15;
-x_10_16 - x_11_16 <= -x_10_15;
 x_11_16 + x_12_16 <=  x_11_15;
-x_11_16 - x_12_16 <= -x_11_15;
 x_12_16 + x_13_16 <=  x_12_15;
-x_12_16 - x_13_16 <= -x_12_15;
 x_13_16 + x_14_16 <=  x_13_15;
-x_13_16 - x_14_16 <= -x_13_15;
 x_14_16 + x_15_16 <=  x_14_15;
-x_14_16 - x_15_16 <= -x_14_15;
 x_15_16 + x_16_16 <=  x_15_15;
-x_15_16 - x_16_16 <= -x_15_15;
 x_0_17 + x_1_17 <=  x_0_16;
-x_0_17 - x_1_17 <= -x_0_16;
 x_1_17 + x_2_17 <=  x_1_16;
-x_1_17 - x_2_17 <= -x_1_16;
 x_2_17 + x_3_17 <=  x_2_16;
-x_2_17 - x_3_17 <= -x_2_16;
 x_3_17 + x_4_17 <=  x_3_16;
-x_3_17 - x_4_17 <= -x_3_16;
 x_4_17 + x_5_17 <=  x_4_16;
-x_4_17 - x_5_17 <= -x_4_16;
 x_5_17 + x_6_17 <=  x_5_16;
-x_5_17 - x_6_17 <= -x_5_16;
 x_6_17 + x_7_17 <=  x_6_16;
-x_6_17 - x_7_17 <= -x_6_16;
 x_7_17 + x_8_17 <=  x_7_16;
-x_7_17 - x_8_17 <= -x_7_16;
 x_8_17 + x_9_17 <=  x_8_16;
-x_8_17 - x_9_17 <= -x_8_16;
 x_9_17 + x_10_17 <=  x_9_16;
-x_9_17 - x_10_17 <= -x_9_16;
 x_10_17 + x_11_17 <=  x_10_16;
-x_10_17 - x_11_17 <= -x_10_16;
 x_11_17 + x_12_17 <=  x_11_16;
-x_11_17 - x_12_17 <= -x_11_16;
 x_12_17 + x_13_17 <=  x_12_16;
-x_12_17 - x_13_17 <= -x_12_16;
 x_13_17 + x_14_17 <=  x_13_16;
-x_13_17 - x_14_17 <= -x_13_16;
 x_14_17 + x_15_17 <=  x_14_16;
-x_14_17 - x_15_17 <= -x_14_16;
 x_15_17 + x_16_17 <=  x_15_16;
-x_15_17 - x_16_17 <= -x_15_16;
 x_16_17 + x_17_17 <=  x_16_16;
-x_16_17 - x_17_17 <= -x_16_16;
 x_0_18 + x_1_18 <=  x_0_17;
-x_0_18 - x_1_18 <= -x_0_17;
 x_1_18 + x_2_18 <=  x_1_17;
-x_1_18 - x_2_18 <= -x_1_17;
 x_2_18 + x_3_18 <=  x_2_17;
-x_2_18 - x_3_18 <= -x_2_17;
 x_3_18 + x_4_18 <=  x_3_17;
-x_3_18 - x_4_18 <= -x_3_17;
 x_4_18 + x_5_18 <=  x_4_17;
-x_4_18 - x_5_18 <= -x_4_17;
 x_5_18 + x_6_18 <=  x_5_17;
-x_5_18 - x_6_18 <= -x_5_17;
 x_6_18 + x_7_18 <=  x_6_17;
-x_6_18 - x_7_18 <= -x_6_17;
 x_7_18 + x_8_18 <=  x_7_17;
-x_7_18 - x_8_18 <= -x_7_17;
 x_8_18 + x_9_18 <=  x_8_17;
-x_8_18 - x_9_18 <= -x_8_17;
 x_9_18 + x_10_18 <=  x_9_17;
-x_9_18 - x_10_18 <= -x_9_17;
 x_10_18 + x_11_18 <=  x_10_17;
-x_10_18 - x_11_18 <= -x_10_17;
 x_11_18 + x_12_18 <=  x_11_17;
-x_11_18 - x_12_18 <= -x_11_17;
 x_12_18 + x_13_18 <=  x_12_17;
-x_12_18 - x_13_18 <= -x_12_17;
 x_13_18 + x_14_18 <=  x_13_17;
-x_13_18 - x_14_18 <= -x_13_17;
 x_14_18 + x_15_18 <=  x_14_17;
-x_14_18 - x_15_18 <= -x_14_17;
 x_15_18 + x_16_18 <=  x_15_17;
-x_15_18 - x_16_18 <= -x_15_17;
 x_16_18 + x_17_18 <=  x_16_17;
-x_16_18 - x_17_18 <= -x_16_17;
 x_17_18 + x_18_18 <=  x_17_17;
-x_17_18 - x_18_18 <= -x_17_17;
 x_0_19 + x_1_19 <=  x_0_18;
-x_0_19 - x_1_19 <= -x_0_18;
 x_1_19 + x_2_19 <=  x_1_18;
-x_1_19 - x_2_19 <= -x_1_18;
 x_2_19 + x_3_19 <=  x_2_18;
-x_2_19 - x_3_19 <= -x_2_18;
 x_3_19 + x_4_19 <=  x_3_18;
-x_3_19 - x_4_19 <= -x_3_18;
 x_4_19 + x_5_19 <=  x_4_18;
-x_4_19 - x_5_19 <= -x_4_18;
 x_5_19 + x_6_19 <=  x_5_18;
-x_5_19 - x_6_19 <= -x_5_18;
 x_6_19 + x_7_19 <=  x_6_18;
-x_6_19 - x_7_19 <= -x_6_18;
 x_7_19 + x_8_19 <=  x_7_18;
-x_7_19 - x_8_19 <= -x_7_18;
 x_8_19 + x_9_19 <=  x_8_18;
-x_8_19 - x_9_19 <= -x_8_18;
 x_9_19 + x_10_19 <=  x_9_18;
-x_9_19 - x_10_19 <= -x_9_18;
 x_10_19 + x_11_19 <=  x_10_18;
-x_10_19 - x_11_19 <= -x_10_18;
 x_11_19 + x_12_19 <=  x_11_18;
-x_11_19 - x_12_19 <= -x_11_18;
 x_12_19 + x_13_19 <=  x_12_18;
-x_12_19 - x_13_19 <= -x_12_18;
 x_13_19 + x_14_19 <=  x_13_18;
-x_13_19 - x_14_19 <= -x_13_18;
 x_14_19 + x_15_19 <=  x_14_18;
-x_14_19 - x_15_19 <= -x_14_18;
 x_15_19 + x_16_19 <=  x_15_18;
-x_15_19 - x_16_19 <= -x_15_18;
 x_16_19 + x_17_19 <=  x_16_18;
-x_16_19 - x_17_19 <= -x_16_18;
 x_17_19 + x_18_19 <=  x_17_18;
-x_17_19 - x_18_19 <= -x_17_18;
 x_18_19 + x_19_19 <=  x_18_18;
-x_18_19 - x_19_19 <= -x_18_18;
 x_0_20 + x_1_20 <=  x_0_19;
-x_0_20 - x_1_20 <= -x_0_19;
 x_1_20 + x_2_20 <=  x_1_19;
-x_1_20 - x_2_20 <= -x_1_19;
 x_2_20 + x_3_20 <=  x_2_19;
-x_2_20 - x_3_20 <= -x_2_19;
 x_3_20 + x_4_20 <=  x_3_19;
-x_3_20 - x_4_20 <= -x_3_19;
 x_4_20 + x_5_20 <=  x_4_19;
-x_4_20 - x_5_20 <= -x_4_19;
 x_5_20 + x_6_20 <=  x_5_19;
-x_5_20 - x_6_20 <= -x_5_19;
 x_6_20 + x_7_20 <=  x_6_19;
-x_6_20 - x_7_20 <= -x_6_19;
 x_7_20 + x_8_20 <=  x_7_19;
-x_7_20 - x_8_20 <= -x_7_19;
 x_8_20 + x_9_20 <=  x_8_19;
-x_8_20 - x_9_20 <= -x_8_19;
 x_9_20 + x_10_20 <=  x_9_19;
-x_9_20 - x_10_20 <= -x_9_19;
 x_10_20 + x_11_20 <=  x_10_19;
-x_10_20 - x_11_20 <= -x_10_19;
 x_11_20 + x_12_20 <=  x_11_19;
-x_11_20 - x_12_20 <= -x_11_19;
 x_12_20 + x_13_20 <=  x_12_19;
-x_12_20 - x_13_20 <= -x_12_19;
 x_13_20 + x_14_20 <=  x_13_19;
-x_13_20 - x_14_20 <= -x_13_19;
 x_14_20 + x_15_20 <=  x_14_19;
-x_14_20 - x_15_20 <= -x_14_19;
 x_15_20 + x_16_20 <=  x_15_19;
-x_15_20 - x_16_20 <= -x_15_19;
 x_16_20 + x_17_20 <=  x_16_19;
-x_16_20 - x_17_20 <= -x_16_19;
 x_17_20 + x_18_20 <=  x_17_19;
-x_17_20 - x_18_20 <= -x_17_19;
 x_18_20 + x_19_20 <=  x_18_19;
-x_18_20 - x_19_20 <= -x_18_19;
 x_19_20 + x_20_20 <=  x_19_19;
-x_19_20 - x_20_20 <= -x_19_19;
 x_0_21 + x_1_21 <=  x_0_20;
-x_0_21 - x_1_21 <= -x_0_20;
 x_1_21 + x_2_21 <=  x_1_20;
-x_1_21 - x_2_21 <= -x_1_20;
 x_2_21 + x_3_21 <=  x_2_20;
-x_2_21 - x_3_21 <= -x_2_20;
 x_3_21 + x_4_21 <=  x_3_20;
-x_3_21 - x_4_21 <= -x_3_20;
 x_4_21 + x_5_21 <=  x_4_20;
-x_4_21 - x_5_21 <= -x_4_20;
 x_5_21 + x_6_21 <=  x_5_20;
-x_5_21 - x_6_21 <= -x_5_20;
 x_6_21 + x_7_21 <=  x_6_20;
-x_6_21 - x_7_21 <= -x_6_20;
 x_7_21 + x_8_21 <=  x_7_20;
-x_7_21 - x_8_21 <= -x_7_20;
 x_8_21 + x_9_21 <=  x_8_20;
-x_8_21 - x_9_21 <= -x_8_20;
 x_9_21 + x_10_21 <=  x_9_20;
-x_9_21 - x_10_21 <= -x_9_20;
 x_10_21 + x_11_21 <=  x_10_20;
-x_10_21 - x_11_21 <= -x_10_20;
 x_11_21 + x_12_21 <=  x_11_20;
-x_11_21 - x_12_21 <= -x_11_20;
 x_12_21 + x_13_21 <=  x_12_20;
-x_12_21 - x_13_21 <= -x_12_20;
 x_13_21 + x_14_21 <=  x_13_20;
-x_13_21 - x_14_21 <= -x_13_20;
 x_14_21 + x_15_21 <=  x_14_20;
-x_14_21 - x_15_21 <= -x_14_20;
 x_15_21 + x_16_21 <=  x_15_20;
-x_15_21 - x_16_21 <= -x_15_20;
 x_16_21 + x_17_21 <=  x_16_20;
-x_16_21 - x_17_21 <= -x_16_20;
 x_17_21 + x_18_21 <=  x_17_20;
-x_17_21 - x_18_21 <= -x_17_20;
 x_18_21 + x_19_21 <=  x_18_20;
-x_18_21 - x_19_21 <= -x_18_20;
 x_19_21 + x_20_21 <=  x_19_20;
-x_19_21 - x_20_21 <= -x_19_20;
 x_20_21 + x_21_21 <=  x_20_20;
-x_20_21 - x_21_21 <= -x_20_20;
 x_0_22 + x_1_22 <=  x_0_21;
-x_0_22 - x_1_22 <= -x_0_21;
 x_1_22 + x_2_22 <=  x_1_21;
-x_1_22 - x_2_22 <= -x_1_21;
 x_2_22 + x_3_22 <=  x_2_21;
-x_2_22 - x_3_22 <= -x_2_21;
 x_3_22 + x_4_22 <=  x_3_21;
-x_3_22 - x_4_22 <= -x_3_21;
 x_4_22 + x_5_22 <=  x_4_21;
-x_4_22 - x_5_22 <= -x_4_21;
 x_5_22 + x_6_22 <=  x_5_21;
-x_5_22 - x_6_22 <= -x_5_21;
 x_6_22 + x_7_22 <=  x_6_21;
-x_6_22 - x_7_22 <= -x_6_21;
 x_7_22 + x_8_22 <=  x_7_21;
-x_7_22 - x_8_22 <= -x_7_21;
 x_8_22 + x_9_22 <=  x_8_21;
-x_8_22 - x_9_22 <= -x_8_21;
 x_9_22 + x_10_22 <=  x_9_21;
-x_9_22 - x_10_22 <= -x_9_21;
 x_10_22 + x_11_22 <=  x_10_21;
-x_10_22 - x_11_22 <= -x_10_21;
 x_11_22 + x_12_22 <=  x_11_21;
-x_11_22 - x_12_22 <= -x_11_21;
 x_12_22 + x_13_22 <=  x_12_21;
-x_12_22 - x_13_22 <= -x_12_21;
 x_13_22 + x_14_22 <=  x_13_21;
-x_13_22 - x_14_22 <= -x_13_21;
 x_14_22 + x_15_22 <=  x_14_21;
-x_14_22 - x_15_22 <= -x_14_21;
 x_15_22 + x_16_22 <=  x_15_21;
-x_15_22 - x_16_22 <= -x_15_21;
 x_16_22 + x_17_22 <=  x_16_21;
-x_16_22 - x_17_22 <= -x_16_21;
 x_17_22 + x_18_22 <=  x_17_21;
-x_17_22 - x_18_22 <= -x_17_21;
 x_18_22 + x_19_22 <=  x_18_21;
-x_18_22 - x_19_22 <= -x_18_21;
 x_19_22 + x_20_22 <=  x_19_21;
-x_19_22 - x_20_22 <= -x_19_21;
 x_20_22 + x_21_22 <=  x_20_21;
-x_20_22 - x_21_22 <= -x_20_21;
 x_21_22 + x_22_22 <=  x_21_21;
-x_21_22 - x_22_22 <= -x_21_21;
 x_0_23 + x_1_23 <=  x_0_22;
-x_0_23 - x_1_23 <= -x_0_22;
 x_1_23 + x_2_23 <=  x_1_22;
-x_1_23 - x_2_23 <= -x_1_22;
 x_2_23 + x_3_23 <=  x_2_22;
-x_2_23 - x_3_23 <= -x_2_22;
 x_3_23 + x_4_23 <=  x_3_22;
-x_3_23 - x_4_23 <= -x_3_22;
 x_4_23 + x_5_23 <=  x_4_22;
-x_4_23 - x_5_23 <= -x_4_22;
 x_5_23 + x_6_23 <=  x_5_22;
-x_5_23 - x_6_23 <= -x_5_22;
 x_6_23 + x_7_23 <=  x_6_22;
-x_6_23 - x_7_23 <= -x_6_22;
 x_7_23 + x_8_23 <=  x_7_22;
-x_7_23 - x_8_23 <= -x_7_22;
 x_8_23 + x_9_23 <=  x_8_22;
-x_8_23 - x_9_23 <= -x_8_22;
 x_9_23 + x_10_23 <=  x_9_22;
-x_9_23 - x_10_23 <= -x_9_22;
 x_10_23 + x_11_23 <=  x_10_22;
-x_10_23 - x_11_23 <= -x_10_22;
 x_11_23 + x_12_23 <=  x_11_22;
-x_11_23 - x_12_23 <= -x_11_22;
 x_12_23 + x_13_23 <=  x_12_22;
-x_12_23 - x_13_23 <= -x_12_22;
 x_13_23 + x_14_23 <=  x_13_22;
-x_13_23 - x_14_23 <= -x_13_22;
 x_14_23 + x_15_23 <=  x_14_22;
-x_14_23 - x_15_23 <= -x_14_22;
 x_15_23 + x_16_23 <=  x_15_22;
-x_15_23 - x_16_23 <= -x_15_22;
 x_16_23 + x_17_23 <=  x_16_22;
-x_16_23 - x_17_23 <= -x_16_22;
 x_17_23 + x_18_23 <=  x_17_22;
-x_17_23 - x_18_23 <= -x_17_22;
 x_18_23 + x_19_23 <=  x_18_22;
-x_18_23 - x_19_23 <= -x_18_22;
 x_19_23 + x_20_23 <=  x_19_22;
-x_19_23 - x_20_23 <= -x_19_22;
 x_20_23 + x_21_23 <=  x_20_22;
-x_20_23 - x_21_23 <= -x_20_22;
 x_21_23 + x_22_23 <=  x_21_22;
-x_21_23 - x_22_23 <= -x_21_22;
 x_22_23 + x_23_23 <=  x_22_22;
-x_22_23 - x_23_23 <= -x_22_22;
 x_0_24 + x_1_24 <=  x_0_23;
-x_0_24 - x_1_24 <= -x_0_23;
 x_1_24 + x_2_24 <=  x_1_23;
-x_1_24 - x_2_24 <= -x_1_23;
 x_2_24 + x_3_24 <=  x_2_23;
-x_2_24 - x_3_24 <= -x_2_23;
 x_3_24 + x_4_24 <=  x_3_23;
-x_3_24 - x_4_24 <= -x_3_23;
 x_4_24 + x_5_24 <=  x_4_23;
-x_4_24 - x_5_24 <= -x_4_23;
 x_5_24 + x_6_24 <=  x_5_23;
-x_5_24 - x_6_24 <= -x_5_23;
 x_6_24 + x_7_24 <=  x_6_23;
-x_6_24 - x_7_24 <= -x_6_23;
 x_7_24 + x_8_24 <=  x_7_23;
-x_7_24 - x_8_24 <= -x_7_23;
 x_8_24 + x_9_24 <=  x_8_23;
-x_8_24 - x_9_24 <= -x_8_23;
 x_9_24 + x_10_24 <=  x_9_23;
-x_9_24 - x_10_24 <= -x_9_23;
 x_10_24 + x_11_24 <=  x_10_23;
-x_10_24 - x_11_24 <= -x_10_23;
 x_11_24 + x_12_24 <=  x_11_23;
-x_11_24 - x_12_24 <= -x_11_23;
 x_12_24 + x_13_24 <=  x_12_23;
-x_12_24 - x_13_24 <= -x_12_23;
 x_13_24 + x_14_24 <=  x_13_23;
-x_13_24 - x_14_24 <= -x_13_23;
 x_14_24 + x_15_24 <=  x_14_23;
-x_14_24 - x_15_24 <= -x_14_23;
 x_15_24 + x_16_24 <=  x_15_23;
-x_15_24 - x_16_24 <= -x_15_23;
 x_16_24 + x_17_24 <=  x_16_23;
-x_16_24 - x_17_24 <= -x_16_23;
 x_17_24 + x_18_24 <=  x_17_23;
-x_17_24 - x_18_24 <= -x_17_23;
 x_18_24 + x_19_24 <=  x_18_23;
-x_18_24 - x_19_24 <= -x_18_23;
 x_19_24 + x_20_24 <=  x_19_23;
-x_19_24 - x_20_24 <= -x_19_23;
 x_20_24 + x_21_24 <=  x_20_23;
-x_20_24 - x_21_24 <= -x_20_23;
 x_21_24 + x_22_24 <=  x_21_23;
-x_21_24 - x_22_24 <= -x_21_23;
 x_22_24 + x_23_24 <=  x_22_23;
-x_22_24 - x_23_24 <= -x_22_23;
 x_23_24 + x_24_24 <=  x_23_23;
-x_23_24 - x_24_24 <= -x_23_23;
 x_0_25 + x_1_25 <=  x_0_24;
-x_0_25 - x_1_25 <= -x_0_24;
 x_1_25 + x_2_25 <=  x_1_24;
-x_1_25 - x_2_25 <= -x_1_24;
 x_2_25 + x_3_25 <=  x_2_24;
-x_2_25 - x_3_25 <= -x_2_24;
 x_3_25 + x_4_25 <=  x_3_24;
-x_3_25 - x_4_25 <= -x_3_24;
 x_4_25 + x_5_25 <=  x_4_24;
-x_4_25 - x_5_25 <= -x_4_24;
 x_5_25 + x_6_25 <=  x_5_24;
-x_5_25 - x_6_25 <= -x_5_24;
 x_6_25 + x_7_25 <=  x_6_24;
-x_6_25 - x_7_25 <= -x_6_24;
 x_7_25 + x_8_25 <=  x_7_24;
-x_7_25 - x_8_25 <= -x_7_24;
 x_8_25 + x_9_25 <=  x_8_24;
-x_8_25 - x_9_25 <= -x_8_24;
 x_9_25 + x_10_25 <=  x_9_24;
-x_9_25 - x_10_25 <= -x_9_24;
 x_10_25 + x_11_25 <=  x_10_24;
-x_10_25 - x_11_25 <= -x_10_24;
 x_11_25 + x_12_25 <=  x_11_24;
-x_11_25 - x_12_25 <= -x_11_24;
 x_12_25 + x_13_25 <=  x_12_24;
-x_12_25 - x_13_25 <= -x_12_24;
 x_13_25 + x_14_25 <=  x_13_24;
-x_13_25 - x_14_25 <= -x_13_24;
 x_14_25 + x_15_25 <=  x_14_24;
-x_14_25 - x_15_25 <= -x_14_24;
 x_15_25 + x_16_25 <=  x_15_24;
-x_15_25 - x_16_25 <= -x_15_24;
 x_16_25 + x_17_25 <=  x_16_24;
-x_16_25 - x_17_25 <= -x_16_24;
 x_17_25 + x_18_25 <=  x_17_24;
-x_17_25 - x_18_25 <= -x_17_24;
 x_18_25 + x_19_25 <=  x_18_24;
-x_18_25 - x_19_25 <= -x_18_24;
 x_19_25 + x_20_25 <=  x_19_24;
-x_19_25 - x_20_25 <= -x_19_24;
 x_20_25 + x_21_25 <=  x_20_24;
-x_20_25 - x_21_25 <= -x_20_24;
 x_21_25 + x_22_25 <=  x_21_24;
-x_21_25 - x_22_25 <= -x_21_24;
 x_22_25 + x_23_25 <=  x_22_24;
-x_22_25 - x_23_25 <= -x_22_24;
 x_23_25 + x_24_25 <=  x_23_24;
-x_23_25 - x_24_25 <= -x_23_24;
 x_24_25 + x_25_25 <=  x_24_24;
-x_24_25 - x_25_25 <= -x_24_24;
 x_0_26 + x_1_26 <=  x_0_25;
-x_0_26 - x_1_26 <= -x_0_25;
 x_1_26 + x_2_26 <=  x_1_25;
-x_1_26 - x_2_26 <= -x_1_25;
 x_2_26 + x_3_26 <=  x_2_25;
-x_2_26 - x_3_26 <= -x_2_25;
 x_3_26 + x_4_26 <=  x_3_25;
-x_3_26 - x_4_26 <= -x_3_25;
 x_4_26 + x_5_26 <=  x_4_25;
-x_4_26 - x_5_26 <= -x_4_25;
 x_5_26 + x_6_26 <=  x_5_25;
-x_5_26 - x_6_26 <= -x_5_25;
 x_6_26 + x_7_26 <=  x_6_25;
-x_6_26 - x_7_26 <= -x_6_25;
 x_7_26 + x_8_26 <=  x_7_25;
-x_7_26 - x_8_26 <= -x_7_25;
 x_8_26 + x_9_26 <=  x_8_25;
-x_8_26 - x_9_26 <= -x_8_25;
 x_9_26 + x_10_26 <=  x_9_25;
-x_9_26 - x_10_26 <= -x_9_25;
 x_10_26 + x_11_26 <=  x_10_25;
-x_10_26 - x_11_26 <= -x_10_25;
 x_11_26 + x_12_26 <=  x_11_25;
-x_11_26 - x_12_26 <= -x_11_25;
 x_12_26 + x_13_26 <=  x_12_25;
-x_12_26 - x_13_26 <= -x_12_25;
 x_13_26 + x_14_26 <=  x_13_25;
-x_13_26 - x_14_26 <= -x_13_25;
 x_14_26 + x_15_26 <=  x_14_25;
-x_14_26 - x_15_26 <= -x_14_25;
 x_15_26 + x_16_26 <=  x_15_25;
-x_15_26 - x_16_26 <= -x_15_25;
 x_16_26 + x_17_26 <=  x_16_25;
-x_16_26 - x_17_26 <= -x_16_25;
 x_17_26 + x_18_26 <=  x_17_25;
-x_17_26 - x_18_26 <= -x_17_25;
 x_18_26 + x_19_26 <=  x_18_25;
-x_18_26 - x_19_26 <= -x_18_25;
 x_19_26 + x_20_26 <=  x_19_25;
-x_19_26 - x_20_26 <= -x_19_25;
 x_20_26 + x_21_26 <=  x_20_25;
-x_20_26 - x_21_26 <= -x_20_25;
 x_21_26 + x_22_26 <=  x_21_25;
-x_21_26 - x_22_26 <= -x_21_25;
 x_22_26 + x_23_26 <=  x_22_25;
-x_22_26 - x_23_26 <= -x_22_25;
 x_23_26 + x_24_26 <=  x_23_25;
-x_23_26 - x_24_26 <= -x_23_25;
 x_24_26 + x_25_26 <=  x_24_25;
-x_24_26 - x_25_26 <= -x_24_25;
 x_25_26 + x_26_26 <=  x_25_25;
-x_25_26 - x_26_26 <= -x_25_25;
 x_0_27 + x_1_27 <=  x_0_26;
-x_0_27 - x_1_27 <= -x_0_26;
 x_1_27 + x_2_27 <=  x_1_26;
-x_1_27 - x_2_27 <= -x_1_26;
 x_2_27 + x_3_27 <=  x_2_26;
-x_2_27 - x_3_27 <= -x_2_26;
 x_3_27 + x_4_27 <=  x_3_26;
-x_3_27 - x_4_27 <= -x_3_26;
 x_4_27 + x_5_27 <=  x_4_26;
-x_4_27 - x_5_27 <= -x_4_26;
 x_5_27 + x_6_27 <=  x_5_26;
-x_5_27 - x_6_27 <= -x_5_26;
 x_6_27 + x_7_27 <=  x_6_26;
-x_6_27 - x_7_27 <= -x_6_26;
 x_7_27 + x_8_27 <=  x_7_26;
-x_7_27 - x_8_27 <= -x_7_26;
 x_8_27 + x_9_27 <=  x_8_26;
-x_8_27 - x_9_27 <= -x_8_26;
 x_9_27 + x_10_27 <=  x_9_26;
-x_9_27 - x_10_27 <= -x_9_26;
 x_10_27 + x_11_27 <=  x_10_26;
-x_10_27 - x_11_27 <= -x_10_26;
 x_11_27 + x_12_27 <=  x_11_26;
-x_11_27 - x_12_27 <= -x_11_26;
 x_12_27 + x_13_27 <=  x_12_26;
-x_12_27 - x_13_27 <= -x_12_26;
 x_13_27 + x_14_27 <=  x_13_26;
-x_13_27 - x_14_27 <= -x_13_26;
 x_14_27 + x_15_27 <=  x_14_26;
-x_14_27 - x_15_27 <= -x_14_26;
 x_15_27 + x_16_27 <=  x_15_26;
-x_15_27 - x_16_27 <= -x_15_26;
 x_16_27 + x_17_27 <=  x_16_26;
-x_16_27 - x_17_27 <= -x_16_26;
 x_17_27 + x_18_27 <=  x_17_26;
-x_17_27 - x_18_27 <= -x_17_26;
 x_18_27 + x_19_27 <=  x_18_26;
-x_18_27 - x_19_27 <= -x_18_26;
 x_19_27 + x_20_27 <=  x_19_26;
-x_19_27 - x_20_27 <= -x_19_26;
 x_20_27 + x_21_27 <=  x_20_26;
-x_20_27 - x_21_27 <= -x_20_26;
 x_21_27 + x_22_27 <=  x_21_26;
-x_21_27 - x_22_27 <= -x_21_26;
 x_22_27 + x_23_27 <=  x_22_26;
-x_22_27 - x_23_27 <= -x_22_26;
 x_23_27 + x_24_27 <=  x_23_26;
-x_23_27 - x_24_27 <= -x_23_26;
 x_24_27 + x_25_27 <=  x_24_26;
-x_24_27 - x_25_27 <= -x_24_26;
 x_25_27 + x_26_27 <=  x_25_26;
-x_25_27 - x_26_27 <= -x_25_26;
 x_26_27 + x_27_27 <=  x_26_26;
-x_26_27 - x_27_27 <= -x_26_26;
 x_0_28 + x_1_28 <=  x_0_27;
-x_0_28 - x_1_28 <= -x_0_27;
 x_1_28 + x_2_28 <=  x_1_27;
-x_1_28 - x_2_28 <= -x_1_27;
 x_2_28 + x_3_28 <=  x_2_27;
-x_2_28 - x_3_28 <= -x_2_27;
 x_3_28 + x_4_28 <=  x_3_27;
-x_3_28 - x_4_28 <= -x_3_27;
 x_4_28 + x_5_28 <=  x_4_27;
-x_4_28 - x_5_28 <= -x_4_27;
 x_5_28 + x_6_28 <=  x_5_27;
-x_5_28 - x_6_28 <= -x_5_27;
 x_6_28 + x_7_28 <=  x_6_27;
-x_6_28 - x_7_28 <= -x_6_27;
 x_7_28 + x_8_28 <=  x_7_27;
-x_7_28 - x_8_28 <= -x_7_27;
 x_8_28 + x_9_28 <=  x_8_27;
-x_8_28 - x_9_28 <= -x_8_27;
 x_9_28 + x_10_28 <=  x_9_27;
-x_9_28 - x_10_28 <= -x_9_27;
 x_10_28 + x_11_28 <=  x_10_27;
-x_10_28 - x_11_28 <= -x_10_27;
 x_11_28 + x_12_28 <=  x_11_27;
-x_11_28 - x_12_28 <= -x_11_27;
 x_12_28 + x_13_28 <=  x_12_27;
-x_12_28 - x_13_28 <= -x_12_27;
 x_13_28 + x_14_28 <=  x_13_27;
-x_13_28 - x_14_28 <= -x_13_27;
 x_14_28 + x_15_28 <=  x_14_27;
-x_14_28 - x_15_28 <= -x_14_27;
 x_15_28 + x_16_28 <=  x_15_27;
-x_15_28 - x_16_28 <= -x_15_27;
 x_16_28 + x_17_28 <=  x_16_27;
-x_16_28 - x_17_28 <= -x_16_27;
 x_17_28 + x_18_28 <=  x_17_27;
-x_17_28 - x_18_28 <= -x_17_27;
 x_18_28 + x_19_28 <=  x_18_27;
-x_18_28 - x_19_28 <= -x_18_27;
 x_19_28 + x_20_28 <=  x_19_27;
-x_19_28 - x_20_28 <= -x_19_27;
 x_20_28 + x_21_28 <=  x_20_27;
-x_20_28 - x_21_28 <= -x_20_27;
 x_21_28 + x_22_28 <=  x_21_27;
-x_21_28 - x_22_28 <= -x_21_27;
 x_22_28 + x_23_28 <=  x_22_27;
-x_22_28 - x_23_28 <= -x_22_27;
 x_23_28 + x_24_28 <=  x_23_27;
-x_23_28 - x_24_28 <= -x_23_27;
 x_24_28 + x_25_28 <=  x_24_27;
-x_24_28 - x_25_28 <= -x_24_27;
 x_25_28 + x_26_28 <=  x_25_27;
-x_25_28 - x_26_28 <= -x_25_27;
 x_26_28 + x_27_28 <=  x_26_27;
-x_26_28 - x_27_28 <= -x_26_27;
 x_27_28 + x_28_28 <=  x_27_27;
-x_27_28 - x_28_28 <= -x_27_27;
 x_0_29 + x_1_29 <=  x_0_28;
-x_0_29 - x_1_29 <= -x_0_28;
 x_1_29 + x_2_29 <=  x_1_28;
-x_1_29 - x_2_29 <= -x_1_28;
 x_2_29 + x_3_29 <=  x_2_28;
-x_2_29 - x_3_29 <= -x_2_28;
 x_3_29 + x_4_29 <=  x_3_28;
-x_3_29 - x_4_29 <= -x_3_28;
 x_4_29 + x_5_29 <=  x_4_28;
-x_4_29 - x_5_29 <= -x_4_28;
 x_5_29 + x_6_29 <=  x_5_28;
-x_5_29 - x_6_29 <= -x_5_28;
 x_6_29 + x_7_29 <=  x_6_28;
-x_6_29 - x_7_29 <= -x_6_28;
 x_7_29 + x_8_29 <=  x_7_28;
-x_7_29 - x_8_29 <= -x_7_28;
 x_8_29 + x_9_29 <=  x_8_28;
-x_8_29 - x_9_29 <= -x_8_28;
 x_9_29 + x_10_29 <=  x_9_28;
-x_9_29 - x_10_29 <= -x_9_28;
 x_10_29 + x_11_29 <=  x_10_28;
-x_10_29 - x_11_29 <= -x_10_28;
 x_11_29 + x_12_29 <=  x_11_28;
-x_11_29 - x_12_29 <= -x_11_28;
 x_12_29 + x_13_29 <=  x_12_28;
-x_12_29 - x_13_29 <= -x_12_28;
 x_13_29 + x_14_29 <=  x_13_28;
-x_13_29 - x_14_29 <= -x_13_28;
 x_14_29 + x_15_29 <=  x_14_28;
-x_14_29 - x_15_29 <= -x_14_28;
 x_15_29 + x_16_29 <=  x_15_28;
-x_15_29 - x_16_29 <= -x_15_28;
 x_16_29 + x_17_29 <=  x_16_28;
-x_16_29 - x_17_29 <= -x_16_28;
 x_17_29 + x_18_29 <=  x_17_28;
-x_17_29 - x_18_29 <= -x_17_28;
 x_18_29 + x_19_29 <=  x_18_28;
-x_18_29 - x_19_29 <= -x_18_28;
 x_19_29 + x_20_29 <=  x_19_28;
-x_19_29 - x_20_29 <= -x_19_28;
 x_20_29 + x_21_29 <=  x_20_28;
-x_20_29 - x_21_29 <= -x_20_28;
 x_21_29 + x_22_29 <=  x_21_28;
-x_21_29 - x_22_29 <= -x_21_28;
 x_22_29 + x_23_29 <=  x_22_28;
-x_22_29 - x_23_29 <= -x_22_28;
 x_23_29 + x_24_29 <=  x_23_28;
-x_23_29 - x_24_29 <= -x_23_28;
 x_24_29 + x_25_29 <=  x_24_28;
-x_24_29 - x_25_29 <= -x_24_28;
 x_25_29 + x_26_29 <=  x_25_28;
-x_25_29 - x_26_29 <= -x_25_28;
 x_26_29 + x_27_29 <=  x_26_28;
-x_26_29 - x_27_29 <= -x_26_28;
 x_27_29 + x_28_29 <=  x_27_28;
-x_27_29 - x_28_29 <= -x_27_28;
 x_28_29 + x_29_29 <=  x_28_28;
-x_28_29 - x_29_29 <= -x_28_28;

 x_1_2 <=  1079011626;
-x_1_2 <= -1079011626;
 x_1_3 <=  542353018;
-x_1_3 <= -542353018;
 x_2_3 <=  536658608;
-x_2_3 <= -536658608;
 x_1_4 <=  271864882;
-x_1_4 <= -271864882;
 x_2_4 <=  270488136;
-x_2_4 <= -270488136;
 x_3_4 <=  266170472;
-x_3_4 <= -266170472;
 x_5_10 <=  4263762;
-x_5_10 <= -4263762;
 x_9_11 <=  1859824;
-x_9_11 <= -1859824;
 x_11_11 <=  1610467;
-x_11_11 <= -1610467;
 x_9_12 <=  968738;
-x_9_12 <= -968738;
 x_10_12 <=  891086;
-x_10_12 <= -891086;
 x_3_13 <=  532656;
-x_3_13 <= -532656;
 x_9_13 <=  502643;
-x_9_13 <= -502643;
 x_10_13 <=  466095;
-x_10_13 <= -466095;
 x_11_13 <=  424991;
-x_11_13 <= -424991;
 x_1_14 <=  267918;
-x_1_14 <= -267918;
 x_3_14 <=  267984;
-x_3_14 <= -267984;
 x_4_14 <=  264672;
-x_4_14 <= -264672;
 x_9_14 <=  259077;
-x_9_14 <= -259077;
 x_10_14 <=  243566;
-x_10_14 <= -243566;
 x_11_14 <=  222529;
-x_11_14 <= -222529;
 x_12_14 <=  202462;
-x_12_14 <= -202462;
 x_9_15 <=  132484;
-x_9_15 <= -132484;
 x_10_15 <=  126593;
-x_10_15 <= -126593;
 x_11_15 <=  116973;
-x_11_15 <= -116973;
 x_12_15 <=  105556;
-x_12_15 <= -105556;
 x_13_15 <=  96906;
-x_13_15 <= -96906;
 x_7_16 <=  66410;
-x_7_16 <= -66410;
 x_15_16 <=  49254;
-x_15_16 <= -49254;
 x_1_17 <=  31758;
-x_1_17 <= -31758;
 x_4_17 <=  33843;
-x_4_17 <= -33843;
 x_15_17 <=  23357;
-x_15_17 <= -23357;
 x_16_17 <=  25897;
-x_16_17 <= -25897;
 x_1_18 <=  15428;
-x_1_18 <= -15428;
 x_2_18 <=  16330;
-x_2_18 <= -16330;
 x_8_18 <=  16581;
-x_8_18 <= -16581;
 x_13_18 <=  13956;
-x_13_18 <= -13956;
 x_15_18 <=  11360;
-x_15_18 <= -11360;
 x_16_18 <=  11997;
-x_16_18 <= -11997;
 x_17_18 <=  13900;
-x_17_18 <= -13900;
 x_8_19 <=  8192;
-x_8_19 <= -8192;
 x_9_19 <=  8389;
-x_9_19 <= -8389;
 x_11_19 <=  8407;
-x_11_19 <= -8407;
 x_15_19 <=  5748;
-x_15_19 <= -5748;
 x_16_19 <=  5612;
-x_16_19 <= -5612;
 x_17_19 <=  6385;
-x_17_19 <= -6385;
 x_18_19 <=  7515;
-x_18_19 <= -7515;
 x_8_20 <=  4056;
-x_8_20 <= -4056;
 x_9_20 <=  4136;
-x_9_20 <= -4136;
 x_10_20 <=  4253;
-x_10_20 <= -4253;
 x_0_21 <=  2114;
-x_0_21 <= -2114;
 x_21_22 <=  1057;
-x_21_22 <= -1057;
 x_1_23 <=  526;
-x_1_23 <= -526;
 x_14_23 <=  510;
-x_14_23 <= -510;
 x_1_25 <=  152;
-x_1_25 <= -152;
 x_10_25 <=  124;
-x_10_25 <= -124;
 x_3_26 <=  61;
-x_3_26 <= -61;
 x_13_26 <=  72;
-x_13_26 <= -72;
 x_3_27 <=  33;
-x_3_27 <= -33;
 x_4_27 <=  28;
-x_4_27 <= -28;
 x_17_27 <=  29;
-x_17_27 <= -29;
 x_14_28 <=  21;
-x_14_28 <= -21;
 x_20_28 <=  7;
-x_20_28 <= -7;
 x_25_28 <=  13;
-x_25_28 <= -13;
 x_2_29 <=  16;
-x_2_29 <= -16;
 x_6_29 <=  9;
-x_6_29 <= -9;
 x_20_29 <=  4;
-x_20_29 <= -4;
 x_21_29 <=  3;
-x_21_29 <= -3;
 x_27_29 <=  10;
-x_27_29 <= -10;

int x_0_0;
int x_0_1;
int x_1_1;
int x_0_2;
int x_1_2;
int x_2_2;
int x_0_3;
int x_1_3;
int x_2_3;
int x_3_3;
int x_0_4;
int x_1_4;
int x_2_4;
int x_3_4;
int x_4_4;
int x_0_5;
int x_1_5;
int x_2_5;
int x_3_5;
int x_4_5;
int x_5_5;
int x_0_6;
int x_1_6;
int x_2_6;
int x_3_6;
int x_4_6;
int x_5_6;
int x_6_6;
int x_0_7;
int x_1_7;
int x_2_7;
int x_3_7;
int x_4_7;
int x_5_7;
int x_6_7;
int x_7_7;
int x_0_8;
int x_1_8;
int x_2_8;
int x_3_8;
int x_4_8;
int x_5_8;
int x_6_8;
int x_7_8;
int x_8_8;
int x_0_9;
int x_1_9;
int x_2_9;
int x_3_9;
int x_4_9;
int x_5_9;
int x_6_9;
int x_7_9;
int x_8_9;
int x_9_9;
int x_0_10;
int x_1_10;
int x_2_10;
int x_3_10;
int x_4_10;
int x_5_10;
int x_6_10;
int x_7_10;
int x_8_10;
int x_9_10;
int x_10_10;
int x_0_11;
int x_1_11;
int x_2_11;
int x_3_11;
int x_4_11;
int x_5_11;
int x_6_11;
int x_7_11;
int x_8_11;
int x_9_11;
int x_10_11;
int x_11_11;
int x_0_12;
int x_1_12;
int x_2_12;
int x_3_12;
int x_4_12;
int x_5_12;
int x_6_12;
int x_7_12;
int x_8_12;
int x_9_12;
int x_10_12;
int x_11_12;
int x_12_12;
int x_0_13;
int x_1_13;
int x_2_13;
int x_3_13;
int x_4_13;
int x_5_13;
int x_6_13;
int x_7_13;
int x_8_13;
int x_9_13;
int x_10_13;
int x_11_13;
int x_12_13;
int x_13_13;
int x_0_14;
int x_1_14;
int x_2_14;
int x_3_14;
int x_4_14;
int x_5_14;
int x_6_14;
int x_7_14;
int x_8_14;
int x_9_14;
int x_10_14;
int x_11_14;
int x_12_14;
int x_13_14;
int x_14_14;
int x_0_15;
int x_1_15;
int x_2_15;
int x_3_15;
int x_4_15;
int x_5_15;
int x_6_15;
int x_7_15;
int x_8_15;
int x_9_15;
int x_10_15;
int x_11_15;
int x_12_15;
int x_13_15;
int x_14_15;
int x_15_15;
int x_0_16;
int x_1_16;
int x_2_16;
int x_3_16;
int x_4_16;
int x_5_16;
int x_6_16;
int x_7_16;
int x_8_16;
int x_9_16;
int x_10_16;
int x_11_16;
int x_12_16;
int x_13_16;
int x_14_16;
int x_15_16;
int x_16_16;
int x_0_17;
int x_1_17;
int x_2_17;
int x_3_17;
int x_4_17;
int x_5_17;
int x_6_17;
int x_7_17;
int x_8_17;
int x_9_17;
int x_10_17;
int x_11_17;
int x_12_17;
int x_13_17;
int x_14_17;
int x_15_17;
int x_16_17;
int x_17_17;
int x_0_18;
int x_1_18;
int x_2_18;
int x_3_18;
int x_4_18;
int x_5_18;
int x_6_18;
int x_7_18;
int x_8_18;
int x_9_18;
int x_10_18;
int x_11_18;
int x_12_18;
int x_13_18;
int x_14_18;
int x_15_18;
int x_16_18;
int x_17_18;
int x_18_18;
int x_0_19;
int x_1_19;
int x_2_19;
int x_3_19;
int x_4_19;
int x_5_19;
int x_6_19;
int x_7_19;
int x_8_19;
int x_9_19;
int x_10_19;
int x_11_19;
int x_12_19;
int x_13_19;
int x_14_19;
int x_15_19;
int x_16_19;
int x_17_19;
int x_18_19;
int x_19_19;
int x_0_20;
int x_1_20;
int x_2_20;
int x_3_20;
int x_4_20;
int x_5_20;
int x_6_20;
int x_7_20;
int x_8_20;
int x_9_20;
int x_10_20;
int x_11_20;
int x_12_20;
int x_13_20;
int x_14_20;
int x_15_20;
int x_16_20;
int x_17_20;
int x_18_20;
int x_19_20;
int x_20_20;
int x_0_21;
int x_1_21;
int x_2_21;
int x_3_21;
int x_4_21;
int x_5_21;
int x_6_21;
int x_7_21;
int x_8_21;
int x_9_21;
int x_10_21;
int x_11_21;
int x_12_21;
int x_13_21;
int x_14_21;
int x_15_21;
int x_16_21;
int x_17_21;
int x_18_21;
int x_19_21;
int x_20_21;
int x_21_21;
int x_0_22;
int x_1_22;
int x_2_22;
int x_3_22;
int x_4_22;
int x_5_22;
int x_6_22;
int x_7_22;
int x_8_22;
int x_9_22;
int x_10_22;
int x_11_22;
int x_12_22;
int x_13_22;
int x_14_22;
int x_15_22;
int x_16_22;
int x_17_22;
int x_18_22;
int x_19_22;
int x_20_22;
int x_21_22;
int x_22_22;
int x_0_23;
int x_1_23;
int x_2_23;
int x_3_23;
int x_4_23;
int x_5_23;
int x_6_23;
int x_7_23;
int x_8_23;
int x_9_23;
int x_10_23;
int x_11_23;
int x_12_23;
int x_13_23;
int x_14_23;
int x_15_23;
int x_16_23;
int x_17_23;
int x_18_23;
int x_19_23;
int x_20_23;
int x_21_23;
int x_22_23;
int x_23_23;
int x_0_24;
int x_1_24;
int x_2_24;
int x_3_24;
int x_4_24;
int x_5_24;
int x_6_24;
int x_7_24;
int x_8_24;
int x_9_24;
int x_10_24;
int x_11_24;
int x_12_24;
int x_13_24;
int x_14_24;
int x_15_24;
int x_16_24;
int x_17_24;
int x_18_24;
int x_19_24;
int x_20_24;
int x_21_24;
int x_22_24;
int x_23_24;
int x_24_24;
int x_0_25;
int x_1_25;
int x_2_25;
int x_3_25;
int x_4_25;
int x_5_25;
int x_6_25;
int x_7_25;
int x_8_25;
int x_9_25;
int x_10_25;
int x_11_25;
int x_12_25;
int x_13_25;
int x_14_25;
int x_15_25;
int x_16_25;
int x_17_25;
int x_18_25;
int x_19_25;
int x_20_25;
int x_21_25;
int x_22_25;
int x_23_25;
int x_24_25;
int x_25_25;
int x_0_26;
int x_1_26;
int x_2_26;
int x_3_26;
int x_4_26;
int x_5_26;
int x_6_26;
int x_7_26;
int x_8_26;
int x_9_26;
int x_10_26;
int x_11_26;
int x_12_26;
int x_13_26;
int x_14_26;
int x_15_26;
int x_16_26;
int x_17_26;
int x_18_26;
int x_19_26;
int x_20_26;
int x_21_26;
int x_22_26;
int x_23_26;
int x_24_26;
int x_25_26;
int x_26_26;
int x_0_27;
int x_1_27;
int x_2_27;
int x_3_27;
int x_4_27;
int x_5_27;
int x_6_27;
int x_7_27;
int x_8_27;
int x_9_27;
int x_10_27;
int x_11_27;
int x_12_27;
int x_13_27;
int x_14_27;
int x_15_27;
int x_16_27;
int x_17_27;
int x_18_27;
int x_19_27;
int x_20_27;
int x_21_27;
int x_22_27;
int x_23_27;
int x_24_27;
int x_25_27;
int x_26_27;
int x_27_27;
int x_0_28;
int x_1_28;
int x_2_28;
int x_3_28;
int x_4_28;
int x_5_28;
int x_6_28;
int x_7_28;
int x_8_28;
int x_9_28;
int x_10_28;
int x_11_28;
int x_12_28;
int x_13_28;
int x_14_28;
int x_15_28;
int x_16_28;
int x_17_28;
int x_18_28;
int x_19_28;
int x_20_28;
int x_21_28;
int x_22_28;
int x_23_28;
int x_24_28;
int x_25_28;
int x_26_28;
int x_27_28;
int x_28_28;
int x_0_29;
int x_1_29;
int x_2_29;
int x_3_29;
int x_4_29;
int x_5_29;
int x_6_29;
int x_7_29;
int x_8_29;
int x_9_29;
int x_10_29;
int x_11_29;
int x_12_29;
int x_13_29;
int x_14_29;
int x_15_29;
int x_16_29;
int x_17_29;
int x_18_29;
int x_19_29;
int x_20_29;
int x_21_29;
int x_22_29;
int x_23_29;
int x_24_29;
int x_25_29;
int x_26_29;
int x_27_29;
int x_28_29;
int x_29_29;


Oliver
Kha Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: Sa 26.12.09 01:52 
@user profile iconBenBE: :think:
Statt Koeffizienten für eine-Gleichung-pro-Gegebene auszurechnen, einfach die elementare Grundgleichung mehrmals aufzustellen, darauf bin ich nicht gekommen.
Mathematik ist dann leider ganz außen vor :mrgreen: und die Implementierung wird etwas komplexer, aber von der Idee her geht es wohl nicht mehr direkter und simpler.

@user profile iconOliver Marx:
Wow, ebenfalls eine äußerst interessante Lösung! Es muss eben nicht immer die direkte Lösung sein, wenn man das Problem stattdessen in ein bekanntes umformulieren kann und dadurch die Implementierung quasi geschenkt bekommt :D .

_________________
>λ=
Noob23
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 93

Win XP, Win Server 2003, Win 7, Ubuntu
Delphi 7, c/c++ Dev-c++, µC-8051 Keil, Webdesign Notepad++
BeitragVerfasst: Sa 26.12.09 09:38 
Hallo zusammen,

auf die Idee, für jede der gegebenen Werte eine Gleichung (Grundlage: Binomialkoeffizienten) aufzustellen, bin ich zwar anfangs gekommen ...da es aber an der Progammumsetzung fehlte, wurde eben mit teilweisem Bruteforce drangegangen ;)
Angeboten hat sich natürlich die linke Pyramidenseite, da hier schon relativ viele Zahlen bekannt waren und Lösung ist Lösung auch wenns eleganter ginge :)

Grüße
Noob23

PS: Der Weihnachtsmann wird wohl von den 4304761169 noch an jeden seiner Mitarbeiter ein Weihnachtsgeld auszahlen ;)

_________________
Man streitet zwar noch über die Entstehung der Erde -
Aber über den Untergang sind sich doch schon alle einig...
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: So 27.12.09 12:01 
tja dann Mein Ansatz:
Der Baum ist vollständig durch die Variablen der untersten Reihe berechenbar.
Also habe ich jede vorgegebene Zahl als Gleichung von den Variablen der untersten Reihe ausdrücken lassen. Das geht mittels Binomialkoeffizienten
Am Ende das Gleichungssystem mittels Gauß hoch und runter rechnen und fertig.

Problem waren die episch großen Zahlen bei den Zwischenschritten. Daraus ist dann die Vorzeichen-BigNum-Lib entstanden ;-)
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: So 27.12.09 12:56 
Hi :)

Ich hatte Anfangs die gleichen Ansätze wie user profile iconFlamefire und user profile iconBenBE. Nach ein Paar Sekunden sind mir dann die episch großen Zahlen aufgefallen und user profile iconBenBE meinte in der SB, es ginge schöner als das was ich vorhatte(Matrizen).

Ironischerweise hat user profile iconBenBE mich falsch verstanden, und mein Ansatz war seiner. :nut: Nur hat er von schöner geredet, was ich als "Mathematiker-schön" und nicht "komplizierter aber schneller" verstanden habe und erstmal weitergesucht.

Aus Frustration dass ich nichts schöneres gefunden habe, hab' ich dann den Computer die Rosinen aufpicken lassen und triviale Teildreiecke ergänzen. Dann habe ich jeweils per Hand ein GLG auf Binomealkoeffizientenbasis gelöst(mit einer Unbekannten und 2 Gleichungen :lol:), um zwei Teildreicke zu vereinen und wieder die Rosinen ergänzen lassen. So kommt man innerhalb von 5-10min zu dem Punkt, wo noch 2 Variablen fehlen um das ganze Ding zu bestimmen(inclusive Codingzeit 8)). Hier sei es dem Geneigten Leser überlassen, ob er diese als X und Y einsetzt und ein finales GLG bildet, oder einen 5-Sekunden-Bruteforce macht. Jedenfalls bitte nicht so wie ich, mit oberen und unteren Schranken für alle Felder hab' ich's echt nochmal verkompliziert. War zwar schnell getippt, hat aber lange zu debuggen gebraucht.

lg

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
Kha Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: So 27.12.09 18:05 
user profile iconHidden hat folgendes geschrieben Zum zitierten Posting springen:
Ich hatte Anfangs die gleichen Ansätze wie user profile iconFlamefire und user profile iconBenBE. Nach ein Paar Sekunden sind mir dann die episch großen Zahlen aufgefallen [...]
user profile iconFlamefire hat folgendes geschrieben Zum zitierten Posting springen:
Problem waren die episch großen Zahlen bei den Zwischenschritten.
Unendliche Genauigkeit ist natürlich immer schön, aber ich habe schon darauf geachtet, dass es auch problemlos mit Floats lösbar ist ;) (was user profile iconBenBEs Code ja auch schon gezeigt hat :) )...

ausblenden volle Höhe F#
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
let isZero x = abs x < 1.e-8

let gaussRef (a:float[][]) =
    let m = Array.length a
    let n = Array.length a.[0]
    let mutable i,j = 0,0
    
    while i<m && j<n do
        let mutable maxI = i
        for k = i+1 to m-1 do
            if abs a.[k].[j] > abs a.[maxI].[j] then
                maxI <- k
        if not (isZero a.[maxI].[j]) then
            let temp = a.[i]
            a.[i] <- a.[maxI]
            a.[maxI] <- temp
            
            let x = a.[i].[j]
            for v = 0 to n-1 do
                a.[i].[v] <- a.[i].[v] / x
            for u = i+1 to m-1 do
                let x = a.[u].[j]
                for v = 0 to n-1 do
                    a.[u].[v] <- a.[u].[v] - a.[i].[v] * x
            i <- i+1
        j <- j+1

let backwardSubstitution (a:float[][]) =
    let n = Array.length a
    if Array.length a.[0] <> n+1 then failwith "lengths"
    
    let rec loop xs = function
    | -1 -> xs
    | i  ->
        loop (
         (a.[i].[n] - 
          (xs |> Seq.mapi (fun i' x -> a.[i].[i'+i+1] * x) |> Seq.sum)
        / a.[i].[i]) :: xs) (i-1)
    loop [a.[n-1].[n] / a.[n-1].[n-1]] (n-2)
    
let rec binomial n = function
    | 0 -> 1
    | k when 2 * k > n -> binomial n (n-k)
    | k -> {2..k} |> Seq.fold (fun acc i -> acc * (n+1-i) / i) n
      
let safeBin n k = if k < 0 || k > n then 0 else binomial n k

let apply f x = f x; x

open System
open System.IO
open Microsoft.FSharp.Math
open System.Text.RegularExpressions

let solve file =
    let lines = File.ReadAllLines file
    let n = lines.Length
    
    let given =
        lines
        |> Seq.mapi (fun i s -> 
            s.Split null
            |> Seq.filter (not << String.IsNullOrEmpty)
            |> Seq.mapi (fun j s ->
                let m = Regex.Match (s,@"(\d+)")
                if m.Success then Some (i,j,float m.Groups.[1].Value) else None)
            |> Seq.choose id
        )
        |> Seq.concat
        
    let baseRow =
        given
        |> Seq.map (fun (i,j,x) ->
            Array.init (n+1) (fun j' ->
                if j' = n then x
                else safeBin (n-i-1) (j'-j) |> float
        ))
        |> Seq.toArray
        |> apply gaussRef
        |> Array.filter (Seq.exists (not << isZero))
        |> backwardSubstitution

    let top =
        baseRow 
        |> Seq.mapi (fun i f -> f * float (safeBin (n-1) i))
        |> Seq.sum
        
    printfn "%f" top
    
[<EntryPoint>]
let main args =
    match args with
    | [|file|] -> solve file
    | _ -> printfn "Usage: Solve.exe file"
    0

_________________
>λ=
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: So 27.12.09 18:27 
Nunja bei BenBEs Code hätte ich trotzdem kalte Füße, da es falsche Zwischenlösungen gibt. Trotzdem stimmt es am Ende. Ist etwas ungewöhnlich ;-)

Bei deinem Code, steige ich grade etwas zäh durch.
Wenn ich das richtig sehe, löst du das LGS so:
Variablenweise+ZeilenWeise die Gleichungen durchgehen (Also für i.Zeile i.Variable(i.Spalte)) also normal.
Jetzt suchst du die Zeile, mit dem größten Koeffizienten für die aktuelle Variable und vertauschst sie mit der aktuellen Zeile. Jetzt diese Zeile auf 1 normieren.
und dann normal weiter.

Die backward verstehe ich gar nicht ;-)
Aber ich vermute, das ist dann ohne tricks, oder?
Kha Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: Mo 28.12.09 01:24 
user profile iconFlamefire hat folgendes geschrieben Zum zitierten Posting springen:
Nunja bei BenBEs Code hätte ich trotzdem kalte Füße, da es falsche Zwischenlösungen gibt.
Gut, vielleicht hat er durch die höhere Anzahl von Gleichungen größere Abweichungen. Bei mir ist auch die unterste Reihe hinreichend genau:
ausblenden Quelltext
1:
2:
3:
4:
5:
[8.00000134; 8.999999777; 16.00000002; 3.999999995; 13.0; 3.0; 9.000000002;
 1.999999998; 15.99999999; 7.000000059; 3.999999852; 13.00000027; 7.999999587;
 1.00000053; 15.9999994; 5.000000596; 7.99999947; 11.00000041; 3.999999742;
 10.00000011; 4.0; 3.0; 1.99999982; 14.0000006; 6.999998775; 10.00000184;
 2.99999816; 10.0; 18.00000584; 0.9999808293]



user profile iconFlamefire hat folgendes geschrieben Zum zitierten Posting springen:
Bei deinem Code, steige ich grade etwas zäh durch.
Brauchst dich nicht dafür durch F# zu quälen, denn der Code ist wirklich "ohne Tricks" :) . gaussRef ist eine 1:1-Übersetzung hiervon, backwardSubstitution eine davon.
Bei ersterer Funktion lässt sich leider nicht viel mit funktionaler Programmierung drehen, was die Lesbarkeit aber wohl eher erhöht hat ;) .

_________________
>λ=
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mo 28.12.09 03:10 
F# ist das was man dann nimmt, wenn man auch vor .NET-Reflection sicher sein will ;)

Meine Lösung ist noch etwas anders, und basiert auf der Tatsache dass jedes gegebene Feld die "rekursive Summe" aller Felder unter ihm ist. Man kann also ein Dreieck darunter aufspannen, so dass man einen Abschnitt der untersten Reihe bekommt.
Die Koeffizienten kriegt man aus (n k) für n=20 und k=Spalte.

Den Wust an Gleichungssystemen überführt man in eine Matrix und einen Vektor, übergibt das ganze in gewünschtem Format an den Kernel eines grade verfügbaren CAS, und hole sich das Ergebnis aus Stdout. Da hätte man dann auch direkt die Gleichung für den obersten Wert aufstellen können, ich hab aber nur die Werte eintragen lassen und dann iterativ nach oben addiert. Alle vorgegeben Werte haben reingepasst, musste also richtig sein.

Anders gesagt: der selbst geschriebe Anteil war lediglich eine Hilfe um das LGS aufzustellen und damit elegant an der beabsichtigten Aufgabe vorbeiprogrammiert ;)

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mo 28.12.09 11:59 
Nunja am Ende war mir das mit der Bignum doch am liebsten, da man so wirklich sicher gehn konnte, dass alles stimmt

UND: Man hat die Aufgabe gelöst, wie man es sollte. Nicht was fertiges verwendet ;-)

Ne ok, bei der andren Aufgabe mit den Funken habe ich ja auch bei Narses abgeguckt also sollte ich da still sein ^^
ub60
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 762
Erhaltene Danke: 127



BeitragVerfasst: Mo 28.12.09 21:14 
user profile iconFlamefire hat folgendes geschrieben Zum zitierten Posting springen:
Nunja am Ende war mir das mit der Bignum doch am liebsten, da man so wirklich sicher gehn konnte, dass alles stimmt

Also, ich habe Int64 verwendet, das ging auch ganz gut.
Und ich hab es auch SELBST programmiert :P :lol:

ub60
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Mo 28.12.09 23:41 
Hi :)

Ich habe auch komplett mit Int64 gearbeitet. Selbst das Gehalt des Weihnachtsmanns war aber schon Int64 und nicht mehr Integer, und beim Gauß-Algorithmus werden ständig Zeilen miteinander multipliziert. Für höhere Genauigkeit bei Gauß-Jordan werden dann zu allem Überfluss noch jeweils extra die größten Zahlen ausgewählt.

Selbst bei geschickter Programmierung muss es hier doch bei Binomialkoeffizienten der untersten Zeile zum Überlauf kommen, wenn man immer nur multipliziert und nie ganze Zeilen mit 0<k<1 malnimmt, wie es der Gauß-Jordan tut?

Zwar ist Int64 mit High(Int64) = High(Integer)² = +9.223.372.036.854.775.808 schon sehr groß, aber mit dem Produkt zweier Zahlen im Bereich High(Integer) kommt man sehr schnell in den Bereich.

user profile iconFlamefire hat folgendes geschrieben:
Nunja am Ende war mir das mit der Bignum doch am liebsten, da man so wirklich sicher gehn konnte, dass alles stimmt
Wenn man es raushatte, konnte man sein Ergebnis doch sehr einfach durch Hochrechnen von der untersten Zeile und Vergleich mit allen gegebenen Zahlen überprüfen :nixweiss:

ausblenden volle Höhe Nur schnell zusammengehackt, meine Überprüfung vom Abgabetag:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
procedure TMainFrm.Button1Click(Sender: TObject);
begin
  self.ReadGalton;  //Unbearbeitete Version einlesen
end;

procedure TMainFrm.Button2Click(Sender: TObject);
var
  i, j: Integer;
  aGaltonCopy: Array of Array of Int64;
begin
  SetLength(aGaltonCopy, Length(FGalton));          //
  for i := 0 to Length(FGalton) - 1 do begin         //
    SetLength(aGaltonCopy[i], Length(FGalton[i]));  //Unbearbeitete Version in den Zwischenspeicher
    for j := 0 to Length(FGalton[i]) - 1 do          //
      aGaltonCopy[i, j] := FGalton[i, j];           //
  end;                                              //
  self.ReadGalton;  //vermeintlich fertige Kopie einlesen
  for i := 0 to Length(FGalton) - 1 do begin
    for j := 0 to Length(FGalton[i]) - 1 do  //alle Fehler durch Leerfelder ersetzen
      if (aGaltonCopy[i, j] <> -1and (FGalton[i, j] <> aGaltonCopy[i, j]) then
        FGalton[i, j] := -1;
  end;
  self.PrintGalton;    
end;

////////////// oben benutzte Funktionen  /////////////////////////////////////////////////////

function FillTo(const S: String; aToLength: Integer; aFillWith: Char = ' '): String;
begin
  if aToLength <= Length(S) then
    result := S
  else begin
    aToLength := aToLength - Length(S);
    result := StringOfChar(aFillWith, aToLength div 2)
            + S + StringOfChar(aFillWith, aToLength - aToLength div 2);
  end;
end;

procedure TMainFrm.PrintGalton;
var
  i, j: Integer;
  S, L: String;
  aLen: Integer;
  aInt: String;
begin
  S := '';
  aLen := Length(FGalton);
  for i := 0 to aLen - 1 do begin
    L := StringOfChar(' '6 * (aLen - 1 - i));
    for j := 0 to Length(FGalton[i]) - 1 do begin
      if FGalton[i, j] = -1 then aInt := '___________'
      else aInt := IntToStr(FGalton[i, j]);
      L := L + FillTo(aInt, 11) + ' ';
    end;
    S := S + L + #13#10;
  end;
  RichEdit1.Lines.Append(S);
end;

procedure TMainFrm.ReadGalton;
var
  aLines: TStrings;
  L: String;
  i, j: Integer;
  aPos: Integer;
  aBuffer: String;
  aIsNum: Boolean;
begin
  aLines := RichEdit1.Lines;
  SetLength(FGalton, aLines.Count);
  for i := 0 to aLines.Count - 1 do begin
    L := aLines[i] + '#';
    SetLength(FGalton[i], i + 1);
    aIsNum := false;
    aBuffer := ' ';
    j := 0;
    for aPos := 0 to Length(L) do begin
      if L[aPos] in ['0'..'9'then begin
        if aIsNum then aBuffer := aBuffer + L[aPos]
        else begin
          aIsNum := true;
          aBuffer := L[aPos];
        end;
      end else begin
        if aIsNum then begin
          FGalton[i, j] := StrToInt64(aBuffer);
          aIsNum := false;
          Inc(j);
        end;
        if (aBuffer = '_'and (L[aPos] <> '_'then begin
          FGalton[i, j] := -1;
          Inc(j);
        end;
        aBuffer := L[aPos];

      end;
    end;
  end;
end;


lg,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)