-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutputFile.txt
More file actions
481 lines (436 loc) · 3.99 KB
/
outputFile.txt
File metadata and controls
481 lines (436 loc) · 3.99 KB
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
Press 1 for Knapsack algorithm
Press 2 for CurveFittingProblem algorithm
Case #1
DP Solution: 58 GA Solution: 58
Taken Items:
7 7
1 22
3 23
3 6
Case #2
DP Solution: 90 GA Solution: 90
Taken Items:
9 27
8 12
8 28
3 23
Case #3
DP Solution: 130 GA Solution: 130
Taken Items:
4 35
7 32
4 34
8 29
Case #4
DP Solution: 46 GA Solution: 46
Taken Items:
10 7
1 14
4 16
2 9
Case #5
DP Solution: 197 GA Solution: 197
Taken Items:
5 15
11 51
7 21
7 15
8 21
4 25
1 49
Case #6
DP Solution: 274 GA Solution: 274
Taken Items:
5 18
6 55
2 20
6 30
9 27
3 58
6 8
10 58
Case #7
DP Solution: 236 GA Solution: 236
Taken Items:
11 20
3 38
5 15
2 17
2 26
6 41
2 37
2 42
Case #8
DP Solution: 202 GA Solution: 202
Taken Items:
7 25
7 19
6 15
3 46
10 21
5 58
8 18
Case #9
DP Solution: 3842 GA Solution: 3842
Taken Items:
38 252
1 150
43 242
50 250
39 277
3 136
10 390
36 236
17 276
9 297
48 243
28 183
30 269
26 304
39 337
Case #10
DP Solution: 3203 GA Solution: 3203
Taken Items:
26 360
42 212
11 84
25 100
23 132
36 122
16 271
12 166
15 351
45 93
21 226
42 237
28 311
20 187
4 208
16 143
Case #11
DP Solution: 2601 GA Solution: 2601
Taken Items:
26 119
3 296
35 155
19 127
21 58
5 76
33 224
29 109
9 30
27 206
45 164
9 159
10 99
41 280
11 362
50 137
Case #12
DP Solution: 3253 GA Solution: 3253
Taken Items:
20 229
1 214
37 275
4 305
20 191
26 271
45 322
7 2
20 77
13 144
25 110
50 246
17 159
44 358
21 350
Case #13
DP Solution: 8205 GA Solution: 8202
Taken Items:
36 178
46 428
12 441
33 217
26 419
31 343
7 504
28 426
29 409
13 403
19 334
15 162
39 229
7 29
48 298
40 251
32 199
31 559
41 418
4 515
10 347
40 576
10 517
Case #14
DP Solution: 8190 GA Solution: 8190
Taken Items:
31 413
41 247
35 157
10 161
13 101
30 323
32 596
43 372
21 378
37 508
48 535
4 240
40 163
7 529
47 571
18 271
43 398
12 212
23 528
12 550
29 625
28 170
13 142
Case #15
DP Solution: 8065 GA Solution: 8065
Taken Items:
1 451
4 246
41 503
41 232
27 197
23 127
14 509
29 155
3 326
30 417
25 255
8 141
37 367
17 461
41 462
50 358
12 435
4 371
29 561
33 301
8 320
32 218
39 256
6 396
Case #16
DP Solution: 8398 GA Solution: 8398
Taken Items:
33 512
12 190
32 524
11 223
18 539
30 268
1 549
30 328
49 528
13 127
20 238
22 227
46 489
22 332
24 452
42 457
12 155
9 145
5 378
8 508
47 546
17 445
37 238
Case #17
DP Solution: 20019 GA Solution: 20019
Taken Items:
46 824
13 216
20 467
9 103
3 467
10 245
5 701
5 351
10 517
4 778
23 498
47 579
48 608
16 409
18 550
33 604
20 339
26 467
46 478
46 650
8 827
35 841
22 291
15 453
14 286
18 583
45 639
2 674
26 774
36 597
12 646
17 415
28 502
23 289
41 390
17 527
2 259
18 600
22 575
Case #18
DP Solution: 18445 GA Solution: 18445
Taken Items:
11 421
29 620
15 150
45 338
8 781
38 690
5 800
8 243
16 675
31 327
9 163
1 528
37 511
41 808
3 440
14 126
2 710
40 776
11 395
20 716
6 46
1 74
26 456
44 372
18 367
19 133
20 526
16 673
48 476
2 156
6 482
22 167
23 649
6 177
35 660
33 621
2 636
34 535
45 351
7 239
10 431
Case #19
DP Solution: 21959 GA Solution: 21947
Taken Items:
50 788
17 158
28 687
48 590
21 212
36 722
9 535
49 703
49 696
35 885
47 797
19 827
8 398
17 847
44 825
32 456
1 40
8 147
37 542
31 456
13 857
6 814
25 507
20 724
8 700
22 415
38 595
24 659
29 881
22 364
4 659
18 413
4 825
3 360
4 272
50 863
4 728
Case #20
DP Solution: 18811 GA Solution: 18811
Taken Items:
4 286
36 239
35 591
16 784
35 546
4 769
4 598
24 500
23 273
50 846
33 882
10 347
40 592
30 527
10 623
16 288
15 68
25 599
32 595
2 592
45 336
2 99
23 261
3 53
14 203
40 279
28 628
4 392
2 406
28 912
27 784
5 335
46 536
50 394
21 893
36 657
35 200
35 599
20 299
Accuracy: 99.9954
-----------END OF THE PROBLEM------------
Press 1 for Knapsack algorithm
Press 2 for CurveFittingProblem algorithm
Case #1
MSE = 0.020690
Coefficients:
0.43163X^0 + 1.18094X^1 + -0.71655X^2 + 0.08529X^3
Case #2
MSE = 0.17561
Coefficients:
-1.04553X^0 + 4.74179X^1 + -2.43355X^2 + 0.20315X^3 + 0.05379X^4 + -0.00685X^5
Case #3
MSE = 2.40750
Coefficients:
-1.16887X^0 + 6.02575X^1 + 1.74683X^2 + -6.60056X^3 + 3.16433X^4 + -0.56909X^5 + 0.03538X^6
-----------END OF THE PROBLEM------------