Jumat, 13 April 2012

Algoritma Brute Force

  Agus Nur Ikhsan       Jumat, 13 April 2012

Ini adalah tugas saya kuliah "Mentukan solusi optimal dengan algoritma brute force"



Soal :
            P = {11, 21, 31, 33, 43, 53, 55, 65}
            W = {1, 11, 21, 23, 33, 43, 45, 55}
            M = 110 àtotal bobot
            N = àbanyak  himpunan




Jawabannya :

Himpunan
Total Bobot
Total Keuntungan
{}
{1}
{2}
{3}
{4}
{5}
{6}
{7}
{8}
{1, 2}
{1, 3}
{1, 4}
{1, 5}
{1, 6}
{1, 7}
{1, 8}
{2, 3}
{2, 4}
{2, 5}
{2, 6}
{2, 7}
{2, 8}
{3, 4}
{3, 5}
{3, 6}
{3, 7}
{3, 8}
{4, 5}
{4, 6}
{4, 7}
{4, 8}
{5, 6}
{5, 7}
{5, 8}
{6, 7}
{6, 8}
{7, 8}
{1, 2, 3}
{1, 2, 4}
{1, 2, 5}
{1, 2, 6}
{1, 2, 7}
{1, 2, 8}
{2, 3, 4}
{2, 3, 5}
{2, 3, 6}
{2, 3, 7}
{2, 3, 8}
{3, 4, 5}
{3, 4, 6}
{3, 4, 7}
{3, 4, 8}
{4, 5, 6}
{4, 5, 7}
{4, 5, 8}
{5, 6, 7}
{5, 6, 8}
{6, 7 , 8}
{1, 2, 3, 4}
{1, 2, 3, 5}
{1, 2, 3,6}
{1,2, 3, 7}
{1, 2, 3, 8}
{2, 3, 4, 5}
{2, 3, 4, 6}
{2, 3, 4, 7}
{2, 3, 4, 8}
{3, 4, 5, 6}
{3, 4, 5, 7}
{3, 4, 5, 8}
{4, 5, 6, 7}
{4, 5, 6, 8}
{5, 6, 7, 8}
{1, 2, 3, 4, 5}
{1, 2, 3, 4, 6}
{1, 2, 3, 4, 7}
{1, 2, 3, 4, 8}
{2, 3, 4, 5, 6 }
{2, 3, 4, 5, 7 }
{2, 3, 4, 5, 8 }
{3, 4, 5, 6, 7 }
{3, 4, 5, 6, 8}
{4, 5, 6, 7, 8 }
{1, 2, 3, 4, 5, 6}
{1, 2, 3, 4, 5, 7}
{1, 2, 3, 4, 5, 8}
{2, 3, 4, 5, 6, 7}
{2, 3, 4, 5, 6, 8}
{ 3, 4, 5, 6, 7, 8}
{1, 2, 3, 4, 5, 6, 7}
{1, 2, 3, 4, 5, 6, 8}
{2, 3, 4, 5, 6, 7,  8}
{1, 2, 3, 4, 5, 6, 7, 8}
0
1
11
21
23
33
43
45
55
12
22
24
34
44
46
56
32
34
44
54
56
66
44
54
64
66
76
56
66
68
78
76
78
88
88
98
100
33
35
45
55
57
67
55
65
75
77
87
77
87
89
99
99
101
111
121
131
143
56
66
76
78
88
88
98
100
110
120
122
132
144
154
176
89
99
101
111
131
133
143
165
175
199
132
134
144
176
186
220
177
187
231
232
0
11
21
31
32
43
53
55
65
32
42
44
54
64
66
76
52
54
64
74
76
86
64
74
84
86
96
76
86
88
98
96
98
108
108
118
120
63
65
75
85
87
97
85
95
105
107
117
107
117
119
129
129
131
141
151
161
173
96
106
116
118
128
128
138
140
150
160
162
172
184
194
216
139
149
151
161
181
183
193
215
225
249
192
194
204
236
246
280
247
257
301
312

         Himpunan bagian objek yang memberikan keuntungan maksimum  adalah {2, 3, 4, 8} dengan total keuntungan adalah 110. 

logoblog

Thanks for reading Algoritma Brute Force

Previous
« Prev Post

Tidak ada komentar:

Posting Komentar