Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with the below program in Java without using external software packages: Implement a genetic algorithm for the Traveling Salesman Problem for the following

Please help with the below program in Java without using external software packages:

Implement a genetic algorithm for the Traveling Salesman Problem for the following distance matrix..The program should create an output file containing the best tour generated during each generation. Data Matrix info for distance_matrix.txt below. Please provide:

The source code of program

The output file

Population size needs to be at least 1000

Selection Rate = 100%

Crossover Rate = 50%

Mutation Rate = 1%

Here is the data Matrix to be used from below:

distance_matrix.txt

0 129 206 569 107 360 284 144 115 162 200 231 288 226 436 272 174 231 297 252 118 146 258 347 121 227 200

129 0 153 696 236 395 155 139 130 291 329 360 417 123 565 401 71 176 426 381 247 225 387 476 250 356 329

206 153 0 777 315 780 312 82 93 370 406 428 496 116 644 480 827 23 505 460 293 188 466 565 329 435 408

569 696 777 0 462 398 797 713 694 407 369 388 291 795 150 314 43 800 272 317 504 609 349 222 544 356 488

107 236 315 462 0 388 408 251 222 55 93 152 181 333 329 185 281 338 190 145 137 242 151 240 82 120 93

360 395 780 398 388 0 466 479 456 194 156 266 195 435 249 107 436 542 192 197 197 492 229 199 335 131 133

284 155 312 797 408 466 0 314 302 446 484 504 567 276 640 587 228 332 568 524 414 354 524 610 408 510 435

144 139 82 713 251 479 314 0 29 306 344 364 432 112 580 416 68 105 441 396 229 124 402 491 265 371 344

115 130 93 694 222 456 302 29 0 277 315 335 403 111 551 387 059 116 412 367 200 95 373 462 236 342 315

162 291 370 407 55 194 446 306 277 0 37 118 126 388 274 110 336 393 135 114 192 297 118 185 137 65 081

200 329 406 369 93 156 484 344 315 37 0 153 88 426 236 72 374 431 97 82 230 335 114 147 175 27 119

231 360 428 388 152 266 504 364 335 118 153 0 111 446 325 185 394 451 116 71 135 240 45 166 234 140 199

288 417 496 291 181 195 567 432 403 126 088 111 0 514 214 087 462 519 9 40 227 332 72 59 263 75 207

226 123 116 795 333 435 276 112 111 388 426 446 514 0 682 498 52 139 523 478 311 206 484 573 347 453 426

436 565 644 150 329 249 640 580 551 274 236 325 214 682 0 164 610 667 223 254 411 546 286 251 411 209 355

272 401 480 314 185 107 587 416 387 110 72 185 87 498 164 0 446 503 87 114 301 406 146 103 247 45 191

174 71 827 43 281 436 228 68 59 336 374 394 462 52 610 446 00 105 471 426 259 254 432 521 295 401 374

231 176 23 800 338 542 332 105 116 393 431 451 519 139 667 503 105 0 528 483 316 211 489 578 352 458 431

297 426 505 272 190 192 568 441 412 135 097 116 9 523 223 87 471 528 0 45 232 337 77 50 272 84 216

252 381 460 317 145 197 524 396 367 114 82 71 40 478 254 114 426 483 45 0 187 292 32 95 227 69 195

118 247 293 504 137 197 414 229 200 192 230 135 227 311 411 301 259 316 232 187 0 105 180 282 174 256 230

146 225 188 609 242 492 354 124 95 297 335 240 332 206 546 406 254 211 337 292 105 0 285 387 287 361 335

258 387 466 349 151 229 524 402 373 118 114 45 72 484 286 146 432 489 077 32 180 285 0 127 233 101 199

347 476 565 222 240 199 610 491 462 185 147 166 59 573 251 103 521 578 50 95 282 387 127 0 322 134 266

121 250 329 544 82 335 408 265 236 137 175 234 263 347 411 247 295 352 272 227 174 287 233 322 0 202 175

227 356 435 356 120 131 510 371 342 065 27 140 075 453 209 45 401 458 84 69 256 361 101 134 202 0 146

200 329 408 488 093 133 435 344 315 081 119 199 207 426 355 191 374 431 216 195 230 335 199 266 175 146 0

Distance Matrix

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

2nd Edition

1597499471, 978-1597499477

More Books

Students also viewed these Databases questions

Question

=+50. Now deduce Theorem 3.3 from part (a).

Answered: 1 week ago