[ { "task_name": "QAP", "problem_type": "QAP", "instruction": "On opening night the awkward flow between favorites was obvious, so the curator’s challenge is to place each painting on its own wall so viewers who move between commonly paired works travel as little as possible. Every painting must have a unique wall and no wall can hold more than one painting. To rank layouts, look at every pair of paintings, multiply their co‑view frequency by the distance between their walls, and sum those products; arrangements with a smaller total keep visitor travel down. The concrete data for this arrangement is shown below.\n\nThere are 9 paintings to place, listed as F1, F2, F3, F4, F5, F6, F7, F8, F9, with 1, 2, 3, 4, 5, 6, 7, 8, 9 walls available for the curator's arrangement.\n\n| from_wall_id | to_wall_id | wall_distance |\n|---|---|---|\n| 1 | 2 | 66 |\n| 1 | 3 | 66 |\n| 1 | 4 | 53 |\n| 1 | 5 | 53 |\n| 1 | 6 | 53 |\n| 1 | 7 | 53 |\n| 1 | 8 | 73 |\n| 1 | 9 | 53 |\n| 2 | 1 | 66 |\n| 2 | 3 | 66 |\n| 2 | 4 | 53 |\n| 2 | 5 | 53 |\n| 2 | 6 | 73 |\n| 2 | 7 | 53 |\n| 2 | 8 | 85 |\n| 2 | 9 | 53 |\n| 3 | 1 | 66 |\n| 3 | 2 | 66 |\n| 3 | 4 | 53 |\n| 3 | 5 | 53 |\n| 3 | 6 | 53 |\n| 3 | 7 | 53 |\n| 3 | 8 | 85 |\n| 3 | 9 | 53 |\n| 4 | 1 | 53 |\n| 4 | 2 | 53 |\n| 4 | 3 | 53 |\n| 4 | 5 | 66 |\n| 4 | 6 | 53 |\n| 4 | 7 | 73 |\n| 4 | 8 | 53 |\n| 4 | 9 | 73 |\n| 5 | 1 | 53 |\n| 5 | 2 | 53 |\n| 5 | 3 | 53 |\n| 5 | 4 | 66 |\n| 5 | 6 | 53 |\n| 5 | 7 | 53 |\n| 5 | 8 | 53 |\n| 5 | 9 | 73 |\n| 6 | 1 | 66 |\n| 6 | 2 | 66 |\n| 6 | 3 | 66 |\n| 6 | 4 | 53 |\n| 6 | 5 | 53 |\n| 6 | 7 | 53 |\n| 6 | 8 | 73 |\n| 6 | 9 | 53 |\n| 7 | 1 | 53 |\n| 7 | 2 | 53 |\n| 7 | 3 | 53 |\n| 7 | 4 | 66 |\n| 7 | 5 | 66 |\n| 7 | 6 | 53 |\n| 7 | 8 | 53 |\n| 7 | 9 | 73 |\n| 8 | 1 | 66 |\n| 8 | 2 | 85 |\n| 8 | 3 | 85 |\n| 8 | 4 | 53 |\n| 8 | 5 | 53 |\n| 8 | 6 | 66 |\n| 8 | 7 | 53 |\n| 8 | 9 | 53 |\n| 9 | 1 | 53 |\n| 9 | 2 | 53 |\n| 9 | 3 | 53 |\n| 9 | 4 | 66 |\n| 9 | 5 | 66 |\n| 9 | 6 | 53 |\n| 9 | 7 | 53 |\n| 9 | 8 | 53 |\n\n| from_painting_id | to_painting_id | co_view_frequency |\n|---|---|---|\n| F1 | F2 | 3 |\n| F1 | F3 | 166 |\n| F1 | F4 | 2151 |\n| F1 | F5 | 148 |\n| F1 | F6 | 2 |\n| F1 | F7 | 36 |\n| F1 | F8 | 0 |\n| F1 | F9 | 8 |\n| F2 | F1 | 1 |\n| F2 | F3 | 7322 |\n| F2 | F4 | 54 |\n| F2 | F5 | 1268 |\n| F2 | F6 | 2 |\n| F2 | F7 | 353 |\n| F2 | F8 | 0 |\n| F2 | F9 | 37 |\n| F3 | F1 | 415 |\n| F3 | F2 | 1114 |\n| F3 | F4 | 222 |\n| F3 | F5 | 1061 |\n| F3 | F6 | 10506 |\n| F3 | F7 | 6584 |\n| F3 | F8 | 56 |\n| F3 | F9 | 518 |\n| F4 | F1 | 0 |\n| F4 | F2 | 1 |\n| F4 | F3 | 3008 |\n| F4 | F5 | 286 |\n| F4 | F6 | 18 |\n| F4 | F7 | 129 |\n| F4 | F8 | 0 |\n| F4 | F9 | 7 |\n| F5 | F1 | 462 |\n| F5 | F2 | 735 |\n| F5 | F3 | 2755 |\n| F5 | F4 | 1 |\n| F5 | F6 | 3732 |\n| F5 | F7 | 99 |\n| F5 | F8 | 2 |\n| F5 | F9 | 33 |\n| F6 | F1 | 146 |\n| F6 | F2 | 2401 |\n| F6 | F3 | 1012 |\n| F6 | F4 | 107 |\n| F6 | F5 | 1212 |\n| F6 | F7 | 31 |\n| F6 | F8 | 2 |\n| F6 | F9 | 140 |\n| F7 | F1 | 39 |\n| F7 | F2 | 1434 |\n| F7 | F3 | 2129 |\n| F7 | F4 | 165 |\n| F7 | F5 | 1035 |\n| F7 | F6 | 159 |\n| F7 | F8 | 5 |\n| F7 | F9 | 167 |\n| F8 | F1 | 7 |\n| F8 | F2 | 0 |\n| F8 | F3 | 5 |\n| F8 | F4 | 0 |\n| F8 | F5 | 10 |\n| F8 | F6 | 0 |\n| F8 | F7 | 0 |\n| F8 | F9 | 0 |\n| F9 | F1 | 0 |\n| F9 | F2 | 0 |\n| F9 | F3 | 959 |\n| F9 | F4 | 0 |\n| F9 | F5 | 477 |\n| F9 | F6 | 11 |\n| F9 | F7 | 0 |\n| F9 | F8 | 0 |\n\nThese entries complete the concrete data the curator will use to score arrangements.\n\nIf you want to send back a layout, just pop it into this little JSON shape so I can read it easily:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThe \"solution\" list is just the order of walls you want each painting to go on — the first entry is the wall for painting number one, the second entry is the wall for painting number two, and so on. Think of it like filling out a short form: one spot per painting that says which wall it gets.\n\nThis JSON is only a sketch of the expected shape, not the actual answer — please return the real identifiers from the instance when you reply.\n\nAll identifiers must be used exactly as they appear in the instance input — no renaming and no new labels.\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 53, 66, 66, 53, 53, 53, 53, 73, 53 ], [ 66, 53, 66, 53, 53, 73, 53, 85, 53 ], [ 66, 66, 53, 53, 53, 53, 53, 85, 53 ], [ 53, 53, 53, 53, 66, 53, 73, 53, 73 ], [ 53, 53, 53, 66, 53, 53, 53, 53, 73 ], [ 66, 66, 66, 53, 53, 53, 53, 73, 53 ], [ 53, 53, 53, 66, 66, 53, 53, 53, 73 ], [ 66, 85, 85, 53, 53, 66, 53, 53, 53 ], [ 53, 53, 53, 66, 66, 53, 53, 53, 53 ] ], "flow_matrix": [ [ 9, 3, 166, 2151, 148, 2, 36, 0, 8 ], [ 1, 158, 7322, 54, 1268, 2, 353, 0, 37 ], [ 415, 1114, 3393, 222, 1061, 10506, 6584, 56, 518 ], [ 0, 1, 3008, 0, 286, 18, 129, 0, 7 ], [ 462, 735, 2755, 1, 3, 3732, 99, 2, 33 ], [ 146, 2401, 1012, 107, 1212, 342, 31, 2, 140 ], [ 39, 1434, 2129, 165, 1035, 159, 127, 5, 167 ], [ 7, 0, 5, 0, 10, 0, 0, 0, 0 ], [ 0, 0, 959, 0, 477, 11, 0, 0, 0 ] ], "objective": 3166256.0 }, "solution": [ 7, 5, 6, 8, 4, 0, 2, 3, 1 ], "obj": 3166256.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 66 }, { "from_id": 1, "to_id": 3, "distance": 66 }, { "from_id": 1, "to_id": 4, "distance": 53 }, { "from_id": 1, "to_id": 5, "distance": 53 }, { "from_id": 1, "to_id": 6, "distance": 53 }, { "from_id": 1, "to_id": 7, "distance": 53 }, { "from_id": 1, "to_id": 8, "distance": 73 }, { "from_id": 1, "to_id": 9, "distance": 53 }, { "from_id": 2, "to_id": 1, "distance": 66 }, { "from_id": 2, "to_id": 3, "distance": 66 }, { "from_id": 2, "to_id": 4, "distance": 53 }, { "from_id": 2, "to_id": 5, "distance": 53 }, { "from_id": 2, "to_id": 6, "distance": 73 }, { "from_id": 2, "to_id": 7, "distance": 53 }, { "from_id": 2, "to_id": 8, "distance": 85 }, { "from_id": 2, "to_id": 9, "distance": 53 }, { "from_id": 3, "to_id": 1, "distance": 66 }, { "from_id": 3, "to_id": 2, "distance": 66 }, { "from_id": 3, "to_id": 4, "distance": 53 }, { "from_id": 3, "to_id": 5, "distance": 53 }, { "from_id": 3, "to_id": 6, "distance": 53 }, { "from_id": 3, "to_id": 7, "distance": 53 }, { "from_id": 3, "to_id": 8, "distance": 85 }, { "from_id": 3, "to_id": 9, "distance": 53 }, { "from_id": 4, "to_id": 1, "distance": 53 }, { "from_id": 4, "to_id": 2, "distance": 53 }, { "from_id": 4, "to_id": 3, "distance": 53 }, { "from_id": 4, "to_id": 5, "distance": 66 }, { "from_id": 4, "to_id": 6, "distance": 53 }, { "from_id": 4, "to_id": 7, "distance": 73 }, { "from_id": 4, "to_id": 8, "distance": 53 }, { "from_id": 4, "to_id": 9, "distance": 73 }, { "from_id": 5, "to_id": 1, "distance": 53 }, { "from_id": 5, "to_id": 2, "distance": 53 }, { "from_id": 5, "to_id": 3, "distance": 53 }, { "from_id": 5, "to_id": 4, "distance": 66 }, { "from_id": 5, "to_id": 6, "distance": 53 }, { "from_id": 5, "to_id": 7, "distance": 53 }, { "from_id": 5, "to_id": 8, "distance": 53 }, { "from_id": 5, "to_id": 9, "distance": 73 }, { "from_id": 6, "to_id": 1, "distance": 66 }, { "from_id": 6, "to_id": 2, "distance": 66 }, { "from_id": 6, "to_id": 3, "distance": 66 }, { "from_id": 6, "to_id": 4, "distance": 53 }, { "from_id": 6, "to_id": 5, "distance": 53 }, { "from_id": 6, "to_id": 7, "distance": 53 }, { "from_id": 6, "to_id": 8, "distance": 73 }, { "from_id": 6, "to_id": 9, "distance": 53 }, { "from_id": 7, "to_id": 1, "distance": 53 }, { "from_id": 7, "to_id": 2, "distance": 53 }, { "from_id": 7, "to_id": 3, "distance": 53 }, { "from_id": 7, "to_id": 4, "distance": 66 }, { "from_id": 7, "to_id": 5, "distance": 66 }, { "from_id": 7, "to_id": 6, "distance": 53 }, { "from_id": 7, "to_id": 8, "distance": 53 }, { "from_id": 7, "to_id": 9, "distance": 73 }, { "from_id": 8, "to_id": 1, "distance": 66 }, { "from_id": 8, "to_id": 2, "distance": 85 }, { "from_id": 8, "to_id": 3, "distance": 85 }, { "from_id": 8, "to_id": 4, "distance": 53 }, { "from_id": 8, "to_id": 5, "distance": 53 }, { "from_id": 8, "to_id": 6, "distance": 66 }, { "from_id": 8, "to_id": 7, "distance": 53 }, { "from_id": 8, "to_id": 9, "distance": 53 }, { "from_id": 9, "to_id": 1, "distance": 53 }, { "from_id": 9, "to_id": 2, "distance": 53 }, { "from_id": 9, "to_id": 3, "distance": 53 }, { "from_id": 9, "to_id": 4, "distance": 66 }, { "from_id": 9, "to_id": 5, "distance": 66 }, { "from_id": 9, "to_id": 6, "distance": 53 }, { "from_id": 9, "to_id": 7, "distance": 53 }, { "from_id": 9, "to_id": 8, "distance": 53 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 3 }, { "from_id": "F1", "to_id": "F3", "flow": 166 }, { "from_id": "F1", "to_id": "F4", "flow": 2151 }, { "from_id": "F1", "to_id": "F5", "flow": 148 }, { "from_id": "F1", "to_id": "F6", "flow": 2 }, { "from_id": "F1", "to_id": "F7", "flow": 36 }, { "from_id": "F1", "to_id": "F8", "flow": 0 }, { "from_id": "F1", "to_id": "F9", "flow": 8 }, { "from_id": "F2", "to_id": "F1", "flow": 1 }, { "from_id": "F2", "to_id": "F3", "flow": 7322 }, { "from_id": "F2", "to_id": "F4", "flow": 54 }, { "from_id": "F2", "to_id": "F5", "flow": 1268 }, { "from_id": "F2", "to_id": "F6", "flow": 2 }, { "from_id": "F2", "to_id": "F7", "flow": 353 }, { "from_id": "F2", "to_id": "F8", "flow": 0 }, { "from_id": "F2", "to_id": "F9", "flow": 37 }, { "from_id": "F3", "to_id": "F1", "flow": 415 }, { "from_id": "F3", "to_id": "F2", "flow": 1114 }, { "from_id": "F3", "to_id": "F4", "flow": 222 }, { "from_id": "F3", "to_id": "F5", "flow": 1061 }, { "from_id": "F3", "to_id": "F6", "flow": 10506 }, { "from_id": "F3", "to_id": "F7", "flow": 6584 }, { "from_id": "F3", "to_id": "F8", "flow": 56 }, { "from_id": "F3", "to_id": "F9", "flow": 518 }, { "from_id": "F4", "to_id": "F1", "flow": 0 }, { "from_id": "F4", "to_id": "F2", "flow": 1 }, { "from_id": "F4", "to_id": "F3", "flow": 3008 }, { "from_id": "F4", "to_id": "F5", "flow": 286 }, { "from_id": "F4", "to_id": "F6", "flow": 18 }, { "from_id": "F4", "to_id": "F7", "flow": 129 }, { "from_id": "F4", "to_id": "F8", "flow": 0 }, { "from_id": "F4", "to_id": "F9", "flow": 7 }, { "from_id": "F5", "to_id": "F1", "flow": 462 }, { "from_id": "F5", "to_id": "F2", "flow": 735 }, { "from_id": "F5", "to_id": "F3", "flow": 2755 }, { "from_id": "F5", "to_id": "F4", "flow": 1 }, { "from_id": "F5", "to_id": "F6", "flow": 3732 }, { "from_id": "F5", "to_id": "F7", "flow": 99 }, { "from_id": "F5", "to_id": "F8", "flow": 2 }, { "from_id": "F5", "to_id": "F9", "flow": 33 }, { "from_id": "F6", "to_id": "F1", "flow": 146 }, { "from_id": "F6", "to_id": "F2", "flow": 2401 }, { "from_id": "F6", "to_id": "F3", "flow": 1012 }, { "from_id": "F6", "to_id": "F4", "flow": 107 }, { "from_id": "F6", "to_id": "F5", "flow": 1212 }, { "from_id": "F6", "to_id": "F7", "flow": 31 }, { "from_id": "F6", "to_id": "F8", "flow": 2 }, { "from_id": "F6", "to_id": "F9", "flow": 140 }, { "from_id": "F7", "to_id": "F1", "flow": 39 }, { "from_id": "F7", "to_id": "F2", "flow": 1434 }, { "from_id": "F7", "to_id": "F3", "flow": 2129 }, { "from_id": "F7", "to_id": "F4", "flow": 165 }, { "from_id": "F7", "to_id": "F5", "flow": 1035 }, { "from_id": "F7", "to_id": "F6", "flow": 159 }, { "from_id": "F7", "to_id": "F8", "flow": 5 }, { "from_id": "F7", "to_id": "F9", "flow": 167 }, { "from_id": "F8", "to_id": "F1", "flow": 7 }, { "from_id": "F8", "to_id": "F2", "flow": 0 }, { "from_id": "F8", "to_id": "F3", "flow": 5 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 10 }, { "from_id": "F8", "to_id": "F6", "flow": 0 }, { "from_id": "F8", "to_id": "F7", "flow": 0 }, { "from_id": "F8", "to_id": "F9", "flow": 0 }, { "from_id": "F9", "to_id": "F1", "flow": 0 }, { "from_id": "F9", "to_id": "F2", "flow": 0 }, { "from_id": "F9", "to_id": "F3", "flow": 959 }, { "from_id": "F9", "to_id": "F4", "flow": 0 }, { "from_id": "F9", "to_id": "F5", "flow": 477 }, { "from_id": "F9", "to_id": "F6", "flow": 11 }, { "from_id": "F9", "to_id": "F7", "flow": 0 }, { "from_id": "F9", "to_id": "F8", "flow": 0 } ] }, "solution_variant": [ 8, 6, 7, 9, 5, 1, 3, 4, 2 ], "context_index": 1, "input_format": "markdown_table", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Recently the principal decided it’s time to reassign rooms so staff aren’t spending half their day walking across campus. The approach is: assign one classroom to each teacher and one teacher per classroom, and try to make it so that when you take every pair of teachers, multiply how often they need to move between each other’s classes by how far apart their rooms would be, and add all those results up, that grand total is as small as possible. That way frequent crossovers happen over short distances. The exact teacher list, room distances, and interaction counts follow below.\n\n{\n \"num_teachers_and_classrooms\": 9,\n \"teacher_ids\": [\n \"F1\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\"\n ],\n \"classroom_ids\": [\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\"\n ],\n \"distance\": [\n {\n \"from_classroom_id\": \"A\",\n \"to_classroom_id\": \"B\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"A\",\n \"to_classroom_id\": \"C\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"A\",\n \"to_classroom_id\": \"D\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"A\",\n \"to_classroom_id\": \"E\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"A\",\n \"to_classroom_id\": \"F\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"A\",\n \"to_classroom_id\": \"G\",\n \"distance_between_classrooms\": 57\n },\n {\n \"from_classroom_id\": \"A\",\n \"to_classroom_id\": \"H\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"A\",\n \"to_classroom_id\": \"I\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"B\",\n \"to_classroom_id\": \"A\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"B\",\n \"to_classroom_id\": \"C\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"B\",\n \"to_classroom_id\": \"D\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"B\",\n \"to_classroom_id\": \"E\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"B\",\n \"to_classroom_id\": \"F\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"B\",\n \"to_classroom_id\": \"G\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"B\",\n \"to_classroom_id\": \"H\",\n \"distance_between_classrooms\": 57\n },\n {\n \"from_classroom_id\": \"B\",\n \"to_classroom_id\": \"I\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"C\",\n \"to_classroom_id\": \"A\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"C\",\n \"to_classroom_id\": \"B\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"C\",\n \"to_classroom_id\": \"D\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"C\",\n \"to_classroom_id\": \"E\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"C\",\n \"to_classroom_id\": \"F\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"C\",\n \"to_classroom_id\": \"G\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"C\",\n \"to_classroom_id\": \"H\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"C\",\n \"to_classroom_id\": \"I\",\n \"distance_between_classrooms\": 57\n },\n {\n \"from_classroom_id\": \"D\",\n \"to_classroom_id\": \"A\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"D\",\n \"to_classroom_id\": \"B\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"D\",\n \"to_classroom_id\": \"C\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"D\",\n \"to_classroom_id\": \"E\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"D\",\n \"to_classroom_id\": \"F\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"D\",\n \"to_classroom_id\": \"G\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"D\",\n \"to_classroom_id\": \"H\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"D\",\n \"to_classroom_id\": \"I\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"E\",\n \"to_classroom_id\": \"A\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"E\",\n \"to_classroom_id\": \"B\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"E\",\n \"to_classroom_id\": \"C\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"E\",\n \"to_classroom_id\": \"D\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"E\",\n \"to_classroom_id\": \"F\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"E\",\n \"to_classroom_id\": \"G\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"E\",\n \"to_classroom_id\": \"H\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"E\",\n \"to_classroom_id\": \"I\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"F\",\n \"to_classroom_id\": \"A\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"F\",\n \"to_classroom_id\": \"B\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"F\",\n \"to_classroom_id\": \"C\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"F\",\n \"to_classroom_id\": \"D\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"F\",\n \"to_classroom_id\": \"E\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"F\",\n \"to_classroom_id\": \"G\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"F\",\n \"to_classroom_id\": \"H\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"F\",\n \"to_classroom_id\": \"I\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"G\",\n \"to_classroom_id\": \"A\",\n \"distance_between_classrooms\": 57\n },\n {\n \"from_classroom_id\": \"G\",\n \"to_classroom_id\": \"B\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"G\",\n \"to_classroom_id\": \"C\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"G\",\n \"to_classroom_id\": \"D\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"G\",\n \"to_classroom_id\": \"E\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"G\",\n \"to_classroom_id\": \"F\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"G\",\n \"to_classroom_id\": \"H\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"G\",\n \"to_classroom_id\": \"I\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"H\",\n \"to_classroom_id\": \"A\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"H\",\n \"to_classroom_id\": \"B\",\n \"distance_between_classrooms\": 57\n },\n {\n \"from_classroom_id\": \"H\",\n \"to_classroom_id\": \"C\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"H\",\n \"to_classroom_id\": \"D\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"H\",\n \"to_classroom_id\": \"E\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"H\",\n \"to_classroom_id\": \"F\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"H\",\n \"to_classroom_id\": \"G\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"H\",\n \"to_classroom_id\": \"I\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"I\",\n \"to_classroom_id\": \"A\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"I\",\n \"to_classroom_id\": \"B\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"I\",\n \"to_classroom_id\": \"C\",\n \"distance_between_classrooms\": 57\n },\n {\n \"from_classroom_id\": \"I\",\n \"to_classroom_id\": \"D\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"I\",\n \"to_classroom_id\": \"E\",\n \"distance_between_classrooms\": 50\n },\n {\n \"from_classroom_id\": \"I\",\n \"to_classroom_id\": \"F\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"I\",\n \"to_classroom_id\": \"G\",\n \"distance_between_classrooms\": 37\n },\n {\n \"from_classroom_id\": \"I\",\n \"to_classroom_id\": \"H\",\n \"distance_between_classrooms\": 37\n }\n ],\n \"flow\": [\n {\n \"from_teacher_id\": \"F1\",\n \"to_teacher_id\": \"F2\",\n \"movement_frequency_between_teachers\": 495\n },\n {\n \"from_teacher_id\": \"F1\",\n \"to_teacher_id\": \"F3\",\n \"movement_frequency_between_teachers\": 610\n },\n {\n \"from_teacher_id\": \"F1\",\n \"to_teacher_id\": \"F4\",\n \"movement_frequency_between_teachers\": 15\n },\n {\n \"from_teacher_id\": \"F1\",\n \"to_teacher_id\": \"F5\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F1\",\n \"to_teacher_id\": \"F6\",\n \"movement_frequency_between_teachers\": 1977\n },\n {\n \"from_teacher_id\": \"F1\",\n \"to_teacher_id\": \"F7\",\n \"movement_frequency_between_teachers\": 1796\n },\n {\n \"from_teacher_id\": \"F1\",\n \"to_teacher_id\": \"F8\",\n \"movement_frequency_between_teachers\": 120\n },\n {\n \"from_teacher_id\": \"F1\",\n \"to_teacher_id\": \"F9\",\n \"movement_frequency_between_teachers\": 16\n },\n {\n \"from_teacher_id\": \"F2\",\n \"to_teacher_id\": \"F1\",\n \"movement_frequency_between_teachers\": 83\n },\n {\n \"from_teacher_id\": \"F2\",\n \"to_teacher_id\": \"F3\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F2\",\n \"to_teacher_id\": \"F4\",\n \"movement_frequency_between_teachers\": 2151\n },\n {\n \"from_teacher_id\": \"F2\",\n \"to_teacher_id\": \"F5\",\n \"movement_frequency_between_teachers\": 1\n },\n {\n \"from_teacher_id\": \"F2\",\n \"to_teacher_id\": \"F6\",\n \"movement_frequency_between_teachers\": 36\n },\n {\n \"from_teacher_id\": \"F2\",\n \"to_teacher_id\": \"F7\",\n \"movement_frequency_between_teachers\": 200\n },\n {\n \"from_teacher_id\": \"F2\",\n \"to_teacher_id\": \"F8\",\n \"movement_frequency_between_teachers\": 1\n },\n {\n \"from_teacher_id\": \"F2\",\n \"to_teacher_id\": \"F9\",\n \"movement_frequency_between_teachers\": 32\n },\n {\n \"from_teacher_id\": \"F3\",\n \"to_teacher_id\": \"F1\",\n \"movement_frequency_between_teachers\": 336\n },\n {\n \"from_teacher_id\": \"F3\",\n \"to_teacher_id\": \"F2\",\n \"movement_frequency_between_teachers\": 5\n },\n {\n \"from_teacher_id\": \"F3\",\n \"to_teacher_id\": \"F4\",\n \"movement_frequency_between_teachers\": 61\n },\n {\n \"from_teacher_id\": \"F3\",\n \"to_teacher_id\": \"F5\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F3\",\n \"to_teacher_id\": \"F6\",\n \"movement_frequency_between_teachers\": 438\n },\n {\n \"from_teacher_id\": \"F3\",\n \"to_teacher_id\": \"F7\",\n \"movement_frequency_between_teachers\": 127\n },\n {\n \"from_teacher_id\": \"F3\",\n \"to_teacher_id\": \"F8\",\n \"movement_frequency_between_teachers\": 19\n },\n {\n \"from_teacher_id\": \"F3\",\n \"to_teacher_id\": \"F9\",\n \"movement_frequency_between_teachers\": 10\n },\n {\n \"from_teacher_id\": \"F4\",\n \"to_teacher_id\": \"F1\",\n \"movement_frequency_between_teachers\": 834\n },\n {\n \"from_teacher_id\": \"F4\",\n \"to_teacher_id\": \"F2\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F4\",\n \"to_teacher_id\": \"F3\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F4\",\n \"to_teacher_id\": \"F5\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F4\",\n \"to_teacher_id\": \"F6\",\n \"movement_frequency_between_teachers\": 129\n },\n {\n \"from_teacher_id\": \"F4\",\n \"to_teacher_id\": \"F7\",\n \"movement_frequency_between_teachers\": 789\n },\n {\n \"from_teacher_id\": \"F4\",\n \"to_teacher_id\": \"F8\",\n \"movement_frequency_between_teachers\": 3\n },\n {\n \"from_teacher_id\": \"F4\",\n \"to_teacher_id\": \"F9\",\n \"movement_frequency_between_teachers\": 5\n },\n {\n \"from_teacher_id\": \"F5\",\n \"to_teacher_id\": \"F1\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F5\",\n \"to_teacher_id\": \"F2\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F5\",\n \"to_teacher_id\": \"F3\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F5\",\n \"to_teacher_id\": \"F4\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F5\",\n \"to_teacher_id\": \"F6\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F5\",\n \"to_teacher_id\": \"F7\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F5\",\n \"to_teacher_id\": \"F8\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F5\",\n \"to_teacher_id\": \"F9\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F6\",\n \"to_teacher_id\": \"F1\",\n \"movement_frequency_between_teachers\": 1140\n },\n {\n \"from_teacher_id\": \"F6\",\n \"to_teacher_id\": \"F2\",\n \"movement_frequency_between_teachers\": 39\n },\n {\n \"from_teacher_id\": \"F6\",\n \"to_teacher_id\": \"F3\",\n \"movement_frequency_between_teachers\": 301\n },\n {\n \"from_teacher_id\": \"F6\",\n \"to_teacher_id\": \"F4\",\n \"movement_frequency_between_teachers\": 165\n },\n {\n \"from_teacher_id\": \"F6\",\n \"to_teacher_id\": \"F5\",\n \"movement_frequency_between_teachers\": 1\n },\n {\n \"from_teacher_id\": \"F6\",\n \"to_teacher_id\": \"F7\",\n \"movement_frequency_between_teachers\": 584\n },\n {\n \"from_teacher_id\": \"F6\",\n \"to_teacher_id\": \"F8\",\n \"movement_frequency_between_teachers\": 187\n },\n {\n \"from_teacher_id\": \"F6\",\n \"to_teacher_id\": \"F9\",\n \"movement_frequency_between_teachers\": 23\n },\n {\n \"from_teacher_id\": \"F7\",\n \"to_teacher_id\": \"F1\",\n \"movement_frequency_between_teachers\": 770\n },\n {\n \"from_teacher_id\": \"F7\",\n \"to_teacher_id\": \"F2\",\n \"movement_frequency_between_teachers\": 12\n },\n {\n \"from_teacher_id\": \"F7\",\n \"to_teacher_id\": \"F3\",\n \"movement_frequency_between_teachers\": 139\n },\n {\n \"from_teacher_id\": \"F7\",\n \"to_teacher_id\": \"F4\",\n \"movement_frequency_between_teachers\": 160\n },\n {\n \"from_teacher_id\": \"F7\",\n \"to_teacher_id\": \"F5\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F7\",\n \"to_teacher_id\": \"F6\",\n \"movement_frequency_between_teachers\": 622\n },\n {\n \"from_teacher_id\": \"F7\",\n \"to_teacher_id\": \"F8\",\n \"movement_frequency_between_teachers\": 88\n },\n {\n \"from_teacher_id\": \"F7\",\n \"to_teacher_id\": \"F9\",\n \"movement_frequency_between_teachers\": 24\n },\n {\n \"from_teacher_id\": \"F8\",\n \"to_teacher_id\": \"F1\",\n \"movement_frequency_between_teachers\": 2203\n },\n {\n \"from_teacher_id\": \"F8\",\n \"to_teacher_id\": \"F2\",\n \"movement_frequency_between_teachers\": 1\n },\n {\n \"from_teacher_id\": \"F8\",\n \"to_teacher_id\": \"F3\",\n \"movement_frequency_between_teachers\": 1\n },\n {\n \"from_teacher_id\": \"F8\",\n \"to_teacher_id\": \"F4\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F8\",\n \"to_teacher_id\": \"F5\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F8\",\n \"to_teacher_id\": \"F6\",\n \"movement_frequency_between_teachers\": 299\n },\n {\n \"from_teacher_id\": \"F8\",\n \"to_teacher_id\": \"F7\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F8\",\n \"to_teacher_id\": \"F9\",\n \"movement_frequency_between_teachers\": 1\n },\n {\n \"from_teacher_id\": \"F9\",\n \"to_teacher_id\": \"F1\",\n \"movement_frequency_between_teachers\": 6\n },\n {\n \"from_teacher_id\": \"F9\",\n \"to_teacher_id\": \"F2\",\n \"movement_frequency_between_teachers\": 9\n },\n {\n \"from_teacher_id\": \"F9\",\n \"to_teacher_id\": \"F3\",\n \"movement_frequency_between_teachers\": 1\n },\n {\n \"from_teacher_id\": \"F9\",\n \"to_teacher_id\": \"F4\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F9\",\n \"to_teacher_id\": \"F5\",\n \"movement_frequency_between_teachers\": 0\n },\n {\n \"from_teacher_id\": \"F9\",\n \"to_teacher_id\": \"F6\",\n \"movement_frequency_between_teachers\": 17\n },\n {\n \"from_teacher_id\": \"F9\",\n \"to_teacher_id\": \"F7\",\n \"movement_frequency_between_teachers\": 4\n },\n {\n \"from_teacher_id\": \"F9\",\n \"to_teacher_id\": \"F8\",\n \"movement_frequency_between_teachers\": 0\n }\n ]\n}\n\nWhen you send back the assignment, just use this relaxed JSON shape so it's easy to parse:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of that \"solution\" list like a simple sign-up sheet: the first entry is the room (location) for the first teacher (first facility), the second entry is the room for the second teacher, and so on. It's just a sketch of the shape I expect — not the actual assignment.\n\nPlease use the exact identifiers shown in the instance input — don't rename or invent new labels.\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 37, 50, 37, 37, 37, 37, 57, 50, 37 ], [ 50, 37, 37, 37, 37, 37, 50, 57, 37 ], [ 37, 37, 37, 50, 50, 37, 37, 37, 57 ], [ 37, 37, 50, 37, 37, 50, 37, 37, 50 ], [ 37, 37, 50, 50, 37, 37, 37, 37, 50 ], [ 37, 37, 50, 50, 37, 37, 37, 37, 50 ], [ 57, 50, 37, 37, 37, 37, 37, 50, 37 ], [ 50, 57, 37, 37, 37, 37, 50, 37, 37 ], [ 37, 37, 57, 50, 50, 37, 37, 37, 37 ] ], "flow_matrix": [ [ 3164, 495, 610, 15, 0, 1977, 1796, 120, 16 ], [ 83, 9, 0, 2151, 1, 36, 200, 1, 32 ], [ 336, 5, 96, 61, 0, 438, 127, 19, 10 ], [ 834, 0, 0, 0, 0, 129, 789, 3, 5 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 1140, 39, 301, 165, 1, 127, 584, 187, 23 ], [ 770, 12, 139, 160, 0, 622, 297, 88, 24 ], [ 2203, 1, 1, 0, 0, 299, 0, 4, 1 ], [ 6, 9, 1, 0, 0, 17, 4, 0, 0 ] ], "objective": 783414.0 }, "solution": [ 5, 0, 7, 8, 3, 4, 1, 6, 2 ], "obj": 783414.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 50 }, { "from_id": "A", "to_id": "C", "distance": 37 }, { "from_id": "A", "to_id": "D", "distance": 37 }, { "from_id": "A", "to_id": "E", "distance": 37 }, { "from_id": "A", "to_id": "F", "distance": 37 }, { "from_id": "A", "to_id": "G", "distance": 57 }, { "from_id": "A", "to_id": "H", "distance": 50 }, { "from_id": "A", "to_id": "I", "distance": 37 }, { "from_id": "B", "to_id": "A", "distance": 50 }, { "from_id": "B", "to_id": "C", "distance": 37 }, { "from_id": "B", "to_id": "D", "distance": 37 }, { "from_id": "B", "to_id": "E", "distance": 37 }, { "from_id": "B", "to_id": "F", "distance": 37 }, { "from_id": "B", "to_id": "G", "distance": 50 }, { "from_id": "B", "to_id": "H", "distance": 57 }, { "from_id": "B", "to_id": "I", "distance": 37 }, { "from_id": "C", "to_id": "A", "distance": 37 }, { "from_id": "C", "to_id": "B", "distance": 37 }, { "from_id": "C", "to_id": "D", "distance": 50 }, { "from_id": "C", "to_id": "E", "distance": 50 }, { "from_id": "C", "to_id": "F", "distance": 37 }, { "from_id": "C", "to_id": "G", "distance": 37 }, { "from_id": "C", "to_id": "H", "distance": 37 }, { "from_id": "C", "to_id": "I", "distance": 57 }, { "from_id": "D", "to_id": "A", "distance": 37 }, { "from_id": "D", "to_id": "B", "distance": 37 }, { "from_id": "D", "to_id": "C", "distance": 50 }, { "from_id": "D", "to_id": "E", "distance": 37 }, { "from_id": "D", "to_id": "F", "distance": 50 }, { "from_id": "D", "to_id": "G", "distance": 37 }, { "from_id": "D", "to_id": "H", "distance": 37 }, { "from_id": "D", "to_id": "I", "distance": 50 }, { "from_id": "E", "to_id": "A", "distance": 37 }, { "from_id": "E", "to_id": "B", "distance": 37 }, { "from_id": "E", "to_id": "C", "distance": 50 }, { "from_id": "E", "to_id": "D", "distance": 50 }, { "from_id": "E", "to_id": "F", "distance": 37 }, { "from_id": "E", "to_id": "G", "distance": 37 }, { "from_id": "E", "to_id": "H", "distance": 37 }, { "from_id": "E", "to_id": "I", "distance": 50 }, { "from_id": "F", "to_id": "A", "distance": 37 }, { "from_id": "F", "to_id": "B", "distance": 37 }, { "from_id": "F", "to_id": "C", "distance": 50 }, { "from_id": "F", "to_id": "D", "distance": 50 }, { "from_id": "F", "to_id": "E", "distance": 37 }, { "from_id": "F", "to_id": "G", "distance": 37 }, { "from_id": "F", "to_id": "H", "distance": 37 }, { "from_id": "F", "to_id": "I", "distance": 50 }, { "from_id": "G", "to_id": "A", "distance": 57 }, { "from_id": "G", "to_id": "B", "distance": 50 }, { "from_id": "G", "to_id": "C", "distance": 37 }, { "from_id": "G", "to_id": "D", "distance": 37 }, { "from_id": "G", "to_id": "E", "distance": 37 }, { "from_id": "G", "to_id": "F", "distance": 37 }, { "from_id": "G", "to_id": "H", "distance": 50 }, { "from_id": "G", "to_id": "I", "distance": 37 }, { "from_id": "H", "to_id": "A", "distance": 50 }, { "from_id": "H", "to_id": "B", "distance": 57 }, { "from_id": "H", "to_id": "C", "distance": 37 }, { "from_id": "H", "to_id": "D", "distance": 37 }, { "from_id": "H", "to_id": "E", "distance": 37 }, { "from_id": "H", "to_id": "F", "distance": 37 }, { "from_id": "H", "to_id": "G", "distance": 50 }, { "from_id": "H", "to_id": "I", "distance": 37 }, { "from_id": "I", "to_id": "A", "distance": 37 }, { "from_id": "I", "to_id": "B", "distance": 37 }, { "from_id": "I", "to_id": "C", "distance": 57 }, { "from_id": "I", "to_id": "D", "distance": 50 }, { "from_id": "I", "to_id": "E", "distance": 50 }, { "from_id": "I", "to_id": "F", "distance": 37 }, { "from_id": "I", "to_id": "G", "distance": 37 }, { "from_id": "I", "to_id": "H", "distance": 37 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 495 }, { "from_id": "F1", "to_id": "F3", "flow": 610 }, { "from_id": "F1", "to_id": "F4", "flow": 15 }, { "from_id": "F1", "to_id": "F5", "flow": 0 }, { "from_id": "F1", "to_id": "F6", "flow": 1977 }, { "from_id": "F1", "to_id": "F7", "flow": 1796 }, { "from_id": "F1", "to_id": "F8", "flow": 120 }, { "from_id": "F1", "to_id": "F9", "flow": 16 }, { "from_id": "F2", "to_id": "F1", "flow": 83 }, { "from_id": "F2", "to_id": "F3", "flow": 0 }, { "from_id": "F2", "to_id": "F4", "flow": 2151 }, { "from_id": "F2", "to_id": "F5", "flow": 1 }, { "from_id": "F2", "to_id": "F6", "flow": 36 }, { "from_id": "F2", "to_id": "F7", "flow": 200 }, { "from_id": "F2", "to_id": "F8", "flow": 1 }, { "from_id": "F2", "to_id": "F9", "flow": 32 }, { "from_id": "F3", "to_id": "F1", "flow": 336 }, { "from_id": "F3", "to_id": "F2", "flow": 5 }, { "from_id": "F3", "to_id": "F4", "flow": 61 }, { "from_id": "F3", "to_id": "F5", "flow": 0 }, { "from_id": "F3", "to_id": "F6", "flow": 438 }, { "from_id": "F3", "to_id": "F7", "flow": 127 }, { "from_id": "F3", "to_id": "F8", "flow": 19 }, { "from_id": "F3", "to_id": "F9", "flow": 10 }, { "from_id": "F4", "to_id": "F1", "flow": 834 }, { "from_id": "F4", "to_id": "F2", "flow": 0 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 0 }, { "from_id": "F4", "to_id": "F6", "flow": 129 }, { "from_id": "F4", "to_id": "F7", "flow": 789 }, { "from_id": "F4", "to_id": "F8", "flow": 3 }, { "from_id": "F4", "to_id": "F9", "flow": 5 }, { "from_id": "F5", "to_id": "F1", "flow": 0 }, { "from_id": "F5", "to_id": "F2", "flow": 0 }, { "from_id": "F5", "to_id": "F3", "flow": 0 }, { "from_id": "F5", "to_id": "F4", "flow": 0 }, { "from_id": "F5", "to_id": "F6", "flow": 0 }, { "from_id": "F5", "to_id": "F7", "flow": 0 }, { "from_id": "F5", "to_id": "F8", "flow": 0 }, { "from_id": "F5", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F1", "flow": 1140 }, { "from_id": "F6", "to_id": "F2", "flow": 39 }, { "from_id": "F6", "to_id": "F3", "flow": 301 }, { "from_id": "F6", "to_id": "F4", "flow": 165 }, { "from_id": "F6", "to_id": "F5", "flow": 1 }, { "from_id": "F6", "to_id": "F7", "flow": 584 }, { "from_id": "F6", "to_id": "F8", "flow": 187 }, { "from_id": "F6", "to_id": "F9", "flow": 23 }, { "from_id": "F7", "to_id": "F1", "flow": 770 }, { "from_id": "F7", "to_id": "F2", "flow": 12 }, { "from_id": "F7", "to_id": "F3", "flow": 139 }, { "from_id": "F7", "to_id": "F4", "flow": 160 }, { "from_id": "F7", "to_id": "F5", "flow": 0 }, { "from_id": "F7", "to_id": "F6", "flow": 622 }, { "from_id": "F7", "to_id": "F8", "flow": 88 }, { "from_id": "F7", "to_id": "F9", "flow": 24 }, { "from_id": "F8", "to_id": "F1", "flow": 2203 }, { "from_id": "F8", "to_id": "F2", "flow": 1 }, { "from_id": "F8", "to_id": "F3", "flow": 1 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 0 }, { "from_id": "F8", "to_id": "F6", "flow": 299 }, { "from_id": "F8", "to_id": "F7", "flow": 0 }, { "from_id": "F8", "to_id": "F9", "flow": 1 }, { "from_id": "F9", "to_id": "F1", "flow": 6 }, { "from_id": "F9", "to_id": "F2", "flow": 9 }, { "from_id": "F9", "to_id": "F3", "flow": 1 }, { "from_id": "F9", "to_id": "F4", "flow": 0 }, { "from_id": "F9", "to_id": "F5", "flow": 0 }, { "from_id": "F9", "to_id": "F6", "flow": 17 }, { "from_id": "F9", "to_id": "F7", "flow": 4 }, { "from_id": "F9", "to_id": "F8", "flow": 0 } ] }, "solution_variant": [ "F", "A", "H", "I", "D", "E", "B", "G", "C" ], "context_index": 2, "input_format": "json", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "I run a busy warehouse and need to decide which shelf zone each product family should live in. The idea is to put each family into one dedicated zone, and make sure no zone ends up with more than one family. A better layout is the one that cuts down the total picking effort: for every pair of product families, take how often they appear together in orders, multiply that by how far apart their zones are, and add up those numbers for all pairs — the smaller that sum, the easier the picking. The specific layout, travel distances, and pair frequencies are shown below.\n\n# num_families_zones=12\n# product_family_ids=F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12\n# shelf_zone_ids=A, B, C, D, E, F, G, H, I, J, K, L\n\nfrom_zone_id,to_zone_id,zone_travel_distance\nA,B,1\nA,C,1\nA,D,1\nA,E,1\nA,F,1\nA,G,1\nA,H,1\nA,I,1\nA,J,0\nA,K,1\nA,L,1\nB,A,1\nB,C,1\nB,D,2\nB,E,1\nB,F,1\nB,G,1\nB,H,1\nB,I,1\nB,J,1\nB,K,0\nB,L,1\nC,A,1\nC,B,1\nC,D,1\nC,E,1\nC,F,1\nC,G,1\nC,H,1\nC,I,1\nC,J,1\nC,K,1\nC,L,1\nD,A,1\nD,B,1\nD,C,1\nD,E,1\nD,F,1\nD,G,1\nD,H,1\nD,I,1\nD,J,1\nD,K,1\nD,L,1\nE,A,1\nE,B,1\nE,C,1\nE,D,1\nE,F,1\nE,G,1\nE,H,1\nE,I,1\nE,J,1\nE,K,1\nE,L,1\nF,A,1\nF,B,1\nF,C,1\nF,D,1\nF,E,1\nF,G,1\nF,H,1\nF,I,1\nF,J,1\nF,K,1\nF,L,1\nG,A,1\nG,B,1\nG,C,1\nG,D,1\nG,E,1\nG,F,2\nG,H,1\nG,I,1\nG,J,1\nG,K,1\nG,L,1\nH,A,1\nH,B,1\nH,C,1\nH,D,1\nH,E,1\nH,F,1\nH,G,1\nH,I,1\nH,J,1\nH,K,1\nH,L,1\nI,A,1\nI,B,1\nI,C,1\nI,D,1\nI,E,1\nI,F,2\nI,G,1\nI,H,1\nI,J,1\nI,K,1\nI,L,1\nJ,A,1\nJ,B,1\nJ,C,1\nJ,D,1\nJ,E,1\nJ,F,1\nJ,G,1\nJ,H,2\nJ,I,1\nJ,K,1\nJ,L,1\nK,A,1\nK,B,1\nK,C,0\nK,D,1\nK,E,1\nK,F,1\nK,G,1\nK,H,1\nK,I,1\nK,J,1\nK,L,1\nL,A,1\nL,B,1\nL,C,1\nL,D,1\nL,E,1\nL,F,1\nL,G,1\nL,H,1\nL,I,1\nL,J,1\nL,K,1\n\nfrom_family_id,to_family_id,co_pick_frequency\nF1,F2,19\nF1,F3,27\nF1,F4,17\nF1,F5,27\nF1,F6,40\nF1,F7,29\nF1,F8,23\nF1,F9,26\nF1,F10,34\nF1,F11,29\nF1,F12,28\nF2,F1,19\nF2,F3,19\nF2,F4,47\nF2,F5,11\nF2,F6,22\nF2,F7,40\nF2,F8,36\nF2,F9,46\nF2,F10,30\nF2,F11,43\nF2,F12,30\nF3,F1,27\nF3,F2,19\nF3,F4,11\nF3,F5,6\nF3,F6,31\nF3,F7,16\nF3,F8,25\nF3,F9,29\nF3,F10,40\nF3,F11,23\nF3,F12,18\nF4,F1,17\nF4,F2,47\nF4,F3,11\nF4,F5,7\nF4,F6,26\nF4,F7,29\nF4,F8,28\nF4,F9,20\nF4,F10,31\nF4,F11,34\nF4,F12,14\nF5,F1,27\nF5,F2,11\nF5,F3,6\nF5,F4,7\nF5,F6,17\nF5,F7,33\nF5,F8,38\nF5,F9,30\nF5,F10,29\nF5,F11,27\nF5,F12,19\nF6,F1,40\nF6,F2,22\nF6,F3,31\nF6,F4,26\nF6,F5,17\nF6,F7,25\nF6,F8,38\nF6,F9,25\nF6,F10,21\nF6,F11,5\nF6,F12,17\nF7,F1,29\nF7,F2,40\nF7,F3,16\nF7,F4,29\nF7,F5,33\nF7,F6,25\nF7,F8,37\nF7,F9,21\nF7,F10,46\nF7,F11,8\nF7,F12,33\nF8,F1,23\nF8,F2,36\nF8,F3,25\nF8,F4,28\nF8,F5,38\nF8,F6,38\nF8,F7,37\nF8,F9,31\nF8,F10,6\nF8,F11,44\nF8,F12,20\nF9,F1,26\nF9,F2,46\nF9,F3,29\nF9,F4,20\nF9,F5,30\nF9,F6,25\nF9,F7,21\nF9,F8,31\nF9,F10,13\nF9,F11,26\nF9,F12,28\nF10,F1,34\nF10,F2,30\nF10,F3,40\nF10,F4,31\nF10,F5,29\nF10,F6,21\nF10,F7,46\nF10,F8,6\nF10,F9,13\nF10,F11,40\nF10,F12,32\nF11,F1,29\nF11,F2,43\nF11,F3,23\nF11,F4,34\nF11,F5,27\nF11,F6,5\nF11,F7,8\nF11,F8,44\nF11,F9,26\nF11,F10,40\nF11,F12,35\nF12,F1,28\nF12,F2,30\nF12,F3,18\nF12,F4,14\nF12,F5,19\nF12,F6,17\nF12,F7,33\nF12,F8,20\nF12,F9,28\nF12,F10,32\nF12,F11,35\n\nIf you want to send me a proposed layout, just drop it in this simple JSON shape so I can read it programmatically — something like this:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of the \"solution\" array as a plain list: the first entry is the zone (location) you want the first product family to live in, the second entry is the zone for the second family, and so on down the list. It's just a lightweight form to say \"family X goes to zone Y.\"\n\nThis JSON is only a sketch of the expected shape — not the actual answer. Please use the exact identifiers from the instance input; do not rename or invent labels. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1 ], [ 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 0, 1 ], [ 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 2, 1, 0, 1, 1 ], [ 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ] ], "flow_matrix": [ [ 0, 19, 27, 17, 27, 40, 29, 23, 26, 34, 29, 28 ], [ 19, 0, 19, 47, 11, 22, 40, 36, 46, 30, 43, 30 ], [ 27, 19, 0, 11, 6, 31, 16, 25, 29, 40, 23, 18 ], [ 17, 47, 11, 0, 7, 26, 29, 28, 20, 31, 34, 14 ], [ 27, 11, 6, 7, 0, 17, 33, 38, 30, 29, 27, 19 ], [ 40, 22, 31, 26, 17, 0, 25, 38, 25, 21, 5, 17 ], [ 29, 40, 16, 29, 33, 25, 0, 37, 21, 46, 8, 33 ], [ 23, 36, 25, 28, 38, 38, 37, 0, 31, 6, 44, 20 ], [ 26, 46, 29, 20, 30, 25, 21, 31, 0, 13, 26, 28 ], [ 34, 30, 40, 31, 29, 21, 46, 6, 13, 0, 40, 32 ], [ 29, 43, 23, 34, 27, 5, 8, 44, 26, 40, 0, 35 ], [ 28, 30, 18, 14, 19, 17, 33, 20, 28, 32, 35, 0 ] ], "objective": 3412.0 }, "solution": [ 0, 10, 8, 6, 5, 9, 11, 1, 2, 3, 7, 4 ], "obj": 3412.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 12, "num_locations": 12, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 1 }, { "from_id": "A", "to_id": "C", "distance": 1 }, { "from_id": "A", "to_id": "D", "distance": 1 }, { "from_id": "A", "to_id": "E", "distance": 1 }, { "from_id": "A", "to_id": "F", "distance": 1 }, { "from_id": "A", "to_id": "G", "distance": 1 }, { "from_id": "A", "to_id": "H", "distance": 1 }, { "from_id": "A", "to_id": "I", "distance": 1 }, { "from_id": "A", "to_id": "J", "distance": 0 }, { "from_id": "A", "to_id": "K", "distance": 1 }, { "from_id": "A", "to_id": "L", "distance": 1 }, { "from_id": "B", "to_id": "A", "distance": 1 }, { "from_id": "B", "to_id": "C", "distance": 1 }, { "from_id": "B", "to_id": "D", "distance": 2 }, { "from_id": "B", "to_id": "E", "distance": 1 }, { "from_id": "B", "to_id": "F", "distance": 1 }, { "from_id": "B", "to_id": "G", "distance": 1 }, { "from_id": "B", "to_id": "H", "distance": 1 }, { "from_id": "B", "to_id": "I", "distance": 1 }, { "from_id": "B", "to_id": "J", "distance": 1 }, { "from_id": "B", "to_id": "K", "distance": 0 }, { "from_id": "B", "to_id": "L", "distance": 1 }, { "from_id": "C", "to_id": "A", "distance": 1 }, { "from_id": "C", "to_id": "B", "distance": 1 }, { "from_id": "C", "to_id": "D", "distance": 1 }, { "from_id": "C", "to_id": "E", "distance": 1 }, { "from_id": "C", "to_id": "F", "distance": 1 }, { "from_id": "C", "to_id": "G", "distance": 1 }, { "from_id": "C", "to_id": "H", "distance": 1 }, { "from_id": "C", "to_id": "I", "distance": 1 }, { "from_id": "C", "to_id": "J", "distance": 1 }, { "from_id": "C", "to_id": "K", "distance": 1 }, { "from_id": "C", "to_id": "L", "distance": 1 }, { "from_id": "D", "to_id": "A", "distance": 1 }, { "from_id": "D", "to_id": "B", "distance": 1 }, { "from_id": "D", "to_id": "C", "distance": 1 }, { "from_id": "D", "to_id": "E", "distance": 1 }, { "from_id": "D", "to_id": "F", "distance": 1 }, { "from_id": "D", "to_id": "G", "distance": 1 }, { "from_id": "D", "to_id": "H", "distance": 1 }, { "from_id": "D", "to_id": "I", "distance": 1 }, { "from_id": "D", "to_id": "J", "distance": 1 }, { "from_id": "D", "to_id": "K", "distance": 1 }, { "from_id": "D", "to_id": "L", "distance": 1 }, { "from_id": "E", "to_id": "A", "distance": 1 }, { "from_id": "E", "to_id": "B", "distance": 1 }, { "from_id": "E", "to_id": "C", "distance": 1 }, { "from_id": "E", "to_id": "D", "distance": 1 }, { "from_id": "E", "to_id": "F", "distance": 1 }, { "from_id": "E", "to_id": "G", "distance": 1 }, { "from_id": "E", "to_id": "H", "distance": 1 }, { "from_id": "E", "to_id": "I", "distance": 1 }, { "from_id": "E", "to_id": "J", "distance": 1 }, { "from_id": "E", "to_id": "K", "distance": 1 }, { "from_id": "E", "to_id": "L", "distance": 1 }, { "from_id": "F", "to_id": "A", "distance": 1 }, { "from_id": "F", "to_id": "B", "distance": 1 }, { "from_id": "F", "to_id": "C", "distance": 1 }, { "from_id": "F", "to_id": "D", "distance": 1 }, { "from_id": "F", "to_id": "E", "distance": 1 }, { "from_id": "F", "to_id": "G", "distance": 1 }, { "from_id": "F", "to_id": "H", "distance": 1 }, { "from_id": "F", "to_id": "I", "distance": 1 }, { "from_id": "F", "to_id": "J", "distance": 1 }, { "from_id": "F", "to_id": "K", "distance": 1 }, { "from_id": "F", "to_id": "L", "distance": 1 }, { "from_id": "G", "to_id": "A", "distance": 1 }, { "from_id": "G", "to_id": "B", "distance": 1 }, { "from_id": "G", "to_id": "C", "distance": 1 }, { "from_id": "G", "to_id": "D", "distance": 1 }, { "from_id": "G", "to_id": "E", "distance": 1 }, { "from_id": "G", "to_id": "F", "distance": 2 }, { "from_id": "G", "to_id": "H", "distance": 1 }, { "from_id": "G", "to_id": "I", "distance": 1 }, { "from_id": "G", "to_id": "J", "distance": 1 }, { "from_id": "G", "to_id": "K", "distance": 1 }, { "from_id": "G", "to_id": "L", "distance": 1 }, { "from_id": "H", "to_id": "A", "distance": 1 }, { "from_id": "H", "to_id": "B", "distance": 1 }, { "from_id": "H", "to_id": "C", "distance": 1 }, { "from_id": "H", "to_id": "D", "distance": 1 }, { "from_id": "H", "to_id": "E", "distance": 1 }, { "from_id": "H", "to_id": "F", "distance": 1 }, { "from_id": "H", "to_id": "G", "distance": 1 }, { "from_id": "H", "to_id": "I", "distance": 1 }, { "from_id": "H", "to_id": "J", "distance": 1 }, { "from_id": "H", "to_id": "K", "distance": 1 }, { "from_id": "H", "to_id": "L", "distance": 1 }, { "from_id": "I", "to_id": "A", "distance": 1 }, { "from_id": "I", "to_id": "B", "distance": 1 }, { "from_id": "I", "to_id": "C", "distance": 1 }, { "from_id": "I", "to_id": "D", "distance": 1 }, { "from_id": "I", "to_id": "E", "distance": 1 }, { "from_id": "I", "to_id": "F", "distance": 2 }, { "from_id": "I", "to_id": "G", "distance": 1 }, { "from_id": "I", "to_id": "H", "distance": 1 }, { "from_id": "I", "to_id": "J", "distance": 1 }, { "from_id": "I", "to_id": "K", "distance": 1 }, { "from_id": "I", "to_id": "L", "distance": 1 }, { "from_id": "J", "to_id": "A", "distance": 1 }, { "from_id": "J", "to_id": "B", "distance": 1 }, { "from_id": "J", "to_id": "C", "distance": 1 }, { "from_id": "J", "to_id": "D", "distance": 1 }, { "from_id": "J", "to_id": "E", "distance": 1 }, { "from_id": "J", "to_id": "F", "distance": 1 }, { "from_id": "J", "to_id": "G", "distance": 1 }, { "from_id": "J", "to_id": "H", "distance": 2 }, { "from_id": "J", "to_id": "I", "distance": 1 }, { "from_id": "J", "to_id": "K", "distance": 1 }, { "from_id": "J", "to_id": "L", "distance": 1 }, { "from_id": "K", "to_id": "A", "distance": 1 }, { "from_id": "K", "to_id": "B", "distance": 1 }, { "from_id": "K", "to_id": "C", "distance": 0 }, { "from_id": "K", "to_id": "D", "distance": 1 }, { "from_id": "K", "to_id": "E", "distance": 1 }, { "from_id": "K", "to_id": "F", "distance": 1 }, { "from_id": "K", "to_id": "G", "distance": 1 }, { "from_id": "K", "to_id": "H", "distance": 1 }, { "from_id": "K", "to_id": "I", "distance": 1 }, { "from_id": "K", "to_id": "J", "distance": 1 }, { "from_id": "K", "to_id": "L", "distance": 1 }, { "from_id": "L", "to_id": "A", "distance": 1 }, { "from_id": "L", "to_id": "B", "distance": 1 }, { "from_id": "L", "to_id": "C", "distance": 1 }, { "from_id": "L", "to_id": "D", "distance": 1 }, { "from_id": "L", "to_id": "E", "distance": 1 }, { "from_id": "L", "to_id": "F", "distance": 1 }, { "from_id": "L", "to_id": "G", "distance": 1 }, { "from_id": "L", "to_id": "H", "distance": 1 }, { "from_id": "L", "to_id": "I", "distance": 1 }, { "from_id": "L", "to_id": "J", "distance": 1 }, { "from_id": "L", "to_id": "K", "distance": 1 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 19 }, { "from_id": "F1", "to_id": "F3", "flow": 27 }, { "from_id": "F1", "to_id": "F4", "flow": 17 }, { "from_id": "F1", "to_id": "F5", "flow": 27 }, { "from_id": "F1", "to_id": "F6", "flow": 40 }, { "from_id": "F1", "to_id": "F7", "flow": 29 }, { "from_id": "F1", "to_id": "F8", "flow": 23 }, { "from_id": "F1", "to_id": "F9", "flow": 26 }, { "from_id": "F1", "to_id": "F10", "flow": 34 }, { "from_id": "F1", "to_id": "F11", "flow": 29 }, { "from_id": "F1", "to_id": "F12", "flow": 28 }, { "from_id": "F2", "to_id": "F1", "flow": 19 }, { "from_id": "F2", "to_id": "F3", "flow": 19 }, { "from_id": "F2", "to_id": "F4", "flow": 47 }, { "from_id": "F2", "to_id": "F5", "flow": 11 }, { "from_id": "F2", "to_id": "F6", "flow": 22 }, { "from_id": "F2", "to_id": "F7", "flow": 40 }, { "from_id": "F2", "to_id": "F8", "flow": 36 }, { "from_id": "F2", "to_id": "F9", "flow": 46 }, { "from_id": "F2", "to_id": "F10", "flow": 30 }, { "from_id": "F2", "to_id": "F11", "flow": 43 }, { "from_id": "F2", "to_id": "F12", "flow": 30 }, { "from_id": "F3", "to_id": "F1", "flow": 27 }, { "from_id": "F3", "to_id": "F2", "flow": 19 }, { "from_id": "F3", "to_id": "F4", "flow": 11 }, { "from_id": "F3", "to_id": "F5", "flow": 6 }, { "from_id": "F3", "to_id": "F6", "flow": 31 }, { "from_id": "F3", "to_id": "F7", "flow": 16 }, { "from_id": "F3", "to_id": "F8", "flow": 25 }, { "from_id": "F3", "to_id": "F9", "flow": 29 }, { "from_id": "F3", "to_id": "F10", "flow": 40 }, { "from_id": "F3", "to_id": "F11", "flow": 23 }, { "from_id": "F3", "to_id": "F12", "flow": 18 }, { "from_id": "F4", "to_id": "F1", "flow": 17 }, { "from_id": "F4", "to_id": "F2", "flow": 47 }, { "from_id": "F4", "to_id": "F3", "flow": 11 }, { "from_id": "F4", "to_id": "F5", "flow": 7 }, { "from_id": "F4", "to_id": "F6", "flow": 26 }, { "from_id": "F4", "to_id": "F7", "flow": 29 }, { "from_id": "F4", "to_id": "F8", "flow": 28 }, { "from_id": "F4", "to_id": "F9", "flow": 20 }, { "from_id": "F4", "to_id": "F10", "flow": 31 }, { "from_id": "F4", "to_id": "F11", "flow": 34 }, { "from_id": "F4", "to_id": "F12", "flow": 14 }, { "from_id": "F5", "to_id": "F1", "flow": 27 }, { "from_id": "F5", "to_id": "F2", "flow": 11 }, { "from_id": "F5", "to_id": "F3", "flow": 6 }, { "from_id": "F5", "to_id": "F4", "flow": 7 }, { "from_id": "F5", "to_id": "F6", "flow": 17 }, { "from_id": "F5", "to_id": "F7", "flow": 33 }, { "from_id": "F5", "to_id": "F8", "flow": 38 }, { "from_id": "F5", "to_id": "F9", "flow": 30 }, { "from_id": "F5", "to_id": "F10", "flow": 29 }, { "from_id": "F5", "to_id": "F11", "flow": 27 }, { "from_id": "F5", "to_id": "F12", "flow": 19 }, { "from_id": "F6", "to_id": "F1", "flow": 40 }, { "from_id": "F6", "to_id": "F2", "flow": 22 }, { "from_id": "F6", "to_id": "F3", "flow": 31 }, { "from_id": "F6", "to_id": "F4", "flow": 26 }, { "from_id": "F6", "to_id": "F5", "flow": 17 }, { "from_id": "F6", "to_id": "F7", "flow": 25 }, { "from_id": "F6", "to_id": "F8", "flow": 38 }, { "from_id": "F6", "to_id": "F9", "flow": 25 }, { "from_id": "F6", "to_id": "F10", "flow": 21 }, { "from_id": "F6", "to_id": "F11", "flow": 5 }, { "from_id": "F6", "to_id": "F12", "flow": 17 }, { "from_id": "F7", "to_id": "F1", "flow": 29 }, { "from_id": "F7", "to_id": "F2", "flow": 40 }, { "from_id": "F7", "to_id": "F3", "flow": 16 }, { "from_id": "F7", "to_id": "F4", "flow": 29 }, { "from_id": "F7", "to_id": "F5", "flow": 33 }, { "from_id": "F7", "to_id": "F6", "flow": 25 }, { "from_id": "F7", "to_id": "F8", "flow": 37 }, { "from_id": "F7", "to_id": "F9", "flow": 21 }, { "from_id": "F7", "to_id": "F10", "flow": 46 }, { "from_id": "F7", "to_id": "F11", "flow": 8 }, { "from_id": "F7", "to_id": "F12", "flow": 33 }, { "from_id": "F8", "to_id": "F1", "flow": 23 }, { "from_id": "F8", "to_id": "F2", "flow": 36 }, { "from_id": "F8", "to_id": "F3", "flow": 25 }, { "from_id": "F8", "to_id": "F4", "flow": 28 }, { "from_id": "F8", "to_id": "F5", "flow": 38 }, { "from_id": "F8", "to_id": "F6", "flow": 38 }, { "from_id": "F8", "to_id": "F7", "flow": 37 }, { "from_id": "F8", "to_id": "F9", "flow": 31 }, { "from_id": "F8", "to_id": "F10", "flow": 6 }, { "from_id": "F8", "to_id": "F11", "flow": 44 }, { "from_id": "F8", "to_id": "F12", "flow": 20 }, { "from_id": "F9", "to_id": "F1", "flow": 26 }, { "from_id": "F9", "to_id": "F2", "flow": 46 }, { "from_id": "F9", "to_id": "F3", "flow": 29 }, { "from_id": "F9", "to_id": "F4", "flow": 20 }, { "from_id": "F9", "to_id": "F5", "flow": 30 }, { "from_id": "F9", "to_id": "F6", "flow": 25 }, { "from_id": "F9", "to_id": "F7", "flow": 21 }, { "from_id": "F9", "to_id": "F8", "flow": 31 }, { "from_id": "F9", "to_id": "F10", "flow": 13 }, { "from_id": "F9", "to_id": "F11", "flow": 26 }, { "from_id": "F9", "to_id": "F12", "flow": 28 }, { "from_id": "F10", "to_id": "F1", "flow": 34 }, { "from_id": "F10", "to_id": "F2", "flow": 30 }, { "from_id": "F10", "to_id": "F3", "flow": 40 }, { "from_id": "F10", "to_id": "F4", "flow": 31 }, { "from_id": "F10", "to_id": "F5", "flow": 29 }, { "from_id": "F10", "to_id": "F6", "flow": 21 }, { "from_id": "F10", "to_id": "F7", "flow": 46 }, { "from_id": "F10", "to_id": "F8", "flow": 6 }, { "from_id": "F10", "to_id": "F9", "flow": 13 }, { "from_id": "F10", "to_id": "F11", "flow": 40 }, { "from_id": "F10", "to_id": "F12", "flow": 32 }, { "from_id": "F11", "to_id": "F1", "flow": 29 }, { "from_id": "F11", "to_id": "F2", "flow": 43 }, { "from_id": "F11", "to_id": "F3", "flow": 23 }, { "from_id": "F11", "to_id": "F4", "flow": 34 }, { "from_id": "F11", "to_id": "F5", "flow": 27 }, { "from_id": "F11", "to_id": "F6", "flow": 5 }, { "from_id": "F11", "to_id": "F7", "flow": 8 }, { "from_id": "F11", "to_id": "F8", "flow": 44 }, { "from_id": "F11", "to_id": "F9", "flow": 26 }, { "from_id": "F11", "to_id": "F10", "flow": 40 }, { "from_id": "F11", "to_id": "F12", "flow": 35 }, { "from_id": "F12", "to_id": "F1", "flow": 28 }, { "from_id": "F12", "to_id": "F2", "flow": 30 }, { "from_id": "F12", "to_id": "F3", "flow": 18 }, { "from_id": "F12", "to_id": "F4", "flow": 14 }, { "from_id": "F12", "to_id": "F5", "flow": 19 }, { "from_id": "F12", "to_id": "F6", "flow": 17 }, { "from_id": "F12", "to_id": "F7", "flow": 33 }, { "from_id": "F12", "to_id": "F8", "flow": 20 }, { "from_id": "F12", "to_id": "F9", "flow": 28 }, { "from_id": "F12", "to_id": "F10", "flow": 32 }, { "from_id": "F12", "to_id": "F11", "flow": 35 } ] }, "solution_variant": [ "A", "K", "I", "G", "F", "J", "L", "B", "C", "D", "H", "E" ], "context_index": 3, "input_format": "csv", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Many people on the floor need to be reassigned so that everyone has their own desk and no desk gets two people. The goal is to cut down on interruptions and handoffs by seating frequent partners closer: measure a seating by taking each pair’s interaction frequency times the desk distance, summing everything up, and aiming for as small a sum as possible. The concrete interaction and distance details are listed below.\n\n{\n \"num_agents_and_desks\": 9,\n \"agent_ids\": [\n \"F1\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\"\n ],\n \"desk_ids\": [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8\n ],\n \"distance\": [\n {\n \"desk_from_id\": 0,\n \"desk_to_id\": 1,\n \"desk_distance\": 1\n },\n {\n \"desk_from_id\": 0,\n \"desk_to_id\": 2,\n \"desk_distance\": 2\n },\n {\n \"desk_from_id\": 0,\n \"desk_to_id\": 3,\n \"desk_distance\": 5\n },\n {\n \"desk_from_id\": 0,\n \"desk_to_id\": 4,\n \"desk_distance\": 9\n },\n {\n \"desk_from_id\": 0,\n \"desk_to_id\": 5,\n \"desk_distance\": 2\n },\n {\n \"desk_from_id\": 0,\n \"desk_to_id\": 6,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 0,\n \"desk_to_id\": 7,\n \"desk_distance\": 8\n },\n {\n \"desk_from_id\": 0,\n \"desk_to_id\": 8,\n \"desk_distance\": 9\n },\n {\n \"desk_from_id\": 1,\n \"desk_to_id\": 0,\n \"desk_distance\": 1\n },\n {\n \"desk_from_id\": 1,\n \"desk_to_id\": 2,\n \"desk_distance\": 1\n },\n {\n \"desk_from_id\": 1,\n \"desk_to_id\": 3,\n \"desk_distance\": 4\n },\n {\n \"desk_from_id\": 1,\n \"desk_to_id\": 4,\n \"desk_distance\": 8\n },\n {\n \"desk_from_id\": 1,\n \"desk_to_id\": 5,\n \"desk_distance\": 3\n },\n {\n \"desk_from_id\": 1,\n \"desk_to_id\": 6,\n \"desk_distance\": 6\n },\n {\n \"desk_from_id\": 1,\n \"desk_to_id\": 7,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 1,\n \"desk_to_id\": 8,\n \"desk_distance\": 8\n },\n {\n \"desk_from_id\": 2,\n \"desk_to_id\": 0,\n \"desk_distance\": 2\n },\n {\n \"desk_from_id\": 2,\n \"desk_to_id\": 1,\n \"desk_distance\": 1\n },\n {\n \"desk_from_id\": 2,\n \"desk_to_id\": 3,\n \"desk_distance\": 3\n },\n {\n \"desk_from_id\": 2,\n \"desk_to_id\": 4,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 2,\n \"desk_to_id\": 5,\n \"desk_distance\": 4\n },\n {\n \"desk_from_id\": 2,\n \"desk_to_id\": 6,\n \"desk_distance\": 5\n },\n {\n \"desk_from_id\": 2,\n \"desk_to_id\": 7,\n \"desk_distance\": 6\n },\n {\n \"desk_from_id\": 2,\n \"desk_to_id\": 8,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 3,\n \"desk_to_id\": 0,\n \"desk_distance\": 5\n },\n {\n \"desk_from_id\": 3,\n \"desk_to_id\": 1,\n \"desk_distance\": 4\n },\n {\n \"desk_from_id\": 3,\n \"desk_to_id\": 2,\n \"desk_distance\": 3\n },\n {\n \"desk_from_id\": 3,\n \"desk_to_id\": 4,\n \"desk_distance\": 4\n },\n {\n \"desk_from_id\": 3,\n \"desk_to_id\": 5,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 3,\n \"desk_to_id\": 6,\n \"desk_distance\": 2\n },\n {\n \"desk_from_id\": 3,\n \"desk_to_id\": 7,\n \"desk_distance\": 3\n },\n {\n \"desk_from_id\": 3,\n \"desk_to_id\": 8,\n \"desk_distance\": 4\n },\n {\n \"desk_from_id\": 4,\n \"desk_to_id\": 0,\n \"desk_distance\": 9\n },\n {\n \"desk_from_id\": 4,\n \"desk_to_id\": 1,\n \"desk_distance\": 8\n },\n {\n \"desk_from_id\": 4,\n \"desk_to_id\": 2,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 4,\n \"desk_to_id\": 3,\n \"desk_distance\": 4\n },\n {\n \"desk_from_id\": 4,\n \"desk_to_id\": 5,\n \"desk_distance\": 11\n },\n {\n \"desk_from_id\": 4,\n \"desk_to_id\": 6,\n \"desk_distance\": 4\n },\n {\n \"desk_from_id\": 4,\n \"desk_to_id\": 7,\n \"desk_distance\": 3\n },\n {\n \"desk_from_id\": 4,\n \"desk_to_id\": 8,\n \"desk_distance\": 2\n },\n {\n \"desk_from_id\": 5,\n \"desk_to_id\": 0,\n \"desk_distance\": 2\n },\n {\n \"desk_from_id\": 5,\n \"desk_to_id\": 1,\n \"desk_distance\": 3\n },\n {\n \"desk_from_id\": 5,\n \"desk_to_id\": 2,\n \"desk_distance\": 4\n },\n {\n \"desk_from_id\": 5,\n \"desk_to_id\": 3,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 5,\n \"desk_to_id\": 4,\n \"desk_distance\": 11\n },\n {\n \"desk_from_id\": 5,\n \"desk_to_id\": 6,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 5,\n \"desk_to_id\": 7,\n \"desk_distance\": 8\n },\n {\n \"desk_from_id\": 5,\n \"desk_to_id\": 8,\n \"desk_distance\": 9\n },\n {\n \"desk_from_id\": 6,\n \"desk_to_id\": 0,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 6,\n \"desk_to_id\": 1,\n \"desk_distance\": 6\n },\n {\n \"desk_from_id\": 6,\n \"desk_to_id\": 2,\n \"desk_distance\": 5\n },\n {\n \"desk_from_id\": 6,\n \"desk_to_id\": 3,\n \"desk_distance\": 2\n },\n {\n \"desk_from_id\": 6,\n \"desk_to_id\": 4,\n \"desk_distance\": 4\n },\n {\n \"desk_from_id\": 6,\n \"desk_to_id\": 5,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 6,\n \"desk_to_id\": 7,\n \"desk_distance\": 1\n },\n {\n \"desk_from_id\": 6,\n \"desk_to_id\": 8,\n \"desk_distance\": 2\n },\n {\n \"desk_from_id\": 7,\n \"desk_to_id\": 0,\n \"desk_distance\": 8\n },\n {\n \"desk_from_id\": 7,\n \"desk_to_id\": 1,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 7,\n \"desk_to_id\": 2,\n \"desk_distance\": 6\n },\n {\n \"desk_from_id\": 7,\n \"desk_to_id\": 3,\n \"desk_distance\": 3\n },\n {\n \"desk_from_id\": 7,\n \"desk_to_id\": 4,\n \"desk_distance\": 3\n },\n {\n \"desk_from_id\": 7,\n \"desk_to_id\": 5,\n \"desk_distance\": 8\n },\n {\n \"desk_from_id\": 7,\n \"desk_to_id\": 6,\n \"desk_distance\": 1\n },\n {\n \"desk_from_id\": 7,\n \"desk_to_id\": 8,\n \"desk_distance\": 1\n },\n {\n \"desk_from_id\": 8,\n \"desk_to_id\": 0,\n \"desk_distance\": 9\n },\n {\n \"desk_from_id\": 8,\n \"desk_to_id\": 1,\n \"desk_distance\": 8\n },\n {\n \"desk_from_id\": 8,\n \"desk_to_id\": 2,\n \"desk_distance\": 7\n },\n {\n \"desk_from_id\": 8,\n \"desk_to_id\": 3,\n \"desk_distance\": 4\n },\n {\n \"desk_from_id\": 8,\n \"desk_to_id\": 4,\n \"desk_distance\": 2\n },\n {\n \"desk_from_id\": 8,\n \"desk_to_id\": 5,\n \"desk_distance\": 9\n },\n {\n \"desk_from_id\": 8,\n \"desk_to_id\": 6,\n \"desk_distance\": 2\n },\n {\n \"desk_from_id\": 8,\n \"desk_to_id\": 7,\n \"desk_distance\": 1\n }\n ],\n \"flow\": [\n {\n \"agent_from_id\": \"F1\",\n \"agent_to_id\": \"F2\",\n \"interaction_frequency\": 4\n },\n {\n \"agent_from_id\": \"F1\",\n \"agent_to_id\": \"F3\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F1\",\n \"agent_to_id\": \"F4\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F1\",\n \"agent_to_id\": \"F5\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F1\",\n \"agent_to_id\": \"F6\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F1\",\n \"agent_to_id\": \"F7\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F1\",\n \"agent_to_id\": \"F8\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F1\",\n \"agent_to_id\": \"F9\",\n \"interaction_frequency\": 6\n },\n {\n \"agent_from_id\": \"F2\",\n \"agent_to_id\": \"F1\",\n \"interaction_frequency\": 4\n },\n {\n \"agent_from_id\": \"F2\",\n \"agent_to_id\": \"F3\",\n \"interaction_frequency\": 3\n },\n {\n \"agent_from_id\": \"F2\",\n \"agent_to_id\": \"F4\",\n \"interaction_frequency\": 5\n },\n {\n \"agent_from_id\": \"F2\",\n \"agent_to_id\": \"F5\",\n \"interaction_frequency\": 4\n },\n {\n \"agent_from_id\": \"F2\",\n \"agent_to_id\": \"F6\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F2\",\n \"agent_to_id\": \"F7\",\n \"interaction_frequency\": 3\n },\n {\n \"agent_from_id\": \"F2\",\n \"agent_to_id\": \"F8\",\n \"interaction_frequency\": 2\n },\n {\n \"agent_from_id\": \"F2\",\n \"agent_to_id\": \"F9\",\n \"interaction_frequency\": 5\n },\n {\n \"agent_from_id\": \"F3\",\n \"agent_to_id\": \"F1\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F3\",\n \"agent_to_id\": \"F2\",\n \"interaction_frequency\": 3\n },\n {\n \"agent_from_id\": \"F3\",\n \"agent_to_id\": \"F4\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F3\",\n \"agent_to_id\": \"F5\",\n \"interaction_frequency\": 6\n },\n {\n \"agent_from_id\": \"F3\",\n \"agent_to_id\": \"F6\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F3\",\n \"agent_to_id\": \"F7\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F3\",\n \"agent_to_id\": \"F8\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F3\",\n \"agent_to_id\": \"F9\",\n \"interaction_frequency\": 2\n },\n {\n \"agent_from_id\": \"F4\",\n \"agent_to_id\": \"F1\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F4\",\n \"agent_to_id\": \"F2\",\n \"interaction_frequency\": 5\n },\n {\n \"agent_from_id\": \"F4\",\n \"agent_to_id\": \"F3\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F4\",\n \"agent_to_id\": \"F5\",\n \"interaction_frequency\": 10\n },\n {\n \"agent_from_id\": \"F4\",\n \"agent_to_id\": \"F6\",\n \"interaction_frequency\": 10\n },\n {\n \"agent_from_id\": \"F4\",\n \"agent_to_id\": \"F7\",\n \"interaction_frequency\": 10\n },\n {\n \"agent_from_id\": \"F4\",\n \"agent_to_id\": \"F8\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F4\",\n \"agent_to_id\": \"F9\",\n \"interaction_frequency\": 5\n },\n {\n \"agent_from_id\": \"F5\",\n \"agent_to_id\": \"F1\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F5\",\n \"agent_to_id\": \"F2\",\n \"interaction_frequency\": 4\n },\n {\n \"agent_from_id\": \"F5\",\n \"agent_to_id\": \"F3\",\n \"interaction_frequency\": 6\n },\n {\n \"agent_from_id\": \"F5\",\n \"agent_to_id\": \"F4\",\n \"interaction_frequency\": 10\n },\n {\n \"agent_from_id\": \"F5\",\n \"agent_to_id\": \"F6\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F5\",\n \"agent_to_id\": \"F7\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F5\",\n \"agent_to_id\": \"F8\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F5\",\n \"agent_to_id\": \"F9\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F6\",\n \"agent_to_id\": \"F1\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F6\",\n \"agent_to_id\": \"F2\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F6\",\n \"agent_to_id\": \"F3\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F6\",\n \"agent_to_id\": \"F4\",\n \"interaction_frequency\": 10\n },\n {\n \"agent_from_id\": \"F6\",\n \"agent_to_id\": \"F5\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F6\",\n \"agent_to_id\": \"F7\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F6\",\n \"agent_to_id\": \"F8\",\n \"interaction_frequency\": 2\n },\n {\n \"agent_from_id\": \"F6\",\n \"agent_to_id\": \"F9\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F7\",\n \"agent_to_id\": \"F1\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F7\",\n \"agent_to_id\": \"F2\",\n \"interaction_frequency\": 3\n },\n {\n \"agent_from_id\": \"F7\",\n \"agent_to_id\": \"F3\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F7\",\n \"agent_to_id\": \"F4\",\n \"interaction_frequency\": 10\n },\n {\n \"agent_from_id\": \"F7\",\n \"agent_to_id\": \"F5\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F7\",\n \"agent_to_id\": \"F6\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F7\",\n \"agent_to_id\": \"F8\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F7\",\n \"agent_to_id\": \"F9\",\n \"interaction_frequency\": 5\n },\n {\n \"agent_from_id\": \"F8\",\n \"agent_to_id\": \"F1\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F8\",\n \"agent_to_id\": \"F2\",\n \"interaction_frequency\": 2\n },\n {\n \"agent_from_id\": \"F8\",\n \"agent_to_id\": \"F3\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F8\",\n \"agent_to_id\": \"F4\",\n \"interaction_frequency\": 1\n },\n {\n \"agent_from_id\": \"F8\",\n \"agent_to_id\": \"F5\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F8\",\n \"agent_to_id\": \"F6\",\n \"interaction_frequency\": 2\n },\n {\n \"agent_from_id\": \"F8\",\n \"agent_to_id\": \"F7\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F8\",\n \"agent_to_id\": \"F9\",\n \"interaction_frequency\": 5\n },\n {\n \"agent_from_id\": \"F9\",\n \"agent_to_id\": \"F1\",\n \"interaction_frequency\": 6\n },\n {\n \"agent_from_id\": \"F9\",\n \"agent_to_id\": \"F2\",\n \"interaction_frequency\": 5\n },\n {\n \"agent_from_id\": \"F9\",\n \"agent_to_id\": \"F3\",\n \"interaction_frequency\": 2\n },\n {\n \"agent_from_id\": \"F9\",\n \"agent_to_id\": \"F4\",\n \"interaction_frequency\": 5\n },\n {\n \"agent_from_id\": \"F9\",\n \"agent_to_id\": \"F5\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F9\",\n \"agent_to_id\": \"F6\",\n \"interaction_frequency\": 0\n },\n {\n \"agent_from_id\": \"F9\",\n \"agent_to_id\": \"F7\",\n \"interaction_frequency\": 5\n },\n {\n \"agent_from_id\": \"F9\",\n \"agent_to_id\": \"F8\",\n \"interaction_frequency\": 5\n }\n ]\n}\n\nAlso, when you send back the seating, it'd be great if you drop it into this little JSON shape so it's quick to check:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of it like a simple form: the \"solution\" array lists, in order, which desk each person gets — first entry is the desk for the first person, the second entry for the second person, and so on. This block is just the expected shape (a sketch), not the actual answer — replace those placeholders with the real desk/location identifiers from the instance.\n\nPlease use the identifiers exactly as they appear in the instance input — no renaming and no new labels. \nFor example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 1, 2, 5, 9, 2, 7, 8, 9 ], [ 1, 0, 1, 4, 8, 3, 6, 7, 8 ], [ 2, 1, 0, 3, 7, 4, 5, 6, 7 ], [ 5, 4, 3, 0, 4, 7, 2, 3, 4 ], [ 9, 8, 7, 4, 0, 11, 4, 3, 2 ], [ 2, 3, 4, 7, 11, 0, 7, 8, 9 ], [ 7, 6, 5, 2, 4, 7, 0, 1, 2 ], [ 8, 7, 6, 3, 3, 8, 1, 0, 1 ], [ 9, 8, 7, 4, 2, 9, 2, 1, 0 ] ], "flow_matrix": [ [ 0, 4, 0, 0, 1, 0, 0, 1, 6 ], [ 4, 0, 3, 5, 4, 1, 3, 2, 5 ], [ 0, 3, 0, 0, 6, 0, 1, 1, 2 ], [ 0, 5, 0, 0, 10, 10, 10, 1, 5 ], [ 1, 4, 6, 10, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 10, 0, 0, 0, 2, 0 ], [ 0, 3, 1, 10, 0, 0, 0, 0, 5 ], [ 1, 2, 1, 1, 0, 2, 0, 0, 5 ], [ 6, 5, 2, 5, 0, 0, 5, 5, 0 ] ], "objective": 616.0 }, "solution": [ 0, 2, 4, 6, 8, 7, 3, 5, 1 ], "obj": 616.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 1 }, { "from_id": 0, "to_id": 2, "distance": 2 }, { "from_id": 0, "to_id": 3, "distance": 5 }, { "from_id": 0, "to_id": 4, "distance": 9 }, { "from_id": 0, "to_id": 5, "distance": 2 }, { "from_id": 0, "to_id": 6, "distance": 7 }, { "from_id": 0, "to_id": 7, "distance": 8 }, { "from_id": 0, "to_id": 8, "distance": 9 }, { "from_id": 1, "to_id": 0, "distance": 1 }, { "from_id": 1, "to_id": 2, "distance": 1 }, { "from_id": 1, "to_id": 3, "distance": 4 }, { "from_id": 1, "to_id": 4, "distance": 8 }, { "from_id": 1, "to_id": 5, "distance": 3 }, { "from_id": 1, "to_id": 6, "distance": 6 }, { "from_id": 1, "to_id": 7, "distance": 7 }, { "from_id": 1, "to_id": 8, "distance": 8 }, { "from_id": 2, "to_id": 0, "distance": 2 }, { "from_id": 2, "to_id": 1, "distance": 1 }, { "from_id": 2, "to_id": 3, "distance": 3 }, { "from_id": 2, "to_id": 4, "distance": 7 }, { "from_id": 2, "to_id": 5, "distance": 4 }, { "from_id": 2, "to_id": 6, "distance": 5 }, { "from_id": 2, "to_id": 7, "distance": 6 }, { "from_id": 2, "to_id": 8, "distance": 7 }, { "from_id": 3, "to_id": 0, "distance": 5 }, { "from_id": 3, "to_id": 1, "distance": 4 }, { "from_id": 3, "to_id": 2, "distance": 3 }, { "from_id": 3, "to_id": 4, "distance": 4 }, { "from_id": 3, "to_id": 5, "distance": 7 }, { "from_id": 3, "to_id": 6, "distance": 2 }, { "from_id": 3, "to_id": 7, "distance": 3 }, { "from_id": 3, "to_id": 8, "distance": 4 }, { "from_id": 4, "to_id": 0, "distance": 9 }, { "from_id": 4, "to_id": 1, "distance": 8 }, { "from_id": 4, "to_id": 2, "distance": 7 }, { "from_id": 4, "to_id": 3, "distance": 4 }, { "from_id": 4, "to_id": 5, "distance": 11 }, { "from_id": 4, "to_id": 6, "distance": 4 }, { "from_id": 4, "to_id": 7, "distance": 3 }, { "from_id": 4, "to_id": 8, "distance": 2 }, { "from_id": 5, "to_id": 0, "distance": 2 }, { "from_id": 5, "to_id": 1, "distance": 3 }, { "from_id": 5, "to_id": 2, "distance": 4 }, { "from_id": 5, "to_id": 3, "distance": 7 }, { "from_id": 5, "to_id": 4, "distance": 11 }, { "from_id": 5, "to_id": 6, "distance": 7 }, { "from_id": 5, "to_id": 7, "distance": 8 }, { "from_id": 5, "to_id": 8, "distance": 9 }, { "from_id": 6, "to_id": 0, "distance": 7 }, { "from_id": 6, "to_id": 1, "distance": 6 }, { "from_id": 6, "to_id": 2, "distance": 5 }, { "from_id": 6, "to_id": 3, "distance": 2 }, { "from_id": 6, "to_id": 4, "distance": 4 }, { "from_id": 6, "to_id": 5, "distance": 7 }, { "from_id": 6, "to_id": 7, "distance": 1 }, { "from_id": 6, "to_id": 8, "distance": 2 }, { "from_id": 7, "to_id": 0, "distance": 8 }, { "from_id": 7, "to_id": 1, "distance": 7 }, { "from_id": 7, "to_id": 2, "distance": 6 }, { "from_id": 7, "to_id": 3, "distance": 3 }, { "from_id": 7, "to_id": 4, "distance": 3 }, { "from_id": 7, "to_id": 5, "distance": 8 }, { "from_id": 7, "to_id": 6, "distance": 1 }, { "from_id": 7, "to_id": 8, "distance": 1 }, { "from_id": 8, "to_id": 0, "distance": 9 }, { "from_id": 8, "to_id": 1, "distance": 8 }, { "from_id": 8, "to_id": 2, "distance": 7 }, { "from_id": 8, "to_id": 3, "distance": 4 }, { "from_id": 8, "to_id": 4, "distance": 2 }, { "from_id": 8, "to_id": 5, "distance": 9 }, { "from_id": 8, "to_id": 6, "distance": 2 }, { "from_id": 8, "to_id": 7, "distance": 1 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 4 }, { "from_id": "F1", "to_id": "F3", "flow": 0 }, { "from_id": "F1", "to_id": "F4", "flow": 0 }, { "from_id": "F1", "to_id": "F5", "flow": 1 }, { "from_id": "F1", "to_id": "F6", "flow": 0 }, { "from_id": "F1", "to_id": "F7", "flow": 0 }, { "from_id": "F1", "to_id": "F8", "flow": 1 }, { "from_id": "F1", "to_id": "F9", "flow": 6 }, { "from_id": "F2", "to_id": "F1", "flow": 4 }, { "from_id": "F2", "to_id": "F3", "flow": 3 }, { "from_id": "F2", "to_id": "F4", "flow": 5 }, { "from_id": "F2", "to_id": "F5", "flow": 4 }, { "from_id": "F2", "to_id": "F6", "flow": 1 }, { "from_id": "F2", "to_id": "F7", "flow": 3 }, { "from_id": "F2", "to_id": "F8", "flow": 2 }, { "from_id": "F2", "to_id": "F9", "flow": 5 }, { "from_id": "F3", "to_id": "F1", "flow": 0 }, { "from_id": "F3", "to_id": "F2", "flow": 3 }, { "from_id": "F3", "to_id": "F4", "flow": 0 }, { "from_id": "F3", "to_id": "F5", "flow": 6 }, { "from_id": "F3", "to_id": "F6", "flow": 0 }, { "from_id": "F3", "to_id": "F7", "flow": 1 }, { "from_id": "F3", "to_id": "F8", "flow": 1 }, { "from_id": "F3", "to_id": "F9", "flow": 2 }, { "from_id": "F4", "to_id": "F1", "flow": 0 }, { "from_id": "F4", "to_id": "F2", "flow": 5 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 10 }, { "from_id": "F4", "to_id": "F6", "flow": 10 }, { "from_id": "F4", "to_id": "F7", "flow": 10 }, { "from_id": "F4", "to_id": "F8", "flow": 1 }, { "from_id": "F4", "to_id": "F9", "flow": 5 }, { "from_id": "F5", "to_id": "F1", "flow": 1 }, { "from_id": "F5", "to_id": "F2", "flow": 4 }, { "from_id": "F5", "to_id": "F3", "flow": 6 }, { "from_id": "F5", "to_id": "F4", "flow": 10 }, { "from_id": "F5", "to_id": "F6", "flow": 0 }, { "from_id": "F5", "to_id": "F7", "flow": 0 }, { "from_id": "F5", "to_id": "F8", "flow": 0 }, { "from_id": "F5", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F1", "flow": 0 }, { "from_id": "F6", "to_id": "F2", "flow": 1 }, { "from_id": "F6", "to_id": "F3", "flow": 0 }, { "from_id": "F6", "to_id": "F4", "flow": 10 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 2 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 0 }, { "from_id": "F7", "to_id": "F2", "flow": 3 }, { "from_id": "F7", "to_id": "F3", "flow": 1 }, { "from_id": "F7", "to_id": "F4", "flow": 10 }, { "from_id": "F7", "to_id": "F5", "flow": 0 }, { "from_id": "F7", "to_id": "F6", "flow": 0 }, { "from_id": "F7", "to_id": "F8", "flow": 0 }, { "from_id": "F7", "to_id": "F9", "flow": 5 }, { "from_id": "F8", "to_id": "F1", "flow": 1 }, { "from_id": "F8", "to_id": "F2", "flow": 2 }, { "from_id": "F8", "to_id": "F3", "flow": 1 }, { "from_id": "F8", "to_id": "F4", "flow": 1 }, { "from_id": "F8", "to_id": "F5", "flow": 0 }, { "from_id": "F8", "to_id": "F6", "flow": 2 }, { "from_id": "F8", "to_id": "F7", "flow": 0 }, { "from_id": "F8", "to_id": "F9", "flow": 5 }, { "from_id": "F9", "to_id": "F1", "flow": 6 }, { "from_id": "F9", "to_id": "F2", "flow": 5 }, { "from_id": "F9", "to_id": "F3", "flow": 2 }, { "from_id": "F9", "to_id": "F4", "flow": 5 }, { "from_id": "F9", "to_id": "F5", "flow": 0 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 5 }, { "from_id": "F9", "to_id": "F8", "flow": 5 } ] }, "solution_variant": [ 0, 2, 4, 6, 8, 7, 3, 5, 1 ], "context_index": 4, "input_format": "json", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "I’m the head nurse juggling a fleet of specialized devices and a set of patient areas, and the job is to decide which device goes to which spot so the whole team works more smoothly. The better choices are the ones that keep delays low: for every pair of devices, look at how often they get used together and multiply that by how far apart their assigned spots are, then add all those products up — that total delay should be as small as possible. Every device has to sit in exactly one patient area, and every area must get exactly one device. The concrete details will be shown below.\n\nThere are 11 devices and 11 patient areas: devices are F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11; patient areas are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.\nI record the travel distance from 1 to 2 as 50.\nI record the travel distance from 1 to 3 as 0.\nI record the travel distance from 1 to 4 as 0.\nI record the travel distance from 1 to 5 as 0.\nI record the travel distance from 1 to 6 as 0.\nI record the travel distance from 1 to 7 as 0.\nI record the travel distance from 1 to 8 as 0.\nI record the travel distance from 1 to 9 as 0.\nI record the travel distance from 1 to 10 as 0.\nI record the travel distance from 1 to 11 as 0.\nI record the travel distance from 2 to 1 as 50.\nI record the travel distance from 2 to 3 as 0.\nI record the travel distance from 2 to 4 as 7.\nI record the travel distance from 2 to 5 as 0.\nI record the travel distance from 2 to 6 as 0.\nI record the travel distance from 2 to 7 as 0.\nI record the travel distance from 2 to 8 as 0.\nI record the travel distance from 2 to 9 as 0.\nI record the travel distance from 2 to 10 as 0.\nI record the travel distance from 2 to 11 as 0.\nI record the travel distance from 3 to 1 as 0.\nI record the travel distance from 3 to 2 as 0.\nI record the travel distance from 3 to 4 as 0.\nI record the travel distance from 3 to 5 as 9.\nI record the travel distance from 3 to 6 as 12.\nI record the travel distance from 3 to 7 as 0.\nI record the travel distance from 3 to 8 as 0.\nI record the travel distance from 3 to 9 as 0.\nI record the travel distance from 3 to 10 as 0.\nI record the travel distance from 3 to 11 as 0.\nI record the travel distance from 4 to 1 as 0.\nI record the travel distance from 4 to 2 as 7.\nI record the travel distance from 4 to 3 as 0.\nI record the travel distance from 4 to 5 as 0.\nI record the travel distance from 4 to 6 as 0.\nI record the travel distance from 4 to 7 as 23.\nI record the travel distance from 4 to 8 as 0.\nI record the travel distance from 4 to 9 as 0.\nI record the travel distance from 4 to 10 as 0.\nI record the travel distance from 4 to 11 as 0.\nI record the travel distance from 5 to 1 as 0.\nI record the travel distance from 5 to 2 as 0.\nI record the travel distance from 5 to 3 as 9.\nI record the travel distance from 5 to 4 as 0.\nI record the travel distance from 5 to 6 as 0.\nI record the travel distance from 5 to 7 as 0.\nI record the travel distance from 5 to 8 as 13.\nI record the travel distance from 5 to 9 as 0.\nI record the travel distance from 5 to 10 as 0.\nI record the travel distance from 5 to 11 as 0.\nI record the travel distance from 6 to 1 as 0.\nI record the travel distance from 6 to 2 as 0.\nI record the travel distance from 6 to 3 as 12.\nI record the travel distance from 6 to 4 as 0.\nI record the travel distance from 6 to 5 as 0.\nI record the travel distance from 6 to 7 as 0.\nI record the travel distance from 6 to 8 as 0.\nI record the travel distance from 6 to 9 as 10.\nI record the travel distance from 6 to 10 as 0.\nI record the travel distance from 6 to 11 as 0.\nI record the travel distance from 7 to 1 as 0.\nI record the travel distance from 7 to 2 as 0.\nI record the travel distance from 7 to 3 as 0.\nI record the travel distance from 7 to 4 as 23.\nI record the travel distance from 7 to 5 as 0.\nI record the travel distance from 7 to 6 as 0.\nI record the travel distance from 7 to 8 as 0.\nI record the travel distance from 7 to 9 as 0.\nI record the travel distance from 7 to 10 as 9.\nI record the travel distance from 7 to 11 as 0.\nI record the travel distance from 8 to 1 as 0.\nI record the travel distance from 8 to 2 as 0.\nI record the travel distance from 8 to 3 as 0.\nI record the travel distance from 8 to 4 as 0.\nI record the travel distance from 8 to 5 as 13.\nI record the travel distance from 8 to 6 as 0.\nI record the travel distance from 8 to 7 as 0.\nI record the travel distance from 8 to 9 as 0.\nI record the travel distance from 8 to 10 as 0.\nI record the travel distance from 8 to 11 as 0.\nI record the travel distance from 9 to 1 as 0.\nI record the travel distance from 9 to 2 as 0.\nI record the travel distance from 9 to 3 as 0.\nI record the travel distance from 9 to 4 as 0.\nI record the travel distance from 9 to 5 as 0.\nI record the travel distance from 9 to 6 as 10.\nI record the travel distance from 9 to 7 as 0.\nI record the travel distance from 9 to 8 as 0.\nI record the travel distance from 9 to 10 as 0.\nI record the travel distance from 9 to 11 as 0.\nI record the travel distance from 10 to 1 as 0.\nI record the travel distance from 10 to 2 as 0.\nI record the travel distance from 10 to 3 as 0.\nI record the travel distance from 10 to 4 as 0.\nI record the travel distance from 10 to 5 as 0.\nI record the travel distance from 10 to 6 as 0.\nI record the travel distance from 10 to 7 as 9.\nI record the travel distance from 10 to 8 as 0.\nI record the travel distance from 10 to 9 as 0.\nI record the travel distance from 10 to 11 as 0.\nI record the travel distance from 11 to 1 as 0.\nI record the travel distance from 11 to 2 as 0.\nI record the travel distance from 11 to 3 as 0.\nI record the travel distance from 11 to 4 as 0.\nI record the travel distance from 11 to 5 as 0.\nI record the travel distance from 11 to 6 as 0.\nI record the travel distance from 11 to 7 as 0.\nI record the travel distance from 11 to 8 as 0.\nI record the travel distance from 11 to 9 as 0.\nI record the travel distance from 11 to 10 as 0.\nI record the co-usage frequency from F1 to F2 as 14.\nI record the co-usage frequency from F1 to F3 as 36.\nI record the co-usage frequency from F1 to F4 as 39.\nI record the co-usage frequency from F1 to F5 as 34.\nI record the co-usage frequency from F1 to F6 as 10.\nI record the co-usage frequency from F1 to F7 as 10.\nI record the co-usage frequency from F1 to F8 as 37.\nI record the co-usage frequency from F1 to F9 as 12.\nI record the co-usage frequency from F1 to F10 as 51.\nI record the co-usage frequency from F1 to F11 as 20.\nI record the co-usage frequency from F2 to F1 as 14.\nI record the co-usage frequency from F2 to F3 as 12.\nI record the co-usage frequency from F2 to F4 as 25.\nI record the co-usage frequency from F2 to F5 as 19.\nI record the co-usage frequency from F2 to F6 as 33.\nI record the co-usage frequency from F2 to F7 as 13.\nI record the co-usage frequency from F2 to F8 as 81.\nI record the co-usage frequency from F2 to F9 as 15.\nI record the co-usage frequency from F2 to F10 as 33.\nI record the co-usage frequency from F2 to F11 as 23.\nI record the co-usage frequency from F3 to F1 as 36.\nI record the co-usage frequency from F3 to F2 as 12.\nI record the co-usage frequency from F3 to F4 as 14.\nI record the co-usage frequency from F3 to F5 as 17.\nI record the co-usage frequency from F3 to F6 as 29.\nI record the co-usage frequency from F3 to F7 as 36.\nI record the co-usage frequency from F3 to F8 as 10.\nI record the co-usage frequency from F3 to F9 as 50.\nI record the co-usage frequency from F3 to F10 as 37.\nI record the co-usage frequency from F3 to F11 as 14.\nI record the co-usage frequency from F4 to F1 as 39.\nI record the co-usage frequency from F4 to F2 as 25.\nI record the co-usage frequency from F4 to F3 as 14.\nI record the co-usage frequency from F4 to F5 as 10.\nI record the co-usage frequency from F4 to F6 as 14.\nI record the co-usage frequency from F4 to F7 as 22.\nI record the co-usage frequency from F4 to F8 as 31.\nI record the co-usage frequency from F4 to F9 as 27.\nI record the co-usage frequency from F4 to F10 as 12.\nI record the co-usage frequency from F4 to F11 as 39.\nI record the co-usage frequency from F5 to F1 as 34.\nI record the co-usage frequency from F5 to F2 as 19.\nI record the co-usage frequency from F5 to F3 as 17.\nI record the co-usage frequency from F5 to F4 as 10.\nI record the co-usage frequency from F5 to F6 as 30.\nI record the co-usage frequency from F5 to F7 as 22.\nI record the co-usage frequency from F5 to F8 as 19.\nI record the co-usage frequency from F5 to F9 as 30.\nI record the co-usage frequency from F5 to F10 as 37.\nI record the co-usage frequency from F5 to F11 as 19.\nI record the co-usage frequency from F6 to F1 as 10.\nI record the co-usage frequency from F6 to F2 as 33.\nI record the co-usage frequency from F6 to F3 as 29.\nI record the co-usage frequency from F6 to F4 as 14.\nI record the co-usage frequency from F6 to F5 as 30.\nI record the co-usage frequency from F6 to F7 as 12.\nI record the co-usage frequency from F6 to F8 as 64.\nI record the co-usage frequency from F6 to F9 as 91.\nI record the co-usage frequency from F6 to F10 as 15.\nI record the co-usage frequency from F6 to F11 as 20.\nI record the co-usage frequency from F7 to F1 as 10.\nI record the co-usage frequency from F7 to F2 as 13.\nI record the co-usage frequency from F7 to F3 as 36.\nI record the co-usage frequency from F7 to F4 as 22.\nI record the co-usage frequency from F7 to F5 as 22.\nI record the co-usage frequency from F7 to F6 as 12.\nI record the co-usage frequency from F7 to F8 as 33.\nI record the co-usage frequency from F7 to F9 as 14.\nI record the co-usage frequency from F7 to F10 as 22.\nI record the co-usage frequency from F7 to F11 as 19.\nI record the co-usage frequency from F8 to F1 as 37.\nI record the co-usage frequency from F8 to F2 as 81.\nI record the co-usage frequency from F8 to F3 as 10.\nI record the co-usage frequency from F8 to F4 as 31.\nI record the co-usage frequency from F8 to F5 as 19.\nI record the co-usage frequency from F8 to F6 as 64.\nI record the co-usage frequency from F8 to F7 as 33.\nI record the co-usage frequency from F8 to F9 as 12.\nI record the co-usage frequency from F8 to F10 as 70.\nI record the co-usage frequency from F8 to F11 as 14.\nI record the co-usage frequency from F9 to F1 as 12.\nI record the co-usage frequency from F9 to F2 as 15.\nI record the co-usage frequency from F9 to F3 as 50.\nI record the co-usage frequency from F9 to F4 as 27.\nI record the co-usage frequency from F9 to F5 as 30.\nI record the co-usage frequency from F9 to F6 as 91.\nI record the co-usage frequency from F9 to F7 as 14.\nI record the co-usage frequency from F9 to F8 as 12.\nI record the co-usage frequency from F9 to F10 as 23.\nI record the co-usage frequency from F9 to F11 as 19.\nI record the co-usage frequency from F10 to F1 as 51.\nI record the co-usage frequency from F10 to F2 as 33.\nI record the co-usage frequency from F10 to F3 as 37.\nI record the co-usage frequency from F10 to F4 as 12.\nI record the co-usage frequency from F10 to F5 as 37.\nI record the co-usage frequency from F10 to F6 as 15.\nI record the co-usage frequency from F10 to F7 as 22.\nI record the co-usage frequency from F10 to F8 as 70.\nI record the co-usage frequency from F10 to F9 as 23.\nI record the co-usage frequency from F10 to F11 as 14.\nI record the co-usage frequency from F11 to F1 as 20.\nI record the co-usage frequency from F11 to F2 as 23.\nI record the co-usage frequency from F11 to F3 as 14.\nI record the co-usage frequency from F11 to F4 as 39.\nI record the co-usage frequency from F11 to F5 as 19.\nI record the co-usage frequency from F11 to F6 as 20.\nI record the co-usage frequency from F11 to F7 as 19.\nI record the co-usage frequency from F11 to F8 as 14.\nI record the co-usage frequency from F11 to F9 as 19.\nI record the co-usage frequency from F11 to F10 as 14.\nI'll use these details to assign each of the 11 devices (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11) to the 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 so total delay is minimized.\n\nAlso, when you send back your assignment, please follow this simple JSON layout so I can read it without guessing:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of that \"solution\" list as a little form: the first entry is the spot you picked for the first device, the second is the spot for the second device, and so on down the line. Super casual — just a one-to-one list in order.\n\nThis JSON is just a sketch of the shape I expect, not the actual filled-in answer. Please use the exact identifiers from the instance input — do not rename them or invent new labels. For example: Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 50, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 9, 12, 0, 0, 0, 0, 0 ], [ 0, 7, 0, 0, 0, 0, 23, 0, 0, 0, 0 ], [ 0, 0, 9, 0, 0, 0, 0, 13, 0, 0, 0 ], [ 0, 0, 12, 0, 0, 0, 0, 0, 10, 0, 0 ], [ 0, 0, 0, 23, 0, 0, 0, 0, 0, 9, 0 ], [ 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 14, 36, 39, 34, 10, 10, 37, 12, 51, 20 ], [ 14, 0, 12, 25, 19, 33, 13, 81, 15, 33, 23 ], [ 36, 12, 0, 14, 17, 29, 36, 10, 50, 37, 14 ], [ 39, 25, 14, 0, 10, 14, 22, 31, 27, 12, 39 ], [ 34, 19, 17, 10, 0, 30, 22, 19, 30, 37, 19 ], [ 10, 33, 29, 14, 30, 0, 12, 64, 91, 15, 20 ], [ 10, 13, 36, 22, 22, 12, 0, 33, 14, 22, 19 ], [ 37, 81, 10, 31, 19, 64, 33, 0, 12, 70, 14 ], [ 12, 15, 50, 27, 30, 91, 14, 12, 0, 23, 19 ], [ 51, 33, 37, 12, 37, 15, 22, 70, 23, 0, 14 ], [ 20, 23, 14, 39, 19, 20, 19, 14, 19, 14, 0 ] ], "objective": 2930.0 }, "solution": [ 2, 7, 3, 1, 0, 5, 4, 6, 9, 8, 10 ], "obj": 2930.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 11, "num_locations": 11, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 50 }, { "from_id": 1, "to_id": 3, "distance": 0 }, { "from_id": 1, "to_id": 4, "distance": 0 }, { "from_id": 1, "to_id": 5, "distance": 0 }, { "from_id": 1, "to_id": 6, "distance": 0 }, { "from_id": 1, "to_id": 7, "distance": 0 }, { "from_id": 1, "to_id": 8, "distance": 0 }, { "from_id": 1, "to_id": 9, "distance": 0 }, { "from_id": 1, "to_id": 10, "distance": 0 }, { "from_id": 1, "to_id": 11, "distance": 0 }, { "from_id": 2, "to_id": 1, "distance": 50 }, { "from_id": 2, "to_id": 3, "distance": 0 }, { "from_id": 2, "to_id": 4, "distance": 7 }, { "from_id": 2, "to_id": 5, "distance": 0 }, { "from_id": 2, "to_id": 6, "distance": 0 }, { "from_id": 2, "to_id": 7, "distance": 0 }, { "from_id": 2, "to_id": 8, "distance": 0 }, { "from_id": 2, "to_id": 9, "distance": 0 }, { "from_id": 2, "to_id": 10, "distance": 0 }, { "from_id": 2, "to_id": 11, "distance": 0 }, { "from_id": 3, "to_id": 1, "distance": 0 }, { "from_id": 3, "to_id": 2, "distance": 0 }, { "from_id": 3, "to_id": 4, "distance": 0 }, { "from_id": 3, "to_id": 5, "distance": 9 }, { "from_id": 3, "to_id": 6, "distance": 12 }, { "from_id": 3, "to_id": 7, "distance": 0 }, { "from_id": 3, "to_id": 8, "distance": 0 }, { "from_id": 3, "to_id": 9, "distance": 0 }, { "from_id": 3, "to_id": 10, "distance": 0 }, { "from_id": 3, "to_id": 11, "distance": 0 }, { "from_id": 4, "to_id": 1, "distance": 0 }, { "from_id": 4, "to_id": 2, "distance": 7 }, { "from_id": 4, "to_id": 3, "distance": 0 }, { "from_id": 4, "to_id": 5, "distance": 0 }, { "from_id": 4, "to_id": 6, "distance": 0 }, { "from_id": 4, "to_id": 7, "distance": 23 }, { "from_id": 4, "to_id": 8, "distance": 0 }, { "from_id": 4, "to_id": 9, "distance": 0 }, { "from_id": 4, "to_id": 10, "distance": 0 }, { "from_id": 4, "to_id": 11, "distance": 0 }, { "from_id": 5, "to_id": 1, "distance": 0 }, { "from_id": 5, "to_id": 2, "distance": 0 }, { "from_id": 5, "to_id": 3, "distance": 9 }, { "from_id": 5, "to_id": 4, "distance": 0 }, { "from_id": 5, "to_id": 6, "distance": 0 }, { "from_id": 5, "to_id": 7, "distance": 0 }, { "from_id": 5, "to_id": 8, "distance": 13 }, { "from_id": 5, "to_id": 9, "distance": 0 }, { "from_id": 5, "to_id": 10, "distance": 0 }, { "from_id": 5, "to_id": 11, "distance": 0 }, { "from_id": 6, "to_id": 1, "distance": 0 }, { "from_id": 6, "to_id": 2, "distance": 0 }, { "from_id": 6, "to_id": 3, "distance": 12 }, { "from_id": 6, "to_id": 4, "distance": 0 }, { "from_id": 6, "to_id": 5, "distance": 0 }, { "from_id": 6, "to_id": 7, "distance": 0 }, { "from_id": 6, "to_id": 8, "distance": 0 }, { "from_id": 6, "to_id": 9, "distance": 10 }, { "from_id": 6, "to_id": 10, "distance": 0 }, { "from_id": 6, "to_id": 11, "distance": 0 }, { "from_id": 7, "to_id": 1, "distance": 0 }, { "from_id": 7, "to_id": 2, "distance": 0 }, { "from_id": 7, "to_id": 3, "distance": 0 }, { "from_id": 7, "to_id": 4, "distance": 23 }, { "from_id": 7, "to_id": 5, "distance": 0 }, { "from_id": 7, "to_id": 6, "distance": 0 }, { "from_id": 7, "to_id": 8, "distance": 0 }, { "from_id": 7, "to_id": 9, "distance": 0 }, { "from_id": 7, "to_id": 10, "distance": 9 }, { "from_id": 7, "to_id": 11, "distance": 0 }, { "from_id": 8, "to_id": 1, "distance": 0 }, { "from_id": 8, "to_id": 2, "distance": 0 }, { "from_id": 8, "to_id": 3, "distance": 0 }, { "from_id": 8, "to_id": 4, "distance": 0 }, { "from_id": 8, "to_id": 5, "distance": 13 }, { "from_id": 8, "to_id": 6, "distance": 0 }, { "from_id": 8, "to_id": 7, "distance": 0 }, { "from_id": 8, "to_id": 9, "distance": 0 }, { "from_id": 8, "to_id": 10, "distance": 0 }, { "from_id": 8, "to_id": 11, "distance": 0 }, { "from_id": 9, "to_id": 1, "distance": 0 }, { "from_id": 9, "to_id": 2, "distance": 0 }, { "from_id": 9, "to_id": 3, "distance": 0 }, { "from_id": 9, "to_id": 4, "distance": 0 }, { "from_id": 9, "to_id": 5, "distance": 0 }, { "from_id": 9, "to_id": 6, "distance": 10 }, { "from_id": 9, "to_id": 7, "distance": 0 }, { "from_id": 9, "to_id": 8, "distance": 0 }, { "from_id": 9, "to_id": 10, "distance": 0 }, { "from_id": 9, "to_id": 11, "distance": 0 }, { "from_id": 10, "to_id": 1, "distance": 0 }, { "from_id": 10, "to_id": 2, "distance": 0 }, { "from_id": 10, "to_id": 3, "distance": 0 }, { "from_id": 10, "to_id": 4, "distance": 0 }, { "from_id": 10, "to_id": 5, "distance": 0 }, { "from_id": 10, "to_id": 6, "distance": 0 }, { "from_id": 10, "to_id": 7, "distance": 9 }, { "from_id": 10, "to_id": 8, "distance": 0 }, { "from_id": 10, "to_id": 9, "distance": 0 }, { "from_id": 10, "to_id": 11, "distance": 0 }, { "from_id": 11, "to_id": 1, "distance": 0 }, { "from_id": 11, "to_id": 2, "distance": 0 }, { "from_id": 11, "to_id": 3, "distance": 0 }, { "from_id": 11, "to_id": 4, "distance": 0 }, { "from_id": 11, "to_id": 5, "distance": 0 }, { "from_id": 11, "to_id": 6, "distance": 0 }, { "from_id": 11, "to_id": 7, "distance": 0 }, { "from_id": 11, "to_id": 8, "distance": 0 }, { "from_id": 11, "to_id": 9, "distance": 0 }, { "from_id": 11, "to_id": 10, "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 14 }, { "from_id": "F1", "to_id": "F3", "flow": 36 }, { "from_id": "F1", "to_id": "F4", "flow": 39 }, { "from_id": "F1", "to_id": "F5", "flow": 34 }, { "from_id": "F1", "to_id": "F6", "flow": 10 }, { "from_id": "F1", "to_id": "F7", "flow": 10 }, { "from_id": "F1", "to_id": "F8", "flow": 37 }, { "from_id": "F1", "to_id": "F9", "flow": 12 }, { "from_id": "F1", "to_id": "F10", "flow": 51 }, { "from_id": "F1", "to_id": "F11", "flow": 20 }, { "from_id": "F2", "to_id": "F1", "flow": 14 }, { "from_id": "F2", "to_id": "F3", "flow": 12 }, { "from_id": "F2", "to_id": "F4", "flow": 25 }, { "from_id": "F2", "to_id": "F5", "flow": 19 }, { "from_id": "F2", "to_id": "F6", "flow": 33 }, { "from_id": "F2", "to_id": "F7", "flow": 13 }, { "from_id": "F2", "to_id": "F8", "flow": 81 }, { "from_id": "F2", "to_id": "F9", "flow": 15 }, { "from_id": "F2", "to_id": "F10", "flow": 33 }, { "from_id": "F2", "to_id": "F11", "flow": 23 }, { "from_id": "F3", "to_id": "F1", "flow": 36 }, { "from_id": "F3", "to_id": "F2", "flow": 12 }, { "from_id": "F3", "to_id": "F4", "flow": 14 }, { "from_id": "F3", "to_id": "F5", "flow": 17 }, { "from_id": "F3", "to_id": "F6", "flow": 29 }, { "from_id": "F3", "to_id": "F7", "flow": 36 }, { "from_id": "F3", "to_id": "F8", "flow": 10 }, { "from_id": "F3", "to_id": "F9", "flow": 50 }, { "from_id": "F3", "to_id": "F10", "flow": 37 }, { "from_id": "F3", "to_id": "F11", "flow": 14 }, { "from_id": "F4", "to_id": "F1", "flow": 39 }, { "from_id": "F4", "to_id": "F2", "flow": 25 }, { "from_id": "F4", "to_id": "F3", "flow": 14 }, { "from_id": "F4", "to_id": "F5", "flow": 10 }, { "from_id": "F4", "to_id": "F6", "flow": 14 }, { "from_id": "F4", "to_id": "F7", "flow": 22 }, { "from_id": "F4", "to_id": "F8", "flow": 31 }, { "from_id": "F4", "to_id": "F9", "flow": 27 }, { "from_id": "F4", "to_id": "F10", "flow": 12 }, { "from_id": "F4", "to_id": "F11", "flow": 39 }, { "from_id": "F5", "to_id": "F1", "flow": 34 }, { "from_id": "F5", "to_id": "F2", "flow": 19 }, { "from_id": "F5", "to_id": "F3", "flow": 17 }, { "from_id": "F5", "to_id": "F4", "flow": 10 }, { "from_id": "F5", "to_id": "F6", "flow": 30 }, { "from_id": "F5", "to_id": "F7", "flow": 22 }, { "from_id": "F5", "to_id": "F8", "flow": 19 }, { "from_id": "F5", "to_id": "F9", "flow": 30 }, { "from_id": "F5", "to_id": "F10", "flow": 37 }, { "from_id": "F5", "to_id": "F11", "flow": 19 }, { "from_id": "F6", "to_id": "F1", "flow": 10 }, { "from_id": "F6", "to_id": "F2", "flow": 33 }, { "from_id": "F6", "to_id": "F3", "flow": 29 }, { "from_id": "F6", "to_id": "F4", "flow": 14 }, { "from_id": "F6", "to_id": "F5", "flow": 30 }, { "from_id": "F6", "to_id": "F7", "flow": 12 }, { "from_id": "F6", "to_id": "F8", "flow": 64 }, { "from_id": "F6", "to_id": "F9", "flow": 91 }, { "from_id": "F6", "to_id": "F10", "flow": 15 }, { "from_id": "F6", "to_id": "F11", "flow": 20 }, { "from_id": "F7", "to_id": "F1", "flow": 10 }, { "from_id": "F7", "to_id": "F2", "flow": 13 }, { "from_id": "F7", "to_id": "F3", "flow": 36 }, { "from_id": "F7", "to_id": "F4", "flow": 22 }, { "from_id": "F7", "to_id": "F5", "flow": 22 }, { "from_id": "F7", "to_id": "F6", "flow": 12 }, { "from_id": "F7", "to_id": "F8", "flow": 33 }, { "from_id": "F7", "to_id": "F9", "flow": 14 }, { "from_id": "F7", "to_id": "F10", "flow": 22 }, { "from_id": "F7", "to_id": "F11", "flow": 19 }, { "from_id": "F8", "to_id": "F1", "flow": 37 }, { "from_id": "F8", "to_id": "F2", "flow": 81 }, { "from_id": "F8", "to_id": "F3", "flow": 10 }, { "from_id": "F8", "to_id": "F4", "flow": 31 }, { "from_id": "F8", "to_id": "F5", "flow": 19 }, { "from_id": "F8", "to_id": "F6", "flow": 64 }, { "from_id": "F8", "to_id": "F7", "flow": 33 }, { "from_id": "F8", "to_id": "F9", "flow": 12 }, { "from_id": "F8", "to_id": "F10", "flow": 70 }, { "from_id": "F8", "to_id": "F11", "flow": 14 }, { "from_id": "F9", "to_id": "F1", "flow": 12 }, { "from_id": "F9", "to_id": "F2", "flow": 15 }, { "from_id": "F9", "to_id": "F3", "flow": 50 }, { "from_id": "F9", "to_id": "F4", "flow": 27 }, { "from_id": "F9", "to_id": "F5", "flow": 30 }, { "from_id": "F9", "to_id": "F6", "flow": 91 }, { "from_id": "F9", "to_id": "F7", "flow": 14 }, { "from_id": "F9", "to_id": "F8", "flow": 12 }, { "from_id": "F9", "to_id": "F10", "flow": 23 }, { "from_id": "F9", "to_id": "F11", "flow": 19 }, { "from_id": "F10", "to_id": "F1", "flow": 51 }, { "from_id": "F10", "to_id": "F2", "flow": 33 }, { "from_id": "F10", "to_id": "F3", "flow": 37 }, { "from_id": "F10", "to_id": "F4", "flow": 12 }, { "from_id": "F10", "to_id": "F5", "flow": 37 }, { "from_id": "F10", "to_id": "F6", "flow": 15 }, { "from_id": "F10", "to_id": "F7", "flow": 22 }, { "from_id": "F10", "to_id": "F8", "flow": 70 }, { "from_id": "F10", "to_id": "F9", "flow": 23 }, { "from_id": "F10", "to_id": "F11", "flow": 14 }, { "from_id": "F11", "to_id": "F1", "flow": 20 }, { "from_id": "F11", "to_id": "F2", "flow": 23 }, { "from_id": "F11", "to_id": "F3", "flow": 14 }, { "from_id": "F11", "to_id": "F4", "flow": 39 }, { "from_id": "F11", "to_id": "F5", "flow": 19 }, { "from_id": "F11", "to_id": "F6", "flow": 20 }, { "from_id": "F11", "to_id": "F7", "flow": 19 }, { "from_id": "F11", "to_id": "F8", "flow": 14 }, { "from_id": "F11", "to_id": "F9", "flow": 19 }, { "from_id": "F11", "to_id": "F10", "flow": 14 } ] }, "solution_variant": [ 3, 8, 4, 2, 1, 6, 5, 7, 10, 9, 11 ], "context_index": 5, "input_format": "nl", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Once, during a slow shift, the idea came up to rearrange racks so co‑serviced servers sit nearer to one another: decide which slot each server gets, making sure each server occupies exactly one slot and each slot houses exactly one server. To evaluate any arrangement, take every pair of servers, multiply their frequency of being serviced together by the distance between their slots, and add up all those products — the arrangement with the lowest total walking number is preferred. The exact instance details are provided below.\n\n# num_servers_and_slots=11\n# server_ids=F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11\n# slot_ids=1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11\n\nslot_from_id,slot_to_id,slot_distance\n1,2,0\n1,3,0\n1,4,0\n1,5,0\n1,6,0\n1,7,0\n1,8,0\n1,9,0\n1,10,0\n1,11,0\n2,1,0\n2,3,0\n2,4,19\n2,5,18\n2,6,0\n2,7,0\n2,8,0\n2,9,0\n2,10,0\n2,11,0\n3,1,0\n3,2,0\n3,4,0\n3,5,0\n3,6,38\n3,7,91\n3,8,0\n3,9,0\n3,10,0\n3,11,0\n4,1,0\n4,2,19\n4,3,0\n4,5,0\n4,6,0\n4,7,0\n4,8,0\n4,9,0\n4,10,0\n4,11,0\n5,1,0\n5,2,18\n5,3,0\n5,4,0\n5,6,0\n5,7,0\n5,8,0\n5,9,0\n5,10,0\n5,11,0\n6,1,0\n6,2,0\n6,3,38\n6,4,0\n6,5,0\n6,7,0\n6,8,0\n6,9,0\n6,10,0\n6,11,0\n7,1,0\n7,2,0\n7,3,91\n7,4,0\n7,5,0\n7,6,0\n7,8,0\n7,9,0\n7,10,0\n7,11,0\n8,1,0\n8,2,0\n8,3,0\n8,4,0\n8,5,0\n8,6,0\n8,7,0\n8,9,0\n8,10,0\n8,11,0\n9,1,0\n9,2,0\n9,3,0\n9,4,0\n9,5,0\n9,6,0\n9,7,0\n9,8,0\n9,10,0\n9,11,0\n10,1,0\n10,2,0\n10,3,0\n10,4,0\n10,5,0\n10,6,0\n10,7,0\n10,8,0\n10,9,0\n10,11,0\n11,1,0\n11,2,0\n11,3,0\n11,4,0\n11,5,0\n11,6,0\n11,7,0\n11,8,0\n11,9,0\n11,10,0\n\nserver_from_id,server_to_id,service_together_frequency\nF1,F2,3\nF1,F3,13\nF1,F4,93\nF1,F5,93\nF1,F6,78\nF1,F7,64\nF1,F8,45\nF1,F9,26\nF1,F10,74\nF1,F11,80\nF2,F1,3\nF2,F3,96\nF2,F4,91\nF2,F5,66\nF2,F6,95\nF2,F7,18\nF2,F8,13\nF2,F9,90\nF2,F10,24\nF2,F11,67\nF3,F1,13\nF3,F2,96\nF3,F4,78\nF3,F5,64\nF3,F6,95\nF3,F7,35\nF3,F8,30\nF3,F9,30\nF3,F10,77\nF3,F11,34\nF4,F1,93\nF4,F2,91\nF4,F3,78\nF4,F5,36\nF4,F6,70\nF4,F7,5\nF4,F8,76\nF4,F9,40\nF4,F10,9\nF4,F11,68\nF5,F1,93\nF5,F2,66\nF5,F3,64\nF5,F4,36\nF5,F6,75\nF5,F7,63\nF5,F8,80\nF5,F9,4\nF5,F10,99\nF5,F11,12\nF6,F1,78\nF6,F2,95\nF6,F3,95\nF6,F4,70\nF6,F5,75\nF6,F7,1\nF6,F8,46\nF6,F9,94\nF6,F10,83\nF6,F11,11\nF7,F1,64\nF7,F2,18\nF7,F3,35\nF7,F4,5\nF7,F5,63\nF7,F6,1\nF7,F8,81\nF7,F9,19\nF7,F10,98\nF7,F11,67\nF8,F1,45\nF8,F2,13\nF8,F3,30\nF8,F4,76\nF8,F5,80\nF8,F6,46\nF8,F7,81\nF8,F9,11\nF8,F10,21\nF8,F11,75\nF9,F1,26\nF9,F2,90\nF9,F3,30\nF9,F4,40\nF9,F5,4\nF9,F6,94\nF9,F7,19\nF9,F8,11\nF9,F10,13\nF9,F11,14\nF10,F1,74\nF10,F2,24\nF10,F3,77\nF10,F4,9\nF10,F5,99\nF10,F6,83\nF10,F7,98\nF10,F8,21\nF10,F9,13\nF10,F11,46\nF11,F1,80\nF11,F2,67\nF11,F3,34\nF11,F4,68\nF11,F5,12\nF11,F6,11\nF11,F7,67\nF11,F8,75\nF11,F9,14\nF11,F10,46\n\nAlso, when you send your arrangement back, think of it like filling a tiny form — I want a JSON object with one key, \"solution\", whose value is an array listing which slot each server gets (first array entry = first server, second = second server, and so on). Here's the shape I expect:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis just shows the expected shape: the array should contain one identifier per server, in order. Treat it like a simple lineup form rather than a technical schema — first entry = where server #1 goes, second = where server #2 goes, etc. It's only a sketch, not the final assignment.\n\nPlease be careful to use the exact identifiers from the instance input — don't rename them or invent new labels. For example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 19, 18, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 38, 91, 0, 0, 0, 0 ], [ 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 3, 13, 93, 93, 78, 64, 45, 26, 74, 80 ], [ 3, 0, 96, 91, 66, 95, 18, 13, 90, 24, 67 ], [ 13, 96, 0, 78, 64, 95, 35, 30, 30, 77, 34 ], [ 93, 91, 78, 0, 36, 70, 5, 76, 40, 9, 68 ], [ 93, 66, 64, 36, 0, 75, 63, 80, 4, 99, 12 ], [ 78, 95, 95, 70, 75, 0, 1, 46, 94, 83, 11 ], [ 64, 18, 35, 5, 63, 1, 0, 81, 19, 98, 67 ], [ 45, 13, 30, 76, 80, 46, 81, 0, 11, 21, 75 ], [ 26, 90, 30, 40, 4, 94, 19, 11, 0, 13, 14 ], [ 74, 24, 77, 9, 99, 83, 98, 21, 13, 0, 46 ], [ 80, 67, 34, 68, 12, 11, 67, 75, 14, 46, 0 ] ], "objective": 1110.0 }, "solution": [ 7, 8, 9, 5, 3, 6, 2, 4, 1, 10, 0 ], "obj": 1110.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 11, "num_locations": 11, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 0 }, { "from_id": 1, "to_id": 3, "distance": 0 }, { "from_id": 1, "to_id": 4, "distance": 0 }, { "from_id": 1, "to_id": 5, "distance": 0 }, { "from_id": 1, "to_id": 6, "distance": 0 }, { "from_id": 1, "to_id": 7, "distance": 0 }, { "from_id": 1, "to_id": 8, "distance": 0 }, { "from_id": 1, "to_id": 9, "distance": 0 }, { "from_id": 1, "to_id": 10, "distance": 0 }, { "from_id": 1, "to_id": 11, "distance": 0 }, { "from_id": 2, "to_id": 1, "distance": 0 }, { "from_id": 2, "to_id": 3, "distance": 0 }, { "from_id": 2, "to_id": 4, "distance": 19 }, { "from_id": 2, "to_id": 5, "distance": 18 }, { "from_id": 2, "to_id": 6, "distance": 0 }, { "from_id": 2, "to_id": 7, "distance": 0 }, { "from_id": 2, "to_id": 8, "distance": 0 }, { "from_id": 2, "to_id": 9, "distance": 0 }, { "from_id": 2, "to_id": 10, "distance": 0 }, { "from_id": 2, "to_id": 11, "distance": 0 }, { "from_id": 3, "to_id": 1, "distance": 0 }, { "from_id": 3, "to_id": 2, "distance": 0 }, { "from_id": 3, "to_id": 4, "distance": 0 }, { "from_id": 3, "to_id": 5, "distance": 0 }, { "from_id": 3, "to_id": 6, "distance": 38 }, { "from_id": 3, "to_id": 7, "distance": 91 }, { "from_id": 3, "to_id": 8, "distance": 0 }, { "from_id": 3, "to_id": 9, "distance": 0 }, { "from_id": 3, "to_id": 10, "distance": 0 }, { "from_id": 3, "to_id": 11, "distance": 0 }, { "from_id": 4, "to_id": 1, "distance": 0 }, { "from_id": 4, "to_id": 2, "distance": 19 }, { "from_id": 4, "to_id": 3, "distance": 0 }, { "from_id": 4, "to_id": 5, "distance": 0 }, { "from_id": 4, "to_id": 6, "distance": 0 }, { "from_id": 4, "to_id": 7, "distance": 0 }, { "from_id": 4, "to_id": 8, "distance": 0 }, { "from_id": 4, "to_id": 9, "distance": 0 }, { "from_id": 4, "to_id": 10, "distance": 0 }, { "from_id": 4, "to_id": 11, "distance": 0 }, { "from_id": 5, "to_id": 1, "distance": 0 }, { "from_id": 5, "to_id": 2, "distance": 18 }, { "from_id": 5, "to_id": 3, "distance": 0 }, { "from_id": 5, "to_id": 4, "distance": 0 }, { "from_id": 5, "to_id": 6, "distance": 0 }, { "from_id": 5, "to_id": 7, "distance": 0 }, { "from_id": 5, "to_id": 8, "distance": 0 }, { "from_id": 5, "to_id": 9, "distance": 0 }, { "from_id": 5, "to_id": 10, "distance": 0 }, { "from_id": 5, "to_id": 11, "distance": 0 }, { "from_id": 6, "to_id": 1, "distance": 0 }, { "from_id": 6, "to_id": 2, "distance": 0 }, { "from_id": 6, "to_id": 3, "distance": 38 }, { "from_id": 6, "to_id": 4, "distance": 0 }, { "from_id": 6, "to_id": 5, "distance": 0 }, { "from_id": 6, "to_id": 7, "distance": 0 }, { "from_id": 6, "to_id": 8, "distance": 0 }, { "from_id": 6, "to_id": 9, "distance": 0 }, { "from_id": 6, "to_id": 10, "distance": 0 }, { "from_id": 6, "to_id": 11, "distance": 0 }, { "from_id": 7, "to_id": 1, "distance": 0 }, { "from_id": 7, "to_id": 2, "distance": 0 }, { "from_id": 7, "to_id": 3, "distance": 91 }, { "from_id": 7, "to_id": 4, "distance": 0 }, { "from_id": 7, "to_id": 5, "distance": 0 }, { "from_id": 7, "to_id": 6, "distance": 0 }, { "from_id": 7, "to_id": 8, "distance": 0 }, { "from_id": 7, "to_id": 9, "distance": 0 }, { "from_id": 7, "to_id": 10, "distance": 0 }, { "from_id": 7, "to_id": 11, "distance": 0 }, { "from_id": 8, "to_id": 1, "distance": 0 }, { "from_id": 8, "to_id": 2, "distance": 0 }, { "from_id": 8, "to_id": 3, "distance": 0 }, { "from_id": 8, "to_id": 4, "distance": 0 }, { "from_id": 8, "to_id": 5, "distance": 0 }, { "from_id": 8, "to_id": 6, "distance": 0 }, { "from_id": 8, "to_id": 7, "distance": 0 }, { "from_id": 8, "to_id": 9, "distance": 0 }, { "from_id": 8, "to_id": 10, "distance": 0 }, { "from_id": 8, "to_id": 11, "distance": 0 }, { "from_id": 9, "to_id": 1, "distance": 0 }, { "from_id": 9, "to_id": 2, "distance": 0 }, { "from_id": 9, "to_id": 3, "distance": 0 }, { "from_id": 9, "to_id": 4, "distance": 0 }, { "from_id": 9, "to_id": 5, "distance": 0 }, { "from_id": 9, "to_id": 6, "distance": 0 }, { "from_id": 9, "to_id": 7, "distance": 0 }, { "from_id": 9, "to_id": 8, "distance": 0 }, { "from_id": 9, "to_id": 10, "distance": 0 }, { "from_id": 9, "to_id": 11, "distance": 0 }, { "from_id": 10, "to_id": 1, "distance": 0 }, { "from_id": 10, "to_id": 2, "distance": 0 }, { "from_id": 10, "to_id": 3, "distance": 0 }, { "from_id": 10, "to_id": 4, "distance": 0 }, { "from_id": 10, "to_id": 5, "distance": 0 }, { "from_id": 10, "to_id": 6, "distance": 0 }, { "from_id": 10, "to_id": 7, "distance": 0 }, { "from_id": 10, "to_id": 8, "distance": 0 }, { "from_id": 10, "to_id": 9, "distance": 0 }, { "from_id": 10, "to_id": 11, "distance": 0 }, { "from_id": 11, "to_id": 1, "distance": 0 }, { "from_id": 11, "to_id": 2, "distance": 0 }, { "from_id": 11, "to_id": 3, "distance": 0 }, { "from_id": 11, "to_id": 4, "distance": 0 }, { "from_id": 11, "to_id": 5, "distance": 0 }, { "from_id": 11, "to_id": 6, "distance": 0 }, { "from_id": 11, "to_id": 7, "distance": 0 }, { "from_id": 11, "to_id": 8, "distance": 0 }, { "from_id": 11, "to_id": 9, "distance": 0 }, { "from_id": 11, "to_id": 10, "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 3 }, { "from_id": "F1", "to_id": "F3", "flow": 13 }, { "from_id": "F1", "to_id": "F4", "flow": 93 }, { "from_id": "F1", "to_id": "F5", "flow": 93 }, { "from_id": "F1", "to_id": "F6", "flow": 78 }, { "from_id": "F1", "to_id": "F7", "flow": 64 }, { "from_id": "F1", "to_id": "F8", "flow": 45 }, { "from_id": "F1", "to_id": "F9", "flow": 26 }, { "from_id": "F1", "to_id": "F10", "flow": 74 }, { "from_id": "F1", "to_id": "F11", "flow": 80 }, { "from_id": "F2", "to_id": "F1", "flow": 3 }, { "from_id": "F2", "to_id": "F3", "flow": 96 }, { "from_id": "F2", "to_id": "F4", "flow": 91 }, { "from_id": "F2", "to_id": "F5", "flow": 66 }, { "from_id": "F2", "to_id": "F6", "flow": 95 }, { "from_id": "F2", "to_id": "F7", "flow": 18 }, { "from_id": "F2", "to_id": "F8", "flow": 13 }, { "from_id": "F2", "to_id": "F9", "flow": 90 }, { "from_id": "F2", "to_id": "F10", "flow": 24 }, { "from_id": "F2", "to_id": "F11", "flow": 67 }, { "from_id": "F3", "to_id": "F1", "flow": 13 }, { "from_id": "F3", "to_id": "F2", "flow": 96 }, { "from_id": "F3", "to_id": "F4", "flow": 78 }, { "from_id": "F3", "to_id": "F5", "flow": 64 }, { "from_id": "F3", "to_id": "F6", "flow": 95 }, { "from_id": "F3", "to_id": "F7", "flow": 35 }, { "from_id": "F3", "to_id": "F8", "flow": 30 }, { "from_id": "F3", "to_id": "F9", "flow": 30 }, { "from_id": "F3", "to_id": "F10", "flow": 77 }, { "from_id": "F3", "to_id": "F11", "flow": 34 }, { "from_id": "F4", "to_id": "F1", "flow": 93 }, { "from_id": "F4", "to_id": "F2", "flow": 91 }, { "from_id": "F4", "to_id": "F3", "flow": 78 }, { "from_id": "F4", "to_id": "F5", "flow": 36 }, { "from_id": "F4", "to_id": "F6", "flow": 70 }, { "from_id": "F4", "to_id": "F7", "flow": 5 }, { "from_id": "F4", "to_id": "F8", "flow": 76 }, { "from_id": "F4", "to_id": "F9", "flow": 40 }, { "from_id": "F4", "to_id": "F10", "flow": 9 }, { "from_id": "F4", "to_id": "F11", "flow": 68 }, { "from_id": "F5", "to_id": "F1", "flow": 93 }, { "from_id": "F5", "to_id": "F2", "flow": 66 }, { "from_id": "F5", "to_id": "F3", "flow": 64 }, { "from_id": "F5", "to_id": "F4", "flow": 36 }, { "from_id": "F5", "to_id": "F6", "flow": 75 }, { "from_id": "F5", "to_id": "F7", "flow": 63 }, { "from_id": "F5", "to_id": "F8", "flow": 80 }, { "from_id": "F5", "to_id": "F9", "flow": 4 }, { "from_id": "F5", "to_id": "F10", "flow": 99 }, { "from_id": "F5", "to_id": "F11", "flow": 12 }, { "from_id": "F6", "to_id": "F1", "flow": 78 }, { "from_id": "F6", "to_id": "F2", "flow": 95 }, { "from_id": "F6", "to_id": "F3", "flow": 95 }, { "from_id": "F6", "to_id": "F4", "flow": 70 }, { "from_id": "F6", "to_id": "F5", "flow": 75 }, { "from_id": "F6", "to_id": "F7", "flow": 1 }, { "from_id": "F6", "to_id": "F8", "flow": 46 }, { "from_id": "F6", "to_id": "F9", "flow": 94 }, { "from_id": "F6", "to_id": "F10", "flow": 83 }, { "from_id": "F6", "to_id": "F11", "flow": 11 }, { "from_id": "F7", "to_id": "F1", "flow": 64 }, { "from_id": "F7", "to_id": "F2", "flow": 18 }, { "from_id": "F7", "to_id": "F3", "flow": 35 }, { "from_id": "F7", "to_id": "F4", "flow": 5 }, { "from_id": "F7", "to_id": "F5", "flow": 63 }, { "from_id": "F7", "to_id": "F6", "flow": 1 }, { "from_id": "F7", "to_id": "F8", "flow": 81 }, { "from_id": "F7", "to_id": "F9", "flow": 19 }, { "from_id": "F7", "to_id": "F10", "flow": 98 }, { "from_id": "F7", "to_id": "F11", "flow": 67 }, { "from_id": "F8", "to_id": "F1", "flow": 45 }, { "from_id": "F8", "to_id": "F2", "flow": 13 }, { "from_id": "F8", "to_id": "F3", "flow": 30 }, { "from_id": "F8", "to_id": "F4", "flow": 76 }, { "from_id": "F8", "to_id": "F5", "flow": 80 }, { "from_id": "F8", "to_id": "F6", "flow": 46 }, { "from_id": "F8", "to_id": "F7", "flow": 81 }, { "from_id": "F8", "to_id": "F9", "flow": 11 }, { "from_id": "F8", "to_id": "F10", "flow": 21 }, { "from_id": "F8", "to_id": "F11", "flow": 75 }, { "from_id": "F9", "to_id": "F1", "flow": 26 }, { "from_id": "F9", "to_id": "F2", "flow": 90 }, { "from_id": "F9", "to_id": "F3", "flow": 30 }, { "from_id": "F9", "to_id": "F4", "flow": 40 }, { "from_id": "F9", "to_id": "F5", "flow": 4 }, { "from_id": "F9", "to_id": "F6", "flow": 94 }, { "from_id": "F9", "to_id": "F7", "flow": 19 }, { "from_id": "F9", "to_id": "F8", "flow": 11 }, { "from_id": "F9", "to_id": "F10", "flow": 13 }, { "from_id": "F9", "to_id": "F11", "flow": 14 }, { "from_id": "F10", "to_id": "F1", "flow": 74 }, { "from_id": "F10", "to_id": "F2", "flow": 24 }, { "from_id": "F10", "to_id": "F3", "flow": 77 }, { "from_id": "F10", "to_id": "F4", "flow": 9 }, { "from_id": "F10", "to_id": "F5", "flow": 99 }, { "from_id": "F10", "to_id": "F6", "flow": 83 }, { "from_id": "F10", "to_id": "F7", "flow": 98 }, { "from_id": "F10", "to_id": "F8", "flow": 21 }, { "from_id": "F10", "to_id": "F9", "flow": 13 }, { "from_id": "F10", "to_id": "F11", "flow": 46 }, { "from_id": "F11", "to_id": "F1", "flow": 80 }, { "from_id": "F11", "to_id": "F2", "flow": 67 }, { "from_id": "F11", "to_id": "F3", "flow": 34 }, { "from_id": "F11", "to_id": "F4", "flow": 68 }, { "from_id": "F11", "to_id": "F5", "flow": 12 }, { "from_id": "F11", "to_id": "F6", "flow": 11 }, { "from_id": "F11", "to_id": "F7", "flow": 67 }, { "from_id": "F11", "to_id": "F8", "flow": 75 }, { "from_id": "F11", "to_id": "F9", "flow": 14 }, { "from_id": "F11", "to_id": "F10", "flow": 46 } ] }, "solution_variant": [ 8, 9, 10, 6, 4, 7, 3, 5, 2, 11, 1 ], "context_index": 6, "input_format": "csv", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Recently the team decided to rework the floor: each collection will go to one display fixture and each fixture will show one collection, no repeats and no empty spots. The point is to reduce how much extra walking shoppers have to do, measured this way — for every pair of collections, multiply the number of times they’re bought together by the distance between their fixtures, then add those products for all pairs; a lower total means shoppers can shop more easily. The exact fixture distances and the buy-together numbers are shown below.\n\nThere are 11 collections (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11) and 11 display fixtures (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10).\nDistance between fixture 0 and fixture 1: 0.\nDistance between fixture 0 and fixture 2: 0.\nDistance between fixture 0 and fixture 3: 0.\nDistance between fixture 0 and fixture 4: 0.\nDistance between fixture 0 and fixture 5: 0.\nDistance between fixture 0 and fixture 6: 0.\nDistance between fixture 0 and fixture 7: 0.\nDistance between fixture 0 and fixture 8: 0.\nDistance between fixture 0 and fixture 9: 0.\nDistance between fixture 0 and fixture 10: 0.\nDistance between fixture 1 and fixture 0: 0.\nDistance between fixture 1 and fixture 2: 0.\nDistance between fixture 1 and fixture 3: 0.\nDistance between fixture 1 and fixture 4: 74.\nDistance between fixture 1 and fixture 5: 20.\nDistance between fixture 1 and fixture 6: 0.\nDistance between fixture 1 and fixture 7: 0.\nDistance between fixture 1 and fixture 8: 0.\nDistance between fixture 1 and fixture 9: 0.\nDistance between fixture 1 and fixture 10: 0.\nDistance between fixture 2 and fixture 0: 0.\nDistance between fixture 2 and fixture 1: 0.\nDistance between fixture 2 and fixture 3: 0.\nDistance between fixture 2 and fixture 4: 0.\nDistance between fixture 2 and fixture 5: 0.\nDistance between fixture 2 and fixture 6: 0.\nDistance between fixture 2 and fixture 7: 0.\nDistance between fixture 2 and fixture 8: 0.\nDistance between fixture 2 and fixture 9: 0.\nDistance between fixture 2 and fixture 10: 0.\nDistance between fixture 3 and fixture 0: 0.\nDistance between fixture 3 and fixture 1: 0.\nDistance between fixture 3 and fixture 2: 0.\nDistance between fixture 3 and fixture 4: 0.\nDistance between fixture 3 and fixture 5: 0.\nDistance between fixture 3 and fixture 6: 0.\nDistance between fixture 3 and fixture 7: 0.\nDistance between fixture 3 and fixture 8: 0.\nDistance between fixture 3 and fixture 9: 0.\nDistance between fixture 3 and fixture 10: 0.\nDistance between fixture 4 and fixture 0: 0.\nDistance between fixture 4 and fixture 1: 74.\nDistance between fixture 4 and fixture 2: 0.\nDistance between fixture 4 and fixture 3: 0.\nDistance between fixture 4 and fixture 5: 0.\nDistance between fixture 4 and fixture 6: 1.\nDistance between fixture 4 and fixture 7: 0.\nDistance between fixture 4 and fixture 8: 0.\nDistance between fixture 4 and fixture 9: 0.\nDistance between fixture 4 and fixture 10: 0.\nDistance between fixture 5 and fixture 0: 0.\nDistance between fixture 5 and fixture 1: 20.\nDistance between fixture 5 and fixture 2: 0.\nDistance between fixture 5 and fixture 3: 0.\nDistance between fixture 5 and fixture 4: 0.\nDistance between fixture 5 and fixture 6: 0.\nDistance between fixture 5 and fixture 7: 65.\nDistance between fixture 5 and fixture 8: 0.\nDistance between fixture 5 and fixture 9: 0.\nDistance between fixture 5 and fixture 10: 0.\nDistance between fixture 6 and fixture 0: 0.\nDistance between fixture 6 and fixture 1: 0.\nDistance between fixture 6 and fixture 2: 0.\nDistance between fixture 6 and fixture 3: 0.\nDistance between fixture 6 and fixture 4: 1.\nDistance between fixture 6 and fixture 5: 0.\nDistance between fixture 6 and fixture 7: 0.\nDistance between fixture 6 and fixture 8: 0.\nDistance between fixture 6 and fixture 9: 0.\nDistance between fixture 6 and fixture 10: 0.\nDistance between fixture 7 and fixture 0: 0.\nDistance between fixture 7 and fixture 1: 0.\nDistance between fixture 7 and fixture 2: 0.\nDistance between fixture 7 and fixture 3: 0.\nDistance between fixture 7 and fixture 4: 0.\nDistance between fixture 7 and fixture 5: 65.\nDistance between fixture 7 and fixture 6: 0.\nDistance between fixture 7 and fixture 8: 0.\nDistance between fixture 7 and fixture 9: 0.\nDistance between fixture 7 and fixture 10: 0.\nDistance between fixture 8 and fixture 0: 0.\nDistance between fixture 8 and fixture 1: 0.\nDistance between fixture 8 and fixture 2: 0.\nDistance between fixture 8 and fixture 3: 0.\nDistance between fixture 8 and fixture 4: 0.\nDistance between fixture 8 and fixture 5: 0.\nDistance between fixture 8 and fixture 6: 0.\nDistance between fixture 8 and fixture 7: 0.\nDistance between fixture 8 and fixture 9: 0.\nDistance between fixture 8 and fixture 10: 0.\nDistance between fixture 9 and fixture 0: 0.\nDistance between fixture 9 and fixture 1: 0.\nDistance between fixture 9 and fixture 2: 0.\nDistance between fixture 9 and fixture 3: 0.\nDistance between fixture 9 and fixture 4: 0.\nDistance between fixture 9 and fixture 5: 0.\nDistance between fixture 9 and fixture 6: 0.\nDistance between fixture 9 and fixture 7: 0.\nDistance between fixture 9 and fixture 8: 0.\nDistance between fixture 9 and fixture 10: 0.\nDistance between fixture 10 and fixture 0: 0.\nDistance between fixture 10 and fixture 1: 0.\nDistance between fixture 10 and fixture 2: 0.\nDistance between fixture 10 and fixture 3: 0.\nDistance between fixture 10 and fixture 4: 0.\nDistance between fixture 10 and fixture 5: 0.\nDistance between fixture 10 and fixture 6: 0.\nDistance between fixture 10 and fixture 7: 0.\nDistance between fixture 10 and fixture 8: 0.\nDistance between fixture 10 and fixture 9: 0.\nTimes collections F1 and F2 are bought together: 16.\nTimes collections F1 and F3 are bought together: 71.\nTimes collections F1 and F4 are bought together: 23.\nTimes collections F1 and F5 are bought together: 14.\nTimes collections F1 and F6 are bought together: 76.\nTimes collections F1 and F7 are bought together: 85.\nTimes collections F1 and F8 are bought together: 12.\nTimes collections F1 and F9 are bought together: 70.\nTimes collections F1 and F10 are bought together: 17.\nTimes collections F1 and F11 are bought together: 77.\nTimes collections F2 and F1 are bought together: 16.\nTimes collections F2 and F3 are bought together: 12.\nTimes collections F2 and F4 are bought together: 28.\nTimes collections F2 and F5 are bought together: 74.\nTimes collections F2 and F6 are bought together: 40.\nTimes collections F2 and F7 are bought together: 12.\nTimes collections F2 and F8 are bought together: 86.\nTimes collections F2 and F9 are bought together: 86.\nTimes collections F2 and F10 are bought together: 55.\nTimes collections F2 and F11 are bought together: 36.\nTimes collections F3 and F1 are bought together: 71.\nTimes collections F3 and F2 are bought together: 12.\nTimes collections F3 and F4 are bought together: 91.\nTimes collections F3 and F5 are bought together: 47.\nTimes collections F3 and F6 are bought together: 1.\nTimes collections F3 and F7 are bought together: 66.\nTimes collections F3 and F8 are bought together: 60.\nTimes collections F3 and F9 are bought together: 62.\nTimes collections F3 and F10 are bought together: 58.\nTimes collections F3 and F11 are bought together: 63.\nTimes collections F4 and F1 are bought together: 23.\nTimes collections F4 and F2 are bought together: 28.\nTimes collections F4 and F3 are bought together: 91.\nTimes collections F4 and F5 are bought together: 84.\nTimes collections F4 and F6 are bought together: 64.\nTimes collections F4 and F7 are bought together: 61.\nTimes collections F4 and F8 are bought together: 45.\nTimes collections F4 and F9 are bought together: 19.\nTimes collections F4 and F10 are bought together: 77.\nTimes collections F4 and F11 are bought together: 13.\nTimes collections F5 and F1 are bought together: 14.\nTimes collections F5 and F2 are bought together: 74.\nTimes collections F5 and F3 are bought together: 47.\nTimes collections F5 and F4 are bought together: 84.\nTimes collections F5 and F6 are bought together: 36.\nTimes collections F5 and F7 are bought together: 68.\nTimes collections F5 and F8 are bought together: 61.\nTimes collections F5 and F9 are bought together: 11.\nTimes collections F5 and F10 are bought together: 26.\nTimes collections F5 and F11 are bought together: 19.\nTimes collections F6 and F1 are bought together: 76.\nTimes collections F6 and F2 are bought together: 40.\nTimes collections F6 and F3 are bought together: 1.\nTimes collections F6 and F4 are bought together: 64.\nTimes collections F6 and F5 are bought together: 36.\nTimes collections F6 and F7 are bought together: 32.\nTimes collections F6 and F8 are bought together: 36.\nTimes collections F6 and F9 are bought together: 48.\nTimes collections F6 and F10 are bought together: 96.\nTimes collections F6 and F11 are bought together: 29.\nTimes collections F7 and F1 are bought together: 85.\nTimes collections F7 and F2 are bought together: 12.\nTimes collections F7 and F3 are bought together: 66.\nTimes collections F7 and F4 are bought together: 61.\nTimes collections F7 and F5 are bought together: 68.\nTimes collections F7 and F6 are bought together: 32.\nTimes collections F7 and F8 are bought together: 43.\nTimes collections F7 and F9 are bought together: 95.\nTimes collections F7 and F10 are bought together: 83.\nTimes collections F7 and F11 are bought together: 50.\nTimes collections F8 and F1 are bought together: 12.\nTimes collections F8 and F2 are bought together: 86.\nTimes collections F8 and F3 are bought together: 60.\nTimes collections F8 and F4 are bought together: 45.\nTimes collections F8 and F5 are bought together: 61.\nTimes collections F8 and F6 are bought together: 36.\nTimes collections F8 and F7 are bought together: 43.\nTimes collections F8 and F9 are bought together: 74.\nTimes collections F8 and F10 are bought together: 36.\nTimes collections F8 and F11 are bought together: 23.\nTimes collections F9 and F1 are bought together: 70.\nTimes collections F9 and F2 are bought together: 86.\nTimes collections F9 and F3 are bought together: 62.\nTimes collections F9 and F4 are bought together: 19.\nTimes collections F9 and F5 are bought together: 11.\nTimes collections F9 and F6 are bought together: 48.\nTimes collections F9 and F7 are bought together: 95.\nTimes collections F9 and F8 are bought together: 74.\nTimes collections F9 and F10 are bought together: 17.\nTimes collections F9 and F11 are bought together: 80.\nTimes collections F10 and F1 are bought together: 17.\nTimes collections F10 and F2 are bought together: 55.\nTimes collections F10 and F3 are bought together: 58.\nTimes collections F10 and F4 are bought together: 77.\nTimes collections F10 and F5 are bought together: 26.\nTimes collections F10 and F6 are bought together: 96.\nTimes collections F10 and F7 are bought together: 83.\nTimes collections F10 and F8 are bought together: 36.\nTimes collections F10 and F9 are bought together: 17.\nTimes collections F10 and F11 are bought together: 49.\nTimes collections F11 and F1 are bought together: 77.\nTimes collections F11 and F2 are bought together: 36.\nTimes collections F11 and F3 are bought together: 63.\nTimes collections F11 and F4 are bought together: 13.\nTimes collections F11 and F5 are bought together: 19.\nTimes collections F11 and F6 are bought together: 29.\nTimes collections F11 and F7 are bought together: 50.\nTimes collections F11 and F8 are bought together: 23.\nTimes collections F11 and F9 are bought together: 80.\nTimes collections F11 and F10 are bought together: 49.\nUse the data below to compute and minimize the total shopper walking inconvenience.\n\nOh, and when you send the actual placement, please stick to this simple JSON layout so it's easy to parse:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis just means the \"solution\" array lists, in order, which fixture (location) each collection is assigned to — first entry = where the first collection goes, second = where the second collection goes, and so on. It's just a quick form, not the final packing — think of it as filling in the blanks.\n\nThe JSON above is only a sketch of the shape I expect, not the actual answer. Please use the exact identifiers from the instance input — no renaming and no new labels. \n\nValid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 74, 20, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 74, 0, 0, 0, 0, 1, 0, 0, 0, 0 ], [ 0, 20, 0, 0, 0, 0, 0, 65, 0, 0, 0 ], [ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 16, 71, 23, 14, 76, 85, 12, 70, 17, 77 ], [ 16, 0, 12, 28, 74, 40, 12, 86, 86, 55, 36 ], [ 71, 12, 0, 91, 47, 1, 66, 60, 62, 58, 63 ], [ 23, 28, 91, 0, 84, 64, 61, 45, 19, 77, 13 ], [ 14, 74, 47, 84, 0, 36, 68, 61, 11, 26, 19 ], [ 76, 40, 1, 64, 36, 0, 32, 36, 48, 96, 29 ], [ 85, 12, 66, 61, 68, 32, 0, 43, 95, 83, 50 ], [ 12, 86, 60, 45, 61, 36, 43, 0, 74, 36, 23 ], [ 70, 86, 62, 19, 11, 48, 95, 74, 0, 17, 80 ], [ 17, 55, 58, 77, 26, 96, 83, 36, 17, 0, 49 ], [ 77, 36, 63, 13, 19, 29, 50, 23, 80, 49, 0 ] ], "objective": 2246.0 }, "solution": [ 8, 5, 1, 0, 2, 4, 7, 10, 3, 9, 6 ], "obj": 2246.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 11, "num_locations": 11, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 0 }, { "from_id": 0, "to_id": 2, "distance": 0 }, { "from_id": 0, "to_id": 3, "distance": 0 }, { "from_id": 0, "to_id": 4, "distance": 0 }, { "from_id": 0, "to_id": 5, "distance": 0 }, { "from_id": 0, "to_id": 6, "distance": 0 }, { "from_id": 0, "to_id": 7, "distance": 0 }, { "from_id": 0, "to_id": 8, "distance": 0 }, { "from_id": 0, "to_id": 9, "distance": 0 }, { "from_id": 0, "to_id": 10, "distance": 0 }, { "from_id": 1, "to_id": 0, "distance": 0 }, { "from_id": 1, "to_id": 2, "distance": 0 }, { "from_id": 1, "to_id": 3, "distance": 0 }, { "from_id": 1, "to_id": 4, "distance": 74 }, { "from_id": 1, "to_id": 5, "distance": 20 }, { "from_id": 1, "to_id": 6, "distance": 0 }, { "from_id": 1, "to_id": 7, "distance": 0 }, { "from_id": 1, "to_id": 8, "distance": 0 }, { "from_id": 1, "to_id": 9, "distance": 0 }, { "from_id": 1, "to_id": 10, "distance": 0 }, { "from_id": 2, "to_id": 0, "distance": 0 }, { "from_id": 2, "to_id": 1, "distance": 0 }, { "from_id": 2, "to_id": 3, "distance": 0 }, { "from_id": 2, "to_id": 4, "distance": 0 }, { "from_id": 2, "to_id": 5, "distance": 0 }, { "from_id": 2, "to_id": 6, "distance": 0 }, { "from_id": 2, "to_id": 7, "distance": 0 }, { "from_id": 2, "to_id": 8, "distance": 0 }, { "from_id": 2, "to_id": 9, "distance": 0 }, { "from_id": 2, "to_id": 10, "distance": 0 }, { "from_id": 3, "to_id": 0, "distance": 0 }, { "from_id": 3, "to_id": 1, "distance": 0 }, { "from_id": 3, "to_id": 2, "distance": 0 }, { "from_id": 3, "to_id": 4, "distance": 0 }, { "from_id": 3, "to_id": 5, "distance": 0 }, { "from_id": 3, "to_id": 6, "distance": 0 }, { "from_id": 3, "to_id": 7, "distance": 0 }, { "from_id": 3, "to_id": 8, "distance": 0 }, { "from_id": 3, "to_id": 9, "distance": 0 }, { "from_id": 3, "to_id": 10, "distance": 0 }, { "from_id": 4, "to_id": 0, "distance": 0 }, { "from_id": 4, "to_id": 1, "distance": 74 }, { "from_id": 4, "to_id": 2, "distance": 0 }, { "from_id": 4, "to_id": 3, "distance": 0 }, { "from_id": 4, "to_id": 5, "distance": 0 }, { "from_id": 4, "to_id": 6, "distance": 1 }, { "from_id": 4, "to_id": 7, "distance": 0 }, { "from_id": 4, "to_id": 8, "distance": 0 }, { "from_id": 4, "to_id": 9, "distance": 0 }, { "from_id": 4, "to_id": 10, "distance": 0 }, { "from_id": 5, "to_id": 0, "distance": 0 }, { "from_id": 5, "to_id": 1, "distance": 20 }, { "from_id": 5, "to_id": 2, "distance": 0 }, { "from_id": 5, "to_id": 3, "distance": 0 }, { "from_id": 5, "to_id": 4, "distance": 0 }, { "from_id": 5, "to_id": 6, "distance": 0 }, { "from_id": 5, "to_id": 7, "distance": 65 }, { "from_id": 5, "to_id": 8, "distance": 0 }, { "from_id": 5, "to_id": 9, "distance": 0 }, { "from_id": 5, "to_id": 10, "distance": 0 }, { "from_id": 6, "to_id": 0, "distance": 0 }, { "from_id": 6, "to_id": 1, "distance": 0 }, { "from_id": 6, "to_id": 2, "distance": 0 }, { "from_id": 6, "to_id": 3, "distance": 0 }, { "from_id": 6, "to_id": 4, "distance": 1 }, { "from_id": 6, "to_id": 5, "distance": 0 }, { "from_id": 6, "to_id": 7, "distance": 0 }, { "from_id": 6, "to_id": 8, "distance": 0 }, { "from_id": 6, "to_id": 9, "distance": 0 }, { "from_id": 6, "to_id": 10, "distance": 0 }, { "from_id": 7, "to_id": 0, "distance": 0 }, { "from_id": 7, "to_id": 1, "distance": 0 }, { "from_id": 7, "to_id": 2, "distance": 0 }, { "from_id": 7, "to_id": 3, "distance": 0 }, { "from_id": 7, "to_id": 4, "distance": 0 }, { "from_id": 7, "to_id": 5, "distance": 65 }, { "from_id": 7, "to_id": 6, "distance": 0 }, { "from_id": 7, "to_id": 8, "distance": 0 }, { "from_id": 7, "to_id": 9, "distance": 0 }, { "from_id": 7, "to_id": 10, "distance": 0 }, { "from_id": 8, "to_id": 0, "distance": 0 }, { "from_id": 8, "to_id": 1, "distance": 0 }, { "from_id": 8, "to_id": 2, "distance": 0 }, { "from_id": 8, "to_id": 3, "distance": 0 }, { "from_id": 8, "to_id": 4, "distance": 0 }, { "from_id": 8, "to_id": 5, "distance": 0 }, { "from_id": 8, "to_id": 6, "distance": 0 }, { "from_id": 8, "to_id": 7, "distance": 0 }, { "from_id": 8, "to_id": 9, "distance": 0 }, { "from_id": 8, "to_id": 10, "distance": 0 }, { "from_id": 9, "to_id": 0, "distance": 0 }, { "from_id": 9, "to_id": 1, "distance": 0 }, { "from_id": 9, "to_id": 2, "distance": 0 }, { "from_id": 9, "to_id": 3, "distance": 0 }, { "from_id": 9, "to_id": 4, "distance": 0 }, { "from_id": 9, "to_id": 5, "distance": 0 }, { "from_id": 9, "to_id": 6, "distance": 0 }, { "from_id": 9, "to_id": 7, "distance": 0 }, { "from_id": 9, "to_id": 8, "distance": 0 }, { "from_id": 9, "to_id": 10, "distance": 0 }, { "from_id": 10, "to_id": 0, "distance": 0 }, { "from_id": 10, "to_id": 1, "distance": 0 }, { "from_id": 10, "to_id": 2, "distance": 0 }, { "from_id": 10, "to_id": 3, "distance": 0 }, { "from_id": 10, "to_id": 4, "distance": 0 }, { "from_id": 10, "to_id": 5, "distance": 0 }, { "from_id": 10, "to_id": 6, "distance": 0 }, { "from_id": 10, "to_id": 7, "distance": 0 }, { "from_id": 10, "to_id": 8, "distance": 0 }, { "from_id": 10, "to_id": 9, "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 16 }, { "from_id": "F1", "to_id": "F3", "flow": 71 }, { "from_id": "F1", "to_id": "F4", "flow": 23 }, { "from_id": "F1", "to_id": "F5", "flow": 14 }, { "from_id": "F1", "to_id": "F6", "flow": 76 }, { "from_id": "F1", "to_id": "F7", "flow": 85 }, { "from_id": "F1", "to_id": "F8", "flow": 12 }, { "from_id": "F1", "to_id": "F9", "flow": 70 }, { "from_id": "F1", "to_id": "F10", "flow": 17 }, { "from_id": "F1", "to_id": "F11", "flow": 77 }, { "from_id": "F2", "to_id": "F1", "flow": 16 }, { "from_id": "F2", "to_id": "F3", "flow": 12 }, { "from_id": "F2", "to_id": "F4", "flow": 28 }, { "from_id": "F2", "to_id": "F5", "flow": 74 }, { "from_id": "F2", "to_id": "F6", "flow": 40 }, { "from_id": "F2", "to_id": "F7", "flow": 12 }, { "from_id": "F2", "to_id": "F8", "flow": 86 }, { "from_id": "F2", "to_id": "F9", "flow": 86 }, { "from_id": "F2", "to_id": "F10", "flow": 55 }, { "from_id": "F2", "to_id": "F11", "flow": 36 }, { "from_id": "F3", "to_id": "F1", "flow": 71 }, { "from_id": "F3", "to_id": "F2", "flow": 12 }, { "from_id": "F3", "to_id": "F4", "flow": 91 }, { "from_id": "F3", "to_id": "F5", "flow": 47 }, { "from_id": "F3", "to_id": "F6", "flow": 1 }, { "from_id": "F3", "to_id": "F7", "flow": 66 }, { "from_id": "F3", "to_id": "F8", "flow": 60 }, { "from_id": "F3", "to_id": "F9", "flow": 62 }, { "from_id": "F3", "to_id": "F10", "flow": 58 }, { "from_id": "F3", "to_id": "F11", "flow": 63 }, { "from_id": "F4", "to_id": "F1", "flow": 23 }, { "from_id": "F4", "to_id": "F2", "flow": 28 }, { "from_id": "F4", "to_id": "F3", "flow": 91 }, { "from_id": "F4", "to_id": "F5", "flow": 84 }, { "from_id": "F4", "to_id": "F6", "flow": 64 }, { "from_id": "F4", "to_id": "F7", "flow": 61 }, { "from_id": "F4", "to_id": "F8", "flow": 45 }, { "from_id": "F4", "to_id": "F9", "flow": 19 }, { "from_id": "F4", "to_id": "F10", "flow": 77 }, { "from_id": "F4", "to_id": "F11", "flow": 13 }, { "from_id": "F5", "to_id": "F1", "flow": 14 }, { "from_id": "F5", "to_id": "F2", "flow": 74 }, { "from_id": "F5", "to_id": "F3", "flow": 47 }, { "from_id": "F5", "to_id": "F4", "flow": 84 }, { "from_id": "F5", "to_id": "F6", "flow": 36 }, { "from_id": "F5", "to_id": "F7", "flow": 68 }, { "from_id": "F5", "to_id": "F8", "flow": 61 }, { "from_id": "F5", "to_id": "F9", "flow": 11 }, { "from_id": "F5", "to_id": "F10", "flow": 26 }, { "from_id": "F5", "to_id": "F11", "flow": 19 }, { "from_id": "F6", "to_id": "F1", "flow": 76 }, { "from_id": "F6", "to_id": "F2", "flow": 40 }, { "from_id": "F6", "to_id": "F3", "flow": 1 }, { "from_id": "F6", "to_id": "F4", "flow": 64 }, { "from_id": "F6", "to_id": "F5", "flow": 36 }, { "from_id": "F6", "to_id": "F7", "flow": 32 }, { "from_id": "F6", "to_id": "F8", "flow": 36 }, { "from_id": "F6", "to_id": "F9", "flow": 48 }, { "from_id": "F6", "to_id": "F10", "flow": 96 }, { "from_id": "F6", "to_id": "F11", "flow": 29 }, { "from_id": "F7", "to_id": "F1", "flow": 85 }, { "from_id": "F7", "to_id": "F2", "flow": 12 }, { "from_id": "F7", "to_id": "F3", "flow": 66 }, { "from_id": "F7", "to_id": "F4", "flow": 61 }, { "from_id": "F7", "to_id": "F5", "flow": 68 }, { "from_id": "F7", "to_id": "F6", "flow": 32 }, { "from_id": "F7", "to_id": "F8", "flow": 43 }, { "from_id": "F7", "to_id": "F9", "flow": 95 }, { "from_id": "F7", "to_id": "F10", "flow": 83 }, { "from_id": "F7", "to_id": "F11", "flow": 50 }, { "from_id": "F8", "to_id": "F1", "flow": 12 }, { "from_id": "F8", "to_id": "F2", "flow": 86 }, { "from_id": "F8", "to_id": "F3", "flow": 60 }, { "from_id": "F8", "to_id": "F4", "flow": 45 }, { "from_id": "F8", "to_id": "F5", "flow": 61 }, { "from_id": "F8", "to_id": "F6", "flow": 36 }, { "from_id": "F8", "to_id": "F7", "flow": 43 }, { "from_id": "F8", "to_id": "F9", "flow": 74 }, { "from_id": "F8", "to_id": "F10", "flow": 36 }, { "from_id": "F8", "to_id": "F11", "flow": 23 }, { "from_id": "F9", "to_id": "F1", "flow": 70 }, { "from_id": "F9", "to_id": "F2", "flow": 86 }, { "from_id": "F9", "to_id": "F3", "flow": 62 }, { "from_id": "F9", "to_id": "F4", "flow": 19 }, { "from_id": "F9", "to_id": "F5", "flow": 11 }, { "from_id": "F9", "to_id": "F6", "flow": 48 }, { "from_id": "F9", "to_id": "F7", "flow": 95 }, { "from_id": "F9", "to_id": "F8", "flow": 74 }, { "from_id": "F9", "to_id": "F10", "flow": 17 }, { "from_id": "F9", "to_id": "F11", "flow": 80 }, { "from_id": "F10", "to_id": "F1", "flow": 17 }, { "from_id": "F10", "to_id": "F2", "flow": 55 }, { "from_id": "F10", "to_id": "F3", "flow": 58 }, { "from_id": "F10", "to_id": "F4", "flow": 77 }, { "from_id": "F10", "to_id": "F5", "flow": 26 }, { "from_id": "F10", "to_id": "F6", "flow": 96 }, { "from_id": "F10", "to_id": "F7", "flow": 83 }, { "from_id": "F10", "to_id": "F8", "flow": 36 }, { "from_id": "F10", "to_id": "F9", "flow": 17 }, { "from_id": "F10", "to_id": "F11", "flow": 49 }, { "from_id": "F11", "to_id": "F1", "flow": 77 }, { "from_id": "F11", "to_id": "F2", "flow": 36 }, { "from_id": "F11", "to_id": "F3", "flow": 63 }, { "from_id": "F11", "to_id": "F4", "flow": 13 }, { "from_id": "F11", "to_id": "F5", "flow": 19 }, { "from_id": "F11", "to_id": "F6", "flow": 29 }, { "from_id": "F11", "to_id": "F7", "flow": 50 }, { "from_id": "F11", "to_id": "F8", "flow": 23 }, { "from_id": "F11", "to_id": "F9", "flow": 80 }, { "from_id": "F11", "to_id": "F10", "flow": 49 } ] }, "solution_variant": [ 8, 5, 1, 0, 2, 4, 7, 10, 3, 9, 6 ], "context_index": 7, "input_format": "nl", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "A conductor’s little challenge: seat each player at one unique stand with no duplicates or empty spots. Then, for every pair of instruments, take how often they play together and multiply it by how far apart their stands are — sum those values across all pairs to see how good the seating is; the smaller the total, the more cohesive the layout. The exact interaction counts and stand distances are listed below.\n\nBelow are the 12 musicians (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12) and the 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 stands.\nStand 0 to stand 1: 70 meters apart.\nStand 0 to stand 2: 92 meters apart.\nStand 0 to stand 3: 68 meters apart.\nStand 0 to stand 4: 77 meters apart.\nStand 0 to stand 5: 27 meters apart.\nStand 0 to stand 6: 44 meters apart.\nStand 0 to stand 7: 81 meters apart.\nStand 0 to stand 8: 955 meters apart.\nStand 0 to stand 9: 648 meters apart.\nStand 0 to stand 10: 718 meters apart.\nStand 0 to stand 11: 727 meters apart.\nStand 1 to stand 0: 70 meters apart.\nStand 1 to stand 2: 25 meters apart.\nStand 1 to stand 3: 64 meters apart.\nStand 1 to stand 4: 15 meters apart.\nStand 1 to stand 5: 55 meters apart.\nStand 1 to stand 6: 26 meters apart.\nStand 1 to stand 7: 57 meters apart.\nStand 1 to stand 8: 970 meters apart.\nStand 1 to stand 9: 687 meters apart.\nStand 1 to stand 10: 747 meters apart.\nStand 1 to stand 11: 758 meters apart.\nStand 2 to stand 0: 92 meters apart.\nStand 2 to stand 1: 25 meters apart.\nStand 2 to stand 3: 87 meters apart.\nStand 2 to stand 4: 15 meters apart.\nStand 2 to stand 5: 72 meters apart.\nStand 2 to stand 6: 47 meters apart.\nStand 2 to stand 7: 78 meters apart.\nStand 2 to stand 8: 989 meters apart.\nStand 2 to stand 9: 711 meters apart.\nStand 2 to stand 10: 770 meters apart.\nStand 2 to stand 11: 781 meters apart.\nStand 3 to stand 0: 68 meters apart.\nStand 3 to stand 1: 64 meters apart.\nStand 3 to stand 2: 87 meters apart.\nStand 3 to stand 4: 79 meters apart.\nStand 3 to stand 5: 78 meters apart.\nStand 3 to stand 6: 60 meters apart.\nStand 3 to stand 7: 20 meters apart.\nStand 3 to stand 8: 908 meters apart.\nStand 3 to stand 9: 623 meters apart.\nStand 3 to stand 10: 683 meters apart.\nStand 3 to stand 11: 695 meters apart.\nStand 4 to stand 0: 77 meters apart.\nStand 4 to stand 1: 15 meters apart.\nStand 4 to stand 2: 15 meters apart.\nStand 4 to stand 3: 79 meters apart.\nStand 4 to stand 5: 57 meters apart.\nStand 4 to stand 6: 33 meters apart.\nStand 4 to stand 7: 72 meters apart.\nStand 4 to stand 8: 985 meters apart.\nStand 4 to stand 9: 701 meters apart.\nStand 4 to stand 10: 762 meters apart.\nStand 4 to stand 11: 773 meters apart.\nStand 5 to stand 0: 27 meters apart.\nStand 5 to stand 1: 55 meters apart.\nStand 5 to stand 2: 72 meters apart.\nStand 5 to stand 3: 78 meters apart.\nStand 5 to stand 4: 57 meters apart.\nStand 5 to stand 6: 30 meters apart.\nStand 5 to stand 7: 85 meters apart.\nStand 5 to stand 8: 977 meters apart.\nStand 5 to stand 9: 674 meters apart.\nStand 5 to stand 10: 743 meters apart.\nStand 5 to stand 11: 752 meters apart.\nStand 6 to stand 0: 44 meters apart.\nStand 6 to stand 1: 26 meters apart.\nStand 6 to stand 2: 47 meters apart.\nStand 6 to stand 3: 60 meters apart.\nStand 6 to stand 4: 33 meters apart.\nStand 6 to stand 5: 30 meters apart.\nStand 6 to stand 7: 62 meters apart.\nStand 6 to stand 8: 968 meters apart.\nStand 6 to stand 9: 676 meters apart.\nStand 6 to stand 10: 740 meters apart.\nStand 6 to stand 11: 750 meters apart.\nStand 7 to stand 0: 81 meters apart.\nStand 7 to stand 1: 57 meters apart.\nStand 7 to stand 2: 78 meters apart.\nStand 7 to stand 3: 20 meters apart.\nStand 7 to stand 4: 72 meters apart.\nStand 7 to stand 5: 85 meters apart.\nStand 7 to stand 6: 62 meters apart.\nStand 7 to stand 8: 912 meters apart.\nStand 7 to stand 9: 634 meters apart.\nStand 7 to stand 10: 692 meters apart.\nStand 7 to stand 11: 704 meters apart.\nStand 8 to stand 0: 955 meters apart.\nStand 8 to stand 1: 970 meters apart.\nStand 8 to stand 2: 989 meters apart.\nStand 8 to stand 3: 908 meters apart.\nStand 8 to stand 4: 985 meters apart.\nStand 8 to stand 5: 977 meters apart.\nStand 8 to stand 6: 968 meters apart.\nStand 8 to stand 7: 912 meters apart.\nStand 8 to stand 9: 413 meters apart.\nStand 8 to stand 10: 290 meters apart.\nStand 8 to stand 11: 303 meters apart.\nStand 9 to stand 0: 648 meters apart.\nStand 9 to stand 1: 687 meters apart.\nStand 9 to stand 2: 711 meters apart.\nStand 9 to stand 3: 623 meters apart.\nStand 9 to stand 4: 701 meters apart.\nStand 9 to stand 5: 674 meters apart.\nStand 9 to stand 6: 676 meters apart.\nStand 9 to stand 7: 634 meters apart.\nStand 9 to stand 8: 413 meters apart.\nStand 9 to stand 10: 124 meters apart.\nStand 9 to stand 11: 111 meters apart.\nStand 10 to stand 0: 718 meters apart.\nStand 10 to stand 1: 747 meters apart.\nStand 10 to stand 2: 770 meters apart.\nStand 10 to stand 3: 683 meters apart.\nStand 10 to stand 4: 762 meters apart.\nStand 10 to stand 5: 743 meters apart.\nStand 10 to stand 6: 740 meters apart.\nStand 10 to stand 7: 692 meters apart.\nStand 10 to stand 8: 290 meters apart.\nStand 10 to stand 9: 124 meters apart.\nStand 10 to stand 11: 29 meters apart.\nStand 11 to stand 0: 727 meters apart.\nStand 11 to stand 1: 758 meters apart.\nStand 11 to stand 2: 781 meters apart.\nStand 11 to stand 3: 695 meters apart.\nStand 11 to stand 4: 773 meters apart.\nStand 11 to stand 5: 752 meters apart.\nStand 11 to stand 6: 750 meters apart.\nStand 11 to stand 7: 704 meters apart.\nStand 11 to stand 8: 303 meters apart.\nStand 11 to stand 9: 111 meters apart.\nStand 11 to stand 10: 29 meters apart.\nMusician F1 to musician F2: play together 5 times.\nMusician F1 to musician F3: play together 589 times.\nMusician F1 to musician F4: play together 7 times.\nMusician F1 to musician F5: play together 0 times.\nMusician F1 to musician F6: play together 406 times.\nMusician F1 to musician F7: play together 7280 times.\nMusician F1 to musician F8: play together 11 times.\nMusician F1 to musician F9: play together 35750 times.\nMusician F1 to musician F10: play together 0 times.\nMusician F1 to musician F11: play together 12 times.\nMusician F1 to musician F12: play together 0 times.\nMusician F2 to musician F1: play together 0 times.\nMusician F2 to musician F3: play together 9687 times.\nMusician F2 to musician F4: play together 31 times.\nMusician F2 to musician F5: play together 0 times.\nMusician F2 to musician F6: play together 1 times.\nMusician F2 to musician F7: play together 116 times.\nMusician F2 to musician F8: play together 0 times.\nMusician F2 to musician F9: play together 0 times.\nMusician F2 to musician F10: play together 0 times.\nMusician F2 to musician F11: play together 0 times.\nMusician F2 to musician F12: play together 0 times.\nMusician F3 to musician F1: play together 3 times.\nMusician F3 to musician F2: play together 87 times.\nMusician F3 to musician F4: play together 0 times.\nMusician F3 to musician F5: play together 0 times.\nMusician F3 to musician F6: play together 2862 times.\nMusician F3 to musician F7: play together 0 times.\nMusician F3 to musician F8: play together 3839 times.\nMusician F3 to musician F9: play together 53531 times.\nMusician F3 to musician F10: play together 0 times.\nMusician F3 to musician F11: play together 0 times.\nMusician F3 to musician F12: play together 0 times.\nMusician F4 to musician F1: play together 31 times.\nMusician F4 to musician F2: play together 0 times.\nMusician F4 to musician F3: play together 1 times.\nMusician F4 to musician F5: play together 0 times.\nMusician F4 to musician F6: play together 0 times.\nMusician F4 to musician F7: play together 0 times.\nMusician F4 to musician F8: play together 19 times.\nMusician F4 to musician F9: play together 270 times.\nMusician F4 to musician F10: play together 0 times.\nMusician F4 to musician F11: play together 2 times.\nMusician F4 to musician F12: play together 0 times.\nMusician F5 to musician F1: play together 27831 times.\nMusician F5 to musician F2: play together 3362 times.\nMusician F5 to musician F3: play together 0 times.\nMusician F5 to musician F4: play together 5 times.\nMusician F5 to musician F6: play together 7 times.\nMusician F5 to musician F7: play together 46004 times.\nMusician F5 to musician F8: play together 0 times.\nMusician F5 to musician F9: play together 0 times.\nMusician F5 to musician F10: play together 1610 times.\nMusician F5 to musician F11: play together 283 times.\nMusician F5 to musician F12: play together 7437 times.\nMusician F6 to musician F1: play together 359 times.\nMusician F6 to musician F2: play together 0 times.\nMusician F6 to musician F3: play together 1126 times.\nMusician F6 to musician F4: play together 0 times.\nMusician F6 to musician F5: play together 1066 times.\nMusician F6 to musician F7: play together 69 times.\nMusician F6 to musician F8: play together 0 times.\nMusician F6 to musician F9: play together 0 times.\nMusician F6 to musician F10: play together 0 times.\nMusician F6 to musician F11: play together 9364 times.\nMusician F6 to musician F12: play together 0 times.\nMusician F7 to musician F1: play together 22 times.\nMusician F7 to musician F2: play together 19781 times.\nMusician F7 to musician F3: play together 16 times.\nMusician F7 to musician F4: play together 0 times.\nMusician F7 to musician F5: play together 183 times.\nMusician F7 to musician F6: play together 93 times.\nMusician F7 to musician F8: play together 2314 times.\nMusician F7 to musician F9: play together 0 times.\nMusician F7 to musician F10: play together 0 times.\nMusician F7 to musician F11: play together 5 times.\nMusician F7 to musician F12: play together 0 times.\nMusician F8 to musician F1: play together 24 times.\nMusician F8 to musician F2: play together 10350 times.\nMusician F8 to musician F3: play together 0 times.\nMusician F8 to musician F4: play together 5492 times.\nMusician F8 to musician F5: play together 0 times.\nMusician F8 to musician F6: play together 29671 times.\nMusician F8 to musician F7: play together 0 times.\nMusician F8 to musician F9: play together 27718 times.\nMusician F8 to musician F10: play together 0 times.\nMusician F8 to musician F11: play together 5176 times.\nMusician F8 to musician F12: play together 6 times.\nMusician F9 to musician F1: play together 54696 times.\nMusician F9 to musician F2: play together 14 times.\nMusician F9 to musician F3: play together 37455 times.\nMusician F9 to musician F4: play together 0 times.\nMusician F9 to musician F5: play together 2137 times.\nMusician F9 to musician F6: play together 0 times.\nMusician F9 to musician F7: play together 0 times.\nMusician F9 to musician F8: play together 0 times.\nMusician F9 to musician F10: play together 8144 times.\nMusician F9 to musician F11: play together 0 times.\nMusician F9 to musician F12: play together 0 times.\nMusician F10 to musician F1: play together 0 times.\nMusician F10 to musician F2: play together 0 times.\nMusician F10 to musician F3: play together 0 times.\nMusician F10 to musician F4: play together 0 times.\nMusician F10 to musician F5: play together 0 times.\nMusician F10 to musician F6: play together 0 times.\nMusician F10 to musician F7: play together 1 times.\nMusician F10 to musician F8: play together 1652 times.\nMusician F10 to musician F9: play together 2 times.\nMusician F10 to musician F11: play together 0 times.\nMusician F10 to musician F12: play together 6 times.\nMusician F11 to musician F1: play together 0 times.\nMusician F11 to musician F2: play together 0 times.\nMusician F11 to musician F3: play together 1 times.\nMusician F11 to musician F4: play together 6 times.\nMusician F11 to musician F5: play together 16242 times.\nMusician F11 to musician F6: play together 30978 times.\nMusician F11 to musician F7: play together 17 times.\nMusician F11 to musician F8: play together 0 times.\nMusician F11 to musician F9: play together 15 times.\nMusician F11 to musician F10: play together 21 times.\nMusician F11 to musician F12: play together 0 times.\nMusician F12 to musician F1: play together 0 times.\nMusician F12 to musician F2: play together 0 times.\nMusician F12 to musician F3: play together 0 times.\nMusician F12 to musician F4: play together 33 times.\nMusician F12 to musician F5: play together 2 times.\nMusician F12 to musician F6: play together 917 times.\nMusician F12 to musician F7: play together 0 times.\nMusician F12 to musician F8: play together 21429 times.\nMusician F12 to musician F9: play together 0 times.\nMusician F12 to musician F10: play together 0 times.\nMusician F12 to musician F11: play together 20865 times.\nAim for the smallest total so the ensemble sounds most cohesive.\n\nOh, and if you want to hand the seating back to me in a neat, predictable shape, just use this little JSON sketch:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThe \"solution\" array is simply the list of seat IDs in order — the first entry is the seat for the first musician, the second entry for the second musician, and so on. Think of it like filling out a short form: one seat per musician, in order. This is just the expected shape, not the actual seating answer.\n\nPlease be sure to use the exact identifiers from the instance input — don't rename them or invent new ones. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 70, 92, 68, 77, 27, 44, 81, 955, 648, 718, 727 ], [ 70, 0, 25, 64, 15, 55, 26, 57, 970, 687, 747, 758 ], [ 92, 25, 0, 87, 15, 72, 47, 78, 989, 711, 770, 781 ], [ 68, 64, 87, 0, 79, 78, 60, 20, 908, 623, 683, 695 ], [ 77, 15, 15, 79, 0, 57, 33, 72, 985, 701, 762, 773 ], [ 27, 55, 72, 78, 57, 0, 30, 85, 977, 674, 743, 752 ], [ 44, 26, 47, 60, 33, 30, 0, 62, 968, 676, 740, 750 ], [ 81, 57, 78, 20, 72, 85, 62, 0, 912, 634, 692, 704 ], [ 955, 970, 989, 908, 985, 977, 968, 912, 0, 413, 290, 303 ], [ 648, 687, 711, 623, 701, 674, 676, 634, 413, 0, 124, 111 ], [ 718, 747, 770, 683, 762, 743, 740, 692, 290, 124, 0, 29 ], [ 727, 758, 781, 695, 773, 752, 750, 704, 303, 111, 29, 0 ] ], "flow_matrix": [ [ 0, 5, 589, 7, 0, 406, 7280, 11, 35750, 0, 12, 0 ], [ 0, 0, 9687, 31, 0, 1, 116, 0, 0, 0, 0, 0 ], [ 3, 87, 0, 0, 0, 2862, 0, 3839, 53531, 0, 0, 0 ], [ 31, 0, 1, 0, 0, 0, 0, 19, 270, 0, 2, 0 ], [ 27831, 3362, 0, 5, 0, 7, 46004, 0, 0, 1610, 283, 7437 ], [ 359, 0, 1126, 0, 1066, 0, 69, 0, 0, 0, 9364, 0 ], [ 22, 19781, 16, 0, 183, 93, 0, 2314, 0, 0, 5, 0 ], [ 24, 10350, 0, 5492, 0, 29671, 0, 0, 27718, 0, 5176, 6 ], [ 54696, 14, 37455, 0, 2137, 0, 0, 0, 0, 8144, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 1, 1652, 2, 0, 0, 6 ], [ 0, 0, 1, 6, 16242, 30978, 17, 0, 15, 21, 0, 0 ], [ 0, 0, 0, 33, 2, 917, 0, 21429, 0, 0, 20865, 0 ] ], "objective": 79245247.0 }, "solution": [ 1, 0, 2, 8, 6, 10, 5, 3, 4, 7, 11, 9 ], "obj": 79245247.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 12, "num_locations": 12, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 70 }, { "from_id": 0, "to_id": 2, "distance": 92 }, { "from_id": 0, "to_id": 3, "distance": 68 }, { "from_id": 0, "to_id": 4, "distance": 77 }, { "from_id": 0, "to_id": 5, "distance": 27 }, { "from_id": 0, "to_id": 6, "distance": 44 }, { "from_id": 0, "to_id": 7, "distance": 81 }, { "from_id": 0, "to_id": 8, "distance": 955 }, { "from_id": 0, "to_id": 9, "distance": 648 }, { "from_id": 0, "to_id": 10, "distance": 718 }, { "from_id": 0, "to_id": 11, "distance": 727 }, { "from_id": 1, "to_id": 0, "distance": 70 }, { "from_id": 1, "to_id": 2, "distance": 25 }, { "from_id": 1, "to_id": 3, "distance": 64 }, { "from_id": 1, "to_id": 4, "distance": 15 }, { "from_id": 1, "to_id": 5, "distance": 55 }, { "from_id": 1, "to_id": 6, "distance": 26 }, { "from_id": 1, "to_id": 7, "distance": 57 }, { "from_id": 1, "to_id": 8, "distance": 970 }, { "from_id": 1, "to_id": 9, "distance": 687 }, { "from_id": 1, "to_id": 10, "distance": 747 }, { "from_id": 1, "to_id": 11, "distance": 758 }, { "from_id": 2, "to_id": 0, "distance": 92 }, { "from_id": 2, "to_id": 1, "distance": 25 }, { "from_id": 2, "to_id": 3, "distance": 87 }, { "from_id": 2, "to_id": 4, "distance": 15 }, { "from_id": 2, "to_id": 5, "distance": 72 }, { "from_id": 2, "to_id": 6, "distance": 47 }, { "from_id": 2, "to_id": 7, "distance": 78 }, { "from_id": 2, "to_id": 8, "distance": 989 }, { "from_id": 2, "to_id": 9, "distance": 711 }, { "from_id": 2, "to_id": 10, "distance": 770 }, { "from_id": 2, "to_id": 11, "distance": 781 }, { "from_id": 3, "to_id": 0, "distance": 68 }, { "from_id": 3, "to_id": 1, "distance": 64 }, { "from_id": 3, "to_id": 2, "distance": 87 }, { "from_id": 3, "to_id": 4, "distance": 79 }, { "from_id": 3, "to_id": 5, "distance": 78 }, { "from_id": 3, "to_id": 6, "distance": 60 }, { "from_id": 3, "to_id": 7, "distance": 20 }, { "from_id": 3, "to_id": 8, "distance": 908 }, { "from_id": 3, "to_id": 9, "distance": 623 }, { "from_id": 3, "to_id": 10, "distance": 683 }, { "from_id": 3, "to_id": 11, "distance": 695 }, { "from_id": 4, "to_id": 0, "distance": 77 }, { "from_id": 4, "to_id": 1, "distance": 15 }, { "from_id": 4, "to_id": 2, "distance": 15 }, { "from_id": 4, "to_id": 3, "distance": 79 }, { "from_id": 4, "to_id": 5, "distance": 57 }, { "from_id": 4, "to_id": 6, "distance": 33 }, { "from_id": 4, "to_id": 7, "distance": 72 }, { "from_id": 4, "to_id": 8, "distance": 985 }, { "from_id": 4, "to_id": 9, "distance": 701 }, { "from_id": 4, "to_id": 10, "distance": 762 }, { "from_id": 4, "to_id": 11, "distance": 773 }, { "from_id": 5, "to_id": 0, "distance": 27 }, { "from_id": 5, "to_id": 1, "distance": 55 }, { "from_id": 5, "to_id": 2, "distance": 72 }, { "from_id": 5, "to_id": 3, "distance": 78 }, { "from_id": 5, "to_id": 4, "distance": 57 }, { "from_id": 5, "to_id": 6, "distance": 30 }, { "from_id": 5, "to_id": 7, "distance": 85 }, { "from_id": 5, "to_id": 8, "distance": 977 }, { "from_id": 5, "to_id": 9, "distance": 674 }, { "from_id": 5, "to_id": 10, "distance": 743 }, { "from_id": 5, "to_id": 11, "distance": 752 }, { "from_id": 6, "to_id": 0, "distance": 44 }, { "from_id": 6, "to_id": 1, "distance": 26 }, { "from_id": 6, "to_id": 2, "distance": 47 }, { "from_id": 6, "to_id": 3, "distance": 60 }, { "from_id": 6, "to_id": 4, "distance": 33 }, { "from_id": 6, "to_id": 5, "distance": 30 }, { "from_id": 6, "to_id": 7, "distance": 62 }, { "from_id": 6, "to_id": 8, "distance": 968 }, { "from_id": 6, "to_id": 9, "distance": 676 }, { "from_id": 6, "to_id": 10, "distance": 740 }, { "from_id": 6, "to_id": 11, "distance": 750 }, { "from_id": 7, "to_id": 0, "distance": 81 }, { "from_id": 7, "to_id": 1, "distance": 57 }, { "from_id": 7, "to_id": 2, "distance": 78 }, { "from_id": 7, "to_id": 3, "distance": 20 }, { "from_id": 7, "to_id": 4, "distance": 72 }, { "from_id": 7, "to_id": 5, "distance": 85 }, { "from_id": 7, "to_id": 6, "distance": 62 }, { "from_id": 7, "to_id": 8, "distance": 912 }, { "from_id": 7, "to_id": 9, "distance": 634 }, { "from_id": 7, "to_id": 10, "distance": 692 }, { "from_id": 7, "to_id": 11, "distance": 704 }, { "from_id": 8, "to_id": 0, "distance": 955 }, { "from_id": 8, "to_id": 1, "distance": 970 }, { "from_id": 8, "to_id": 2, "distance": 989 }, { "from_id": 8, "to_id": 3, "distance": 908 }, { "from_id": 8, "to_id": 4, "distance": 985 }, { "from_id": 8, "to_id": 5, "distance": 977 }, { "from_id": 8, "to_id": 6, "distance": 968 }, { "from_id": 8, "to_id": 7, "distance": 912 }, { "from_id": 8, "to_id": 9, "distance": 413 }, { "from_id": 8, "to_id": 10, "distance": 290 }, { "from_id": 8, "to_id": 11, "distance": 303 }, { "from_id": 9, "to_id": 0, "distance": 648 }, { "from_id": 9, "to_id": 1, "distance": 687 }, { "from_id": 9, "to_id": 2, "distance": 711 }, { "from_id": 9, "to_id": 3, "distance": 623 }, { "from_id": 9, "to_id": 4, "distance": 701 }, { "from_id": 9, "to_id": 5, "distance": 674 }, { "from_id": 9, "to_id": 6, "distance": 676 }, { "from_id": 9, "to_id": 7, "distance": 634 }, { "from_id": 9, "to_id": 8, "distance": 413 }, { "from_id": 9, "to_id": 10, "distance": 124 }, { "from_id": 9, "to_id": 11, "distance": 111 }, { "from_id": 10, "to_id": 0, "distance": 718 }, { "from_id": 10, "to_id": 1, "distance": 747 }, { "from_id": 10, "to_id": 2, "distance": 770 }, { "from_id": 10, "to_id": 3, "distance": 683 }, { "from_id": 10, "to_id": 4, "distance": 762 }, { "from_id": 10, "to_id": 5, "distance": 743 }, { "from_id": 10, "to_id": 6, "distance": 740 }, { "from_id": 10, "to_id": 7, "distance": 692 }, { "from_id": 10, "to_id": 8, "distance": 290 }, { "from_id": 10, "to_id": 9, "distance": 124 }, { "from_id": 10, "to_id": 11, "distance": 29 }, { "from_id": 11, "to_id": 0, "distance": 727 }, { "from_id": 11, "to_id": 1, "distance": 758 }, { "from_id": 11, "to_id": 2, "distance": 781 }, { "from_id": 11, "to_id": 3, "distance": 695 }, { "from_id": 11, "to_id": 4, "distance": 773 }, { "from_id": 11, "to_id": 5, "distance": 752 }, { "from_id": 11, "to_id": 6, "distance": 750 }, { "from_id": 11, "to_id": 7, "distance": 704 }, { "from_id": 11, "to_id": 8, "distance": 303 }, { "from_id": 11, "to_id": 9, "distance": 111 }, { "from_id": 11, "to_id": 10, "distance": 29 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 5 }, { "from_id": "F1", "to_id": "F3", "flow": 589 }, { "from_id": "F1", "to_id": "F4", "flow": 7 }, { "from_id": "F1", "to_id": "F5", "flow": 0 }, { "from_id": "F1", "to_id": "F6", "flow": 406 }, { "from_id": "F1", "to_id": "F7", "flow": 7280 }, { "from_id": "F1", "to_id": "F8", "flow": 11 }, { "from_id": "F1", "to_id": "F9", "flow": 35750 }, { "from_id": "F1", "to_id": "F10", "flow": 0 }, { "from_id": "F1", "to_id": "F11", "flow": 12 }, { "from_id": "F1", "to_id": "F12", "flow": 0 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 9687 }, { "from_id": "F2", "to_id": "F4", "flow": 31 }, { "from_id": "F2", "to_id": "F5", "flow": 0 }, { "from_id": "F2", "to_id": "F6", "flow": 1 }, { "from_id": "F2", "to_id": "F7", "flow": 116 }, { "from_id": "F2", "to_id": "F8", "flow": 0 }, { "from_id": "F2", "to_id": "F9", "flow": 0 }, { "from_id": "F2", "to_id": "F10", "flow": 0 }, { "from_id": "F2", "to_id": "F11", "flow": 0 }, { "from_id": "F2", "to_id": "F12", "flow": 0 }, { "from_id": "F3", "to_id": "F1", "flow": 3 }, { "from_id": "F3", "to_id": "F2", "flow": 87 }, { "from_id": "F3", "to_id": "F4", "flow": 0 }, { "from_id": "F3", "to_id": "F5", "flow": 0 }, { "from_id": "F3", "to_id": "F6", "flow": 2862 }, { "from_id": "F3", "to_id": "F7", "flow": 0 }, { "from_id": "F3", "to_id": "F8", "flow": 3839 }, { "from_id": "F3", "to_id": "F9", "flow": 53531 }, { "from_id": "F3", "to_id": "F10", "flow": 0 }, { "from_id": "F3", "to_id": "F11", "flow": 0 }, { "from_id": "F3", "to_id": "F12", "flow": 0 }, { "from_id": "F4", "to_id": "F1", "flow": 31 }, { "from_id": "F4", "to_id": "F2", "flow": 0 }, { "from_id": "F4", "to_id": "F3", "flow": 1 }, { "from_id": "F4", "to_id": "F5", "flow": 0 }, { "from_id": "F4", "to_id": "F6", "flow": 0 }, { "from_id": "F4", "to_id": "F7", "flow": 0 }, { "from_id": "F4", "to_id": "F8", "flow": 19 }, { "from_id": "F4", "to_id": "F9", "flow": 270 }, { "from_id": "F4", "to_id": "F10", "flow": 0 }, { "from_id": "F4", "to_id": "F11", "flow": 2 }, { "from_id": "F4", "to_id": "F12", "flow": 0 }, { "from_id": "F5", "to_id": "F1", "flow": 27831 }, { "from_id": "F5", "to_id": "F2", "flow": 3362 }, { "from_id": "F5", "to_id": "F3", "flow": 0 }, { "from_id": "F5", "to_id": "F4", "flow": 5 }, { "from_id": "F5", "to_id": "F6", "flow": 7 }, { "from_id": "F5", "to_id": "F7", "flow": 46004 }, { "from_id": "F5", "to_id": "F8", "flow": 0 }, { "from_id": "F5", "to_id": "F9", "flow": 0 }, { "from_id": "F5", "to_id": "F10", "flow": 1610 }, { "from_id": "F5", "to_id": "F11", "flow": 283 }, { "from_id": "F5", "to_id": "F12", "flow": 7437 }, { "from_id": "F6", "to_id": "F1", "flow": 359 }, { "from_id": "F6", "to_id": "F2", "flow": 0 }, { "from_id": "F6", "to_id": "F3", "flow": 1126 }, { "from_id": "F6", "to_id": "F4", "flow": 0 }, { "from_id": "F6", "to_id": "F5", "flow": 1066 }, { "from_id": "F6", "to_id": "F7", "flow": 69 }, { "from_id": "F6", "to_id": "F8", "flow": 0 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F10", "flow": 0 }, { "from_id": "F6", "to_id": "F11", "flow": 9364 }, { "from_id": "F6", "to_id": "F12", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 22 }, { "from_id": "F7", "to_id": "F2", "flow": 19781 }, { "from_id": "F7", "to_id": "F3", "flow": 16 }, { "from_id": "F7", "to_id": "F4", "flow": 0 }, { "from_id": "F7", "to_id": "F5", "flow": 183 }, { "from_id": "F7", "to_id": "F6", "flow": 93 }, { "from_id": "F7", "to_id": "F8", "flow": 2314 }, { "from_id": "F7", "to_id": "F9", "flow": 0 }, { "from_id": "F7", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F11", "flow": 5 }, { "from_id": "F7", "to_id": "F12", "flow": 0 }, { "from_id": "F8", "to_id": "F1", "flow": 24 }, { "from_id": "F8", "to_id": "F2", "flow": 10350 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 5492 }, { "from_id": "F8", "to_id": "F5", "flow": 0 }, { "from_id": "F8", "to_id": "F6", "flow": 29671 }, { "from_id": "F8", "to_id": "F7", "flow": 0 }, { "from_id": "F8", "to_id": "F9", "flow": 27718 }, { "from_id": "F8", "to_id": "F10", "flow": 0 }, { "from_id": "F8", "to_id": "F11", "flow": 5176 }, { "from_id": "F8", "to_id": "F12", "flow": 6 }, { "from_id": "F9", "to_id": "F1", "flow": 54696 }, { "from_id": "F9", "to_id": "F2", "flow": 14 }, { "from_id": "F9", "to_id": "F3", "flow": 37455 }, { "from_id": "F9", "to_id": "F4", "flow": 0 }, { "from_id": "F9", "to_id": "F5", "flow": 2137 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 0 }, { "from_id": "F9", "to_id": "F8", "flow": 0 }, { "from_id": "F9", "to_id": "F10", "flow": 8144 }, { "from_id": "F9", "to_id": "F11", "flow": 0 }, { "from_id": "F9", "to_id": "F12", "flow": 0 }, { "from_id": "F10", "to_id": "F1", "flow": 0 }, { "from_id": "F10", "to_id": "F2", "flow": 0 }, { "from_id": "F10", "to_id": "F3", "flow": 0 }, { "from_id": "F10", "to_id": "F4", "flow": 0 }, { "from_id": "F10", "to_id": "F5", "flow": 0 }, { "from_id": "F10", "to_id": "F6", "flow": 0 }, { "from_id": "F10", "to_id": "F7", "flow": 1 }, { "from_id": "F10", "to_id": "F8", "flow": 1652 }, { "from_id": "F10", "to_id": "F9", "flow": 2 }, { "from_id": "F10", "to_id": "F11", "flow": 0 }, { "from_id": "F10", "to_id": "F12", "flow": 6 }, { "from_id": "F11", "to_id": "F1", "flow": 0 }, { "from_id": "F11", "to_id": "F2", "flow": 0 }, { "from_id": "F11", "to_id": "F3", "flow": 1 }, { "from_id": "F11", "to_id": "F4", "flow": 6 }, { "from_id": "F11", "to_id": "F5", "flow": 16242 }, { "from_id": "F11", "to_id": "F6", "flow": 30978 }, { "from_id": "F11", "to_id": "F7", "flow": 17 }, { "from_id": "F11", "to_id": "F8", "flow": 0 }, { "from_id": "F11", "to_id": "F9", "flow": 15 }, { "from_id": "F11", "to_id": "F10", "flow": 21 }, { "from_id": "F11", "to_id": "F12", "flow": 0 }, { "from_id": "F12", "to_id": "F1", "flow": 0 }, { "from_id": "F12", "to_id": "F2", "flow": 0 }, { "from_id": "F12", "to_id": "F3", "flow": 0 }, { "from_id": "F12", "to_id": "F4", "flow": 33 }, { "from_id": "F12", "to_id": "F5", "flow": 2 }, { "from_id": "F12", "to_id": "F6", "flow": 917 }, { "from_id": "F12", "to_id": "F7", "flow": 0 }, { "from_id": "F12", "to_id": "F8", "flow": 21429 }, { "from_id": "F12", "to_id": "F9", "flow": 0 }, { "from_id": "F12", "to_id": "F10", "flow": 0 }, { "from_id": "F12", "to_id": "F11", "flow": 20865 } ] }, "solution_variant": [ 1, 0, 2, 8, 6, 10, 5, 3, 4, 7, 11, 9 ], "context_index": 8, "input_format": "nl", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Someone in facilities is trying to make the workspace less awkward: everyone must have one private office and every office must be used by only one person. To judge arrangements, consider each pair of coworkers — their contribution is interaction frequency times office distance, and the sum of all those contributions is the number to keep as small as possible. The exact numbers and office map that feed into those calculations are shown below.\n\nThere are 11 employees and offices; the employees are F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11 and the offices are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.\n\n| office_source_id | office_target_id | office_distance |\n|---|---|---|\n| 1 | 2 | 5 |\n| 1 | 3 | 2 |\n| 1 | 4 | 4 |\n| 1 | 5 | 6 |\n| 1 | 6 | 10 |\n| 1 | 7 | 10 |\n| 1 | 8 | 13 |\n| 1 | 9 | 10 |\n| 1 | 10 | 11 |\n| 1 | 11 | 16 |\n| 2 | 1 | 5 |\n| 2 | 3 | 5 |\n| 2 | 4 | 3 |\n| 2 | 5 | 3 |\n| 2 | 6 | 5 |\n| 2 | 7 | 5 |\n| 2 | 8 | 8 |\n| 2 | 9 | 5 |\n| 2 | 10 | 10 |\n| 2 | 11 | 11 |\n| 3 | 1 | 2 |\n| 3 | 2 | 5 |\n| 3 | 4 | 2 |\n| 3 | 5 | 4 |\n| 3 | 6 | 8 |\n| 3 | 7 | 8 |\n| 3 | 8 | 11 |\n| 3 | 9 | 8 |\n| 3 | 10 | 9 |\n| 3 | 11 | 14 |\n| 4 | 1 | 4 |\n| 4 | 2 | 3 |\n| 4 | 3 | 2 |\n| 4 | 5 | 2 |\n| 4 | 6 | 6 |\n| 4 | 7 | 6 |\n| 4 | 8 | 9 |\n| 4 | 9 | 6 |\n| 4 | 10 | 7 |\n| 4 | 11 | 12 |\n| 5 | 1 | 6 |\n| 5 | 2 | 3 |\n| 5 | 3 | 4 |\n| 5 | 4 | 2 |\n| 5 | 6 | 4 |\n| 5 | 7 | 4 |\n| 5 | 8 | 7 |\n| 5 | 9 | 4 |\n| 5 | 10 | 7 |\n| 5 | 11 | 10 |\n| 6 | 1 | 10 |\n| 6 | 2 | 5 |\n| 6 | 3 | 8 |\n| 6 | 4 | 6 |\n| 6 | 5 | 4 |\n| 6 | 7 | 4 |\n| 6 | 8 | 3 |\n| 6 | 9 | 6 |\n| 6 | 10 | 11 |\n| 6 | 11 | 6 |\n| 7 | 1 | 10 |\n| 7 | 2 | 5 |\n| 7 | 3 | 8 |\n| 7 | 4 | 6 |\n| 7 | 5 | 4 |\n| 7 | 6 | 4 |\n| 7 | 8 | 3 |\n| 7 | 9 | 2 |\n| 7 | 10 | 7 |\n| 7 | 11 | 6 |\n| 8 | 1 | 13 |\n| 8 | 2 | 8 |\n| 8 | 3 | 11 |\n| 8 | 4 | 9 |\n| 8 | 5 | 7 |\n| 8 | 6 | 3 |\n| 8 | 7 | 3 |\n| 8 | 9 | 5 |\n| 8 | 10 | 10 |\n| 8 | 11 | 5 |\n| 9 | 1 | 10 |\n| 9 | 2 | 5 |\n| 9 | 3 | 8 |\n| 9 | 4 | 6 |\n| 9 | 5 | 4 |\n| 9 | 6 | 6 |\n| 9 | 7 | 2 |\n| 9 | 8 | 5 |\n| 9 | 10 | 5 |\n| 9 | 11 | 6 |\n| 10 | 1 | 11 |\n| 10 | 2 | 10 |\n| 10 | 3 | 9 |\n| 10 | 4 | 7 |\n| 10 | 5 | 7 |\n| 10 | 6 | 11 |\n| 10 | 7 | 7 |\n| 10 | 8 | 10 |\n| 10 | 9 | 5 |\n| 10 | 11 | 5 |\n| 11 | 1 | 16 |\n| 11 | 2 | 11 |\n| 11 | 3 | 14 |\n| 11 | 4 | 12 |\n| 11 | 5 | 10 |\n| 11 | 6 | 6 |\n| 11 | 7 | 6 |\n| 11 | 8 | 5 |\n| 11 | 9 | 6 |\n| 11 | 10 | 5 |\n\n| employee_source_id | employee_target_id | interaction_frequency |\n|---|---|---|\n| F1 | F2 | 1 |\n| F1 | F3 | 4 |\n| F1 | F4 | 2 |\n| F1 | F5 | 0 |\n| F1 | F6 | 1 |\n| F1 | F7 | 2 |\n| F1 | F8 | 0 |\n| F1 | F9 | 5 |\n| F1 | F10 | 1 |\n| F1 | F11 | 5 |\n| F2 | F1 | 1 |\n| F2 | F3 | 0 |\n| F2 | F4 | 2 |\n| F2 | F5 | 5 |\n| F2 | F6 | 0 |\n| F2 | F7 | 6 |\n| F2 | F8 | 0 |\n| F2 | F9 | 1 |\n| F2 | F10 | 0 |\n| F2 | F11 | 10 |\n| F3 | F1 | 4 |\n| F3 | F2 | 0 |\n| F3 | F4 | 0 |\n| F3 | F5 | 0 |\n| F3 | F6 | 1 |\n| F3 | F7 | 3 |\n| F3 | F8 | 2 |\n| F3 | F9 | 0 |\n| F3 | F10 | 2 |\n| F3 | F11 | 10 |\n| F4 | F1 | 2 |\n| F4 | F2 | 2 |\n| F4 | F3 | 0 |\n| F4 | F5 | 0 |\n| F4 | F6 | 5 |\n| F4 | F7 | 4 |\n| F4 | F8 | 0 |\n| F4 | F9 | 0 |\n| F4 | F10 | 1 |\n| F4 | F11 | 0 |\n| F5 | F1 | 0 |\n| F5 | F2 | 5 |\n| F5 | F3 | 0 |\n| F5 | F4 | 0 |\n| F5 | F6 | 0 |\n| F5 | F7 | 0 |\n| F5 | F8 | 3 |\n| F5 | F9 | 5 |\n| F5 | F10 | 5 |\n| F5 | F11 | 5 |\n| F6 | F1 | 1 |\n| F6 | F2 | 0 |\n| F6 | F3 | 1 |\n| F6 | F4 | 5 |\n| F6 | F5 | 0 |\n| F6 | F7 | 10 |\n| F6 | F8 | 5 |\n| F6 | F9 | 2 |\n| F6 | F10 | 1 |\n| F6 | F11 | 1 |\n| F7 | F1 | 2 |\n| F7 | F2 | 6 |\n| F7 | F3 | 3 |\n| F7 | F4 | 4 |\n| F7 | F5 | 0 |\n| F7 | F6 | 10 |\n| F7 | F8 | 5 |\n| F7 | F9 | 0 |\n| F7 | F10 | 10 |\n| F7 | F11 | 10 |\n| F8 | F1 | 0 |\n| F8 | F2 | 0 |\n| F8 | F3 | 2 |\n| F8 | F4 | 0 |\n| F8 | F5 | 3 |\n| F8 | F6 | 5 |\n| F8 | F7 | 5 |\n| F8 | F9 | 2 |\n| F8 | F10 | 1 |\n| F8 | F11 | 10 |\n| F9 | F1 | 5 |\n| F9 | F2 | 1 |\n| F9 | F3 | 0 |\n| F9 | F4 | 0 |\n| F9 | F5 | 5 |\n| F9 | F6 | 2 |\n| F9 | F7 | 0 |\n| F9 | F8 | 2 |\n| F9 | F10 | 1 |\n| F9 | F11 | 6 |\n| F10 | F1 | 1 |\n| F10 | F2 | 0 |\n| F10 | F3 | 2 |\n| F10 | F4 | 1 |\n| F10 | F5 | 5 |\n| F10 | F6 | 1 |\n| F10 | F7 | 10 |\n| F10 | F8 | 1 |\n| F10 | F9 | 1 |\n| F10 | F11 | 0 |\n| F11 | F1 | 5 |\n| F11 | F2 | 10 |\n| F11 | F3 | 10 |\n| F11 | F4 | 0 |\n| F11 | F5 | 5 |\n| F11 | F6 | 1 |\n| F11 | F7 | 10 |\n| F11 | F8 | 10 |\n| F11 | F9 | 6 |\n| F11 | F10 | 0 |\n\nThese figures provide the exact numbers and office map to use when evaluating arrangements.\n\nAlso, when you send back the chosen arrangement, please use this simple JSON shape — it's just a single \"solution\" list that gives the office assigned to each person in order.\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nNothing fancy — \"solution\" is the array, the first slot is the office for the first person, the second slot for the second person, and so on. Think of it like filling out a short form: position in the list = which person, value = which office.\n\nThis JSON is just a sketch of the shape I expect, not the actual answer.\n\nPlease use the exact identifiers from the instance input — do not rename them or invent new ones. \n- Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 5, 2, 4, 6, 10, 10, 13, 10, 11, 16 ], [ 5, 0, 5, 3, 3, 5, 5, 8, 5, 10, 11 ], [ 2, 5, 0, 2, 4, 8, 8, 11, 8, 9, 14 ], [ 4, 3, 2, 0, 2, 6, 6, 9, 6, 7, 12 ], [ 6, 3, 4, 2, 0, 4, 4, 7, 4, 7, 10 ], [ 10, 5, 8, 6, 4, 0, 4, 3, 6, 11, 6 ], [ 10, 5, 8, 6, 4, 4, 0, 3, 2, 7, 6 ], [ 13, 8, 11, 9, 7, 3, 3, 0, 5, 10, 5 ], [ 10, 5, 8, 6, 4, 6, 2, 5, 0, 5, 6 ], [ 11, 10, 9, 7, 7, 11, 7, 10, 5, 0, 5 ], [ 16, 11, 14, 12, 10, 6, 6, 5, 6, 5, 0 ] ], "flow_matrix": [ [ 0, 1, 4, 2, 0, 1, 2, 0, 5, 1, 5 ], [ 1, 0, 0, 2, 5, 0, 6, 0, 1, 0, 10 ], [ 4, 0, 0, 0, 0, 1, 3, 2, 0, 2, 10 ], [ 2, 2, 0, 0, 0, 5, 4, 0, 0, 1, 0 ], [ 0, 5, 0, 0, 0, 0, 0, 3, 5, 5, 5 ], [ 1, 0, 1, 5, 0, 0, 10, 5, 2, 1, 1 ], [ 2, 6, 3, 4, 0, 10, 0, 5, 0, 10, 10 ], [ 0, 0, 2, 0, 3, 5, 5, 0, 2, 1, 10 ], [ 5, 1, 0, 0, 5, 2, 0, 2, 0, 1, 6 ], [ 1, 0, 2, 1, 5, 1, 10, 1, 1, 0, 0 ], [ 5, 10, 10, 0, 5, 1, 10, 10, 6, 0, 0 ] ], "objective": 1496.0 }, "solution": [ 9, 7, 8, 0, 5, 2, 3, 4, 10, 1, 6 ], "obj": 1496.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 11, "num_locations": 11, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 5 }, { "from_id": 1, "to_id": 3, "distance": 2 }, { "from_id": 1, "to_id": 4, "distance": 4 }, { "from_id": 1, "to_id": 5, "distance": 6 }, { "from_id": 1, "to_id": 6, "distance": 10 }, { "from_id": 1, "to_id": 7, "distance": 10 }, { "from_id": 1, "to_id": 8, "distance": 13 }, { "from_id": 1, "to_id": 9, "distance": 10 }, { "from_id": 1, "to_id": 10, "distance": 11 }, { "from_id": 1, "to_id": 11, "distance": 16 }, { "from_id": 2, "to_id": 1, "distance": 5 }, { "from_id": 2, "to_id": 3, "distance": 5 }, { "from_id": 2, "to_id": 4, "distance": 3 }, { "from_id": 2, "to_id": 5, "distance": 3 }, { "from_id": 2, "to_id": 6, "distance": 5 }, { "from_id": 2, "to_id": 7, "distance": 5 }, { "from_id": 2, "to_id": 8, "distance": 8 }, { "from_id": 2, "to_id": 9, "distance": 5 }, { "from_id": 2, "to_id": 10, "distance": 10 }, { "from_id": 2, "to_id": 11, "distance": 11 }, { "from_id": 3, "to_id": 1, "distance": 2 }, { "from_id": 3, "to_id": 2, "distance": 5 }, { "from_id": 3, "to_id": 4, "distance": 2 }, { "from_id": 3, "to_id": 5, "distance": 4 }, { "from_id": 3, "to_id": 6, "distance": 8 }, { "from_id": 3, "to_id": 7, "distance": 8 }, { "from_id": 3, "to_id": 8, "distance": 11 }, { "from_id": 3, "to_id": 9, "distance": 8 }, { "from_id": 3, "to_id": 10, "distance": 9 }, { "from_id": 3, "to_id": 11, "distance": 14 }, { "from_id": 4, "to_id": 1, "distance": 4 }, { "from_id": 4, "to_id": 2, "distance": 3 }, { "from_id": 4, "to_id": 3, "distance": 2 }, { "from_id": 4, "to_id": 5, "distance": 2 }, { "from_id": 4, "to_id": 6, "distance": 6 }, { "from_id": 4, "to_id": 7, "distance": 6 }, { "from_id": 4, "to_id": 8, "distance": 9 }, { "from_id": 4, "to_id": 9, "distance": 6 }, { "from_id": 4, "to_id": 10, "distance": 7 }, { "from_id": 4, "to_id": 11, "distance": 12 }, { "from_id": 5, "to_id": 1, "distance": 6 }, { "from_id": 5, "to_id": 2, "distance": 3 }, { "from_id": 5, "to_id": 3, "distance": 4 }, { "from_id": 5, "to_id": 4, "distance": 2 }, { "from_id": 5, "to_id": 6, "distance": 4 }, { "from_id": 5, "to_id": 7, "distance": 4 }, { "from_id": 5, "to_id": 8, "distance": 7 }, { "from_id": 5, "to_id": 9, "distance": 4 }, { "from_id": 5, "to_id": 10, "distance": 7 }, { "from_id": 5, "to_id": 11, "distance": 10 }, { "from_id": 6, "to_id": 1, "distance": 10 }, { "from_id": 6, "to_id": 2, "distance": 5 }, { "from_id": 6, "to_id": 3, "distance": 8 }, { "from_id": 6, "to_id": 4, "distance": 6 }, { "from_id": 6, "to_id": 5, "distance": 4 }, { "from_id": 6, "to_id": 7, "distance": 4 }, { "from_id": 6, "to_id": 8, "distance": 3 }, { "from_id": 6, "to_id": 9, "distance": 6 }, { "from_id": 6, "to_id": 10, "distance": 11 }, { "from_id": 6, "to_id": 11, "distance": 6 }, { "from_id": 7, "to_id": 1, "distance": 10 }, { "from_id": 7, "to_id": 2, "distance": 5 }, { "from_id": 7, "to_id": 3, "distance": 8 }, { "from_id": 7, "to_id": 4, "distance": 6 }, { "from_id": 7, "to_id": 5, "distance": 4 }, { "from_id": 7, "to_id": 6, "distance": 4 }, { "from_id": 7, "to_id": 8, "distance": 3 }, { "from_id": 7, "to_id": 9, "distance": 2 }, { "from_id": 7, "to_id": 10, "distance": 7 }, { "from_id": 7, "to_id": 11, "distance": 6 }, { "from_id": 8, "to_id": 1, "distance": 13 }, { "from_id": 8, "to_id": 2, "distance": 8 }, { "from_id": 8, "to_id": 3, "distance": 11 }, { "from_id": 8, "to_id": 4, "distance": 9 }, { "from_id": 8, "to_id": 5, "distance": 7 }, { "from_id": 8, "to_id": 6, "distance": 3 }, { "from_id": 8, "to_id": 7, "distance": 3 }, { "from_id": 8, "to_id": 9, "distance": 5 }, { "from_id": 8, "to_id": 10, "distance": 10 }, { "from_id": 8, "to_id": 11, "distance": 5 }, { "from_id": 9, "to_id": 1, "distance": 10 }, { "from_id": 9, "to_id": 2, "distance": 5 }, { "from_id": 9, "to_id": 3, "distance": 8 }, { "from_id": 9, "to_id": 4, "distance": 6 }, { "from_id": 9, "to_id": 5, "distance": 4 }, { "from_id": 9, "to_id": 6, "distance": 6 }, { "from_id": 9, "to_id": 7, "distance": 2 }, { "from_id": 9, "to_id": 8, "distance": 5 }, { "from_id": 9, "to_id": 10, "distance": 5 }, { "from_id": 9, "to_id": 11, "distance": 6 }, { "from_id": 10, "to_id": 1, "distance": 11 }, { "from_id": 10, "to_id": 2, "distance": 10 }, { "from_id": 10, "to_id": 3, "distance": 9 }, { "from_id": 10, "to_id": 4, "distance": 7 }, { "from_id": 10, "to_id": 5, "distance": 7 }, { "from_id": 10, "to_id": 6, "distance": 11 }, { "from_id": 10, "to_id": 7, "distance": 7 }, { "from_id": 10, "to_id": 8, "distance": 10 }, { "from_id": 10, "to_id": 9, "distance": 5 }, { "from_id": 10, "to_id": 11, "distance": 5 }, { "from_id": 11, "to_id": 1, "distance": 16 }, { "from_id": 11, "to_id": 2, "distance": 11 }, { "from_id": 11, "to_id": 3, "distance": 14 }, { "from_id": 11, "to_id": 4, "distance": 12 }, { "from_id": 11, "to_id": 5, "distance": 10 }, { "from_id": 11, "to_id": 6, "distance": 6 }, { "from_id": 11, "to_id": 7, "distance": 6 }, { "from_id": 11, "to_id": 8, "distance": 5 }, { "from_id": 11, "to_id": 9, "distance": 6 }, { "from_id": 11, "to_id": 10, "distance": 5 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 1 }, { "from_id": "F1", "to_id": "F3", "flow": 4 }, { "from_id": "F1", "to_id": "F4", "flow": 2 }, { "from_id": "F1", "to_id": "F5", "flow": 0 }, { "from_id": "F1", "to_id": "F6", "flow": 1 }, { "from_id": "F1", "to_id": "F7", "flow": 2 }, { "from_id": "F1", "to_id": "F8", "flow": 0 }, { "from_id": "F1", "to_id": "F9", "flow": 5 }, { "from_id": "F1", "to_id": "F10", "flow": 1 }, { "from_id": "F1", "to_id": "F11", "flow": 5 }, { "from_id": "F2", "to_id": "F1", "flow": 1 }, { "from_id": "F2", "to_id": "F3", "flow": 0 }, { "from_id": "F2", "to_id": "F4", "flow": 2 }, { "from_id": "F2", "to_id": "F5", "flow": 5 }, { "from_id": "F2", "to_id": "F6", "flow": 0 }, { "from_id": "F2", "to_id": "F7", "flow": 6 }, { "from_id": "F2", "to_id": "F8", "flow": 0 }, { "from_id": "F2", "to_id": "F9", "flow": 1 }, { "from_id": "F2", "to_id": "F10", "flow": 0 }, { "from_id": "F2", "to_id": "F11", "flow": 10 }, { "from_id": "F3", "to_id": "F1", "flow": 4 }, { "from_id": "F3", "to_id": "F2", "flow": 0 }, { "from_id": "F3", "to_id": "F4", "flow": 0 }, { "from_id": "F3", "to_id": "F5", "flow": 0 }, { "from_id": "F3", "to_id": "F6", "flow": 1 }, { "from_id": "F3", "to_id": "F7", "flow": 3 }, { "from_id": "F3", "to_id": "F8", "flow": 2 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F3", "to_id": "F10", "flow": 2 }, { "from_id": "F3", "to_id": "F11", "flow": 10 }, { "from_id": "F4", "to_id": "F1", "flow": 2 }, { "from_id": "F4", "to_id": "F2", "flow": 2 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 0 }, { "from_id": "F4", "to_id": "F6", "flow": 5 }, { "from_id": "F4", "to_id": "F7", "flow": 4 }, { "from_id": "F4", "to_id": "F8", "flow": 0 }, { "from_id": "F4", "to_id": "F9", "flow": 0 }, { "from_id": "F4", "to_id": "F10", "flow": 1 }, { "from_id": "F4", "to_id": "F11", "flow": 0 }, { "from_id": "F5", "to_id": "F1", "flow": 0 }, { "from_id": "F5", "to_id": "F2", "flow": 5 }, { "from_id": "F5", "to_id": "F3", "flow": 0 }, { "from_id": "F5", "to_id": "F4", "flow": 0 }, { "from_id": "F5", "to_id": "F6", "flow": 0 }, { "from_id": "F5", "to_id": "F7", "flow": 0 }, { "from_id": "F5", "to_id": "F8", "flow": 3 }, { "from_id": "F5", "to_id": "F9", "flow": 5 }, { "from_id": "F5", "to_id": "F10", "flow": 5 }, { "from_id": "F5", "to_id": "F11", "flow": 5 }, { "from_id": "F6", "to_id": "F1", "flow": 1 }, { "from_id": "F6", "to_id": "F2", "flow": 0 }, { "from_id": "F6", "to_id": "F3", "flow": 1 }, { "from_id": "F6", "to_id": "F4", "flow": 5 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 10 }, { "from_id": "F6", "to_id": "F8", "flow": 5 }, { "from_id": "F6", "to_id": "F9", "flow": 2 }, { "from_id": "F6", "to_id": "F10", "flow": 1 }, { "from_id": "F6", "to_id": "F11", "flow": 1 }, { "from_id": "F7", "to_id": "F1", "flow": 2 }, { "from_id": "F7", "to_id": "F2", "flow": 6 }, { "from_id": "F7", "to_id": "F3", "flow": 3 }, { "from_id": "F7", "to_id": "F4", "flow": 4 }, { "from_id": "F7", "to_id": "F5", "flow": 0 }, { "from_id": "F7", "to_id": "F6", "flow": 10 }, { "from_id": "F7", "to_id": "F8", "flow": 5 }, { "from_id": "F7", "to_id": "F9", "flow": 0 }, { "from_id": "F7", "to_id": "F10", "flow": 10 }, { "from_id": "F7", "to_id": "F11", "flow": 10 }, { "from_id": "F8", "to_id": "F1", "flow": 0 }, { "from_id": "F8", "to_id": "F2", "flow": 0 }, { "from_id": "F8", "to_id": "F3", "flow": 2 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 3 }, { "from_id": "F8", "to_id": "F6", "flow": 5 }, { "from_id": "F8", "to_id": "F7", "flow": 5 }, { "from_id": "F8", "to_id": "F9", "flow": 2 }, { "from_id": "F8", "to_id": "F10", "flow": 1 }, { "from_id": "F8", "to_id": "F11", "flow": 10 }, { "from_id": "F9", "to_id": "F1", "flow": 5 }, { "from_id": "F9", "to_id": "F2", "flow": 1 }, { "from_id": "F9", "to_id": "F3", "flow": 0 }, { "from_id": "F9", "to_id": "F4", "flow": 0 }, { "from_id": "F9", "to_id": "F5", "flow": 5 }, { "from_id": "F9", "to_id": "F6", "flow": 2 }, { "from_id": "F9", "to_id": "F7", "flow": 0 }, { "from_id": "F9", "to_id": "F8", "flow": 2 }, { "from_id": "F9", "to_id": "F10", "flow": 1 }, { "from_id": "F9", "to_id": "F11", "flow": 6 }, { "from_id": "F10", "to_id": "F1", "flow": 1 }, { "from_id": "F10", "to_id": "F2", "flow": 0 }, { "from_id": "F10", "to_id": "F3", "flow": 2 }, { "from_id": "F10", "to_id": "F4", "flow": 1 }, { "from_id": "F10", "to_id": "F5", "flow": 5 }, { "from_id": "F10", "to_id": "F6", "flow": 1 }, { "from_id": "F10", "to_id": "F7", "flow": 10 }, { "from_id": "F10", "to_id": "F8", "flow": 1 }, { "from_id": "F10", "to_id": "F9", "flow": 1 }, { "from_id": "F10", "to_id": "F11", "flow": 0 }, { "from_id": "F11", "to_id": "F1", "flow": 5 }, { "from_id": "F11", "to_id": "F2", "flow": 10 }, { "from_id": "F11", "to_id": "F3", "flow": 10 }, { "from_id": "F11", "to_id": "F4", "flow": 0 }, { "from_id": "F11", "to_id": "F5", "flow": 5 }, { "from_id": "F11", "to_id": "F6", "flow": 1 }, { "from_id": "F11", "to_id": "F7", "flow": 10 }, { "from_id": "F11", "to_id": "F8", "flow": 10 }, { "from_id": "F11", "to_id": "F9", "flow": 6 }, { "from_id": "F11", "to_id": "F10", "flow": 0 } ] }, "solution_variant": [ 10, 8, 9, 1, 6, 3, 4, 5, 11, 2, 7 ], "context_index": 9, "input_format": "markdown_table", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Out in the kitchen there’s a simple rule for layout: each ingredient category gets one dedicated counter and every counter holds one category. The overall slow-down comes from ingredient pairs — for each pair, take the number of times they’re used together, multiply it by the distance between their counters, and sum all those results to get the total delay. The trick is to arrange the categories so that summed delay is as low as possible. The concrete instance — the groups, their pair-usage numbers and the counter distances — appears below.\n\nBelow are the 9 ingredient categories F1, F2, F3, F4, F5, F6, F7, F8, F9 and the 1, 2, 3, 4, 5, 6, 7, 8, 9 prep counters.\nPrep counter 1 → prep counter 2: distance 4.\nPrep counter 1 → prep counter 3: distance 5.\nPrep counter 1 → prep counter 4: distance 1.\nPrep counter 1 → prep counter 5: distance 6.\nPrep counter 1 → prep counter 6: distance 6.\nPrep counter 1 → prep counter 7: distance 4.\nPrep counter 1 → prep counter 8: distance 5.\nPrep counter 1 → prep counter 9: distance 7.\nPrep counter 2 → prep counter 1: distance 4.\nPrep counter 2 → prep counter 3: distance 1.\nPrep counter 2 → prep counter 4: distance 5.\nPrep counter 2 → prep counter 5: distance 2.\nPrep counter 2 → prep counter 6: distance 2.\nPrep counter 2 → prep counter 7: distance 6.\nPrep counter 2 → prep counter 8: distance 5.\nPrep counter 2 → prep counter 9: distance 3.\nPrep counter 3 → prep counter 1: distance 5.\nPrep counter 3 → prep counter 2: distance 1.\nPrep counter 3 → prep counter 4: distance 6.\nPrep counter 3 → prep counter 5: distance 1.\nPrep counter 3 → prep counter 6: distance 3.\nPrep counter 3 → prep counter 7: distance 7.\nPrep counter 3 → prep counter 8: distance 6.\nPrep counter 3 → prep counter 9: distance 4.\nPrep counter 4 → prep counter 1: distance 1.\nPrep counter 4 → prep counter 2: distance 5.\nPrep counter 4 → prep counter 3: distance 6.\nPrep counter 4 → prep counter 5: distance 5.\nPrep counter 4 → prep counter 6: distance 5.\nPrep counter 4 → prep counter 7: distance 3.\nPrep counter 4 → prep counter 8: distance 4.\nPrep counter 4 → prep counter 9: distance 6.\nPrep counter 5 → prep counter 1: distance 6.\nPrep counter 5 → prep counter 2: distance 2.\nPrep counter 5 → prep counter 3: distance 1.\nPrep counter 5 → prep counter 4: distance 5.\nPrep counter 5 → prep counter 6: distance 2.\nPrep counter 5 → prep counter 7: distance 6.\nPrep counter 5 → prep counter 8: distance 5.\nPrep counter 5 → prep counter 9: distance 3.\nPrep counter 6 → prep counter 1: distance 6.\nPrep counter 6 → prep counter 2: distance 2.\nPrep counter 6 → prep counter 3: distance 3.\nPrep counter 6 → prep counter 4: distance 5.\nPrep counter 6 → prep counter 5: distance 2.\nPrep counter 6 → prep counter 7: distance 4.\nPrep counter 6 → prep counter 8: distance 3.\nPrep counter 6 → prep counter 9: distance 1.\nPrep counter 7 → prep counter 1: distance 4.\nPrep counter 7 → prep counter 2: distance 6.\nPrep counter 7 → prep counter 3: distance 7.\nPrep counter 7 → prep counter 4: distance 3.\nPrep counter 7 → prep counter 5: distance 6.\nPrep counter 7 → prep counter 6: distance 4.\nPrep counter 7 → prep counter 8: distance 1.\nPrep counter 7 → prep counter 9: distance 3.\nPrep counter 8 → prep counter 1: distance 5.\nPrep counter 8 → prep counter 2: distance 5.\nPrep counter 8 → prep counter 3: distance 6.\nPrep counter 8 → prep counter 4: distance 4.\nPrep counter 8 → prep counter 5: distance 5.\nPrep counter 8 → prep counter 6: distance 3.\nPrep counter 8 → prep counter 7: distance 1.\nPrep counter 8 → prep counter 9: distance 2.\nPrep counter 9 → prep counter 1: distance 7.\nPrep counter 9 → prep counter 2: distance 3.\nPrep counter 9 → prep counter 3: distance 4.\nPrep counter 9 → prep counter 4: distance 6.\nPrep counter 9 → prep counter 5: distance 3.\nPrep counter 9 → prep counter 6: distance 1.\nPrep counter 9 → prep counter 7: distance 3.\nPrep counter 9 → prep counter 8: distance 2.\nIngredient group F1 → F2: used together 0 times.\nIngredient group F1 → F3: used together 2 times.\nIngredient group F1 → F4: used together 10 times.\nIngredient group F1 → F5: used together 5 times.\nIngredient group F1 → F6: used together 5 times.\nIngredient group F1 → F7: used together 0 times.\nIngredient group F1 → F8: used together 1 times.\nIngredient group F1 → F9: used together 0 times.\nIngredient group F2 → F1: used together 0 times.\nIngredient group F2 → F3: used together 5 times.\nIngredient group F2 → F4: used together 2 times.\nIngredient group F2 → F5: used together 2 times.\nIngredient group F2 → F6: used together 2 times.\nIngredient group F2 → F7: used together 0 times.\nIngredient group F2 → F8: used together 2 times.\nIngredient group F2 → F9: used together 5 times.\nIngredient group F3 → F1: used together 2 times.\nIngredient group F3 → F2: used together 5 times.\nIngredient group F3 → F4: used together 1 times.\nIngredient group F3 → F5: used together 10 times.\nIngredient group F3 → F6: used together 0 times.\nIngredient group F3 → F7: used together 0 times.\nIngredient group F3 → F8: used together 0 times.\nIngredient group F3 → F9: used together 0 times.\nIngredient group F4 → F1: used together 10 times.\nIngredient group F4 → F2: used together 2 times.\nIngredient group F4 → F3: used together 1 times.\nIngredient group F4 → F5: used together 10 times.\nIngredient group F4 → F6: used together 2 times.\nIngredient group F4 → F7: used together 1 times.\nIngredient group F4 → F8: used together 5 times.\nIngredient group F4 → F9: used together 2 times.\nIngredient group F5 → F1: used together 5 times.\nIngredient group F5 → F2: used together 2 times.\nIngredient group F5 → F3: used together 10 times.\nIngredient group F5 → F4: used together 10 times.\nIngredient group F5 → F6: used together 0 times.\nIngredient group F5 → F7: used together 2 times.\nIngredient group F5 → F8: used together 0 times.\nIngredient group F5 → F9: used together 5 times.\nIngredient group F6 → F1: used together 5 times.\nIngredient group F6 → F2: used together 2 times.\nIngredient group F6 → F3: used together 0 times.\nIngredient group F6 → F4: used together 2 times.\nIngredient group F6 → F5: used together 0 times.\nIngredient group F6 → F7: used together 0 times.\nIngredient group F6 → F8: used together 0 times.\nIngredient group F6 → F9: used together 6 times.\nIngredient group F7 → F1: used together 0 times.\nIngredient group F7 → F2: used together 0 times.\nIngredient group F7 → F3: used together 0 times.\nIngredient group F7 → F4: used together 1 times.\nIngredient group F7 → F5: used together 2 times.\nIngredient group F7 → F6: used together 0 times.\nIngredient group F7 → F8: used together 5 times.\nIngredient group F7 → F9: used together 1 times.\nIngredient group F8 → F1: used together 1 times.\nIngredient group F8 → F2: used together 2 times.\nIngredient group F8 → F3: used together 0 times.\nIngredient group F8 → F4: used together 5 times.\nIngredient group F8 → F5: used together 0 times.\nIngredient group F8 → F6: used together 0 times.\nIngredient group F8 → F7: used together 5 times.\nIngredient group F8 → F9: used together 0 times.\nIngredient group F9 → F1: used together 0 times.\nIngredient group F9 → F2: used together 5 times.\nIngredient group F9 → F3: used together 0 times.\nIngredient group F9 → F4: used together 2 times.\nIngredient group F9 → F5: used together 5 times.\nIngredient group F9 → F6: used together 6 times.\nIngredient group F9 → F7: used together 1 times.\nIngredient group F9 → F8: used together 0 times.\nPlace the F1, F2, F3, F4, F5, F6, F7, F8, F9 on the 1, 2, 3, 4, 5, 6, 7, 8, 9 so the summed delay is as small as possible.\n\nAlso, when you send your layout back, just use this simple JSON shape so I can read it without guessing:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThe \"solution\" array is just a straight list: the first entry is the counter (location) you put the first ingredient category on, the second entry is the counter for the second category, and so on — one entry per category in order. Think of it like filling out a short form: one slot for each category, write the counter label you chose.\n\nThis JSON is only a sketch of the shape I need, not the actual answer. Please use the exact identifiers from the instance input — do not rename them or invent new ones. Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 4, 5, 1, 6, 6, 4, 5, 7 ], [ 4, 0, 1, 5, 2, 2, 6, 5, 3 ], [ 5, 1, 0, 6, 1, 3, 7, 6, 4 ], [ 1, 5, 6, 0, 5, 5, 3, 4, 6 ], [ 6, 2, 1, 5, 0, 2, 6, 5, 3 ], [ 6, 2, 3, 5, 2, 0, 4, 3, 1 ], [ 4, 6, 7, 3, 6, 4, 0, 1, 3 ], [ 5, 5, 6, 4, 5, 3, 1, 0, 2 ], [ 7, 3, 4, 6, 3, 1, 3, 2, 0 ] ], "flow_matrix": [ [ 0, 0, 2, 10, 5, 5, 0, 1, 0 ], [ 0, 0, 5, 2, 2, 2, 0, 2, 5 ], [ 2, 5, 0, 1, 10, 0, 0, 0, 0 ], [ 10, 2, 1, 0, 10, 2, 1, 5, 2 ], [ 5, 2, 10, 10, 0, 0, 2, 0, 5 ], [ 5, 2, 0, 2, 0, 0, 0, 0, 6 ], [ 0, 0, 0, 1, 2, 0, 0, 5, 1 ], [ 1, 2, 0, 5, 0, 0, 5, 0, 0 ], [ 0, 5, 0, 2, 5, 6, 1, 0, 0 ] ], "objective": 478.0 }, "solution": [ 2, 6, 8, 1, 5, 4, 3, 0, 7 ], "obj": 478.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 4 }, { "from_id": 1, "to_id": 3, "distance": 5 }, { "from_id": 1, "to_id": 4, "distance": 1 }, { "from_id": 1, "to_id": 5, "distance": 6 }, { "from_id": 1, "to_id": 6, "distance": 6 }, { "from_id": 1, "to_id": 7, "distance": 4 }, { "from_id": 1, "to_id": 8, "distance": 5 }, { "from_id": 1, "to_id": 9, "distance": 7 }, { "from_id": 2, "to_id": 1, "distance": 4 }, { "from_id": 2, "to_id": 3, "distance": 1 }, { "from_id": 2, "to_id": 4, "distance": 5 }, { "from_id": 2, "to_id": 5, "distance": 2 }, { "from_id": 2, "to_id": 6, "distance": 2 }, { "from_id": 2, "to_id": 7, "distance": 6 }, { "from_id": 2, "to_id": 8, "distance": 5 }, { "from_id": 2, "to_id": 9, "distance": 3 }, { "from_id": 3, "to_id": 1, "distance": 5 }, { "from_id": 3, "to_id": 2, "distance": 1 }, { "from_id": 3, "to_id": 4, "distance": 6 }, { "from_id": 3, "to_id": 5, "distance": 1 }, { "from_id": 3, "to_id": 6, "distance": 3 }, { "from_id": 3, "to_id": 7, "distance": 7 }, { "from_id": 3, "to_id": 8, "distance": 6 }, { "from_id": 3, "to_id": 9, "distance": 4 }, { "from_id": 4, "to_id": 1, "distance": 1 }, { "from_id": 4, "to_id": 2, "distance": 5 }, { "from_id": 4, "to_id": 3, "distance": 6 }, { "from_id": 4, "to_id": 5, "distance": 5 }, { "from_id": 4, "to_id": 6, "distance": 5 }, { "from_id": 4, "to_id": 7, "distance": 3 }, { "from_id": 4, "to_id": 8, "distance": 4 }, { "from_id": 4, "to_id": 9, "distance": 6 }, { "from_id": 5, "to_id": 1, "distance": 6 }, { "from_id": 5, "to_id": 2, "distance": 2 }, { "from_id": 5, "to_id": 3, "distance": 1 }, { "from_id": 5, "to_id": 4, "distance": 5 }, { "from_id": 5, "to_id": 6, "distance": 2 }, { "from_id": 5, "to_id": 7, "distance": 6 }, { "from_id": 5, "to_id": 8, "distance": 5 }, { "from_id": 5, "to_id": 9, "distance": 3 }, { "from_id": 6, "to_id": 1, "distance": 6 }, { "from_id": 6, "to_id": 2, "distance": 2 }, { "from_id": 6, "to_id": 3, "distance": 3 }, { "from_id": 6, "to_id": 4, "distance": 5 }, { "from_id": 6, "to_id": 5, "distance": 2 }, { "from_id": 6, "to_id": 7, "distance": 4 }, { "from_id": 6, "to_id": 8, "distance": 3 }, { "from_id": 6, "to_id": 9, "distance": 1 }, { "from_id": 7, "to_id": 1, "distance": 4 }, { "from_id": 7, "to_id": 2, "distance": 6 }, { "from_id": 7, "to_id": 3, "distance": 7 }, { "from_id": 7, "to_id": 4, "distance": 3 }, { "from_id": 7, "to_id": 5, "distance": 6 }, { "from_id": 7, "to_id": 6, "distance": 4 }, { "from_id": 7, "to_id": 8, "distance": 1 }, { "from_id": 7, "to_id": 9, "distance": 3 }, { "from_id": 8, "to_id": 1, "distance": 5 }, { "from_id": 8, "to_id": 2, "distance": 5 }, { "from_id": 8, "to_id": 3, "distance": 6 }, { "from_id": 8, "to_id": 4, "distance": 4 }, { "from_id": 8, "to_id": 5, "distance": 5 }, { "from_id": 8, "to_id": 6, "distance": 3 }, { "from_id": 8, "to_id": 7, "distance": 1 }, { "from_id": 8, "to_id": 9, "distance": 2 }, { "from_id": 9, "to_id": 1, "distance": 7 }, { "from_id": 9, "to_id": 2, "distance": 3 }, { "from_id": 9, "to_id": 3, "distance": 4 }, { "from_id": 9, "to_id": 4, "distance": 6 }, { "from_id": 9, "to_id": 5, "distance": 3 }, { "from_id": 9, "to_id": 6, "distance": 1 }, { "from_id": 9, "to_id": 7, "distance": 3 }, { "from_id": 9, "to_id": 8, "distance": 2 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 2 }, { "from_id": "F1", "to_id": "F4", "flow": 10 }, { "from_id": "F1", "to_id": "F5", "flow": 5 }, { "from_id": "F1", "to_id": "F6", "flow": 5 }, { "from_id": "F1", "to_id": "F7", "flow": 0 }, { "from_id": "F1", "to_id": "F8", "flow": 1 }, { "from_id": "F1", "to_id": "F9", "flow": 0 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 5 }, { "from_id": "F2", "to_id": "F4", "flow": 2 }, { "from_id": "F2", "to_id": "F5", "flow": 2 }, { "from_id": "F2", "to_id": "F6", "flow": 2 }, { "from_id": "F2", "to_id": "F7", "flow": 0 }, { "from_id": "F2", "to_id": "F8", "flow": 2 }, { "from_id": "F2", "to_id": "F9", "flow": 5 }, { "from_id": "F3", "to_id": "F1", "flow": 2 }, { "from_id": "F3", "to_id": "F2", "flow": 5 }, { "from_id": "F3", "to_id": "F4", "flow": 1 }, { "from_id": "F3", "to_id": "F5", "flow": 10 }, { "from_id": "F3", "to_id": "F6", "flow": 0 }, { "from_id": "F3", "to_id": "F7", "flow": 0 }, { "from_id": "F3", "to_id": "F8", "flow": 0 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F4", "to_id": "F1", "flow": 10 }, { "from_id": "F4", "to_id": "F2", "flow": 2 }, { "from_id": "F4", "to_id": "F3", "flow": 1 }, { "from_id": "F4", "to_id": "F5", "flow": 10 }, { "from_id": "F4", "to_id": "F6", "flow": 2 }, { "from_id": "F4", "to_id": "F7", "flow": 1 }, { "from_id": "F4", "to_id": "F8", "flow": 5 }, { "from_id": "F4", "to_id": "F9", "flow": 2 }, { "from_id": "F5", "to_id": "F1", "flow": 5 }, { "from_id": "F5", "to_id": "F2", "flow": 2 }, { "from_id": "F5", "to_id": "F3", "flow": 10 }, { "from_id": "F5", "to_id": "F4", "flow": 10 }, { "from_id": "F5", "to_id": "F6", "flow": 0 }, { "from_id": "F5", "to_id": "F7", "flow": 2 }, { "from_id": "F5", "to_id": "F8", "flow": 0 }, { "from_id": "F5", "to_id": "F9", "flow": 5 }, { "from_id": "F6", "to_id": "F1", "flow": 5 }, { "from_id": "F6", "to_id": "F2", "flow": 2 }, { "from_id": "F6", "to_id": "F3", "flow": 0 }, { "from_id": "F6", "to_id": "F4", "flow": 2 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 0 }, { "from_id": "F6", "to_id": "F9", "flow": 6 }, { "from_id": "F7", "to_id": "F1", "flow": 0 }, { "from_id": "F7", "to_id": "F2", "flow": 0 }, { "from_id": "F7", "to_id": "F3", "flow": 0 }, { "from_id": "F7", "to_id": "F4", "flow": 1 }, { "from_id": "F7", "to_id": "F5", "flow": 2 }, { "from_id": "F7", "to_id": "F6", "flow": 0 }, { "from_id": "F7", "to_id": "F8", "flow": 5 }, { "from_id": "F7", "to_id": "F9", "flow": 1 }, { "from_id": "F8", "to_id": "F1", "flow": 1 }, { "from_id": "F8", "to_id": "F2", "flow": 2 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 5 }, { "from_id": "F8", "to_id": "F5", "flow": 0 }, { "from_id": "F8", "to_id": "F6", "flow": 0 }, { "from_id": "F8", "to_id": "F7", "flow": 5 }, { "from_id": "F8", "to_id": "F9", "flow": 0 }, { "from_id": "F9", "to_id": "F1", "flow": 0 }, { "from_id": "F9", "to_id": "F2", "flow": 5 }, { "from_id": "F9", "to_id": "F3", "flow": 0 }, { "from_id": "F9", "to_id": "F4", "flow": 2 }, { "from_id": "F9", "to_id": "F5", "flow": 5 }, { "from_id": "F9", "to_id": "F6", "flow": 6 }, { "from_id": "F9", "to_id": "F7", "flow": 1 }, { "from_id": "F9", "to_id": "F8", "flow": 0 } ] }, "solution_variant": [ 3, 7, 9, 2, 6, 5, 4, 1, 8 ], "context_index": 10, "input_format": "nl", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "We’ve got a bunch of produce categories and a handful of display islands, and the job is to put one category on each island without any duplicates or empty spots. What makes an arrangement “good” is simple: for each pair of categories, multiply how often they’re purchased together by the walking distance between their islands, then sum all those products — smaller sums mean shoppers travel less overall. The concrete layout and purchase counts are listed below.\n\nHere are the 11 produce categories (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11) and the 11 display islands (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) we'll place them on.\n\n| from_island_id | to_island_id | walking_distance |\n|---|---|---|\n| 1 | 2 | 114 |\n| 1 | 3 | 127 |\n| 1 | 4 | 89 |\n| 1 | 5 | 943 |\n| 1 | 6 | 430 |\n| 1 | 7 | 517 |\n| 1 | 8 | 918 |\n| 1 | 9 | 1232 |\n| 1 | 10 | 1255 |\n| 1 | 11 | 1307 |\n| 2 | 1 | 114 |\n| 2 | 3 | 29 |\n| 2 | 4 | 91 |\n| 2 | 5 | 879 |\n| 2 | 6 | 537 |\n| 2 | 7 | 623 |\n| 2 | 8 | 807 |\n| 2 | 9 | 1145 |\n| 2 | 10 | 1160 |\n| 2 | 11 | 1215 |\n| 3 | 1 | 127 |\n| 3 | 2 | 29 |\n| 3 | 4 | 80 |\n| 3 | 5 | 898 |\n| 3 | 6 | 537 |\n| 3 | 7 | 622 |\n| 3 | 8 | 806 |\n| 3 | 9 | 1157 |\n| 3 | 10 | 1169 |\n| 3 | 11 | 1226 |\n| 4 | 1 | 89 |\n| 4 | 2 | 91 |\n| 4 | 3 | 80 |\n| 4 | 5 | 969 |\n| 4 | 6 | 460 |\n| 4 | 7 | 545 |\n| 4 | 8 | 885 |\n| 4 | 9 | 1235 |\n| 4 | 10 | 1249 |\n| 4 | 11 | 1305 |\n| 5 | 1 | 943 |\n| 5 | 2 | 879 |\n| 5 | 3 | 898 |\n| 5 | 4 | 969 |\n| 5 | 6 | 1337 |\n| 5 | 7 | 1418 |\n| 5 | 8 | 627 |\n| 5 | 9 | 400 |\n| 5 | 10 | 505 |\n| 5 | 11 | 500 |\n| 6 | 1 | 430 |\n| 6 | 2 | 537 |\n| 6 | 3 | 537 |\n| 6 | 4 | 460 |\n| 6 | 5 | 1337 |\n| 6 | 7 | 86 |\n| 6 | 8 | 1343 |\n| 6 | 9 | 1653 |\n| 6 | 10 | 1683 |\n| 6 | 11 | 1731 |\n| 7 | 1 | 517 |\n| 7 | 2 | 623 |\n| 7 | 3 | 622 |\n| 7 | 4 | 545 |\n| 7 | 5 | 1418 |\n| 7 | 6 | 86 |\n| 7 | 8 | 1429 |\n| 7 | 9 | 1738 |\n| 7 | 10 | 1769 |\n| 7 | 11 | 1817 |\n| 8 | 1 | 918 |\n| 8 | 2 | 807 |\n| 8 | 3 | 806 |\n| 8 | 4 | 885 |\n| 8 | 5 | 627 |\n| 8 | 6 | 1343 |\n| 8 | 7 | 1429 |\n| 8 | 9 | 553 |\n| 8 | 10 | 480 |\n| 8 | 11 | 565 |\n| 9 | 1 | 1232 |\n| 9 | 2 | 1145 |\n| 9 | 3 | 1157 |\n| 9 | 4 | 1235 |\n| 9 | 5 | 400 |\n| 9 | 6 | 1653 |\n| 9 | 7 | 1738 |\n| 9 | 8 | 553 |\n| 9 | 10 | 140 |\n| 9 | 11 | 101 |\n| 10 | 1 | 1255 |\n| 10 | 2 | 1160 |\n| 10 | 3 | 1169 |\n| 10 | 4 | 1249 |\n| 10 | 5 | 505 |\n| 10 | 6 | 1683 |\n| 10 | 7 | 1769 |\n| 10 | 8 | 480 |\n| 10 | 9 | 140 |\n| 10 | 11 | 89 |\n| 11 | 1 | 1307 |\n| 11 | 2 | 1215 |\n| 11 | 3 | 1226 |\n| 11 | 4 | 1305 |\n| 11 | 5 | 500 |\n| 11 | 6 | 1731 |\n| 11 | 7 | 1817 |\n| 11 | 8 | 565 |\n| 11 | 9 | 101 |\n| 11 | 10 | 89 |\n\n| from_category_id | to_category_id | co_purchase_frequency |\n|---|---|---|\n| F1 | F2 | 0 |\n| F1 | F3 | 256 |\n| F1 | F4 | 516 |\n| F1 | F5 | 0 |\n| F1 | F6 | 0 |\n| F1 | F7 | 0 |\n| F1 | F8 | 11 |\n| F1 | F9 | 0 |\n| F1 | F10 | 0 |\n| F1 | F11 | 2506 |\n| F2 | F1 | 0 |\n| F2 | F3 | 0 |\n| F2 | F4 | 0 |\n| F2 | F5 | 0 |\n| F2 | F6 | 0 |\n| F2 | F7 | 0 |\n| F2 | F8 | 8054 |\n| F2 | F9 | 0 |\n| F2 | F10 | 0 |\n| F2 | F11 | 1 |\n| F3 | F1 | 75 |\n| F3 | F2 | 0 |\n| F3 | F4 | 0 |\n| F3 | F5 | 0 |\n| F3 | F6 | 238 |\n| F3 | F7 | 30 |\n| F3 | F8 | 0 |\n| F3 | F9 | 327 |\n| F3 | F10 | 4157 |\n| F3 | F11 | 1 |\n| F4 | F1 | 0 |\n| F4 | F2 | 0 |\n| F4 | F3 | 0 |\n| F4 | F5 | 0 |\n| F4 | F6 | 0 |\n| F4 | F7 | 0 |\n| F4 | F8 | 897 |\n| F4 | F9 | 0 |\n| F4 | F10 | 0 |\n| F4 | F11 | 0 |\n| F5 | F1 | 0 |\n| F5 | F2 | 55 |\n| F5 | F3 | 0 |\n| F5 | F4 | 3481 |\n| F5 | F6 | 7 |\n| F5 | F7 | 3781 |\n| F5 | F8 | 760 |\n| F5 | F9 | 1 |\n| F5 | F10 | 0 |\n| F5 | F11 | 0 |\n| F6 | F1 | 478 |\n| F6 | F2 | 20 |\n| F6 | F3 | 0 |\n| F6 | F4 | 0 |\n| F6 | F5 | 0 |\n| F6 | F7 | 0 |\n| F6 | F8 | 0 |\n| F6 | F9 | 0 |\n| F6 | F10 | 0 |\n| F6 | F11 | 0 |\n| F7 | F1 | 0 |\n| F7 | F2 | 0 |\n| F7 | F3 | 4529 |\n| F7 | F4 | 53 |\n| F7 | F5 | 0 |\n| F7 | F6 | 6930 |\n| F7 | F8 | 5 |\n| F7 | F9 | 45 |\n| F7 | F10 | 0 |\n| F7 | F11 | 253 |\n| F8 | F1 | 0 |\n| F8 | F2 | 0 |\n| F8 | F3 | 0 |\n| F8 | F4 | 63 |\n| F8 | F5 | 0 |\n| F8 | F6 | 312 |\n| F8 | F7 | 2 |\n| F8 | F9 | 0 |\n| F8 | F10 | 0 |\n| F8 | F11 | 1 |\n| F9 | F1 | 18 |\n| F9 | F2 | 0 |\n| F9 | F3 | 0 |\n| F9 | F4 | 19 |\n| F9 | F5 | 18 |\n| F9 | F6 | 0 |\n| F9 | F7 | 0 |\n| F9 | F8 | 1804 |\n| F9 | F10 | 0 |\n| F9 | F11 | 0 |\n| F10 | F1 | 7559 |\n| F10 | F2 | 2 |\n| F10 | F3 | 4739 |\n| F10 | F4 | 39 |\n| F10 | F5 | 0 |\n| F10 | F6 | 15 |\n| F10 | F7 | 0 |\n| F10 | F8 | 0 |\n| F10 | F9 | 0 |\n| F10 | F11 | 0 |\n| F11 | F1 | 0 |\n| F11 | F2 | 1 |\n| F11 | F3 | 0 |\n| F11 | F4 | 32 |\n| F11 | F5 | 1 |\n| F11 | F6 | 0 |\n| F11 | F7 | 0 |\n| F11 | F8 | 0 |\n| F11 | F9 | 0 |\n| F11 | F10 | 0 |\n\nWe'll use these distances and co-purchase counts to score arrangements of the 11 categories on the 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.\n\nOne more thing — when you send back your chosen layout, please use this simple JSON shape so I can read it easily:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\n\"solution\" should be a list where the first entry is the island id where the first produce category goes, the second entry is the island id for the second category, and so on through the list of categories in the instance. This JSON is just a sketch of the expected shape — not your final answer filled in.\n\nPlease make sure to use the exact identifiers from the instance input, with no renaming and no new labels. Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 114, 127, 89, 943, 430, 517, 918, 1232, 1255, 1307 ], [ 114, 0, 29, 91, 879, 537, 623, 807, 1145, 1160, 1215 ], [ 127, 29, 0, 80, 898, 537, 622, 806, 1157, 1169, 1226 ], [ 89, 91, 80, 0, 969, 460, 545, 885, 1235, 1249, 1305 ], [ 943, 879, 898, 969, 0, 1337, 1418, 627, 400, 505, 500 ], [ 430, 537, 537, 460, 1337, 0, 86, 1343, 1653, 1683, 1731 ], [ 517, 623, 622, 545, 1418, 86, 0, 1429, 1738, 1769, 1817 ], [ 918, 807, 806, 885, 627, 1343, 1429, 0, 553, 480, 565 ], [ 1232, 1145, 1157, 1235, 400, 1653, 1738, 553, 0, 140, 101 ], [ 1255, 1160, 1169, 1249, 505, 1683, 1769, 480, 140, 0, 89 ], [ 1307, 1215, 1226, 1305, 500, 1731, 1817, 565, 101, 89, 0 ] ], "flow_matrix": [ [ 0, 0, 256, 516, 0, 0, 0, 11, 0, 0, 2506 ], [ 0, 0, 0, 0, 0, 0, 0, 8054, 0, 0, 1 ], [ 75, 0, 0, 0, 0, 238, 30, 0, 327, 4157, 1 ], [ 0, 0, 0, 0, 0, 0, 0, 897, 0, 0, 0 ], [ 0, 55, 0, 3481, 0, 7, 3781, 760, 1, 0, 0 ], [ 478, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 4529, 53, 0, 6930, 0, 5, 45, 0, 253 ], [ 0, 0, 0, 63, 0, 312, 2, 0, 0, 0, 1 ], [ 18, 0, 0, 19, 18, 0, 0, 1804, 0, 0, 0 ], [ 7559, 2, 4739, 39, 0, 15, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 32, 1, 0, 0, 0, 0, 0, 0 ] ], "objective": 14114391.0 }, "solution": [ 5, 10, 3, 9, 7, 1, 2, 8, 4, 0, 6 ], "obj": 14114391.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 11, "num_locations": 11, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 114 }, { "from_id": 1, "to_id": 3, "distance": 127 }, { "from_id": 1, "to_id": 4, "distance": 89 }, { "from_id": 1, "to_id": 5, "distance": 943 }, { "from_id": 1, "to_id": 6, "distance": 430 }, { "from_id": 1, "to_id": 7, "distance": 517 }, { "from_id": 1, "to_id": 8, "distance": 918 }, { "from_id": 1, "to_id": 9, "distance": 1232 }, { "from_id": 1, "to_id": 10, "distance": 1255 }, { "from_id": 1, "to_id": 11, "distance": 1307 }, { "from_id": 2, "to_id": 1, "distance": 114 }, { "from_id": 2, "to_id": 3, "distance": 29 }, { "from_id": 2, "to_id": 4, "distance": 91 }, { "from_id": 2, "to_id": 5, "distance": 879 }, { "from_id": 2, "to_id": 6, "distance": 537 }, { "from_id": 2, "to_id": 7, "distance": 623 }, { "from_id": 2, "to_id": 8, "distance": 807 }, { "from_id": 2, "to_id": 9, "distance": 1145 }, { "from_id": 2, "to_id": 10, "distance": 1160 }, { "from_id": 2, "to_id": 11, "distance": 1215 }, { "from_id": 3, "to_id": 1, "distance": 127 }, { "from_id": 3, "to_id": 2, "distance": 29 }, { "from_id": 3, "to_id": 4, "distance": 80 }, { "from_id": 3, "to_id": 5, "distance": 898 }, { "from_id": 3, "to_id": 6, "distance": 537 }, { "from_id": 3, "to_id": 7, "distance": 622 }, { "from_id": 3, "to_id": 8, "distance": 806 }, { "from_id": 3, "to_id": 9, "distance": 1157 }, { "from_id": 3, "to_id": 10, "distance": 1169 }, { "from_id": 3, "to_id": 11, "distance": 1226 }, { "from_id": 4, "to_id": 1, "distance": 89 }, { "from_id": 4, "to_id": 2, "distance": 91 }, { "from_id": 4, "to_id": 3, "distance": 80 }, { "from_id": 4, "to_id": 5, "distance": 969 }, { "from_id": 4, "to_id": 6, "distance": 460 }, { "from_id": 4, "to_id": 7, "distance": 545 }, { "from_id": 4, "to_id": 8, "distance": 885 }, { "from_id": 4, "to_id": 9, "distance": 1235 }, { "from_id": 4, "to_id": 10, "distance": 1249 }, { "from_id": 4, "to_id": 11, "distance": 1305 }, { "from_id": 5, "to_id": 1, "distance": 943 }, { "from_id": 5, "to_id": 2, "distance": 879 }, { "from_id": 5, "to_id": 3, "distance": 898 }, { "from_id": 5, "to_id": 4, "distance": 969 }, { "from_id": 5, "to_id": 6, "distance": 1337 }, { "from_id": 5, "to_id": 7, "distance": 1418 }, { "from_id": 5, "to_id": 8, "distance": 627 }, { "from_id": 5, "to_id": 9, "distance": 400 }, { "from_id": 5, "to_id": 10, "distance": 505 }, { "from_id": 5, "to_id": 11, "distance": 500 }, { "from_id": 6, "to_id": 1, "distance": 430 }, { "from_id": 6, "to_id": 2, "distance": 537 }, { "from_id": 6, "to_id": 3, "distance": 537 }, { "from_id": 6, "to_id": 4, "distance": 460 }, { "from_id": 6, "to_id": 5, "distance": 1337 }, { "from_id": 6, "to_id": 7, "distance": 86 }, { "from_id": 6, "to_id": 8, "distance": 1343 }, { "from_id": 6, "to_id": 9, "distance": 1653 }, { "from_id": 6, "to_id": 10, "distance": 1683 }, { "from_id": 6, "to_id": 11, "distance": 1731 }, { "from_id": 7, "to_id": 1, "distance": 517 }, { "from_id": 7, "to_id": 2, "distance": 623 }, { "from_id": 7, "to_id": 3, "distance": 622 }, { "from_id": 7, "to_id": 4, "distance": 545 }, { "from_id": 7, "to_id": 5, "distance": 1418 }, { "from_id": 7, "to_id": 6, "distance": 86 }, { "from_id": 7, "to_id": 8, "distance": 1429 }, { "from_id": 7, "to_id": 9, "distance": 1738 }, { "from_id": 7, "to_id": 10, "distance": 1769 }, { "from_id": 7, "to_id": 11, "distance": 1817 }, { "from_id": 8, "to_id": 1, "distance": 918 }, { "from_id": 8, "to_id": 2, "distance": 807 }, { "from_id": 8, "to_id": 3, "distance": 806 }, { "from_id": 8, "to_id": 4, "distance": 885 }, { "from_id": 8, "to_id": 5, "distance": 627 }, { "from_id": 8, "to_id": 6, "distance": 1343 }, { "from_id": 8, "to_id": 7, "distance": 1429 }, { "from_id": 8, "to_id": 9, "distance": 553 }, { "from_id": 8, "to_id": 10, "distance": 480 }, { "from_id": 8, "to_id": 11, "distance": 565 }, { "from_id": 9, "to_id": 1, "distance": 1232 }, { "from_id": 9, "to_id": 2, "distance": 1145 }, { "from_id": 9, "to_id": 3, "distance": 1157 }, { "from_id": 9, "to_id": 4, "distance": 1235 }, { "from_id": 9, "to_id": 5, "distance": 400 }, { "from_id": 9, "to_id": 6, "distance": 1653 }, { "from_id": 9, "to_id": 7, "distance": 1738 }, { "from_id": 9, "to_id": 8, "distance": 553 }, { "from_id": 9, "to_id": 10, "distance": 140 }, { "from_id": 9, "to_id": 11, "distance": 101 }, { "from_id": 10, "to_id": 1, "distance": 1255 }, { "from_id": 10, "to_id": 2, "distance": 1160 }, { "from_id": 10, "to_id": 3, "distance": 1169 }, { "from_id": 10, "to_id": 4, "distance": 1249 }, { "from_id": 10, "to_id": 5, "distance": 505 }, { "from_id": 10, "to_id": 6, "distance": 1683 }, { "from_id": 10, "to_id": 7, "distance": 1769 }, { "from_id": 10, "to_id": 8, "distance": 480 }, { "from_id": 10, "to_id": 9, "distance": 140 }, { "from_id": 10, "to_id": 11, "distance": 89 }, { "from_id": 11, "to_id": 1, "distance": 1307 }, { "from_id": 11, "to_id": 2, "distance": 1215 }, { "from_id": 11, "to_id": 3, "distance": 1226 }, { "from_id": 11, "to_id": 4, "distance": 1305 }, { "from_id": 11, "to_id": 5, "distance": 500 }, { "from_id": 11, "to_id": 6, "distance": 1731 }, { "from_id": 11, "to_id": 7, "distance": 1817 }, { "from_id": 11, "to_id": 8, "distance": 565 }, { "from_id": 11, "to_id": 9, "distance": 101 }, { "from_id": 11, "to_id": 10, "distance": 89 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 256 }, { "from_id": "F1", "to_id": "F4", "flow": 516 }, { "from_id": "F1", "to_id": "F5", "flow": 0 }, { "from_id": "F1", "to_id": "F6", "flow": 0 }, { "from_id": "F1", "to_id": "F7", "flow": 0 }, { "from_id": "F1", "to_id": "F8", "flow": 11 }, { "from_id": "F1", "to_id": "F9", "flow": 0 }, { "from_id": "F1", "to_id": "F10", "flow": 0 }, { "from_id": "F1", "to_id": "F11", "flow": 2506 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 0 }, { "from_id": "F2", "to_id": "F4", "flow": 0 }, { "from_id": "F2", "to_id": "F5", "flow": 0 }, { "from_id": "F2", "to_id": "F6", "flow": 0 }, { "from_id": "F2", "to_id": "F7", "flow": 0 }, { "from_id": "F2", "to_id": "F8", "flow": 8054 }, { "from_id": "F2", "to_id": "F9", "flow": 0 }, { "from_id": "F2", "to_id": "F10", "flow": 0 }, { "from_id": "F2", "to_id": "F11", "flow": 1 }, { "from_id": "F3", "to_id": "F1", "flow": 75 }, { "from_id": "F3", "to_id": "F2", "flow": 0 }, { "from_id": "F3", "to_id": "F4", "flow": 0 }, { "from_id": "F3", "to_id": "F5", "flow": 0 }, { "from_id": "F3", "to_id": "F6", "flow": 238 }, { "from_id": "F3", "to_id": "F7", "flow": 30 }, { "from_id": "F3", "to_id": "F8", "flow": 0 }, { "from_id": "F3", "to_id": "F9", "flow": 327 }, { "from_id": "F3", "to_id": "F10", "flow": 4157 }, { "from_id": "F3", "to_id": "F11", "flow": 1 }, { "from_id": "F4", "to_id": "F1", "flow": 0 }, { "from_id": "F4", "to_id": "F2", "flow": 0 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 0 }, { "from_id": "F4", "to_id": "F6", "flow": 0 }, { "from_id": "F4", "to_id": "F7", "flow": 0 }, { "from_id": "F4", "to_id": "F8", "flow": 897 }, { "from_id": "F4", "to_id": "F9", "flow": 0 }, { "from_id": "F4", "to_id": "F10", "flow": 0 }, { "from_id": "F4", "to_id": "F11", "flow": 0 }, { "from_id": "F5", "to_id": "F1", "flow": 0 }, { "from_id": "F5", "to_id": "F2", "flow": 55 }, { "from_id": "F5", "to_id": "F3", "flow": 0 }, { "from_id": "F5", "to_id": "F4", "flow": 3481 }, { "from_id": "F5", "to_id": "F6", "flow": 7 }, { "from_id": "F5", "to_id": "F7", "flow": 3781 }, { "from_id": "F5", "to_id": "F8", "flow": 760 }, { "from_id": "F5", "to_id": "F9", "flow": 1 }, { "from_id": "F5", "to_id": "F10", "flow": 0 }, { "from_id": "F5", "to_id": "F11", "flow": 0 }, { "from_id": "F6", "to_id": "F1", "flow": 478 }, { "from_id": "F6", "to_id": "F2", "flow": 20 }, { "from_id": "F6", "to_id": "F3", "flow": 0 }, { "from_id": "F6", "to_id": "F4", "flow": 0 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 0 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F10", "flow": 0 }, { "from_id": "F6", "to_id": "F11", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 0 }, { "from_id": "F7", "to_id": "F2", "flow": 0 }, { "from_id": "F7", "to_id": "F3", "flow": 4529 }, { "from_id": "F7", "to_id": "F4", "flow": 53 }, { "from_id": "F7", "to_id": "F5", "flow": 0 }, { "from_id": "F7", "to_id": "F6", "flow": 6930 }, { "from_id": "F7", "to_id": "F8", "flow": 5 }, { "from_id": "F7", "to_id": "F9", "flow": 45 }, { "from_id": "F7", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F11", "flow": 253 }, { "from_id": "F8", "to_id": "F1", "flow": 0 }, { "from_id": "F8", "to_id": "F2", "flow": 0 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 63 }, { "from_id": "F8", "to_id": "F5", "flow": 0 }, { "from_id": "F8", "to_id": "F6", "flow": 312 }, { "from_id": "F8", "to_id": "F7", "flow": 2 }, { "from_id": "F8", "to_id": "F9", "flow": 0 }, { "from_id": "F8", "to_id": "F10", "flow": 0 }, { "from_id": "F8", "to_id": "F11", "flow": 1 }, { "from_id": "F9", "to_id": "F1", "flow": 18 }, { "from_id": "F9", "to_id": "F2", "flow": 0 }, { "from_id": "F9", "to_id": "F3", "flow": 0 }, { "from_id": "F9", "to_id": "F4", "flow": 19 }, { "from_id": "F9", "to_id": "F5", "flow": 18 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 0 }, { "from_id": "F9", "to_id": "F8", "flow": 1804 }, { "from_id": "F9", "to_id": "F10", "flow": 0 }, { "from_id": "F9", "to_id": "F11", "flow": 0 }, { "from_id": "F10", "to_id": "F1", "flow": 7559 }, { "from_id": "F10", "to_id": "F2", "flow": 2 }, { "from_id": "F10", "to_id": "F3", "flow": 4739 }, { "from_id": "F10", "to_id": "F4", "flow": 39 }, { "from_id": "F10", "to_id": "F5", "flow": 0 }, { "from_id": "F10", "to_id": "F6", "flow": 15 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 0 }, { "from_id": "F10", "to_id": "F9", "flow": 0 }, { "from_id": "F10", "to_id": "F11", "flow": 0 }, { "from_id": "F11", "to_id": "F1", "flow": 0 }, { "from_id": "F11", "to_id": "F2", "flow": 1 }, { "from_id": "F11", "to_id": "F3", "flow": 0 }, { "from_id": "F11", "to_id": "F4", "flow": 32 }, { "from_id": "F11", "to_id": "F5", "flow": 1 }, { "from_id": "F11", "to_id": "F6", "flow": 0 }, { "from_id": "F11", "to_id": "F7", "flow": 0 }, { "from_id": "F11", "to_id": "F8", "flow": 0 }, { "from_id": "F11", "to_id": "F9", "flow": 0 }, { "from_id": "F11", "to_id": "F10", "flow": 0 } ] }, "solution_variant": [ 6, 11, 4, 10, 8, 2, 3, 9, 5, 1, 7 ], "context_index": 11, "input_format": "markdown_table", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "I work in a library where every subject collection has to live on its own single bookcase, and every case can hold only one subject. The job is to arrange those bookcases so that when people grab pairs of titles, the total amount of hauling around is kept as small as possible. Practically that means looking at how often each pair of titles gets requested together and how far apart their bookcases would be, multiplying those two numbers for each pair, and adding all those products up — the smaller that total, the better the layout. No collection can be split across cases or duplicated, and no case can be empty or hold more than one subject. The exact lists of collections, request-pair counts, and shelf spacings are shown below.\n\n# num_collections_and_cases=9\n# subject_collection_ids=F1, F2, F3, F4, F5, F6, F7, F8, F9\n# bookcase_ids=1, 2, 3, 4, 5, 6, 7, 8, 9\n\nfrom_bookcase_id,to_bookcase_id,shelf_distance\n1,2,2\n1,3,1\n1,4,0\n1,5,0\n1,6,0\n1,7,0\n1,8,0\n1,9,0\n2,1,2\n2,3,3\n2,4,0\n2,5,0\n2,6,0\n2,7,0\n2,8,0\n2,9,0\n3,1,1\n3,2,3\n3,4,1\n3,5,0\n3,6,0\n3,7,0\n3,8,0\n3,9,0\n4,1,0\n4,2,0\n4,3,1\n4,5,2\n4,6,1\n4,7,0\n4,8,0\n4,9,0\n5,1,0\n5,2,0\n5,3,0\n5,4,2\n5,6,2\n5,7,0\n5,8,0\n5,9,0\n6,1,0\n6,2,0\n6,3,0\n6,4,1\n6,5,2\n6,7,0\n6,8,0\n6,9,0\n7,1,0\n7,2,0\n7,3,0\n7,4,0\n7,5,0\n7,6,0\n7,8,0\n7,9,0\n8,1,0\n8,2,0\n8,3,0\n8,4,0\n8,5,0\n8,6,0\n8,7,0\n8,9,0\n9,1,0\n9,2,0\n9,3,0\n9,4,0\n9,5,0\n9,6,0\n9,7,0\n9,8,0\n\nfrom_collection_id,to_collection_id,co_request_count\nF1,F2,0\nF1,F3,1\nF1,F4,0\nF1,F5,1\nF1,F6,1\nF1,F7,0\nF1,F8,2\nF1,F9,2\nF2,F1,0\nF2,F3,2\nF2,F4,1\nF2,F5,0\nF2,F6,2\nF2,F7,1\nF2,F8,3\nF2,F9,1\nF3,F1,1\nF3,F2,2\nF3,F4,0\nF3,F5,1\nF3,F6,1\nF3,F7,2\nF3,F8,0\nF3,F9,2\nF4,F1,0\nF4,F2,1\nF4,F3,0\nF4,F5,0\nF4,F6,2\nF4,F7,1\nF4,F8,1\nF4,F9,1\nF5,F1,1\nF5,F2,0\nF5,F3,1\nF5,F4,0\nF5,F6,3\nF5,F7,2\nF5,F8,2\nF5,F9,0\nF6,F1,1\nF6,F2,2\nF6,F3,1\nF6,F4,2\nF6,F5,3\nF6,F7,0\nF6,F8,0\nF6,F9,2\nF7,F1,0\nF7,F2,1\nF7,F3,2\nF7,F4,1\nF7,F5,2\nF7,F6,0\nF7,F8,1\nF7,F9,1\nF8,F1,2\nF8,F2,3\nF8,F3,0\nF8,F4,1\nF8,F5,2\nF8,F6,0\nF8,F7,1\nF8,F9,1\nF9,F1,2\nF9,F2,1\nF9,F3,2\nF9,F4,1\nF9,F5,0\nF9,F6,2\nF9,F7,1\nF9,F8,1\n\nIf you want to send your proposed layout back to me, just use this simple JSON shape so I can read it easily:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of that \"solution\" list as a form: the first item is the case id where the first collection should live, the second item is where the second collection goes, and so on through the whole list. This is just a sketch of the shape I need, not the actual answer—fill in the real case IDs when you reply.\n\nPlease make sure to use the exact identifiers from the instance input — no renaming and no new labels. \nfor example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 2, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 0, 3, 0, 0, 0, 0, 0, 0 ], [ 1, 3, 0, 1, 0, 0, 0, 0, 0 ], [ 0, 0, 1, 0, 2, 1, 0, 0, 0 ], [ 0, 0, 0, 2, 0, 2, 0, 0, 0 ], [ 0, 0, 0, 1, 2, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 0, 1, 0, 1, 1, 0, 2, 2 ], [ 0, 0, 2, 1, 0, 2, 1, 3, 1 ], [ 1, 2, 0, 0, 1, 1, 2, 0, 2 ], [ 0, 1, 0, 0, 0, 2, 1, 1, 1 ], [ 1, 0, 1, 0, 0, 3, 2, 2, 0 ], [ 1, 2, 1, 2, 3, 0, 0, 0, 2 ], [ 0, 1, 2, 1, 2, 0, 0, 1, 1 ], [ 2, 3, 0, 1, 2, 0, 1, 0, 1 ], [ 2, 1, 2, 1, 0, 2, 1, 1, 0 ] ], "objective": 4.0 }, "solution": [ 1, 2, 5, 4, 3, 6, 0, 7, 8 ], "obj": 4.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 2 }, { "from_id": 1, "to_id": 3, "distance": 1 }, { "from_id": 1, "to_id": 4, "distance": 0 }, { "from_id": 1, "to_id": 5, "distance": 0 }, { "from_id": 1, "to_id": 6, "distance": 0 }, { "from_id": 1, "to_id": 7, "distance": 0 }, { "from_id": 1, "to_id": 8, "distance": 0 }, { "from_id": 1, "to_id": 9, "distance": 0 }, { "from_id": 2, "to_id": 1, "distance": 2 }, { "from_id": 2, "to_id": 3, "distance": 3 }, { "from_id": 2, "to_id": 4, "distance": 0 }, { "from_id": 2, "to_id": 5, "distance": 0 }, { "from_id": 2, "to_id": 6, "distance": 0 }, { "from_id": 2, "to_id": 7, "distance": 0 }, { "from_id": 2, "to_id": 8, "distance": 0 }, { "from_id": 2, "to_id": 9, "distance": 0 }, { "from_id": 3, "to_id": 1, "distance": 1 }, { "from_id": 3, "to_id": 2, "distance": 3 }, { "from_id": 3, "to_id": 4, "distance": 1 }, { "from_id": 3, "to_id": 5, "distance": 0 }, { "from_id": 3, "to_id": 6, "distance": 0 }, { "from_id": 3, "to_id": 7, "distance": 0 }, { "from_id": 3, "to_id": 8, "distance": 0 }, { "from_id": 3, "to_id": 9, "distance": 0 }, { "from_id": 4, "to_id": 1, "distance": 0 }, { "from_id": 4, "to_id": 2, "distance": 0 }, { "from_id": 4, "to_id": 3, "distance": 1 }, { "from_id": 4, "to_id": 5, "distance": 2 }, { "from_id": 4, "to_id": 6, "distance": 1 }, { "from_id": 4, "to_id": 7, "distance": 0 }, { "from_id": 4, "to_id": 8, "distance": 0 }, { "from_id": 4, "to_id": 9, "distance": 0 }, { "from_id": 5, "to_id": 1, "distance": 0 }, { "from_id": 5, "to_id": 2, "distance": 0 }, { "from_id": 5, "to_id": 3, "distance": 0 }, { "from_id": 5, "to_id": 4, "distance": 2 }, { "from_id": 5, "to_id": 6, "distance": 2 }, { "from_id": 5, "to_id": 7, "distance": 0 }, { "from_id": 5, "to_id": 8, "distance": 0 }, { "from_id": 5, "to_id": 9, "distance": 0 }, { "from_id": 6, "to_id": 1, "distance": 0 }, { "from_id": 6, "to_id": 2, "distance": 0 }, { "from_id": 6, "to_id": 3, "distance": 0 }, { "from_id": 6, "to_id": 4, "distance": 1 }, { "from_id": 6, "to_id": 5, "distance": 2 }, { "from_id": 6, "to_id": 7, "distance": 0 }, { "from_id": 6, "to_id": 8, "distance": 0 }, { "from_id": 6, "to_id": 9, "distance": 0 }, { "from_id": 7, "to_id": 1, "distance": 0 }, { "from_id": 7, "to_id": 2, "distance": 0 }, { "from_id": 7, "to_id": 3, "distance": 0 }, { "from_id": 7, "to_id": 4, "distance": 0 }, { "from_id": 7, "to_id": 5, "distance": 0 }, { "from_id": 7, "to_id": 6, "distance": 0 }, { "from_id": 7, "to_id": 8, "distance": 0 }, { "from_id": 7, "to_id": 9, "distance": 0 }, { "from_id": 8, "to_id": 1, "distance": 0 }, { "from_id": 8, "to_id": 2, "distance": 0 }, { "from_id": 8, "to_id": 3, "distance": 0 }, { "from_id": 8, "to_id": 4, "distance": 0 }, { "from_id": 8, "to_id": 5, "distance": 0 }, { "from_id": 8, "to_id": 6, "distance": 0 }, { "from_id": 8, "to_id": 7, "distance": 0 }, { "from_id": 8, "to_id": 9, "distance": 0 }, { "from_id": 9, "to_id": 1, "distance": 0 }, { "from_id": 9, "to_id": 2, "distance": 0 }, { "from_id": 9, "to_id": 3, "distance": 0 }, { "from_id": 9, "to_id": 4, "distance": 0 }, { "from_id": 9, "to_id": 5, "distance": 0 }, { "from_id": 9, "to_id": 6, "distance": 0 }, { "from_id": 9, "to_id": 7, "distance": 0 }, { "from_id": 9, "to_id": 8, "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 1 }, { "from_id": "F1", "to_id": "F4", "flow": 0 }, { "from_id": "F1", "to_id": "F5", "flow": 1 }, { "from_id": "F1", "to_id": "F6", "flow": 1 }, { "from_id": "F1", "to_id": "F7", "flow": 0 }, { "from_id": "F1", "to_id": "F8", "flow": 2 }, { "from_id": "F1", "to_id": "F9", "flow": 2 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 2 }, { "from_id": "F2", "to_id": "F4", "flow": 1 }, { "from_id": "F2", "to_id": "F5", "flow": 0 }, { "from_id": "F2", "to_id": "F6", "flow": 2 }, { "from_id": "F2", "to_id": "F7", "flow": 1 }, { "from_id": "F2", "to_id": "F8", "flow": 3 }, { "from_id": "F2", "to_id": "F9", "flow": 1 }, { "from_id": "F3", "to_id": "F1", "flow": 1 }, { "from_id": "F3", "to_id": "F2", "flow": 2 }, { "from_id": "F3", "to_id": "F4", "flow": 0 }, { "from_id": "F3", "to_id": "F5", "flow": 1 }, { "from_id": "F3", "to_id": "F6", "flow": 1 }, { "from_id": "F3", "to_id": "F7", "flow": 2 }, { "from_id": "F3", "to_id": "F8", "flow": 0 }, { "from_id": "F3", "to_id": "F9", "flow": 2 }, { "from_id": "F4", "to_id": "F1", "flow": 0 }, { "from_id": "F4", "to_id": "F2", "flow": 1 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 0 }, { "from_id": "F4", "to_id": "F6", "flow": 2 }, { "from_id": "F4", "to_id": "F7", "flow": 1 }, { "from_id": "F4", "to_id": "F8", "flow": 1 }, { "from_id": "F4", "to_id": "F9", "flow": 1 }, { "from_id": "F5", "to_id": "F1", "flow": 1 }, { "from_id": "F5", "to_id": "F2", "flow": 0 }, { "from_id": "F5", "to_id": "F3", "flow": 1 }, { "from_id": "F5", "to_id": "F4", "flow": 0 }, { "from_id": "F5", "to_id": "F6", "flow": 3 }, { "from_id": "F5", "to_id": "F7", "flow": 2 }, { "from_id": "F5", "to_id": "F8", "flow": 2 }, { "from_id": "F5", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F1", "flow": 1 }, { "from_id": "F6", "to_id": "F2", "flow": 2 }, { "from_id": "F6", "to_id": "F3", "flow": 1 }, { "from_id": "F6", "to_id": "F4", "flow": 2 }, { "from_id": "F6", "to_id": "F5", "flow": 3 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 0 }, { "from_id": "F6", "to_id": "F9", "flow": 2 }, { "from_id": "F7", "to_id": "F1", "flow": 0 }, { "from_id": "F7", "to_id": "F2", "flow": 1 }, { "from_id": "F7", "to_id": "F3", "flow": 2 }, { "from_id": "F7", "to_id": "F4", "flow": 1 }, { "from_id": "F7", "to_id": "F5", "flow": 2 }, { "from_id": "F7", "to_id": "F6", "flow": 0 }, { "from_id": "F7", "to_id": "F8", "flow": 1 }, { "from_id": "F7", "to_id": "F9", "flow": 1 }, { "from_id": "F8", "to_id": "F1", "flow": 2 }, { "from_id": "F8", "to_id": "F2", "flow": 3 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 1 }, { "from_id": "F8", "to_id": "F5", "flow": 2 }, { "from_id": "F8", "to_id": "F6", "flow": 0 }, { "from_id": "F8", "to_id": "F7", "flow": 1 }, { "from_id": "F8", "to_id": "F9", "flow": 1 }, { "from_id": "F9", "to_id": "F1", "flow": 2 }, { "from_id": "F9", "to_id": "F2", "flow": 1 }, { "from_id": "F9", "to_id": "F3", "flow": 2 }, { "from_id": "F9", "to_id": "F4", "flow": 1 }, { "from_id": "F9", "to_id": "F5", "flow": 0 }, { "from_id": "F9", "to_id": "F6", "flow": 2 }, { "from_id": "F9", "to_id": "F7", "flow": 1 }, { "from_id": "F9", "to_id": "F8", "flow": 1 } ] }, "solution_variant": [ 2, 3, 6, 5, 4, 7, 1, 8, 9 ], "context_index": 12, "input_format": "csv", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Recently the ramp supervisor asked for a better parking plan: every piece of service equipment goes into one specific bay, and every bay gets exactly one piece. The way total turnaround delay is measured is simple — for every pair of pieces multiply how often they’re needed together by the distance between their bays, then add all those values up; the parking that produces the lowest overall sum is what we’re aiming for. The detailed equipment roster, bay layout, pair frequencies and distances follow below.\n\nSummary for the records: 10 total service pieces and bays; equipment identifiers F1, F2, F3, F4, F5, F6, F7, F8, F9, F10; bay identifiers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.\n\n| bay_from_id | bay_to_id | bay_distance |\n|---|---|---|\n| 0 | 1 | 2 |\n| 0 | 2 | 0 |\n| 0 | 3 | 2 |\n| 0 | 4 | 2 |\n| 0 | 5 | 1 |\n| 0 | 6 | 1 |\n| 0 | 7 | 2 |\n| 0 | 8 | 2 |\n| 0 | 9 | 0 |\n| 1 | 0 | 2 |\n| 1 | 2 | 0 |\n| 1 | 3 | 0 |\n| 1 | 4 | 2 |\n| 1 | 5 | 5 |\n| 1 | 6 | 6 |\n| 1 | 7 | 0 |\n| 1 | 8 | 5 |\n| 1 | 9 | 2 |\n| 2 | 0 | 0 |\n| 2 | 1 | 0 |\n| 2 | 3 | 5 |\n| 2 | 4 | 2 |\n| 2 | 5 | 0 |\n| 2 | 6 | 2 |\n| 2 | 7 | 0 |\n| 2 | 8 | 4 |\n| 2 | 9 | 10 |\n| 3 | 0 | 2 |\n| 3 | 1 | 0 |\n| 3 | 2 | 5 |\n| 3 | 4 | 0 |\n| 3 | 5 | 2 |\n| 3 | 6 | 0 |\n| 3 | 7 | 6 |\n| 3 | 8 | 2 |\n| 3 | 9 | 5 |\n| 4 | 0 | 2 |\n| 4 | 1 | 2 |\n| 4 | 2 | 2 |\n| 4 | 3 | 0 |\n| 4 | 5 | 5 |\n| 4 | 6 | 1 |\n| 4 | 7 | 0 |\n| 4 | 8 | 5 |\n| 4 | 9 | 2 |\n| 5 | 0 | 1 |\n| 5 | 1 | 5 |\n| 5 | 2 | 0 |\n| 5 | 3 | 2 |\n| 5 | 4 | 5 |\n| 5 | 6 | 0 |\n| 5 | 7 | 0 |\n| 5 | 8 | 0 |\n| 5 | 9 | 5 |\n| 6 | 0 | 1 |\n| 6 | 1 | 6 |\n| 6 | 2 | 2 |\n| 6 | 3 | 0 |\n| 6 | 4 | 1 |\n| 6 | 5 | 0 |\n| 6 | 7 | 5 |\n| 6 | 8 | 2 |\n| 6 | 9 | 3 |\n| 7 | 0 | 2 |\n| 7 | 1 | 0 |\n| 7 | 2 | 0 |\n| 7 | 3 | 6 |\n| 7 | 4 | 0 |\n| 7 | 5 | 0 |\n| 7 | 6 | 5 |\n| 7 | 8 | 4 |\n| 7 | 9 | 1 |\n| 8 | 0 | 2 |\n| 8 | 1 | 5 |\n| 8 | 2 | 4 |\n| 8 | 3 | 2 |\n| 8 | 4 | 5 |\n| 8 | 5 | 0 |\n| 8 | 6 | 2 |\n| 8 | 7 | 4 |\n| 8 | 9 | 0 |\n| 9 | 0 | 0 |\n| 9 | 1 | 2 |\n| 9 | 2 | 10 |\n| 9 | 3 | 5 |\n| 9 | 4 | 2 |\n| 9 | 5 | 5 |\n| 9 | 6 | 3 |\n| 9 | 7 | 1 |\n| 9 | 8 | 0 |\n\n| equipment_from_id | equipment_to_id | pairing_frequency |\n|---|---|---|\n| F1 | F2 | 4 |\n| F1 | F3 | 2 |\n| F1 | F4 | 3 |\n| F1 | F5 | 5 |\n| F1 | F6 | 3 |\n| F1 | F7 | 4 |\n| F1 | F8 | 5 |\n| F1 | F9 | 6 |\n| F1 | F10 | 4 |\n| F2 | F1 | 4 |\n| F2 | F3 | 4 |\n| F2 | F4 | 5 |\n| F2 | F5 | 1 |\n| F2 | F6 | 3 |\n| F2 | F7 | 6 |\n| F2 | F8 | 7 |\n| F2 | F9 | 2 |\n| F2 | F10 | 4 |\n| F3 | F1 | 2 |\n| F3 | F2 | 4 |\n| F3 | F4 | 1 |\n| F3 | F5 | 5 |\n| F3 | F6 | 3 |\n| F3 | F7 | 2 |\n| F3 | F8 | 3 |\n| F3 | F9 | 6 |\n| F3 | F10 | 4 |\n| F4 | F1 | 3 |\n| F4 | F2 | 5 |\n| F4 | F3 | 1 |\n| F4 | F5 | 6 |\n| F4 | F6 | 4 |\n| F4 | F7 | 1 |\n| F4 | F8 | 2 |\n| F4 | F9 | 7 |\n| F4 | F10 | 5 |\n| F5 | F1 | 5 |\n| F5 | F2 | 1 |\n| F5 | F3 | 5 |\n| F5 | F4 | 6 |\n| F5 | F6 | 2 |\n| F5 | F7 | 5 |\n| F5 | F8 | 6 |\n| F5 | F9 | 1 |\n| F5 | F10 | 3 |\n| F6 | F1 | 3 |\n| F6 | F2 | 3 |\n| F6 | F3 | 3 |\n| F6 | F4 | 4 |\n| F6 | F5 | 2 |\n| F6 | F7 | 3 |\n| F6 | F8 | 4 |\n| F6 | F9 | 3 |\n| F6 | F10 | 1 |\n| F7 | F1 | 4 |\n| F7 | F2 | 6 |\n| F7 | F3 | 2 |\n| F7 | F4 | 1 |\n| F7 | F5 | 5 |\n| F7 | F6 | 3 |\n| F7 | F8 | 1 |\n| F7 | F9 | 6 |\n| F7 | F10 | 4 |\n| F8 | F1 | 5 |\n| F8 | F2 | 7 |\n| F8 | F3 | 3 |\n| F8 | F4 | 2 |\n| F8 | F5 | 6 |\n| F8 | F6 | 4 |\n| F8 | F7 | 1 |\n| F8 | F9 | 7 |\n| F8 | F10 | 5 |\n| F9 | F1 | 6 |\n| F9 | F2 | 2 |\n| F9 | F3 | 6 |\n| F9 | F4 | 7 |\n| F9 | F5 | 1 |\n| F9 | F6 | 3 |\n| F9 | F7 | 6 |\n| F9 | F8 | 7 |\n| F9 | F10 | 2 |\n| F10 | F1 | 4 |\n| F10 | F2 | 4 |\n| F10 | F3 | 4 |\n| F10 | F4 | 5 |\n| F10 | F5 | 3 |\n| F10 | F6 | 1 |\n| F10 | F7 | 4 |\n| F10 | F8 | 5 |\n| F10 | F9 | 2 |\n\nThese entries are provided to compute the parking assignment that minimizes total turnaround delay.\n\nWhen you send back the parking plan, just use a tiny JSON object so it's easy to parse — something casual like this will do:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of that \"solution\" list as a simple checklist: the first entry says which bay the first item on the equipment roster goes to, the second entry is for the second item, and so on. The angled-bracket names are just placeholders showing the shape I expect — you'll replace each with the actual bay identifier from the instance.\n\nThis JSON is only a sketch of the shape I need, not the final answer itself. Please use the exact identifiers as they appear in the instance input — do not rename them or invent new labels.\n\n- Valid identifiers look like plain numbers such as \"1\" or \"23\", single capital letters like \"A\" or \"B\", or a capital letter followed by digits like \"A1\" or \"X7\".", "instance": { "distance_matrix": [ [ 0, 2, 0, 2, 2, 1, 1, 2, 2, 0 ], [ 2, 0, 0, 0, 2, 5, 6, 0, 5, 2 ], [ 0, 0, 0, 5, 2, 0, 2, 0, 4, 10 ], [ 2, 0, 5, 0, 0, 2, 0, 6, 2, 5 ], [ 2, 2, 2, 0, 0, 5, 1, 0, 5, 2 ], [ 1, 5, 0, 2, 5, 0, 0, 0, 0, 5 ], [ 1, 6, 2, 0, 1, 0, 0, 5, 2, 3 ], [ 2, 0, 0, 6, 0, 0, 5, 0, 4, 1 ], [ 2, 5, 4, 2, 5, 0, 2, 4, 0, 0 ], [ 0, 2, 10, 5, 2, 5, 3, 1, 0, 0 ] ], "flow_matrix": [ [ 0, 4, 2, 3, 5, 3, 4, 5, 6, 4 ], [ 4, 0, 4, 5, 1, 3, 6, 7, 2, 4 ], [ 2, 4, 0, 1, 5, 3, 2, 3, 6, 4 ], [ 3, 5, 1, 0, 6, 4, 1, 2, 7, 5 ], [ 5, 1, 5, 6, 0, 2, 5, 6, 1, 3 ], [ 3, 3, 3, 4, 2, 0, 3, 4, 3, 1 ], [ 4, 6, 2, 1, 5, 3, 0, 1, 6, 4 ], [ 5, 7, 3, 2, 6, 4, 1, 0, 7, 5 ], [ 6, 2, 6, 7, 1, 3, 6, 7, 0, 2 ], [ 4, 4, 4, 5, 3, 1, 4, 5, 2, 0 ] ], "objective": 566.0 }, "solution": [ 0, 2, 8, 4, 9, 6, 1, 5, 3, 7 ], "obj": 566.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 2 }, { "from_id": 0, "to_id": 2, "distance": 0 }, { "from_id": 0, "to_id": 3, "distance": 2 }, { "from_id": 0, "to_id": 4, "distance": 2 }, { "from_id": 0, "to_id": 5, "distance": 1 }, { "from_id": 0, "to_id": 6, "distance": 1 }, { "from_id": 0, "to_id": 7, "distance": 2 }, { "from_id": 0, "to_id": 8, "distance": 2 }, { "from_id": 0, "to_id": 9, "distance": 0 }, { "from_id": 1, "to_id": 0, "distance": 2 }, { "from_id": 1, "to_id": 2, "distance": 0 }, { "from_id": 1, "to_id": 3, "distance": 0 }, { "from_id": 1, "to_id": 4, "distance": 2 }, { "from_id": 1, "to_id": 5, "distance": 5 }, { "from_id": 1, "to_id": 6, "distance": 6 }, { "from_id": 1, "to_id": 7, "distance": 0 }, { "from_id": 1, "to_id": 8, "distance": 5 }, { "from_id": 1, "to_id": 9, "distance": 2 }, { "from_id": 2, "to_id": 0, "distance": 0 }, { "from_id": 2, "to_id": 1, "distance": 0 }, { "from_id": 2, "to_id": 3, "distance": 5 }, { "from_id": 2, "to_id": 4, "distance": 2 }, { "from_id": 2, "to_id": 5, "distance": 0 }, { "from_id": 2, "to_id": 6, "distance": 2 }, { "from_id": 2, "to_id": 7, "distance": 0 }, { "from_id": 2, "to_id": 8, "distance": 4 }, { "from_id": 2, "to_id": 9, "distance": 10 }, { "from_id": 3, "to_id": 0, "distance": 2 }, { "from_id": 3, "to_id": 1, "distance": 0 }, { "from_id": 3, "to_id": 2, "distance": 5 }, { "from_id": 3, "to_id": 4, "distance": 0 }, { "from_id": 3, "to_id": 5, "distance": 2 }, { "from_id": 3, "to_id": 6, "distance": 0 }, { "from_id": 3, "to_id": 7, "distance": 6 }, { "from_id": 3, "to_id": 8, "distance": 2 }, { "from_id": 3, "to_id": 9, "distance": 5 }, { "from_id": 4, "to_id": 0, "distance": 2 }, { "from_id": 4, "to_id": 1, "distance": 2 }, { "from_id": 4, "to_id": 2, "distance": 2 }, { "from_id": 4, "to_id": 3, "distance": 0 }, { "from_id": 4, "to_id": 5, "distance": 5 }, { "from_id": 4, "to_id": 6, "distance": 1 }, { "from_id": 4, "to_id": 7, "distance": 0 }, { "from_id": 4, "to_id": 8, "distance": 5 }, { "from_id": 4, "to_id": 9, "distance": 2 }, { "from_id": 5, "to_id": 0, "distance": 1 }, { "from_id": 5, "to_id": 1, "distance": 5 }, { "from_id": 5, "to_id": 2, "distance": 0 }, { "from_id": 5, "to_id": 3, "distance": 2 }, { "from_id": 5, "to_id": 4, "distance": 5 }, { "from_id": 5, "to_id": 6, "distance": 0 }, { "from_id": 5, "to_id": 7, "distance": 0 }, { "from_id": 5, "to_id": 8, "distance": 0 }, { "from_id": 5, "to_id": 9, "distance": 5 }, { "from_id": 6, "to_id": 0, "distance": 1 }, { "from_id": 6, "to_id": 1, "distance": 6 }, { "from_id": 6, "to_id": 2, "distance": 2 }, { "from_id": 6, "to_id": 3, "distance": 0 }, { "from_id": 6, "to_id": 4, "distance": 1 }, { "from_id": 6, "to_id": 5, "distance": 0 }, { "from_id": 6, "to_id": 7, "distance": 5 }, { "from_id": 6, "to_id": 8, "distance": 2 }, { "from_id": 6, "to_id": 9, "distance": 3 }, { "from_id": 7, "to_id": 0, "distance": 2 }, { "from_id": 7, "to_id": 1, "distance": 0 }, { "from_id": 7, "to_id": 2, "distance": 0 }, { "from_id": 7, "to_id": 3, "distance": 6 }, { "from_id": 7, "to_id": 4, "distance": 0 }, { "from_id": 7, "to_id": 5, "distance": 0 }, { "from_id": 7, "to_id": 6, "distance": 5 }, { "from_id": 7, "to_id": 8, "distance": 4 }, { "from_id": 7, "to_id": 9, "distance": 1 }, { "from_id": 8, "to_id": 0, "distance": 2 }, { "from_id": 8, "to_id": 1, "distance": 5 }, { "from_id": 8, "to_id": 2, "distance": 4 }, { "from_id": 8, "to_id": 3, "distance": 2 }, { "from_id": 8, "to_id": 4, "distance": 5 }, { "from_id": 8, "to_id": 5, "distance": 0 }, { "from_id": 8, "to_id": 6, "distance": 2 }, { "from_id": 8, "to_id": 7, "distance": 4 }, { "from_id": 8, "to_id": 9, "distance": 0 }, { "from_id": 9, "to_id": 0, "distance": 0 }, { "from_id": 9, "to_id": 1, "distance": 2 }, { "from_id": 9, "to_id": 2, "distance": 10 }, { "from_id": 9, "to_id": 3, "distance": 5 }, { "from_id": 9, "to_id": 4, "distance": 2 }, { "from_id": 9, "to_id": 5, "distance": 5 }, { "from_id": 9, "to_id": 6, "distance": 3 }, { "from_id": 9, "to_id": 7, "distance": 1 }, { "from_id": 9, "to_id": 8, "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 4 }, { "from_id": "F1", "to_id": "F3", "flow": 2 }, { "from_id": "F1", "to_id": "F4", "flow": 3 }, { "from_id": "F1", "to_id": "F5", "flow": 5 }, { "from_id": "F1", "to_id": "F6", "flow": 3 }, { "from_id": "F1", "to_id": "F7", "flow": 4 }, { "from_id": "F1", "to_id": "F8", "flow": 5 }, { "from_id": "F1", "to_id": "F9", "flow": 6 }, { "from_id": "F1", "to_id": "F10", "flow": 4 }, { "from_id": "F2", "to_id": "F1", "flow": 4 }, { "from_id": "F2", "to_id": "F3", "flow": 4 }, { "from_id": "F2", "to_id": "F4", "flow": 5 }, { "from_id": "F2", "to_id": "F5", "flow": 1 }, { "from_id": "F2", "to_id": "F6", "flow": 3 }, { "from_id": "F2", "to_id": "F7", "flow": 6 }, { "from_id": "F2", "to_id": "F8", "flow": 7 }, { "from_id": "F2", "to_id": "F9", "flow": 2 }, { "from_id": "F2", "to_id": "F10", "flow": 4 }, { "from_id": "F3", "to_id": "F1", "flow": 2 }, { "from_id": "F3", "to_id": "F2", "flow": 4 }, { "from_id": "F3", "to_id": "F4", "flow": 1 }, { "from_id": "F3", "to_id": "F5", "flow": 5 }, { "from_id": "F3", "to_id": "F6", "flow": 3 }, { "from_id": "F3", "to_id": "F7", "flow": 2 }, { "from_id": "F3", "to_id": "F8", "flow": 3 }, { "from_id": "F3", "to_id": "F9", "flow": 6 }, { "from_id": "F3", "to_id": "F10", "flow": 4 }, { "from_id": "F4", "to_id": "F1", "flow": 3 }, { "from_id": "F4", "to_id": "F2", "flow": 5 }, { "from_id": "F4", "to_id": "F3", "flow": 1 }, { "from_id": "F4", "to_id": "F5", "flow": 6 }, { "from_id": "F4", "to_id": "F6", "flow": 4 }, { "from_id": "F4", "to_id": "F7", "flow": 1 }, { "from_id": "F4", "to_id": "F8", "flow": 2 }, { "from_id": "F4", "to_id": "F9", "flow": 7 }, { "from_id": "F4", "to_id": "F10", "flow": 5 }, { "from_id": "F5", "to_id": "F1", "flow": 5 }, { "from_id": "F5", "to_id": "F2", "flow": 1 }, { "from_id": "F5", "to_id": "F3", "flow": 5 }, { "from_id": "F5", "to_id": "F4", "flow": 6 }, { "from_id": "F5", "to_id": "F6", "flow": 2 }, { "from_id": "F5", "to_id": "F7", "flow": 5 }, { "from_id": "F5", "to_id": "F8", "flow": 6 }, { "from_id": "F5", "to_id": "F9", "flow": 1 }, { "from_id": "F5", "to_id": "F10", "flow": 3 }, { "from_id": "F6", "to_id": "F1", "flow": 3 }, { "from_id": "F6", "to_id": "F2", "flow": 3 }, { "from_id": "F6", "to_id": "F3", "flow": 3 }, { "from_id": "F6", "to_id": "F4", "flow": 4 }, { "from_id": "F6", "to_id": "F5", "flow": 2 }, { "from_id": "F6", "to_id": "F7", "flow": 3 }, { "from_id": "F6", "to_id": "F8", "flow": 4 }, { "from_id": "F6", "to_id": "F9", "flow": 3 }, { "from_id": "F6", "to_id": "F10", "flow": 1 }, { "from_id": "F7", "to_id": "F1", "flow": 4 }, { "from_id": "F7", "to_id": "F2", "flow": 6 }, { "from_id": "F7", "to_id": "F3", "flow": 2 }, { "from_id": "F7", "to_id": "F4", "flow": 1 }, { "from_id": "F7", "to_id": "F5", "flow": 5 }, { "from_id": "F7", "to_id": "F6", "flow": 3 }, { "from_id": "F7", "to_id": "F8", "flow": 1 }, { "from_id": "F7", "to_id": "F9", "flow": 6 }, { "from_id": "F7", "to_id": "F10", "flow": 4 }, { "from_id": "F8", "to_id": "F1", "flow": 5 }, { "from_id": "F8", "to_id": "F2", "flow": 7 }, { "from_id": "F8", "to_id": "F3", "flow": 3 }, { "from_id": "F8", "to_id": "F4", "flow": 2 }, { "from_id": "F8", "to_id": "F5", "flow": 6 }, { "from_id": "F8", "to_id": "F6", "flow": 4 }, { "from_id": "F8", "to_id": "F7", "flow": 1 }, { "from_id": "F8", "to_id": "F9", "flow": 7 }, { "from_id": "F8", "to_id": "F10", "flow": 5 }, { "from_id": "F9", "to_id": "F1", "flow": 6 }, { "from_id": "F9", "to_id": "F2", "flow": 2 }, { "from_id": "F9", "to_id": "F3", "flow": 6 }, { "from_id": "F9", "to_id": "F4", "flow": 7 }, { "from_id": "F9", "to_id": "F5", "flow": 1 }, { "from_id": "F9", "to_id": "F6", "flow": 3 }, { "from_id": "F9", "to_id": "F7", "flow": 6 }, { "from_id": "F9", "to_id": "F8", "flow": 7 }, { "from_id": "F9", "to_id": "F10", "flow": 2 }, { "from_id": "F10", "to_id": "F1", "flow": 4 }, { "from_id": "F10", "to_id": "F2", "flow": 4 }, { "from_id": "F10", "to_id": "F3", "flow": 4 }, { "from_id": "F10", "to_id": "F4", "flow": 5 }, { "from_id": "F10", "to_id": "F5", "flow": 3 }, { "from_id": "F10", "to_id": "F6", "flow": 1 }, { "from_id": "F10", "to_id": "F7", "flow": 4 }, { "from_id": "F10", "to_id": "F8", "flow": 5 }, { "from_id": "F10", "to_id": "F9", "flow": 2 } ] }, "solution_variant": [ 0, 2, 8, 4, 9, 6, 1, 5, 3, 7 ], "context_index": 13, "input_format": "markdown_table", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Recently the layout team had to reassign machines to bays so the plant spends less time moving parts around. Every machine gets exactly one bay and each bay gets exactly one machine; then for each pair of machines the cost contribution is how often they transfer parts times how far apart their bays are, and all those contributions are added up to give the overall material handling cost — the aim is to keep that overall number down. The full list of distances and transfer frequencies is shown below.\n\nThere are 9 machines and bays; machine identifiers are F1, F2, F3, F4, F5, F6, F7, F8, F9 and bay identifiers are 0, 1, 2, 3, 4, 5, 6, 7, 8.\n\n| bay_from_id | bay_to_id | travel_distance_between_bays |\n|---|---|---|\n| 0 | 1 | 180 |\n| 0 | 2 | 0 |\n| 0 | 3 | 112 |\n| 0 | 4 | 0 |\n| 0 | 5 | 0 |\n| 0 | 6 | 0 |\n| 0 | 7 | 0 |\n| 0 | 8 | 0 |\n| 1 | 0 | 180 |\n| 1 | 2 | 0 |\n| 1 | 3 | 0 |\n| 1 | 4 | 0 |\n| 1 | 5 | 0 |\n| 1 | 6 | 0 |\n| 1 | 7 | 690 |\n| 1 | 8 | 0 |\n| 2 | 0 | 0 |\n| 2 | 1 | 0 |\n| 2 | 3 | 0 |\n| 2 | 4 | 0 |\n| 2 | 5 | 0 |\n| 2 | 6 | 0 |\n| 2 | 7 | 750 |\n| 2 | 8 | 3345 |\n| 3 | 0 | 112 |\n| 3 | 1 | 0 |\n| 3 | 2 | 0 |\n| 3 | 4 | 225 |\n| 3 | 5 | 0 |\n| 3 | 6 | 0 |\n| 3 | 7 | 0 |\n| 3 | 8 | 0 |\n| 4 | 0 | 0 |\n| 4 | 1 | 0 |\n| 4 | 2 | 0 |\n| 4 | 3 | 225 |\n| 4 | 5 | 1500 |\n| 4 | 6 | 0 |\n| 4 | 7 | 840 |\n| 4 | 8 | 0 |\n| 5 | 0 | 0 |\n| 5 | 1 | 0 |\n| 5 | 2 | 0 |\n| 5 | 3 | 0 |\n| 5 | 4 | 1500 |\n| 5 | 6 | 0 |\n| 5 | 7 | 750 |\n| 5 | 8 | 0 |\n| 6 | 0 | 0 |\n| 6 | 1 | 0 |\n| 6 | 2 | 0 |\n| 6 | 3 | 0 |\n| 6 | 4 | 0 |\n| 6 | 5 | 0 |\n| 6 | 7 | 465 |\n| 6 | 8 | 0 |\n| 7 | 0 | 0 |\n| 7 | 1 | 690 |\n| 7 | 2 | 750 |\n| 7 | 3 | 0 |\n| 7 | 4 | 840 |\n| 7 | 5 | 750 |\n| 7 | 6 | 465 |\n| 7 | 8 | 0 |\n| 8 | 0 | 0 |\n| 8 | 1 | 0 |\n| 8 | 2 | 3345 |\n| 8 | 3 | 0 |\n| 8 | 4 | 0 |\n| 8 | 5 | 0 |\n| 8 | 6 | 0 |\n| 8 | 7 | 0 |\n\n| machine_from_id | machine_to_id | part_transfer_frequency |\n|---|---|---|\n| F1 | F2 | 1 |\n| F1 | F3 | 4 |\n| F1 | F4 | 4 |\n| F1 | F5 | 5 |\n| F1 | F6 | 4 |\n| F1 | F7 | 5 |\n| F1 | F8 | 6 |\n| F1 | F9 | 7 |\n| F2 | F1 | 1 |\n| F2 | F3 | 3 |\n| F2 | F4 | 3 |\n| F2 | F5 | 4 |\n| F2 | F6 | 5 |\n| F2 | F7 | 4 |\n| F2 | F8 | 5 |\n| F2 | F9 | 6 |\n| F3 | F1 | 4 |\n| F3 | F2 | 3 |\n| F3 | F4 | 2 |\n| F3 | F5 | 1 |\n| F3 | F6 | 6 |\n| F3 | F7 | 5 |\n| F3 | F8 | 4 |\n| F3 | F9 | 3 |\n| F4 | F1 | 4 |\n| F4 | F2 | 3 |\n| F4 | F3 | 2 |\n| F4 | F5 | 1 |\n| F4 | F6 | 4 |\n| F4 | F7 | 3 |\n| F4 | F8 | 2 |\n| F4 | F9 | 3 |\n| F5 | F1 | 5 |\n| F5 | F2 | 4 |\n| F5 | F3 | 1 |\n| F5 | F4 | 1 |\n| F5 | F6 | 5 |\n| F5 | F7 | 4 |\n| F5 | F8 | 3 |\n| F5 | F9 | 2 |\n| F6 | F1 | 4 |\n| F6 | F2 | 5 |\n| F6 | F3 | 6 |\n| F6 | F4 | 4 |\n| F6 | F5 | 5 |\n| F6 | F7 | 1 |\n| F6 | F8 | 2 |\n| F6 | F9 | 3 |\n| F7 | F1 | 5 |\n| F7 | F2 | 4 |\n| F7 | F3 | 5 |\n| F7 | F4 | 3 |\n| F7 | F5 | 4 |\n| F7 | F6 | 1 |\n| F7 | F8 | 1 |\n| F7 | F9 | 2 |\n| F8 | F1 | 6 |\n| F8 | F2 | 5 |\n| F8 | F3 | 4 |\n| F8 | F4 | 2 |\n| F8 | F5 | 3 |\n| F8 | F6 | 2 |\n| F8 | F7 | 1 |\n| F8 | F9 | 1 |\n| F9 | F1 | 7 |\n| F9 | F2 | 6 |\n| F9 | F3 | 3 |\n| F9 | F4 | 3 |\n| F9 | F5 | 2 |\n| F9 | F6 | 3 |\n| F9 | F7 | 2 |\n| F9 | F8 | 1 |\n\nThese records are used together to compute the total material handling cost.\n\nIf you'd like to give the assignment back to me, a compact JSON like this works best — nothing fancy, just a list that says which bay each machine goes to:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis \"solution\" array is just a simple mapping: the first entry is the bay for the first machine, the second entry is the bay for the second machine, and so on. Think of the angle-bracket placeholders as blanks to fill in with the exact bay identifiers from the instance — it's just a sketch of the shape I need, not the final answer.\n\nPlease make sure to use the identifiers exactly as they appear in the problem input — do not rename them or invent new labels. To be clear, valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 180, 0, 112, 0, 0, 0, 0, 0 ], [ 180, 0, 0, 0, 0, 0, 0, 690, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 750, 3345 ], [ 112, 0, 0, 0, 225, 0, 0, 0, 0 ], [ 0, 0, 0, 225, 0, 1500, 0, 840, 0 ], [ 0, 0, 0, 0, 1500, 0, 0, 750, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 465, 0 ], [ 0, 690, 750, 0, 840, 750, 465, 0, 0 ], [ 0, 0, 3345, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 1, 4, 4, 5, 4, 5, 6, 7 ], [ 1, 0, 3, 3, 4, 5, 4, 5, 6 ], [ 4, 3, 0, 2, 1, 6, 5, 4, 3 ], [ 4, 3, 2, 0, 1, 4, 3, 2, 3 ], [ 5, 4, 1, 1, 0, 5, 4, 3, 2 ], [ 4, 5, 6, 4, 5, 0, 1, 2, 3 ], [ 5, 4, 5, 3, 4, 1, 0, 1, 2 ], [ 6, 5, 4, 2, 3, 2, 1, 0, 1 ], [ 7, 6, 3, 3, 2, 3, 2, 1, 0 ] ], "objective": 25844.0 }, "solution": [ 3, 0, 8, 1, 2, 4, 5, 7, 6 ], "obj": 25844.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 180 }, { "from_id": 0, "to_id": 2, "distance": 0 }, { "from_id": 0, "to_id": 3, "distance": 112 }, { "from_id": 0, "to_id": 4, "distance": 0 }, { "from_id": 0, "to_id": 5, "distance": 0 }, { "from_id": 0, "to_id": 6, "distance": 0 }, { "from_id": 0, "to_id": 7, "distance": 0 }, { "from_id": 0, "to_id": 8, "distance": 0 }, { "from_id": 1, "to_id": 0, "distance": 180 }, { "from_id": 1, "to_id": 2, "distance": 0 }, { "from_id": 1, "to_id": 3, "distance": 0 }, { "from_id": 1, "to_id": 4, "distance": 0 }, { "from_id": 1, "to_id": 5, "distance": 0 }, { "from_id": 1, "to_id": 6, "distance": 0 }, { "from_id": 1, "to_id": 7, "distance": 690 }, { "from_id": 1, "to_id": 8, "distance": 0 }, { "from_id": 2, "to_id": 0, "distance": 0 }, { "from_id": 2, "to_id": 1, "distance": 0 }, { "from_id": 2, "to_id": 3, "distance": 0 }, { "from_id": 2, "to_id": 4, "distance": 0 }, { "from_id": 2, "to_id": 5, "distance": 0 }, { "from_id": 2, "to_id": 6, "distance": 0 }, { "from_id": 2, "to_id": 7, "distance": 750 }, { "from_id": 2, "to_id": 8, "distance": 3345 }, { "from_id": 3, "to_id": 0, "distance": 112 }, { "from_id": 3, "to_id": 1, "distance": 0 }, { "from_id": 3, "to_id": 2, "distance": 0 }, { "from_id": 3, "to_id": 4, "distance": 225 }, { "from_id": 3, "to_id": 5, "distance": 0 }, { "from_id": 3, "to_id": 6, "distance": 0 }, { "from_id": 3, "to_id": 7, "distance": 0 }, { "from_id": 3, "to_id": 8, "distance": 0 }, { "from_id": 4, "to_id": 0, "distance": 0 }, { "from_id": 4, "to_id": 1, "distance": 0 }, { "from_id": 4, "to_id": 2, "distance": 0 }, { "from_id": 4, "to_id": 3, "distance": 225 }, { "from_id": 4, "to_id": 5, "distance": 1500 }, { "from_id": 4, "to_id": 6, "distance": 0 }, { "from_id": 4, "to_id": 7, "distance": 840 }, { "from_id": 4, "to_id": 8, "distance": 0 }, { "from_id": 5, "to_id": 0, "distance": 0 }, { "from_id": 5, "to_id": 1, "distance": 0 }, { "from_id": 5, "to_id": 2, "distance": 0 }, { "from_id": 5, "to_id": 3, "distance": 0 }, { "from_id": 5, "to_id": 4, "distance": 1500 }, { "from_id": 5, "to_id": 6, "distance": 0 }, { "from_id": 5, "to_id": 7, "distance": 750 }, { "from_id": 5, "to_id": 8, "distance": 0 }, { "from_id": 6, "to_id": 0, "distance": 0 }, { "from_id": 6, "to_id": 1, "distance": 0 }, { "from_id": 6, "to_id": 2, "distance": 0 }, { "from_id": 6, "to_id": 3, "distance": 0 }, { "from_id": 6, "to_id": 4, "distance": 0 }, { "from_id": 6, "to_id": 5, "distance": 0 }, { "from_id": 6, "to_id": 7, "distance": 465 }, { "from_id": 6, "to_id": 8, "distance": 0 }, { "from_id": 7, "to_id": 0, "distance": 0 }, { "from_id": 7, "to_id": 1, "distance": 690 }, { "from_id": 7, "to_id": 2, "distance": 750 }, { "from_id": 7, "to_id": 3, "distance": 0 }, { "from_id": 7, "to_id": 4, "distance": 840 }, { "from_id": 7, "to_id": 5, "distance": 750 }, { "from_id": 7, "to_id": 6, "distance": 465 }, { "from_id": 7, "to_id": 8, "distance": 0 }, { "from_id": 8, "to_id": 0, "distance": 0 }, { "from_id": 8, "to_id": 1, "distance": 0 }, { "from_id": 8, "to_id": 2, "distance": 3345 }, { "from_id": 8, "to_id": 3, "distance": 0 }, { "from_id": 8, "to_id": 4, "distance": 0 }, { "from_id": 8, "to_id": 5, "distance": 0 }, { "from_id": 8, "to_id": 6, "distance": 0 }, { "from_id": 8, "to_id": 7, "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 1 }, { "from_id": "F1", "to_id": "F3", "flow": 4 }, { "from_id": "F1", "to_id": "F4", "flow": 4 }, { "from_id": "F1", "to_id": "F5", "flow": 5 }, { "from_id": "F1", "to_id": "F6", "flow": 4 }, { "from_id": "F1", "to_id": "F7", "flow": 5 }, { "from_id": "F1", "to_id": "F8", "flow": 6 }, { "from_id": "F1", "to_id": "F9", "flow": 7 }, { "from_id": "F2", "to_id": "F1", "flow": 1 }, { "from_id": "F2", "to_id": "F3", "flow": 3 }, { "from_id": "F2", "to_id": "F4", "flow": 3 }, { "from_id": "F2", "to_id": "F5", "flow": 4 }, { "from_id": "F2", "to_id": "F6", "flow": 5 }, { "from_id": "F2", "to_id": "F7", "flow": 4 }, { "from_id": "F2", "to_id": "F8", "flow": 5 }, { "from_id": "F2", "to_id": "F9", "flow": 6 }, { "from_id": "F3", "to_id": "F1", "flow": 4 }, { "from_id": "F3", "to_id": "F2", "flow": 3 }, { "from_id": "F3", "to_id": "F4", "flow": 2 }, { "from_id": "F3", "to_id": "F5", "flow": 1 }, { "from_id": "F3", "to_id": "F6", "flow": 6 }, { "from_id": "F3", "to_id": "F7", "flow": 5 }, { "from_id": "F3", "to_id": "F8", "flow": 4 }, { "from_id": "F3", "to_id": "F9", "flow": 3 }, { "from_id": "F4", "to_id": "F1", "flow": 4 }, { "from_id": "F4", "to_id": "F2", "flow": 3 }, { "from_id": "F4", "to_id": "F3", "flow": 2 }, { "from_id": "F4", "to_id": "F5", "flow": 1 }, { "from_id": "F4", "to_id": "F6", "flow": 4 }, { "from_id": "F4", "to_id": "F7", "flow": 3 }, { "from_id": "F4", "to_id": "F8", "flow": 2 }, { "from_id": "F4", "to_id": "F9", "flow": 3 }, { "from_id": "F5", "to_id": "F1", "flow": 5 }, { "from_id": "F5", "to_id": "F2", "flow": 4 }, { "from_id": "F5", "to_id": "F3", "flow": 1 }, { "from_id": "F5", "to_id": "F4", "flow": 1 }, { "from_id": "F5", "to_id": "F6", "flow": 5 }, { "from_id": "F5", "to_id": "F7", "flow": 4 }, { "from_id": "F5", "to_id": "F8", "flow": 3 }, { "from_id": "F5", "to_id": "F9", "flow": 2 }, { "from_id": "F6", "to_id": "F1", "flow": 4 }, { "from_id": "F6", "to_id": "F2", "flow": 5 }, { "from_id": "F6", "to_id": "F3", "flow": 6 }, { "from_id": "F6", "to_id": "F4", "flow": 4 }, { "from_id": "F6", "to_id": "F5", "flow": 5 }, { "from_id": "F6", "to_id": "F7", "flow": 1 }, { "from_id": "F6", "to_id": "F8", "flow": 2 }, { "from_id": "F6", "to_id": "F9", "flow": 3 }, { "from_id": "F7", "to_id": "F1", "flow": 5 }, { "from_id": "F7", "to_id": "F2", "flow": 4 }, { "from_id": "F7", "to_id": "F3", "flow": 5 }, { "from_id": "F7", "to_id": "F4", "flow": 3 }, { "from_id": "F7", "to_id": "F5", "flow": 4 }, { "from_id": "F7", "to_id": "F6", "flow": 1 }, { "from_id": "F7", "to_id": "F8", "flow": 1 }, { "from_id": "F7", "to_id": "F9", "flow": 2 }, { "from_id": "F8", "to_id": "F1", "flow": 6 }, { "from_id": "F8", "to_id": "F2", "flow": 5 }, { "from_id": "F8", "to_id": "F3", "flow": 4 }, { "from_id": "F8", "to_id": "F4", "flow": 2 }, { "from_id": "F8", "to_id": "F5", "flow": 3 }, { "from_id": "F8", "to_id": "F6", "flow": 2 }, { "from_id": "F8", "to_id": "F7", "flow": 1 }, { "from_id": "F8", "to_id": "F9", "flow": 1 }, { "from_id": "F9", "to_id": "F1", "flow": 7 }, { "from_id": "F9", "to_id": "F2", "flow": 6 }, { "from_id": "F9", "to_id": "F3", "flow": 3 }, { "from_id": "F9", "to_id": "F4", "flow": 3 }, { "from_id": "F9", "to_id": "F5", "flow": 2 }, { "from_id": "F9", "to_id": "F6", "flow": 3 }, { "from_id": "F9", "to_id": "F7", "flow": 2 }, { "from_id": "F9", "to_id": "F8", "flow": 1 } ] }, "solution_variant": [ 3, 0, 8, 1, 2, 4, 5, 7, 6 ], "context_index": 14, "input_format": "markdown_table", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Someone on the events team is in charge of assigning every vendor to a specific spot; the catch is that each vendor must occupy exactly one booth and every booth must have exactly one vendor. The goal is to avoid needless walking: for every two vendors, take how many attendees travel between them and multiply that by the distance separating their booths, then total those products for all pairs. A layout with a smaller total means people do less cross-traffic. The full list of numbers and the map follows below.\n\n{\n \"num_exhibitors_and_booths\": 9,\n \"exhibitor_ids\": [\n \"F1\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\"\n ],\n \"booth_ids\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9\n ],\n \"distance\": [\n {\n \"booth_source_id\": 1,\n \"booth_target_id\": 2,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 1,\n \"booth_target_id\": 3,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 1,\n \"booth_target_id\": 4,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 1,\n \"booth_target_id\": 5,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 1,\n \"booth_target_id\": 6,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 1,\n \"booth_target_id\": 7,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 1,\n \"booth_target_id\": 8,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 1,\n \"booth_target_id\": 9,\n \"walking_distance_between_booths\": 2\n },\n {\n \"booth_source_id\": 2,\n \"booth_target_id\": 1,\n \"walking_distance_between_booths\": 2\n },\n {\n \"booth_source_id\": 2,\n \"booth_target_id\": 3,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 2,\n \"booth_target_id\": 4,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 2,\n \"booth_target_id\": 5,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 2,\n \"booth_target_id\": 6,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 2,\n \"booth_target_id\": 7,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 2,\n \"booth_target_id\": 8,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 2,\n \"booth_target_id\": 9,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 3,\n \"booth_target_id\": 1,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 3,\n \"booth_target_id\": 2,\n \"walking_distance_between_booths\": 0\n },\n {\n \"booth_source_id\": 3,\n \"booth_target_id\": 4,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 3,\n \"booth_target_id\": 5,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 3,\n \"booth_target_id\": 6,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 3,\n \"booth_target_id\": 7,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 3,\n \"booth_target_id\": 8,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 3,\n \"booth_target_id\": 9,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 4,\n \"booth_target_id\": 1,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 4,\n \"booth_target_id\": 2,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 4,\n \"booth_target_id\": 3,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 4,\n \"booth_target_id\": 5,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 4,\n \"booth_target_id\": 6,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 4,\n \"booth_target_id\": 7,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 4,\n \"booth_target_id\": 8,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 4,\n \"booth_target_id\": 9,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 5,\n \"booth_target_id\": 1,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 5,\n \"booth_target_id\": 2,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 5,\n \"booth_target_id\": 3,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 5,\n \"booth_target_id\": 4,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 5,\n \"booth_target_id\": 6,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 5,\n \"booth_target_id\": 7,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 5,\n \"booth_target_id\": 8,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 5,\n \"booth_target_id\": 9,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 6,\n \"booth_target_id\": 1,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 6,\n \"booth_target_id\": 2,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 6,\n \"booth_target_id\": 3,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 6,\n \"booth_target_id\": 4,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 6,\n \"booth_target_id\": 5,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 6,\n \"booth_target_id\": 7,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 6,\n \"booth_target_id\": 8,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 6,\n \"booth_target_id\": 9,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 7,\n \"booth_target_id\": 1,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 7,\n \"booth_target_id\": 2,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 7,\n \"booth_target_id\": 3,\n \"walking_distance_between_booths\": 0\n },\n {\n \"booth_source_id\": 7,\n \"booth_target_id\": 4,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 7,\n \"booth_target_id\": 5,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 7,\n \"booth_target_id\": 6,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 7,\n \"booth_target_id\": 8,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 7,\n \"booth_target_id\": 9,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 8,\n \"booth_target_id\": 1,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 8,\n \"booth_target_id\": 2,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 8,\n \"booth_target_id\": 3,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 8,\n \"booth_target_id\": 4,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 8,\n \"booth_target_id\": 5,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 8,\n \"booth_target_id\": 6,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 8,\n \"booth_target_id\": 7,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 8,\n \"booth_target_id\": 9,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 9,\n \"booth_target_id\": 1,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 9,\n \"booth_target_id\": 2,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 9,\n \"booth_target_id\": 3,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 9,\n \"booth_target_id\": 4,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 9,\n \"booth_target_id\": 5,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 9,\n \"booth_target_id\": 6,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 9,\n \"booth_target_id\": 7,\n \"walking_distance_between_booths\": 1\n },\n {\n \"booth_source_id\": 9,\n \"booth_target_id\": 8,\n \"walking_distance_between_booths\": 1\n }\n ],\n \"flow\": [\n {\n \"exhibitor_source_id\": \"F1\",\n \"exhibitor_target_id\": \"F2\",\n \"attendee_flow_between_exhibitors\": 43\n },\n {\n \"exhibitor_source_id\": \"F1\",\n \"exhibitor_target_id\": \"F3\",\n \"attendee_flow_between_exhibitors\": 30\n },\n {\n \"exhibitor_source_id\": \"F1\",\n \"exhibitor_target_id\": \"F4\",\n \"attendee_flow_between_exhibitors\": 21\n },\n {\n \"exhibitor_source_id\": \"F1\",\n \"exhibitor_target_id\": \"F5\",\n \"attendee_flow_between_exhibitors\": 26\n },\n {\n \"exhibitor_source_id\": \"F1\",\n \"exhibitor_target_id\": \"F6\",\n \"attendee_flow_between_exhibitors\": 44\n },\n {\n \"exhibitor_source_id\": \"F1\",\n \"exhibitor_target_id\": \"F7\",\n \"attendee_flow_between_exhibitors\": 29\n },\n {\n \"exhibitor_source_id\": \"F1\",\n \"exhibitor_target_id\": \"F8\",\n \"attendee_flow_between_exhibitors\": 13\n },\n {\n \"exhibitor_source_id\": \"F1\",\n \"exhibitor_target_id\": \"F9\",\n \"attendee_flow_between_exhibitors\": 32\n },\n {\n \"exhibitor_source_id\": \"F2\",\n \"exhibitor_target_id\": \"F1\",\n \"attendee_flow_between_exhibitors\": 43\n },\n {\n \"exhibitor_source_id\": \"F2\",\n \"exhibitor_target_id\": \"F3\",\n \"attendee_flow_between_exhibitors\": 28\n },\n {\n \"exhibitor_source_id\": \"F2\",\n \"exhibitor_target_id\": \"F4\",\n \"attendee_flow_between_exhibitors\": 50\n },\n {\n \"exhibitor_source_id\": \"F2\",\n \"exhibitor_target_id\": \"F5\",\n \"attendee_flow_between_exhibitors\": 39\n },\n {\n \"exhibitor_source_id\": \"F2\",\n \"exhibitor_target_id\": \"F6\",\n \"attendee_flow_between_exhibitors\": 23\n },\n {\n \"exhibitor_source_id\": \"F2\",\n \"exhibitor_target_id\": \"F7\",\n \"attendee_flow_between_exhibitors\": 41\n },\n {\n \"exhibitor_source_id\": \"F2\",\n \"exhibitor_target_id\": \"F8\",\n \"attendee_flow_between_exhibitors\": 26\n },\n {\n \"exhibitor_source_id\": \"F2\",\n \"exhibitor_target_id\": \"F9\",\n \"attendee_flow_between_exhibitors\": 23\n },\n {\n \"exhibitor_source_id\": \"F3\",\n \"exhibitor_target_id\": \"F1\",\n \"attendee_flow_between_exhibitors\": 30\n },\n {\n \"exhibitor_source_id\": \"F3\",\n \"exhibitor_target_id\": \"F2\",\n \"attendee_flow_between_exhibitors\": 28\n },\n {\n \"exhibitor_source_id\": \"F3\",\n \"exhibitor_target_id\": \"F4\",\n \"attendee_flow_between_exhibitors\": 46\n },\n {\n \"exhibitor_source_id\": \"F3\",\n \"exhibitor_target_id\": \"F5\",\n \"attendee_flow_between_exhibitors\": 18\n },\n {\n \"exhibitor_source_id\": \"F3\",\n \"exhibitor_target_id\": \"F6\",\n \"attendee_flow_between_exhibitors\": 12\n },\n {\n \"exhibitor_source_id\": \"F3\",\n \"exhibitor_target_id\": \"F7\",\n \"attendee_flow_between_exhibitors\": 22\n },\n {\n \"exhibitor_source_id\": \"F3\",\n \"exhibitor_target_id\": \"F8\",\n \"attendee_flow_between_exhibitors\": 12\n },\n {\n \"exhibitor_source_id\": \"F3\",\n \"exhibitor_target_id\": \"F9\",\n \"attendee_flow_between_exhibitors\": 45\n },\n {\n \"exhibitor_source_id\": \"F4\",\n \"exhibitor_target_id\": \"F1\",\n \"attendee_flow_between_exhibitors\": 21\n },\n {\n \"exhibitor_source_id\": \"F4\",\n \"exhibitor_target_id\": \"F2\",\n \"attendee_flow_between_exhibitors\": 50\n },\n {\n \"exhibitor_source_id\": \"F4\",\n \"exhibitor_target_id\": \"F3\",\n \"attendee_flow_between_exhibitors\": 46\n },\n {\n \"exhibitor_source_id\": \"F4\",\n \"exhibitor_target_id\": \"F5\",\n \"attendee_flow_between_exhibitors\": 23\n },\n {\n \"exhibitor_source_id\": \"F4\",\n \"exhibitor_target_id\": \"F6\",\n \"attendee_flow_between_exhibitors\": 23\n },\n {\n \"exhibitor_source_id\": \"F4\",\n \"exhibitor_target_id\": \"F7\",\n \"attendee_flow_between_exhibitors\": 17\n },\n {\n \"exhibitor_source_id\": \"F4\",\n \"exhibitor_target_id\": \"F8\",\n \"attendee_flow_between_exhibitors\": 14\n },\n {\n \"exhibitor_source_id\": \"F4\",\n \"exhibitor_target_id\": \"F9\",\n \"attendee_flow_between_exhibitors\": 37\n },\n {\n \"exhibitor_source_id\": \"F5\",\n \"exhibitor_target_id\": \"F1\",\n \"attendee_flow_between_exhibitors\": 26\n },\n {\n \"exhibitor_source_id\": \"F5\",\n \"exhibitor_target_id\": \"F2\",\n \"attendee_flow_between_exhibitors\": 39\n },\n {\n \"exhibitor_source_id\": \"F5\",\n \"exhibitor_target_id\": \"F3\",\n \"attendee_flow_between_exhibitors\": 18\n },\n {\n \"exhibitor_source_id\": \"F5\",\n \"exhibitor_target_id\": \"F4\",\n \"attendee_flow_between_exhibitors\": 23\n },\n {\n \"exhibitor_source_id\": \"F5\",\n \"exhibitor_target_id\": \"F6\",\n \"attendee_flow_between_exhibitors\": 33\n },\n {\n \"exhibitor_source_id\": \"F5\",\n \"exhibitor_target_id\": \"F7\",\n \"attendee_flow_between_exhibitors\": 30\n },\n {\n \"exhibitor_source_id\": \"F5\",\n \"exhibitor_target_id\": \"F8\",\n \"attendee_flow_between_exhibitors\": 21\n },\n {\n \"exhibitor_source_id\": \"F5\",\n \"exhibitor_target_id\": \"F9\",\n \"attendee_flow_between_exhibitors\": 25\n },\n {\n \"exhibitor_source_id\": \"F6\",\n \"exhibitor_target_id\": \"F1\",\n \"attendee_flow_between_exhibitors\": 44\n },\n {\n \"exhibitor_source_id\": \"F6\",\n \"exhibitor_target_id\": \"F2\",\n \"attendee_flow_between_exhibitors\": 23\n },\n {\n \"exhibitor_source_id\": \"F6\",\n \"exhibitor_target_id\": \"F3\",\n \"attendee_flow_between_exhibitors\": 12\n },\n {\n \"exhibitor_source_id\": \"F6\",\n \"exhibitor_target_id\": \"F4\",\n \"attendee_flow_between_exhibitors\": 23\n },\n {\n \"exhibitor_source_id\": \"F6\",\n \"exhibitor_target_id\": \"F5\",\n \"attendee_flow_between_exhibitors\": 33\n },\n {\n \"exhibitor_source_id\": \"F6\",\n \"exhibitor_target_id\": \"F7\",\n \"attendee_flow_between_exhibitors\": 31\n },\n {\n \"exhibitor_source_id\": \"F6\",\n \"exhibitor_target_id\": \"F8\",\n \"attendee_flow_between_exhibitors\": 3\n },\n {\n \"exhibitor_source_id\": \"F6\",\n \"exhibitor_target_id\": \"F9\",\n \"attendee_flow_between_exhibitors\": 32\n },\n {\n \"exhibitor_source_id\": \"F7\",\n \"exhibitor_target_id\": \"F1\",\n \"attendee_flow_between_exhibitors\": 29\n },\n {\n \"exhibitor_source_id\": \"F7\",\n \"exhibitor_target_id\": \"F2\",\n \"attendee_flow_between_exhibitors\": 41\n },\n {\n \"exhibitor_source_id\": \"F7\",\n \"exhibitor_target_id\": \"F3\",\n \"attendee_flow_between_exhibitors\": 22\n },\n {\n \"exhibitor_source_id\": \"F7\",\n \"exhibitor_target_id\": \"F4\",\n \"attendee_flow_between_exhibitors\": 17\n },\n {\n \"exhibitor_source_id\": \"F7\",\n \"exhibitor_target_id\": \"F5\",\n \"attendee_flow_between_exhibitors\": 30\n },\n {\n \"exhibitor_source_id\": \"F7\",\n \"exhibitor_target_id\": \"F6\",\n \"attendee_flow_between_exhibitors\": 31\n },\n {\n \"exhibitor_source_id\": \"F7\",\n \"exhibitor_target_id\": \"F8\",\n \"attendee_flow_between_exhibitors\": 20\n },\n {\n \"exhibitor_source_id\": \"F7\",\n \"exhibitor_target_id\": \"F9\",\n \"attendee_flow_between_exhibitors\": 35\n },\n {\n \"exhibitor_source_id\": \"F8\",\n \"exhibitor_target_id\": \"F1\",\n \"attendee_flow_between_exhibitors\": 13\n },\n {\n \"exhibitor_source_id\": \"F8\",\n \"exhibitor_target_id\": \"F2\",\n \"attendee_flow_between_exhibitors\": 26\n },\n {\n \"exhibitor_source_id\": \"F8\",\n \"exhibitor_target_id\": \"F3\",\n \"attendee_flow_between_exhibitors\": 12\n },\n {\n \"exhibitor_source_id\": \"F8\",\n \"exhibitor_target_id\": \"F4\",\n \"attendee_flow_between_exhibitors\": 14\n },\n {\n \"exhibitor_source_id\": \"F8\",\n \"exhibitor_target_id\": \"F5\",\n \"attendee_flow_between_exhibitors\": 21\n },\n {\n \"exhibitor_source_id\": \"F8\",\n \"exhibitor_target_id\": \"F6\",\n \"attendee_flow_between_exhibitors\": 3\n },\n {\n \"exhibitor_source_id\": \"F8\",\n \"exhibitor_target_id\": \"F7\",\n \"attendee_flow_between_exhibitors\": 20\n },\n {\n \"exhibitor_source_id\": \"F8\",\n \"exhibitor_target_id\": \"F9\",\n \"attendee_flow_between_exhibitors\": 16\n },\n {\n \"exhibitor_source_id\": \"F9\",\n \"exhibitor_target_id\": \"F1\",\n \"attendee_flow_between_exhibitors\": 32\n },\n {\n \"exhibitor_source_id\": \"F9\",\n \"exhibitor_target_id\": \"F2\",\n \"attendee_flow_between_exhibitors\": 23\n },\n {\n \"exhibitor_source_id\": \"F9\",\n \"exhibitor_target_id\": \"F3\",\n \"attendee_flow_between_exhibitors\": 45\n },\n {\n \"exhibitor_source_id\": \"F9\",\n \"exhibitor_target_id\": \"F4\",\n \"attendee_flow_between_exhibitors\": 37\n },\n {\n \"exhibitor_source_id\": \"F9\",\n \"exhibitor_target_id\": \"F5\",\n \"attendee_flow_between_exhibitors\": 25\n },\n {\n \"exhibitor_source_id\": \"F9\",\n \"exhibitor_target_id\": \"F6\",\n \"attendee_flow_between_exhibitors\": 32\n },\n {\n \"exhibitor_source_id\": \"F9\",\n \"exhibitor_target_id\": \"F7\",\n \"attendee_flow_between_exhibitors\": 35\n },\n {\n \"exhibitor_source_id\": \"F9\",\n \"exhibitor_target_id\": \"F8\",\n \"attendee_flow_between_exhibitors\": 16\n }\n ]\n}\n\nAlso, when you send back your final assignment, keep it in this simple JSON shape so it's easy to parse:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nHere that array is just a list that says which booth goes to which vendor — first entry = booth for the first vendor, second entry = booth for the second vendor, and so on. It's just the format I need, not the actual assignment — think of it like filling out a short form.\n\nPlease be sure to use the exact identifiers from the instance input (don't rename them or invent new ones). For example:\n- Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 1, 1, 1, 1, 1, 1, 1, 2 ], [ 2, 0, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 0, 0, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 0, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 0, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 0, 1, 1, 1 ], [ 1, 1, 0, 1, 1, 1, 0, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 0, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 0 ] ], "flow_matrix": [ [ 0, 43, 30, 21, 26, 44, 29, 13, 32 ], [ 43, 0, 28, 50, 39, 23, 41, 26, 23 ], [ 30, 28, 0, 46, 18, 12, 22, 12, 45 ], [ 21, 50, 46, 0, 23, 23, 17, 14, 37 ], [ 26, 39, 18, 23, 0, 33, 30, 21, 25 ], [ 44, 23, 12, 23, 33, 0, 31, 3, 32 ], [ 29, 41, 22, 17, 30, 31, 0, 20, 35 ], [ 13, 26, 12, 14, 21, 3, 20, 0, 16 ], [ 32, 23, 45, 37, 25, 32, 35, 16, 0 ] ], "objective": 1890.0 }, "solution": [ 6, 2, 3, 1, 7, 8, 4, 0, 5 ], "obj": 1890.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 1 }, { "from_id": 1, "to_id": 3, "distance": 1 }, { "from_id": 1, "to_id": 4, "distance": 1 }, { "from_id": 1, "to_id": 5, "distance": 1 }, { "from_id": 1, "to_id": 6, "distance": 1 }, { "from_id": 1, "to_id": 7, "distance": 1 }, { "from_id": 1, "to_id": 8, "distance": 1 }, { "from_id": 1, "to_id": 9, "distance": 2 }, { "from_id": 2, "to_id": 1, "distance": 2 }, { "from_id": 2, "to_id": 3, "distance": 1 }, { "from_id": 2, "to_id": 4, "distance": 1 }, { "from_id": 2, "to_id": 5, "distance": 1 }, { "from_id": 2, "to_id": 6, "distance": 1 }, { "from_id": 2, "to_id": 7, "distance": 1 }, { "from_id": 2, "to_id": 8, "distance": 1 }, { "from_id": 2, "to_id": 9, "distance": 1 }, { "from_id": 3, "to_id": 1, "distance": 1 }, { "from_id": 3, "to_id": 2, "distance": 0 }, { "from_id": 3, "to_id": 4, "distance": 1 }, { "from_id": 3, "to_id": 5, "distance": 1 }, { "from_id": 3, "to_id": 6, "distance": 1 }, { "from_id": 3, "to_id": 7, "distance": 1 }, { "from_id": 3, "to_id": 8, "distance": 1 }, { "from_id": 3, "to_id": 9, "distance": 1 }, { "from_id": 4, "to_id": 1, "distance": 1 }, { "from_id": 4, "to_id": 2, "distance": 1 }, { "from_id": 4, "to_id": 3, "distance": 1 }, { "from_id": 4, "to_id": 5, "distance": 1 }, { "from_id": 4, "to_id": 6, "distance": 1 }, { "from_id": 4, "to_id": 7, "distance": 1 }, { "from_id": 4, "to_id": 8, "distance": 1 }, { "from_id": 4, "to_id": 9, "distance": 1 }, { "from_id": 5, "to_id": 1, "distance": 1 }, { "from_id": 5, "to_id": 2, "distance": 1 }, { "from_id": 5, "to_id": 3, "distance": 1 }, { "from_id": 5, "to_id": 4, "distance": 1 }, { "from_id": 5, "to_id": 6, "distance": 1 }, { "from_id": 5, "to_id": 7, "distance": 1 }, { "from_id": 5, "to_id": 8, "distance": 1 }, { "from_id": 5, "to_id": 9, "distance": 1 }, { "from_id": 6, "to_id": 1, "distance": 1 }, { "from_id": 6, "to_id": 2, "distance": 1 }, { "from_id": 6, "to_id": 3, "distance": 1 }, { "from_id": 6, "to_id": 4, "distance": 1 }, { "from_id": 6, "to_id": 5, "distance": 1 }, { "from_id": 6, "to_id": 7, "distance": 1 }, { "from_id": 6, "to_id": 8, "distance": 1 }, { "from_id": 6, "to_id": 9, "distance": 1 }, { "from_id": 7, "to_id": 1, "distance": 1 }, { "from_id": 7, "to_id": 2, "distance": 1 }, { "from_id": 7, "to_id": 3, "distance": 0 }, { "from_id": 7, "to_id": 4, "distance": 1 }, { "from_id": 7, "to_id": 5, "distance": 1 }, { "from_id": 7, "to_id": 6, "distance": 1 }, { "from_id": 7, "to_id": 8, "distance": 1 }, { "from_id": 7, "to_id": 9, "distance": 1 }, { "from_id": 8, "to_id": 1, "distance": 1 }, { "from_id": 8, "to_id": 2, "distance": 1 }, { "from_id": 8, "to_id": 3, "distance": 1 }, { "from_id": 8, "to_id": 4, "distance": 1 }, { "from_id": 8, "to_id": 5, "distance": 1 }, { "from_id": 8, "to_id": 6, "distance": 1 }, { "from_id": 8, "to_id": 7, "distance": 1 }, { "from_id": 8, "to_id": 9, "distance": 1 }, { "from_id": 9, "to_id": 1, "distance": 1 }, { "from_id": 9, "to_id": 2, "distance": 1 }, { "from_id": 9, "to_id": 3, "distance": 1 }, { "from_id": 9, "to_id": 4, "distance": 1 }, { "from_id": 9, "to_id": 5, "distance": 1 }, { "from_id": 9, "to_id": 6, "distance": 1 }, { "from_id": 9, "to_id": 7, "distance": 1 }, { "from_id": 9, "to_id": 8, "distance": 1 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 43 }, { "from_id": "F1", "to_id": "F3", "flow": 30 }, { "from_id": "F1", "to_id": "F4", "flow": 21 }, { "from_id": "F1", "to_id": "F5", "flow": 26 }, { "from_id": "F1", "to_id": "F6", "flow": 44 }, { "from_id": "F1", "to_id": "F7", "flow": 29 }, { "from_id": "F1", "to_id": "F8", "flow": 13 }, { "from_id": "F1", "to_id": "F9", "flow": 32 }, { "from_id": "F2", "to_id": "F1", "flow": 43 }, { "from_id": "F2", "to_id": "F3", "flow": 28 }, { "from_id": "F2", "to_id": "F4", "flow": 50 }, { "from_id": "F2", "to_id": "F5", "flow": 39 }, { "from_id": "F2", "to_id": "F6", "flow": 23 }, { "from_id": "F2", "to_id": "F7", "flow": 41 }, { "from_id": "F2", "to_id": "F8", "flow": 26 }, { "from_id": "F2", "to_id": "F9", "flow": 23 }, { "from_id": "F3", "to_id": "F1", "flow": 30 }, { "from_id": "F3", "to_id": "F2", "flow": 28 }, { "from_id": "F3", "to_id": "F4", "flow": 46 }, { "from_id": "F3", "to_id": "F5", "flow": 18 }, { "from_id": "F3", "to_id": "F6", "flow": 12 }, { "from_id": "F3", "to_id": "F7", "flow": 22 }, { "from_id": "F3", "to_id": "F8", "flow": 12 }, { "from_id": "F3", "to_id": "F9", "flow": 45 }, { "from_id": "F4", "to_id": "F1", "flow": 21 }, { "from_id": "F4", "to_id": "F2", "flow": 50 }, { "from_id": "F4", "to_id": "F3", "flow": 46 }, { "from_id": "F4", "to_id": "F5", "flow": 23 }, { "from_id": "F4", "to_id": "F6", "flow": 23 }, { "from_id": "F4", "to_id": "F7", "flow": 17 }, { "from_id": "F4", "to_id": "F8", "flow": 14 }, { "from_id": "F4", "to_id": "F9", "flow": 37 }, { "from_id": "F5", "to_id": "F1", "flow": 26 }, { "from_id": "F5", "to_id": "F2", "flow": 39 }, { "from_id": "F5", "to_id": "F3", "flow": 18 }, { "from_id": "F5", "to_id": "F4", "flow": 23 }, { "from_id": "F5", "to_id": "F6", "flow": 33 }, { "from_id": "F5", "to_id": "F7", "flow": 30 }, { "from_id": "F5", "to_id": "F8", "flow": 21 }, { "from_id": "F5", "to_id": "F9", "flow": 25 }, { "from_id": "F6", "to_id": "F1", "flow": 44 }, { "from_id": "F6", "to_id": "F2", "flow": 23 }, { "from_id": "F6", "to_id": "F3", "flow": 12 }, { "from_id": "F6", "to_id": "F4", "flow": 23 }, { "from_id": "F6", "to_id": "F5", "flow": 33 }, { "from_id": "F6", "to_id": "F7", "flow": 31 }, { "from_id": "F6", "to_id": "F8", "flow": 3 }, { "from_id": "F6", "to_id": "F9", "flow": 32 }, { "from_id": "F7", "to_id": "F1", "flow": 29 }, { "from_id": "F7", "to_id": "F2", "flow": 41 }, { "from_id": "F7", "to_id": "F3", "flow": 22 }, { "from_id": "F7", "to_id": "F4", "flow": 17 }, { "from_id": "F7", "to_id": "F5", "flow": 30 }, { "from_id": "F7", "to_id": "F6", "flow": 31 }, { "from_id": "F7", "to_id": "F8", "flow": 20 }, { "from_id": "F7", "to_id": "F9", "flow": 35 }, { "from_id": "F8", "to_id": "F1", "flow": 13 }, { "from_id": "F8", "to_id": "F2", "flow": 26 }, { "from_id": "F8", "to_id": "F3", "flow": 12 }, { "from_id": "F8", "to_id": "F4", "flow": 14 }, { "from_id": "F8", "to_id": "F5", "flow": 21 }, { "from_id": "F8", "to_id": "F6", "flow": 3 }, { "from_id": "F8", "to_id": "F7", "flow": 20 }, { "from_id": "F8", "to_id": "F9", "flow": 16 }, { "from_id": "F9", "to_id": "F1", "flow": 32 }, { "from_id": "F9", "to_id": "F2", "flow": 23 }, { "from_id": "F9", "to_id": "F3", "flow": 45 }, { "from_id": "F9", "to_id": "F4", "flow": 37 }, { "from_id": "F9", "to_id": "F5", "flow": 25 }, { "from_id": "F9", "to_id": "F6", "flow": 32 }, { "from_id": "F9", "to_id": "F7", "flow": 35 }, { "from_id": "F9", "to_id": "F8", "flow": 16 } ] }, "solution_variant": [ 7, 3, 4, 2, 8, 9, 5, 1, 6 ], "context_index": 15, "input_format": "json", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Over the last week the chair has been mapping groups to benches so that each group ends up at exactly one bench and each bench hosts exactly one group. To figure out which mapping makes life easier, calculate for every pair how often they interact times the distance between their benches, then add all those numbers together; a smaller total means less overhead from distance. No benches left empty and no group placed twice. The exact bench positions and interaction counts follow below.\n\n# num_groups_and_benches=12\n# research_group_ids=F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12\n# bench_ids=1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12\n\nbench_id_from,bench_id_to,bench_distance\n1,2,1\n1,3,1\n1,4,1\n1,5,1\n1,6,1\n1,7,1\n1,8,1\n1,9,1\n1,10,1\n1,11,1\n1,12,1\n2,1,1\n2,3,1\n2,4,1\n2,5,1\n2,6,1\n2,7,1\n2,8,1\n2,9,1\n2,10,1\n2,11,1\n2,12,1\n3,1,1\n3,2,1\n3,4,1\n3,5,1\n3,6,1\n3,7,1\n3,8,1\n3,9,1\n3,10,0\n3,11,1\n3,12,1\n4,1,1\n4,2,1\n4,3,1\n4,5,1\n4,6,1\n4,7,1\n4,8,1\n4,9,1\n4,10,1\n4,11,1\n4,12,1\n5,1,1\n5,2,1\n5,3,1\n5,4,1\n5,6,1\n5,7,1\n5,8,1\n5,9,1\n5,10,0\n5,11,1\n5,12,1\n6,1,1\n6,2,1\n6,3,1\n6,4,1\n6,5,1\n6,7,1\n6,8,1\n6,9,1\n6,10,1\n6,11,1\n6,12,1\n7,1,0\n7,2,1\n7,3,1\n7,4,1\n7,5,1\n7,6,1\n7,8,1\n7,9,1\n7,10,1\n7,11,1\n7,12,1\n8,1,1\n8,2,1\n8,3,1\n8,4,1\n8,5,1\n8,6,1\n8,7,1\n8,9,1\n8,10,1\n8,11,1\n8,12,1\n9,1,1\n9,2,1\n9,3,1\n9,4,1\n9,5,1\n9,6,1\n9,7,1\n9,8,1\n9,10,1\n9,11,0\n9,12,1\n10,1,1\n10,2,1\n10,3,1\n10,4,1\n10,5,1\n10,6,1\n10,7,1\n10,8,1\n10,9,1\n10,11,1\n10,12,1\n11,1,1\n11,2,1\n11,3,1\n11,4,1\n11,5,1\n11,6,1\n11,7,1\n11,8,1\n11,9,1\n11,10,1\n11,12,1\n12,1,1\n12,2,1\n12,3,1\n12,4,1\n12,5,1\n12,6,1\n12,7,0\n12,8,1\n12,9,1\n12,10,1\n12,11,1\n\ngroup_id_from,group_id_to,interaction_frequency\nF1,F2,19\nF1,F3,29\nF1,F4,13\nF1,F5,15\nF1,F6,12\nF1,F7,27\nF1,F8,22\nF1,F9,7\nF1,F10,14\nF1,F11,22\nF1,F12,11\nF2,F1,19\nF2,F3,25\nF2,F4,31\nF2,F5,21\nF2,F6,37\nF2,F7,33\nF2,F8,32\nF2,F9,29\nF2,F10,17\nF2,F11,20\nF2,F12,8\nF3,F1,29\nF3,F2,25\nF3,F4,13\nF3,F5,11\nF3,F6,31\nF3,F7,12\nF3,F8,23\nF3,F9,22\nF3,F10,15\nF3,F11,13\nF3,F12,12\nF4,F1,13\nF4,F2,31\nF4,F3,13\nF4,F5,36\nF4,F6,15\nF4,F7,21\nF4,F8,19\nF4,F9,34\nF4,F10,25\nF4,F11,33\nF4,F12,27\nF5,F1,15\nF5,F2,21\nF5,F3,11\nF5,F4,36\nF5,F6,38\nF5,F7,26\nF5,F8,9\nF5,F9,18\nF5,F10,22\nF5,F11,24\nF5,F12,18\nF6,F1,12\nF6,F2,37\nF6,F3,31\nF6,F4,15\nF6,F5,38\nF6,F7,5\nF6,F8,14\nF6,F9,32\nF6,F10,12\nF6,F11,25\nF6,F12,17\nF7,F1,27\nF7,F2,33\nF7,F3,12\nF7,F4,21\nF7,F5,26\nF7,F6,5\nF7,F8,18\nF7,F9,17\nF7,F10,33\nF7,F11,24\nF7,F12,34\nF8,F1,22\nF8,F2,32\nF8,F3,23\nF8,F4,19\nF8,F5,9\nF8,F6,14\nF8,F7,18\nF8,F9,10\nF8,F10,21\nF8,F11,22\nF8,F12,18\nF9,F1,7\nF9,F2,29\nF9,F3,22\nF9,F4,34\nF9,F5,18\nF9,F6,32\nF9,F7,17\nF9,F8,10\nF9,F10,25\nF9,F11,11\nF9,F12,14\nF10,F1,14\nF10,F2,17\nF10,F3,15\nF10,F4,25\nF10,F5,22\nF10,F6,12\nF10,F7,33\nF10,F8,21\nF10,F9,25\nF10,F11,22\nF10,F12,28\nF11,F1,22\nF11,F2,20\nF11,F3,13\nF11,F4,33\nF11,F5,24\nF11,F6,25\nF11,F7,24\nF11,F8,22\nF11,F9,11\nF11,F10,22\nF11,F12,27\nF12,F1,11\nF12,F2,8\nF12,F3,12\nF12,F4,27\nF12,F5,18\nF12,F6,17\nF12,F7,34\nF12,F8,18\nF12,F9,14\nF12,F10,28\nF12,F11,27\n\nIf you want to hand me the final mapping in a simple, machine-friendly way, just follow this little JSON sketch — nothing fancy, just the order of benches for each group:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis \"solution\" list is just the benches in order: the first entry is the bench for the first group, the second entry for the second group, and so on. Treat the angle-bracket placeholders as slots you replace with the actual bench identifiers from the instance. It's just a form to fill out — not the real answer itself.\n\nPlease be sure to use the exact identifiers given in the instance input — don't rename them or invent new labels.\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1 ], [ 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1 ], [ 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1 ], [ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 ], [ 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0 ] ], "flow_matrix": [ [ 0, 19, 29, 13, 15, 12, 27, 22, 7, 14, 22, 11 ], [ 19, 0, 25, 31, 21, 37, 33, 32, 29, 17, 20, 8 ], [ 29, 25, 0, 13, 11, 31, 12, 23, 22, 15, 13, 12 ], [ 13, 31, 13, 0, 36, 15, 21, 19, 34, 25, 33, 27 ], [ 15, 21, 11, 36, 0, 38, 26, 9, 18, 22, 24, 18 ], [ 12, 37, 31, 15, 38, 0, 5, 14, 32, 12, 25, 17 ], [ 27, 33, 12, 21, 26, 5, 0, 18, 17, 33, 24, 34 ], [ 22, 32, 23, 19, 9, 14, 18, 0, 10, 21, 22, 18 ], [ 7, 29, 22, 34, 18, 32, 17, 10, 0, 25, 11, 14 ], [ 14, 17, 15, 25, 22, 12, 33, 21, 25, 0, 22, 28 ], [ 22, 20, 13, 33, 24, 25, 24, 22, 11, 22, 0, 27 ], [ 11, 8, 12, 27, 18, 17, 34, 18, 14, 28, 27, 0 ] ], "objective": 2604.0 }, "solution": [ 3, 2, 7, 6, 4, 9, 8, 5, 11, 1, 0, 10 ], "obj": 2604.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 12, "num_locations": 12, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 1 }, { "from_id": 1, "to_id": 3, "distance": 1 }, { "from_id": 1, "to_id": 4, "distance": 1 }, { "from_id": 1, "to_id": 5, "distance": 1 }, { "from_id": 1, "to_id": 6, "distance": 1 }, { "from_id": 1, "to_id": 7, "distance": 1 }, { "from_id": 1, "to_id": 8, "distance": 1 }, { "from_id": 1, "to_id": 9, "distance": 1 }, { "from_id": 1, "to_id": 10, "distance": 1 }, { "from_id": 1, "to_id": 11, "distance": 1 }, { "from_id": 1, "to_id": 12, "distance": 1 }, { "from_id": 2, "to_id": 1, "distance": 1 }, { "from_id": 2, "to_id": 3, "distance": 1 }, { "from_id": 2, "to_id": 4, "distance": 1 }, { "from_id": 2, "to_id": 5, "distance": 1 }, { "from_id": 2, "to_id": 6, "distance": 1 }, { "from_id": 2, "to_id": 7, "distance": 1 }, { "from_id": 2, "to_id": 8, "distance": 1 }, { "from_id": 2, "to_id": 9, "distance": 1 }, { "from_id": 2, "to_id": 10, "distance": 1 }, { "from_id": 2, "to_id": 11, "distance": 1 }, { "from_id": 2, "to_id": 12, "distance": 1 }, { "from_id": 3, "to_id": 1, "distance": 1 }, { "from_id": 3, "to_id": 2, "distance": 1 }, { "from_id": 3, "to_id": 4, "distance": 1 }, { "from_id": 3, "to_id": 5, "distance": 1 }, { "from_id": 3, "to_id": 6, "distance": 1 }, { "from_id": 3, "to_id": 7, "distance": 1 }, { "from_id": 3, "to_id": 8, "distance": 1 }, { "from_id": 3, "to_id": 9, "distance": 1 }, { "from_id": 3, "to_id": 10, "distance": 0 }, { "from_id": 3, "to_id": 11, "distance": 1 }, { "from_id": 3, "to_id": 12, "distance": 1 }, { "from_id": 4, "to_id": 1, "distance": 1 }, { "from_id": 4, "to_id": 2, "distance": 1 }, { "from_id": 4, "to_id": 3, "distance": 1 }, { "from_id": 4, "to_id": 5, "distance": 1 }, { "from_id": 4, "to_id": 6, "distance": 1 }, { "from_id": 4, "to_id": 7, "distance": 1 }, { "from_id": 4, "to_id": 8, "distance": 1 }, { "from_id": 4, "to_id": 9, "distance": 1 }, { "from_id": 4, "to_id": 10, "distance": 1 }, { "from_id": 4, "to_id": 11, "distance": 1 }, { "from_id": 4, "to_id": 12, "distance": 1 }, { "from_id": 5, "to_id": 1, "distance": 1 }, { "from_id": 5, "to_id": 2, "distance": 1 }, { "from_id": 5, "to_id": 3, "distance": 1 }, { "from_id": 5, "to_id": 4, "distance": 1 }, { "from_id": 5, "to_id": 6, "distance": 1 }, { "from_id": 5, "to_id": 7, "distance": 1 }, { "from_id": 5, "to_id": 8, "distance": 1 }, { "from_id": 5, "to_id": 9, "distance": 1 }, { "from_id": 5, "to_id": 10, "distance": 0 }, { "from_id": 5, "to_id": 11, "distance": 1 }, { "from_id": 5, "to_id": 12, "distance": 1 }, { "from_id": 6, "to_id": 1, "distance": 1 }, { "from_id": 6, "to_id": 2, "distance": 1 }, { "from_id": 6, "to_id": 3, "distance": 1 }, { "from_id": 6, "to_id": 4, "distance": 1 }, { "from_id": 6, "to_id": 5, "distance": 1 }, { "from_id": 6, "to_id": 7, "distance": 1 }, { "from_id": 6, "to_id": 8, "distance": 1 }, { "from_id": 6, "to_id": 9, "distance": 1 }, { "from_id": 6, "to_id": 10, "distance": 1 }, { "from_id": 6, "to_id": 11, "distance": 1 }, { "from_id": 6, "to_id": 12, "distance": 1 }, { "from_id": 7, "to_id": 1, "distance": 0 }, { "from_id": 7, "to_id": 2, "distance": 1 }, { "from_id": 7, "to_id": 3, "distance": 1 }, { "from_id": 7, "to_id": 4, "distance": 1 }, { "from_id": 7, "to_id": 5, "distance": 1 }, { "from_id": 7, "to_id": 6, "distance": 1 }, { "from_id": 7, "to_id": 8, "distance": 1 }, { "from_id": 7, "to_id": 9, "distance": 1 }, { "from_id": 7, "to_id": 10, "distance": 1 }, { "from_id": 7, "to_id": 11, "distance": 1 }, { "from_id": 7, "to_id": 12, "distance": 1 }, { "from_id": 8, "to_id": 1, "distance": 1 }, { "from_id": 8, "to_id": 2, "distance": 1 }, { "from_id": 8, "to_id": 3, "distance": 1 }, { "from_id": 8, "to_id": 4, "distance": 1 }, { "from_id": 8, "to_id": 5, "distance": 1 }, { "from_id": 8, "to_id": 6, "distance": 1 }, { "from_id": 8, "to_id": 7, "distance": 1 }, { "from_id": 8, "to_id": 9, "distance": 1 }, { "from_id": 8, "to_id": 10, "distance": 1 }, { "from_id": 8, "to_id": 11, "distance": 1 }, { "from_id": 8, "to_id": 12, "distance": 1 }, { "from_id": 9, "to_id": 1, "distance": 1 }, { "from_id": 9, "to_id": 2, "distance": 1 }, { "from_id": 9, "to_id": 3, "distance": 1 }, { "from_id": 9, "to_id": 4, "distance": 1 }, { "from_id": 9, "to_id": 5, "distance": 1 }, { "from_id": 9, "to_id": 6, "distance": 1 }, { "from_id": 9, "to_id": 7, "distance": 1 }, { "from_id": 9, "to_id": 8, "distance": 1 }, { "from_id": 9, "to_id": 10, "distance": 1 }, { "from_id": 9, "to_id": 11, "distance": 0 }, { "from_id": 9, "to_id": 12, "distance": 1 }, { "from_id": 10, "to_id": 1, "distance": 1 }, { "from_id": 10, "to_id": 2, "distance": 1 }, { "from_id": 10, "to_id": 3, "distance": 1 }, { "from_id": 10, "to_id": 4, "distance": 1 }, { "from_id": 10, "to_id": 5, "distance": 1 }, { "from_id": 10, "to_id": 6, "distance": 1 }, { "from_id": 10, "to_id": 7, "distance": 1 }, { "from_id": 10, "to_id": 8, "distance": 1 }, { "from_id": 10, "to_id": 9, "distance": 1 }, { "from_id": 10, "to_id": 11, "distance": 1 }, { "from_id": 10, "to_id": 12, "distance": 1 }, { "from_id": 11, "to_id": 1, "distance": 1 }, { "from_id": 11, "to_id": 2, "distance": 1 }, { "from_id": 11, "to_id": 3, "distance": 1 }, { "from_id": 11, "to_id": 4, "distance": 1 }, { "from_id": 11, "to_id": 5, "distance": 1 }, { "from_id": 11, "to_id": 6, "distance": 1 }, { "from_id": 11, "to_id": 7, "distance": 1 }, { "from_id": 11, "to_id": 8, "distance": 1 }, { "from_id": 11, "to_id": 9, "distance": 1 }, { "from_id": 11, "to_id": 10, "distance": 1 }, { "from_id": 11, "to_id": 12, "distance": 1 }, { "from_id": 12, "to_id": 1, "distance": 1 }, { "from_id": 12, "to_id": 2, "distance": 1 }, { "from_id": 12, "to_id": 3, "distance": 1 }, { "from_id": 12, "to_id": 4, "distance": 1 }, { "from_id": 12, "to_id": 5, "distance": 1 }, { "from_id": 12, "to_id": 6, "distance": 1 }, { "from_id": 12, "to_id": 7, "distance": 0 }, { "from_id": 12, "to_id": 8, "distance": 1 }, { "from_id": 12, "to_id": 9, "distance": 1 }, { "from_id": 12, "to_id": 10, "distance": 1 }, { "from_id": 12, "to_id": 11, "distance": 1 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 19 }, { "from_id": "F1", "to_id": "F3", "flow": 29 }, { "from_id": "F1", "to_id": "F4", "flow": 13 }, { "from_id": "F1", "to_id": "F5", "flow": 15 }, { "from_id": "F1", "to_id": "F6", "flow": 12 }, { "from_id": "F1", "to_id": "F7", "flow": 27 }, { "from_id": "F1", "to_id": "F8", "flow": 22 }, { "from_id": "F1", "to_id": "F9", "flow": 7 }, { "from_id": "F1", "to_id": "F10", "flow": 14 }, { "from_id": "F1", "to_id": "F11", "flow": 22 }, { "from_id": "F1", "to_id": "F12", "flow": 11 }, { "from_id": "F2", "to_id": "F1", "flow": 19 }, { "from_id": "F2", "to_id": "F3", "flow": 25 }, { "from_id": "F2", "to_id": "F4", "flow": 31 }, { "from_id": "F2", "to_id": "F5", "flow": 21 }, { "from_id": "F2", "to_id": "F6", "flow": 37 }, { "from_id": "F2", "to_id": "F7", "flow": 33 }, { "from_id": "F2", "to_id": "F8", "flow": 32 }, { "from_id": "F2", "to_id": "F9", "flow": 29 }, { "from_id": "F2", "to_id": "F10", "flow": 17 }, { "from_id": "F2", "to_id": "F11", "flow": 20 }, { "from_id": "F2", "to_id": "F12", "flow": 8 }, { "from_id": "F3", "to_id": "F1", "flow": 29 }, { "from_id": "F3", "to_id": "F2", "flow": 25 }, { "from_id": "F3", "to_id": "F4", "flow": 13 }, { "from_id": "F3", "to_id": "F5", "flow": 11 }, { "from_id": "F3", "to_id": "F6", "flow": 31 }, { "from_id": "F3", "to_id": "F7", "flow": 12 }, { "from_id": "F3", "to_id": "F8", "flow": 23 }, { "from_id": "F3", "to_id": "F9", "flow": 22 }, { "from_id": "F3", "to_id": "F10", "flow": 15 }, { "from_id": "F3", "to_id": "F11", "flow": 13 }, { "from_id": "F3", "to_id": "F12", "flow": 12 }, { "from_id": "F4", "to_id": "F1", "flow": 13 }, { "from_id": "F4", "to_id": "F2", "flow": 31 }, { "from_id": "F4", "to_id": "F3", "flow": 13 }, { "from_id": "F4", "to_id": "F5", "flow": 36 }, { "from_id": "F4", "to_id": "F6", "flow": 15 }, { "from_id": "F4", "to_id": "F7", "flow": 21 }, { "from_id": "F4", "to_id": "F8", "flow": 19 }, { "from_id": "F4", "to_id": "F9", "flow": 34 }, { "from_id": "F4", "to_id": "F10", "flow": 25 }, { "from_id": "F4", "to_id": "F11", "flow": 33 }, { "from_id": "F4", "to_id": "F12", "flow": 27 }, { "from_id": "F5", "to_id": "F1", "flow": 15 }, { "from_id": "F5", "to_id": "F2", "flow": 21 }, { "from_id": "F5", "to_id": "F3", "flow": 11 }, { "from_id": "F5", "to_id": "F4", "flow": 36 }, { "from_id": "F5", "to_id": "F6", "flow": 38 }, { "from_id": "F5", "to_id": "F7", "flow": 26 }, { "from_id": "F5", "to_id": "F8", "flow": 9 }, { "from_id": "F5", "to_id": "F9", "flow": 18 }, { "from_id": "F5", "to_id": "F10", "flow": 22 }, { "from_id": "F5", "to_id": "F11", "flow": 24 }, { "from_id": "F5", "to_id": "F12", "flow": 18 }, { "from_id": "F6", "to_id": "F1", "flow": 12 }, { "from_id": "F6", "to_id": "F2", "flow": 37 }, { "from_id": "F6", "to_id": "F3", "flow": 31 }, { "from_id": "F6", "to_id": "F4", "flow": 15 }, { "from_id": "F6", "to_id": "F5", "flow": 38 }, { "from_id": "F6", "to_id": "F7", "flow": 5 }, { "from_id": "F6", "to_id": "F8", "flow": 14 }, { "from_id": "F6", "to_id": "F9", "flow": 32 }, { "from_id": "F6", "to_id": "F10", "flow": 12 }, { "from_id": "F6", "to_id": "F11", "flow": 25 }, { "from_id": "F6", "to_id": "F12", "flow": 17 }, { "from_id": "F7", "to_id": "F1", "flow": 27 }, { "from_id": "F7", "to_id": "F2", "flow": 33 }, { "from_id": "F7", "to_id": "F3", "flow": 12 }, { "from_id": "F7", "to_id": "F4", "flow": 21 }, { "from_id": "F7", "to_id": "F5", "flow": 26 }, { "from_id": "F7", "to_id": "F6", "flow": 5 }, { "from_id": "F7", "to_id": "F8", "flow": 18 }, { "from_id": "F7", "to_id": "F9", "flow": 17 }, { "from_id": "F7", "to_id": "F10", "flow": 33 }, { "from_id": "F7", "to_id": "F11", "flow": 24 }, { "from_id": "F7", "to_id": "F12", "flow": 34 }, { "from_id": "F8", "to_id": "F1", "flow": 22 }, { "from_id": "F8", "to_id": "F2", "flow": 32 }, { "from_id": "F8", "to_id": "F3", "flow": 23 }, { "from_id": "F8", "to_id": "F4", "flow": 19 }, { "from_id": "F8", "to_id": "F5", "flow": 9 }, { "from_id": "F8", "to_id": "F6", "flow": 14 }, { "from_id": "F8", "to_id": "F7", "flow": 18 }, { "from_id": "F8", "to_id": "F9", "flow": 10 }, { "from_id": "F8", "to_id": "F10", "flow": 21 }, { "from_id": "F8", "to_id": "F11", "flow": 22 }, { "from_id": "F8", "to_id": "F12", "flow": 18 }, { "from_id": "F9", "to_id": "F1", "flow": 7 }, { "from_id": "F9", "to_id": "F2", "flow": 29 }, { "from_id": "F9", "to_id": "F3", "flow": 22 }, { "from_id": "F9", "to_id": "F4", "flow": 34 }, { "from_id": "F9", "to_id": "F5", "flow": 18 }, { "from_id": "F9", "to_id": "F6", "flow": 32 }, { "from_id": "F9", "to_id": "F7", "flow": 17 }, { "from_id": "F9", "to_id": "F8", "flow": 10 }, { "from_id": "F9", "to_id": "F10", "flow": 25 }, { "from_id": "F9", "to_id": "F11", "flow": 11 }, { "from_id": "F9", "to_id": "F12", "flow": 14 }, { "from_id": "F10", "to_id": "F1", "flow": 14 }, { "from_id": "F10", "to_id": "F2", "flow": 17 }, { "from_id": "F10", "to_id": "F3", "flow": 15 }, { "from_id": "F10", "to_id": "F4", "flow": 25 }, { "from_id": "F10", "to_id": "F5", "flow": 22 }, { "from_id": "F10", "to_id": "F6", "flow": 12 }, { "from_id": "F10", "to_id": "F7", "flow": 33 }, { "from_id": "F10", "to_id": "F8", "flow": 21 }, { "from_id": "F10", "to_id": "F9", "flow": 25 }, { "from_id": "F10", "to_id": "F11", "flow": 22 }, { "from_id": "F10", "to_id": "F12", "flow": 28 }, { "from_id": "F11", "to_id": "F1", "flow": 22 }, { "from_id": "F11", "to_id": "F2", "flow": 20 }, { "from_id": "F11", "to_id": "F3", "flow": 13 }, { "from_id": "F11", "to_id": "F4", "flow": 33 }, { "from_id": "F11", "to_id": "F5", "flow": 24 }, { "from_id": "F11", "to_id": "F6", "flow": 25 }, { "from_id": "F11", "to_id": "F7", "flow": 24 }, { "from_id": "F11", "to_id": "F8", "flow": 22 }, { "from_id": "F11", "to_id": "F9", "flow": 11 }, { "from_id": "F11", "to_id": "F10", "flow": 22 }, { "from_id": "F11", "to_id": "F12", "flow": 27 }, { "from_id": "F12", "to_id": "F1", "flow": 11 }, { "from_id": "F12", "to_id": "F2", "flow": 8 }, { "from_id": "F12", "to_id": "F3", "flow": 12 }, { "from_id": "F12", "to_id": "F4", "flow": 27 }, { "from_id": "F12", "to_id": "F5", "flow": 18 }, { "from_id": "F12", "to_id": "F6", "flow": 17 }, { "from_id": "F12", "to_id": "F7", "flow": 34 }, { "from_id": "F12", "to_id": "F8", "flow": 18 }, { "from_id": "F12", "to_id": "F9", "flow": 14 }, { "from_id": "F12", "to_id": "F10", "flow": 28 }, { "from_id": "F12", "to_id": "F11", "flow": 27 } ] }, "solution_variant": [ 4, 3, 8, 7, 5, 10, 9, 6, 12, 2, 1, 11 ], "context_index": 16, "input_format": "csv", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Many people don’t realize how much walking for props adds up, so the plan is to put each prop set into its own storage spot and ensure no spot holds more than one set. There’s a number for how frequently any two sets are fetched together and a distance for any two spots; for each pair, multiply the frequency by the distance to get the pair’s retrieval cost. Sum those costs across all pairs and that total is what we want to keep small by choosing which set goes where. The detailed frequencies and distances are listed below.\n\nThere are 12 of each: prop set ids are F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12 and storage spot ids are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.\nWalking time from spot 0 to spot 1 is 1.\nWalking time from spot 0 to spot 2 is 5.\nWalking time from spot 0 to spot 3 is 7.\nWalking time from spot 0 to spot 4 is 10.\nWalking time from spot 0 to spot 5 is 9.\nWalking time from spot 0 to spot 6 is 7.\nWalking time from spot 0 to spot 7 is 8.\nWalking time from spot 0 to spot 8 is 12.\nWalking time from spot 0 to spot 9 is 11.\nWalking time from spot 0 to spot 10 is 8.\nWalking time from spot 0 to spot 11 is 12.\nWalking time from spot 1 to spot 0 is 1.\nWalking time from spot 1 to spot 2 is 6.\nWalking time from spot 1 to spot 3 is 8.\nWalking time from spot 1 to spot 4 is 11.\nWalking time from spot 1 to spot 5 is 10.\nWalking time from spot 1 to spot 6 is 8.\nWalking time from spot 1 to spot 7 is 7.\nWalking time from spot 1 to spot 8 is 13.\nWalking time from spot 1 to spot 9 is 12.\nWalking time from spot 1 to spot 10 is 9.\nWalking time from spot 1 to spot 11 is 13.\nWalking time from spot 2 to spot 0 is 5.\nWalking time from spot 2 to spot 1 is 6.\nWalking time from spot 2 to spot 3 is 4.\nWalking time from spot 2 to spot 4 is 5.\nWalking time from spot 2 to spot 5 is 4.\nWalking time from spot 2 to spot 6 is 6.\nWalking time from spot 2 to spot 7 is 11.\nWalking time from spot 2 to spot 8 is 7.\nWalking time from spot 2 to spot 9 is 8.\nWalking time from spot 2 to spot 10 is 11.\nWalking time from spot 2 to spot 11 is 9.\nWalking time from spot 3 to spot 0 is 7.\nWalking time from spot 3 to spot 1 is 8.\nWalking time from spot 3 to spot 2 is 4.\nWalking time from spot 3 to spot 4 is 3.\nWalking time from spot 3 to spot 5 is 2.\nWalking time from spot 3 to spot 6 is 2.\nWalking time from spot 3 to spot 7 is 7.\nWalking time from spot 3 to spot 8 is 5.\nWalking time from spot 3 to spot 9 is 4.\nWalking time from spot 3 to spot 10 is 7.\nWalking time from spot 3 to spot 11 is 5.\nWalking time from spot 4 to spot 0 is 10.\nWalking time from spot 4 to spot 1 is 11.\nWalking time from spot 4 to spot 2 is 5.\nWalking time from spot 4 to spot 3 is 3.\nWalking time from spot 4 to spot 5 is 1.\nWalking time from spot 4 to spot 6 is 3.\nWalking time from spot 4 to spot 7 is 8.\nWalking time from spot 4 to spot 8 is 4.\nWalking time from spot 4 to spot 9 is 5.\nWalking time from spot 4 to spot 10 is 8.\nWalking time from spot 4 to spot 11 is 6.\nWalking time from spot 5 to spot 0 is 9.\nWalking time from spot 5 to spot 1 is 10.\nWalking time from spot 5 to spot 2 is 4.\nWalking time from spot 5 to spot 3 is 2.\nWalking time from spot 5 to spot 4 is 1.\nWalking time from spot 5 to spot 6 is 2.\nWalking time from spot 5 to spot 7 is 7.\nWalking time from spot 5 to spot 8 is 3.\nWalking time from spot 5 to spot 9 is 4.\nWalking time from spot 5 to spot 10 is 7.\nWalking time from spot 5 to spot 11 is 5.\nWalking time from spot 6 to spot 0 is 7.\nWalking time from spot 6 to spot 1 is 8.\nWalking time from spot 6 to spot 2 is 6.\nWalking time from spot 6 to spot 3 is 2.\nWalking time from spot 6 to spot 4 is 3.\nWalking time from spot 6 to spot 5 is 2.\nWalking time from spot 6 to spot 7 is 5.\nWalking time from spot 6 to spot 8 is 5.\nWalking time from spot 6 to spot 9 is 4.\nWalking time from spot 6 to spot 10 is 5.\nWalking time from spot 6 to spot 11 is 5.\nWalking time from spot 7 to spot 0 is 8.\nWalking time from spot 7 to spot 1 is 7.\nWalking time from spot 7 to spot 2 is 11.\nWalking time from spot 7 to spot 3 is 7.\nWalking time from spot 7 to spot 4 is 8.\nWalking time from spot 7 to spot 5 is 7.\nWalking time from spot 7 to spot 6 is 5.\nWalking time from spot 7 to spot 8 is 10.\nWalking time from spot 7 to spot 9 is 9.\nWalking time from spot 7 to spot 10 is 6.\nWalking time from spot 7 to spot 11 is 10.\nWalking time from spot 8 to spot 0 is 12.\nWalking time from spot 8 to spot 1 is 13.\nWalking time from spot 8 to spot 2 is 7.\nWalking time from spot 8 to spot 3 is 5.\nWalking time from spot 8 to spot 4 is 4.\nWalking time from spot 8 to spot 5 is 3.\nWalking time from spot 8 to spot 6 is 5.\nWalking time from spot 8 to spot 7 is 10.\nWalking time from spot 8 to spot 9 is 1.\nWalking time from spot 8 to spot 10 is 4.\nWalking time from spot 8 to spot 11 is 2.\nWalking time from spot 9 to spot 0 is 11.\nWalking time from spot 9 to spot 1 is 12.\nWalking time from spot 9 to spot 2 is 8.\nWalking time from spot 9 to spot 3 is 4.\nWalking time from spot 9 to spot 4 is 5.\nWalking time from spot 9 to spot 5 is 4.\nWalking time from spot 9 to spot 6 is 4.\nWalking time from spot 9 to spot 7 is 9.\nWalking time from spot 9 to spot 8 is 1.\nWalking time from spot 9 to spot 10 is 3.\nWalking time from spot 9 to spot 11 is 1.\nWalking time from spot 10 to spot 0 is 8.\nWalking time from spot 10 to spot 1 is 9.\nWalking time from spot 10 to spot 2 is 11.\nWalking time from spot 10 to spot 3 is 7.\nWalking time from spot 10 to spot 4 is 8.\nWalking time from spot 10 to spot 5 is 7.\nWalking time from spot 10 to spot 6 is 5.\nWalking time from spot 10 to spot 7 is 6.\nWalking time from spot 10 to spot 8 is 4.\nWalking time from spot 10 to spot 9 is 3.\nWalking time from spot 10 to spot 11 is 4.\nWalking time from spot 11 to spot 0 is 12.\nWalking time from spot 11 to spot 1 is 13.\nWalking time from spot 11 to spot 2 is 9.\nWalking time from spot 11 to spot 3 is 5.\nWalking time from spot 11 to spot 4 is 6.\nWalking time from spot 11 to spot 5 is 5.\nWalking time from spot 11 to spot 6 is 5.\nWalking time from spot 11 to spot 7 is 10.\nWalking time from spot 11 to spot 8 is 2.\nWalking time from spot 11 to spot 9 is 1.\nWalking time from spot 11 to spot 10 is 4.\nJoint fetch frequency from prop set F1 to F2 is 0.\nJoint fetch frequency from prop set F1 to F3 is 1.\nJoint fetch frequency from prop set F1 to F4 is 0.\nJoint fetch frequency from prop set F1 to F5 is 0.\nJoint fetch frequency from prop set F1 to F6 is 0.\nJoint fetch frequency from prop set F1 to F7 is 3.\nJoint fetch frequency from prop set F1 to F8 is 0.\nJoint fetch frequency from prop set F1 to F9 is 1.\nJoint fetch frequency from prop set F1 to F10 is 2.\nJoint fetch frequency from prop set F1 to F11 is 5.\nJoint fetch frequency from prop set F1 to F12 is 2.\nJoint fetch frequency from prop set F2 to F1 is 0.\nJoint fetch frequency from prop set F2 to F3 is 5.\nJoint fetch frequency from prop set F2 to F4 is 5.\nJoint fetch frequency from prop set F2 to F5 is 1.\nJoint fetch frequency from prop set F2 to F6 is 0.\nJoint fetch frequency from prop set F2 to F7 is 10.\nJoint fetch frequency from prop set F2 to F8 is 0.\nJoint fetch frequency from prop set F2 to F9 is 2.\nJoint fetch frequency from prop set F2 to F10 is 5.\nJoint fetch frequency from prop set F2 to F11 is 1.\nJoint fetch frequency from prop set F2 to F12 is 0.\nJoint fetch frequency from prop set F3 to F1 is 1.\nJoint fetch frequency from prop set F3 to F2 is 5.\nJoint fetch frequency from prop set F3 to F4 is 0.\nJoint fetch frequency from prop set F3 to F5 is 10.\nJoint fetch frequency from prop set F3 to F6 is 0.\nJoint fetch frequency from prop set F3 to F7 is 1.\nJoint fetch frequency from prop set F3 to F8 is 0.\nJoint fetch frequency from prop set F3 to F9 is 0.\nJoint fetch frequency from prop set F3 to F10 is 2.\nJoint fetch frequency from prop set F3 to F11 is 4.\nJoint fetch frequency from prop set F3 to F12 is 2.\nJoint fetch frequency from prop set F4 to F1 is 0.\nJoint fetch frequency from prop set F4 to F2 is 5.\nJoint fetch frequency from prop set F4 to F3 is 0.\nJoint fetch frequency from prop set F4 to F5 is 10.\nJoint fetch frequency from prop set F4 to F6 is 5.\nJoint fetch frequency from prop set F4 to F7 is 2.\nJoint fetch frequency from prop set F4 to F8 is 0.\nJoint fetch frequency from prop set F4 to F9 is 4.\nJoint fetch frequency from prop set F4 to F10 is 0.\nJoint fetch frequency from prop set F4 to F11 is 10.\nJoint fetch frequency from prop set F4 to F12 is 0.\nJoint fetch frequency from prop set F5 to F1 is 0.\nJoint fetch frequency from prop set F5 to F2 is 1.\nJoint fetch frequency from prop set F5 to F3 is 10.\nJoint fetch frequency from prop set F5 to F4 is 10.\nJoint fetch frequency from prop set F5 to F6 is 0.\nJoint fetch frequency from prop set F5 to F7 is 5.\nJoint fetch frequency from prop set F5 to F8 is 0.\nJoint fetch frequency from prop set F5 to F9 is 4.\nJoint fetch frequency from prop set F5 to F10 is 5.\nJoint fetch frequency from prop set F5 to F11 is 10.\nJoint fetch frequency from prop set F5 to F12 is 5.\nJoint fetch frequency from prop set F6 to F1 is 0.\nJoint fetch frequency from prop set F6 to F2 is 0.\nJoint fetch frequency from prop set F6 to F3 is 0.\nJoint fetch frequency from prop set F6 to F4 is 5.\nJoint fetch frequency from prop set F6 to F5 is 0.\nJoint fetch frequency from prop set F6 to F7 is 0.\nJoint fetch frequency from prop set F6 to F8 is 0.\nJoint fetch frequency from prop set F6 to F9 is 0.\nJoint fetch frequency from prop set F6 to F10 is 2.\nJoint fetch frequency from prop set F6 to F11 is 0.\nJoint fetch frequency from prop set F6 to F12 is 3.\nJoint fetch frequency from prop set F7 to F1 is 3.\nJoint fetch frequency from prop set F7 to F2 is 10.\nJoint fetch frequency from prop set F7 to F3 is 1.\nJoint fetch frequency from prop set F7 to F4 is 2.\nJoint fetch frequency from prop set F7 to F5 is 5.\nJoint fetch frequency from prop set F7 to F6 is 0.\nJoint fetch frequency from prop set F7 to F8 is 2.\nJoint fetch frequency from prop set F7 to F9 is 5.\nJoint fetch frequency from prop set F7 to F10 is 0.\nJoint fetch frequency from prop set F7 to F11 is 6.\nJoint fetch frequency from prop set F7 to F12 is 2.\nJoint fetch frequency from prop set F8 to F1 is 0.\nJoint fetch frequency from prop set F8 to F2 is 0.\nJoint fetch frequency from prop set F8 to F3 is 0.\nJoint fetch frequency from prop set F8 to F4 is 0.\nJoint fetch frequency from prop set F8 to F5 is 0.\nJoint fetch frequency from prop set F8 to F6 is 0.\nJoint fetch frequency from prop set F8 to F7 is 2.\nJoint fetch frequency from prop set F8 to F9 is 0.\nJoint fetch frequency from prop set F8 to F10 is 10.\nJoint fetch frequency from prop set F8 to F11 is 3.\nJoint fetch frequency from prop set F8 to F12 is 1.\nJoint fetch frequency from prop set F9 to F1 is 1.\nJoint fetch frequency from prop set F9 to F2 is 2.\nJoint fetch frequency from prop set F9 to F3 is 0.\nJoint fetch frequency from prop set F9 to F4 is 4.\nJoint fetch frequency from prop set F9 to F5 is 4.\nJoint fetch frequency from prop set F9 to F6 is 0.\nJoint fetch frequency from prop set F9 to F7 is 5.\nJoint fetch frequency from prop set F9 to F8 is 0.\nJoint fetch frequency from prop set F9 to F10 is 0.\nJoint fetch frequency from prop set F9 to F11 is 5.\nJoint fetch frequency from prop set F9 to F12 is 2.\nJoint fetch frequency from prop set F10 to F1 is 2.\nJoint fetch frequency from prop set F10 to F2 is 5.\nJoint fetch frequency from prop set F10 to F3 is 2.\nJoint fetch frequency from prop set F10 to F4 is 0.\nJoint fetch frequency from prop set F10 to F5 is 5.\nJoint fetch frequency from prop set F10 to F6 is 2.\nJoint fetch frequency from prop set F10 to F7 is 0.\nJoint fetch frequency from prop set F10 to F8 is 10.\nJoint fetch frequency from prop set F10 to F9 is 0.\nJoint fetch frequency from prop set F10 to F11 is 2.\nJoint fetch frequency from prop set F10 to F12 is 0.\nJoint fetch frequency from prop set F11 to F1 is 5.\nJoint fetch frequency from prop set F11 to F2 is 1.\nJoint fetch frequency from prop set F11 to F3 is 4.\nJoint fetch frequency from prop set F11 to F4 is 10.\nJoint fetch frequency from prop set F11 to F5 is 10.\nJoint fetch frequency from prop set F11 to F6 is 0.\nJoint fetch frequency from prop set F11 to F7 is 6.\nJoint fetch frequency from prop set F11 to F8 is 3.\nJoint fetch frequency from prop set F11 to F9 is 5.\nJoint fetch frequency from prop set F11 to F10 is 2.\nJoint fetch frequency from prop set F11 to F12 is 0.\nJoint fetch frequency from prop set F12 to F1 is 2.\nJoint fetch frequency from prop set F12 to F2 is 0.\nJoint fetch frequency from prop set F12 to F3 is 2.\nJoint fetch frequency from prop set F12 to F4 is 0.\nJoint fetch frequency from prop set F12 to F5 is 5.\nJoint fetch frequency from prop set F12 to F6 is 3.\nJoint fetch frequency from prop set F12 to F7 is 2.\nJoint fetch frequency from prop set F12 to F8 is 1.\nJoint fetch frequency from prop set F12 to F9 is 2.\nJoint fetch frequency from prop set F12 to F10 is 0.\nJoint fetch frequency from prop set F12 to F11 is 0.\nUse these entries to compute the total retrieval cost and choose assignments that keep it small.\n\nAlso, when you send back your placement, a little JSON blob like the one below is handy — it just lists which spot each prop set goes to, in order.\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis simply means: the first entry is the spot assigned to the first prop set, the second entry is the spot for the second prop set, and so on. Think of it as a quick form where each slot in the list names the storage spot for that particular set.\n\nThis JSON is only a sketch of the shape I expect, not the actual placement — please fill in the real identifiers from the instance when you reply. Also make sure to use the exact identifiers given in the instance input — do not rename them or invent new labels. For example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 1, 5, 7, 10, 9, 7, 8, 12, 11, 8, 12 ], [ 1, 0, 6, 8, 11, 10, 8, 7, 13, 12, 9, 13 ], [ 5, 6, 0, 4, 5, 4, 6, 11, 7, 8, 11, 9 ], [ 7, 8, 4, 0, 3, 2, 2, 7, 5, 4, 7, 5 ], [ 10, 11, 5, 3, 0, 1, 3, 8, 4, 5, 8, 6 ], [ 9, 10, 4, 2, 1, 0, 2, 7, 3, 4, 7, 5 ], [ 7, 8, 6, 2, 3, 2, 0, 5, 5, 4, 5, 5 ], [ 8, 7, 11, 7, 8, 7, 5, 0, 10, 9, 6, 10 ], [ 12, 13, 7, 5, 4, 3, 5, 10, 0, 1, 4, 2 ], [ 11, 12, 8, 4, 5, 4, 4, 9, 1, 0, 3, 1 ], [ 8, 9, 11, 7, 8, 7, 5, 6, 4, 3, 0, 4 ], [ 12, 13, 9, 5, 6, 5, 5, 10, 2, 1, 4, 0 ] ], "flow_matrix": [ [ 0, 0, 1, 0, 0, 0, 3, 0, 1, 2, 5, 2 ], [ 0, 0, 5, 5, 1, 0, 10, 0, 2, 5, 1, 0 ], [ 1, 5, 0, 0, 10, 0, 1, 0, 0, 2, 4, 2 ], [ 0, 5, 0, 0, 10, 5, 2, 0, 4, 0, 10, 0 ], [ 0, 1, 10, 10, 0, 0, 5, 0, 4, 5, 10, 5 ], [ 0, 0, 0, 5, 0, 0, 0, 0, 0, 2, 0, 3 ], [ 3, 10, 1, 2, 5, 0, 0, 2, 5, 0, 6, 2 ], [ 0, 0, 0, 0, 0, 0, 2, 0, 0, 10, 3, 1 ], [ 1, 2, 0, 4, 4, 0, 5, 0, 0, 0, 5, 2 ], [ 2, 5, 2, 0, 5, 2, 0, 10, 0, 0, 2, 0 ], [ 5, 1, 4, 10, 10, 0, 6, 3, 5, 2, 0, 0 ], [ 2, 0, 2, 0, 5, 3, 2, 1, 2, 0, 0, 0 ] ], "objective": 1390.0 }, "solution": [ 2, 11, 3, 4, 6, 7, 9, 1, 8, 0, 5, 10 ], "obj": 1390.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 12, "num_locations": 12, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 1 }, { "from_id": 0, "to_id": 2, "distance": 5 }, { "from_id": 0, "to_id": 3, "distance": 7 }, { "from_id": 0, "to_id": 4, "distance": 10 }, { "from_id": 0, "to_id": 5, "distance": 9 }, { "from_id": 0, "to_id": 6, "distance": 7 }, { "from_id": 0, "to_id": 7, "distance": 8 }, { "from_id": 0, "to_id": 8, "distance": 12 }, { "from_id": 0, "to_id": 9, "distance": 11 }, { "from_id": 0, "to_id": 10, "distance": 8 }, { "from_id": 0, "to_id": 11, "distance": 12 }, { "from_id": 1, "to_id": 0, "distance": 1 }, { "from_id": 1, "to_id": 2, "distance": 6 }, { "from_id": 1, "to_id": 3, "distance": 8 }, { "from_id": 1, "to_id": 4, "distance": 11 }, { "from_id": 1, "to_id": 5, "distance": 10 }, { "from_id": 1, "to_id": 6, "distance": 8 }, { "from_id": 1, "to_id": 7, "distance": 7 }, { "from_id": 1, "to_id": 8, "distance": 13 }, { "from_id": 1, "to_id": 9, "distance": 12 }, { "from_id": 1, "to_id": 10, "distance": 9 }, { "from_id": 1, "to_id": 11, "distance": 13 }, { "from_id": 2, "to_id": 0, "distance": 5 }, { "from_id": 2, "to_id": 1, "distance": 6 }, { "from_id": 2, "to_id": 3, "distance": 4 }, { "from_id": 2, "to_id": 4, "distance": 5 }, { "from_id": 2, "to_id": 5, "distance": 4 }, { "from_id": 2, "to_id": 6, "distance": 6 }, { "from_id": 2, "to_id": 7, "distance": 11 }, { "from_id": 2, "to_id": 8, "distance": 7 }, { "from_id": 2, "to_id": 9, "distance": 8 }, { "from_id": 2, "to_id": 10, "distance": 11 }, { "from_id": 2, "to_id": 11, "distance": 9 }, { "from_id": 3, "to_id": 0, "distance": 7 }, { "from_id": 3, "to_id": 1, "distance": 8 }, { "from_id": 3, "to_id": 2, "distance": 4 }, { "from_id": 3, "to_id": 4, "distance": 3 }, { "from_id": 3, "to_id": 5, "distance": 2 }, { "from_id": 3, "to_id": 6, "distance": 2 }, { "from_id": 3, "to_id": 7, "distance": 7 }, { "from_id": 3, "to_id": 8, "distance": 5 }, { "from_id": 3, "to_id": 9, "distance": 4 }, { "from_id": 3, "to_id": 10, "distance": 7 }, { "from_id": 3, "to_id": 11, "distance": 5 }, { "from_id": 4, "to_id": 0, "distance": 10 }, { "from_id": 4, "to_id": 1, "distance": 11 }, { "from_id": 4, "to_id": 2, "distance": 5 }, { "from_id": 4, "to_id": 3, "distance": 3 }, { "from_id": 4, "to_id": 5, "distance": 1 }, { "from_id": 4, "to_id": 6, "distance": 3 }, { "from_id": 4, "to_id": 7, "distance": 8 }, { "from_id": 4, "to_id": 8, "distance": 4 }, { "from_id": 4, "to_id": 9, "distance": 5 }, { "from_id": 4, "to_id": 10, "distance": 8 }, { "from_id": 4, "to_id": 11, "distance": 6 }, { "from_id": 5, "to_id": 0, "distance": 9 }, { "from_id": 5, "to_id": 1, "distance": 10 }, { "from_id": 5, "to_id": 2, "distance": 4 }, { "from_id": 5, "to_id": 3, "distance": 2 }, { "from_id": 5, "to_id": 4, "distance": 1 }, { "from_id": 5, "to_id": 6, "distance": 2 }, { "from_id": 5, "to_id": 7, "distance": 7 }, { "from_id": 5, "to_id": 8, "distance": 3 }, { "from_id": 5, "to_id": 9, "distance": 4 }, { "from_id": 5, "to_id": 10, "distance": 7 }, { "from_id": 5, "to_id": 11, "distance": 5 }, { "from_id": 6, "to_id": 0, "distance": 7 }, { "from_id": 6, "to_id": 1, "distance": 8 }, { "from_id": 6, "to_id": 2, "distance": 6 }, { "from_id": 6, "to_id": 3, "distance": 2 }, { "from_id": 6, "to_id": 4, "distance": 3 }, { "from_id": 6, "to_id": 5, "distance": 2 }, { "from_id": 6, "to_id": 7, "distance": 5 }, { "from_id": 6, "to_id": 8, "distance": 5 }, { "from_id": 6, "to_id": 9, "distance": 4 }, { "from_id": 6, "to_id": 10, "distance": 5 }, { "from_id": 6, "to_id": 11, "distance": 5 }, { "from_id": 7, "to_id": 0, "distance": 8 }, { "from_id": 7, "to_id": 1, "distance": 7 }, { "from_id": 7, "to_id": 2, "distance": 11 }, { "from_id": 7, "to_id": 3, "distance": 7 }, { "from_id": 7, "to_id": 4, "distance": 8 }, { "from_id": 7, "to_id": 5, "distance": 7 }, { "from_id": 7, "to_id": 6, "distance": 5 }, { "from_id": 7, "to_id": 8, "distance": 10 }, { "from_id": 7, "to_id": 9, "distance": 9 }, { "from_id": 7, "to_id": 10, "distance": 6 }, { "from_id": 7, "to_id": 11, "distance": 10 }, { "from_id": 8, "to_id": 0, "distance": 12 }, { "from_id": 8, "to_id": 1, "distance": 13 }, { "from_id": 8, "to_id": 2, "distance": 7 }, { "from_id": 8, "to_id": 3, "distance": 5 }, { "from_id": 8, "to_id": 4, "distance": 4 }, { "from_id": 8, "to_id": 5, "distance": 3 }, { "from_id": 8, "to_id": 6, "distance": 5 }, { "from_id": 8, "to_id": 7, "distance": 10 }, { "from_id": 8, "to_id": 9, "distance": 1 }, { "from_id": 8, "to_id": 10, "distance": 4 }, { "from_id": 8, "to_id": 11, "distance": 2 }, { "from_id": 9, "to_id": 0, "distance": 11 }, { "from_id": 9, "to_id": 1, "distance": 12 }, { "from_id": 9, "to_id": 2, "distance": 8 }, { "from_id": 9, "to_id": 3, "distance": 4 }, { "from_id": 9, "to_id": 4, "distance": 5 }, { "from_id": 9, "to_id": 5, "distance": 4 }, { "from_id": 9, "to_id": 6, "distance": 4 }, { "from_id": 9, "to_id": 7, "distance": 9 }, { "from_id": 9, "to_id": 8, "distance": 1 }, { "from_id": 9, "to_id": 10, "distance": 3 }, { "from_id": 9, "to_id": 11, "distance": 1 }, { "from_id": 10, "to_id": 0, "distance": 8 }, { "from_id": 10, "to_id": 1, "distance": 9 }, { "from_id": 10, "to_id": 2, "distance": 11 }, { "from_id": 10, "to_id": 3, "distance": 7 }, { "from_id": 10, "to_id": 4, "distance": 8 }, { "from_id": 10, "to_id": 5, "distance": 7 }, { "from_id": 10, "to_id": 6, "distance": 5 }, { "from_id": 10, "to_id": 7, "distance": 6 }, { "from_id": 10, "to_id": 8, "distance": 4 }, { "from_id": 10, "to_id": 9, "distance": 3 }, { "from_id": 10, "to_id": 11, "distance": 4 }, { "from_id": 11, "to_id": 0, "distance": 12 }, { "from_id": 11, "to_id": 1, "distance": 13 }, { "from_id": 11, "to_id": 2, "distance": 9 }, { "from_id": 11, "to_id": 3, "distance": 5 }, { "from_id": 11, "to_id": 4, "distance": 6 }, { "from_id": 11, "to_id": 5, "distance": 5 }, { "from_id": 11, "to_id": 6, "distance": 5 }, { "from_id": 11, "to_id": 7, "distance": 10 }, { "from_id": 11, "to_id": 8, "distance": 2 }, { "from_id": 11, "to_id": 9, "distance": 1 }, { "from_id": 11, "to_id": 10, "distance": 4 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 1 }, { "from_id": "F1", "to_id": "F4", "flow": 0 }, { "from_id": "F1", "to_id": "F5", "flow": 0 }, { "from_id": "F1", "to_id": "F6", "flow": 0 }, { "from_id": "F1", "to_id": "F7", "flow": 3 }, { "from_id": "F1", "to_id": "F8", "flow": 0 }, { "from_id": "F1", "to_id": "F9", "flow": 1 }, { "from_id": "F1", "to_id": "F10", "flow": 2 }, { "from_id": "F1", "to_id": "F11", "flow": 5 }, { "from_id": "F1", "to_id": "F12", "flow": 2 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 5 }, { "from_id": "F2", "to_id": "F4", "flow": 5 }, { "from_id": "F2", "to_id": "F5", "flow": 1 }, { "from_id": "F2", "to_id": "F6", "flow": 0 }, { "from_id": "F2", "to_id": "F7", "flow": 10 }, { "from_id": "F2", "to_id": "F8", "flow": 0 }, { "from_id": "F2", "to_id": "F9", "flow": 2 }, { "from_id": "F2", "to_id": "F10", "flow": 5 }, { "from_id": "F2", "to_id": "F11", "flow": 1 }, { "from_id": "F2", "to_id": "F12", "flow": 0 }, { "from_id": "F3", "to_id": "F1", "flow": 1 }, { "from_id": "F3", "to_id": "F2", "flow": 5 }, { "from_id": "F3", "to_id": "F4", "flow": 0 }, { "from_id": "F3", "to_id": "F5", "flow": 10 }, { "from_id": "F3", "to_id": "F6", "flow": 0 }, { "from_id": "F3", "to_id": "F7", "flow": 1 }, { "from_id": "F3", "to_id": "F8", "flow": 0 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F3", "to_id": "F10", "flow": 2 }, { "from_id": "F3", "to_id": "F11", "flow": 4 }, { "from_id": "F3", "to_id": "F12", "flow": 2 }, { "from_id": "F4", "to_id": "F1", "flow": 0 }, { "from_id": "F4", "to_id": "F2", "flow": 5 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 10 }, { "from_id": "F4", "to_id": "F6", "flow": 5 }, { "from_id": "F4", "to_id": "F7", "flow": 2 }, { "from_id": "F4", "to_id": "F8", "flow": 0 }, { "from_id": "F4", "to_id": "F9", "flow": 4 }, { "from_id": "F4", "to_id": "F10", "flow": 0 }, { "from_id": "F4", "to_id": "F11", "flow": 10 }, { "from_id": "F4", "to_id": "F12", "flow": 0 }, { "from_id": "F5", "to_id": "F1", "flow": 0 }, { "from_id": "F5", "to_id": "F2", "flow": 1 }, { "from_id": "F5", "to_id": "F3", "flow": 10 }, { "from_id": "F5", "to_id": "F4", "flow": 10 }, { "from_id": "F5", "to_id": "F6", "flow": 0 }, { "from_id": "F5", "to_id": "F7", "flow": 5 }, { "from_id": "F5", "to_id": "F8", "flow": 0 }, { "from_id": "F5", "to_id": "F9", "flow": 4 }, { "from_id": "F5", "to_id": "F10", "flow": 5 }, { "from_id": "F5", "to_id": "F11", "flow": 10 }, { "from_id": "F5", "to_id": "F12", "flow": 5 }, { "from_id": "F6", "to_id": "F1", "flow": 0 }, { "from_id": "F6", "to_id": "F2", "flow": 0 }, { "from_id": "F6", "to_id": "F3", "flow": 0 }, { "from_id": "F6", "to_id": "F4", "flow": 5 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 0 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F10", "flow": 2 }, { "from_id": "F6", "to_id": "F11", "flow": 0 }, { "from_id": "F6", "to_id": "F12", "flow": 3 }, { "from_id": "F7", "to_id": "F1", "flow": 3 }, { "from_id": "F7", "to_id": "F2", "flow": 10 }, { "from_id": "F7", "to_id": "F3", "flow": 1 }, { "from_id": "F7", "to_id": "F4", "flow": 2 }, { "from_id": "F7", "to_id": "F5", "flow": 5 }, { "from_id": "F7", "to_id": "F6", "flow": 0 }, { "from_id": "F7", "to_id": "F8", "flow": 2 }, { "from_id": "F7", "to_id": "F9", "flow": 5 }, { "from_id": "F7", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F11", "flow": 6 }, { "from_id": "F7", "to_id": "F12", "flow": 2 }, { "from_id": "F8", "to_id": "F1", "flow": 0 }, { "from_id": "F8", "to_id": "F2", "flow": 0 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 0 }, { "from_id": "F8", "to_id": "F6", "flow": 0 }, { "from_id": "F8", "to_id": "F7", "flow": 2 }, { "from_id": "F8", "to_id": "F9", "flow": 0 }, { "from_id": "F8", "to_id": "F10", "flow": 10 }, { "from_id": "F8", "to_id": "F11", "flow": 3 }, { "from_id": "F8", "to_id": "F12", "flow": 1 }, { "from_id": "F9", "to_id": "F1", "flow": 1 }, { "from_id": "F9", "to_id": "F2", "flow": 2 }, { "from_id": "F9", "to_id": "F3", "flow": 0 }, { "from_id": "F9", "to_id": "F4", "flow": 4 }, { "from_id": "F9", "to_id": "F5", "flow": 4 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 5 }, { "from_id": "F9", "to_id": "F8", "flow": 0 }, { "from_id": "F9", "to_id": "F10", "flow": 0 }, { "from_id": "F9", "to_id": "F11", "flow": 5 }, { "from_id": "F9", "to_id": "F12", "flow": 2 }, { "from_id": "F10", "to_id": "F1", "flow": 2 }, { "from_id": "F10", "to_id": "F2", "flow": 5 }, { "from_id": "F10", "to_id": "F3", "flow": 2 }, { "from_id": "F10", "to_id": "F4", "flow": 0 }, { "from_id": "F10", "to_id": "F5", "flow": 5 }, { "from_id": "F10", "to_id": "F6", "flow": 2 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 10 }, { "from_id": "F10", "to_id": "F9", "flow": 0 }, { "from_id": "F10", "to_id": "F11", "flow": 2 }, { "from_id": "F10", "to_id": "F12", "flow": 0 }, { "from_id": "F11", "to_id": "F1", "flow": 5 }, { "from_id": "F11", "to_id": "F2", "flow": 1 }, { "from_id": "F11", "to_id": "F3", "flow": 4 }, { "from_id": "F11", "to_id": "F4", "flow": 10 }, { "from_id": "F11", "to_id": "F5", "flow": 10 }, { "from_id": "F11", "to_id": "F6", "flow": 0 }, { "from_id": "F11", "to_id": "F7", "flow": 6 }, { "from_id": "F11", "to_id": "F8", "flow": 3 }, { "from_id": "F11", "to_id": "F9", "flow": 5 }, { "from_id": "F11", "to_id": "F10", "flow": 2 }, { "from_id": "F11", "to_id": "F12", "flow": 0 }, { "from_id": "F12", "to_id": "F1", "flow": 2 }, { "from_id": "F12", "to_id": "F2", "flow": 0 }, { "from_id": "F12", "to_id": "F3", "flow": 2 }, { "from_id": "F12", "to_id": "F4", "flow": 0 }, { "from_id": "F12", "to_id": "F5", "flow": 5 }, { "from_id": "F12", "to_id": "F6", "flow": 3 }, { "from_id": "F12", "to_id": "F7", "flow": 2 }, { "from_id": "F12", "to_id": "F8", "flow": 1 }, { "from_id": "F12", "to_id": "F9", "flow": 2 }, { "from_id": "F12", "to_id": "F10", "flow": 0 }, { "from_id": "F12", "to_id": "F11", "flow": 0 } ] }, "solution_variant": [ 2, 11, 3, 4, 6, 7, 9, 1, 8, 0, 5, 10 ], "context_index": 17, "input_format": "nl", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "There’s a plan to reduce bottlenecks at the dispensary by reassigning where medication families sit. The rule is strict — one family per drawer and one drawer per family, no sharing or empty slots. The task is choosing which family is assigned to which drawer; an assignment is judged by adding up, for every pair of families, the frequency they’re prescribed together times how far apart their drawers are. The lower that combined number, the less time lost to fetching meds. The detailed instance data (families, drawers, co-prescription counts and distances) appear below.\n\nThe detailed instance lists 9 medication families (F1, F2, F3, F4, F5, F6, F7, F8, F9) and 0, 1, 2, 3, 4, 5, 6, 7, 8 drawers to be assigned.\nDistance from drawer 0 to drawer 1: 67.\nDistance from drawer 0 to drawer 2: 79.\nDistance from drawer 0 to drawer 3: 27.\nDistance from drawer 0 to drawer 4: 76.\nDistance from drawer 0 to drawer 5: 45.\nDistance from drawer 0 to drawer 6: 33.\nDistance from drawer 0 to drawer 7: 4.\nDistance from drawer 0 to drawer 8: 31.\nDistance from drawer 1 to drawer 0: 67.\nDistance from drawer 1 to drawer 2: 63.\nDistance from drawer 1 to drawer 3: 22.\nDistance from drawer 1 to drawer 4: 37.\nDistance from drawer 1 to drawer 5: 19.\nDistance from drawer 1 to drawer 6: 74.\nDistance from drawer 1 to drawer 7: 69.\nDistance from drawer 1 to drawer 8: 78.\nDistance from drawer 2 to drawer 0: 79.\nDistance from drawer 2 to drawer 1: 63.\nDistance from drawer 2 to drawer 3: 25.\nDistance from drawer 2 to drawer 4: 46.\nDistance from drawer 2 to drawer 5: 51.\nDistance from drawer 2 to drawer 6: 20.\nDistance from drawer 2 to drawer 7: 4.\nDistance from drawer 2 to drawer 8: 57.\nDistance from drawer 3 to drawer 0: 26.\nDistance from drawer 3 to drawer 1: 21.\nDistance from drawer 3 to drawer 2: 26.\nDistance from drawer 3 to drawer 4: 7.\nDistance from drawer 3 to drawer 5: 6.\nDistance from drawer 3 to drawer 6: 20.\nDistance from drawer 3 to drawer 7: 17.\nDistance from drawer 3 to drawer 8: 9.\nDistance from drawer 4 to drawer 0: 76.\nDistance from drawer 4 to drawer 1: 38.\nDistance from drawer 4 to drawer 2: 47.\nDistance from drawer 4 to drawer 3: 6.\nDistance from drawer 4 to drawer 5: 42.\nDistance from drawer 4 to drawer 6: 73.\nDistance from drawer 4 to drawer 7: 79.\nDistance from drawer 4 to drawer 8: 32.\nDistance from drawer 5 to drawer 0: 45.\nDistance from drawer 5 to drawer 1: 20.\nDistance from drawer 5 to drawer 2: 52.\nDistance from drawer 5 to drawer 3: 5.\nDistance from drawer 5 to drawer 4: 42.\nDistance from drawer 5 to drawer 6: 44.\nDistance from drawer 5 to drawer 7: 66.\nDistance from drawer 5 to drawer 8: 16.\nDistance from drawer 6 to drawer 0: 33.\nDistance from drawer 6 to drawer 1: 73.\nDistance from drawer 6 to drawer 2: 21.\nDistance from drawer 6 to drawer 3: 19.\nDistance from drawer 6 to drawer 4: 73.\nDistance from drawer 6 to drawer 5: 44.\nDistance from drawer 6 to drawer 7: 27.\nDistance from drawer 6 to drawer 8: 71.\nDistance from drawer 7 to drawer 0: 4.\nDistance from drawer 7 to drawer 1: 69.\nDistance from drawer 7 to drawer 2: 4.\nDistance from drawer 7 to drawer 3: 17.\nDistance from drawer 7 to drawer 4: 79.\nDistance from drawer 7 to drawer 5: 66.\nDistance from drawer 7 to drawer 6: 27.\nDistance from drawer 7 to drawer 8: 71.\nDistance from drawer 8 to drawer 0: 31.\nDistance from drawer 8 to drawer 1: 77.\nDistance from drawer 8 to drawer 2: 56.\nDistance from drawer 8 to drawer 3: 8.\nDistance from drawer 8 to drawer 4: 31.\nDistance from drawer 8 to drawer 5: 16.\nDistance from drawer 8 to drawer 6: 71.\nDistance from drawer 8 to drawer 7: 71.\nCo-prescription count between family F1 and family F2: 23.\nCo-prescription count between family F1 and family F3: 4.\nCo-prescription count between family F1 and family F4: 48.\nCo-prescription count between family F1 and family F5: 11.\nCo-prescription count between family F1 and family F6: 38.\nCo-prescription count between family F1 and family F7: 44.\nCo-prescription count between family F1 and family F8: 67.\nCo-prescription count between family F1 and family F9: 45.\nCo-prescription count between family F2 and family F1: 23.\nCo-prescription count between family F2 and family F3: 26.\nCo-prescription count between family F2 and family F4: 51.\nCo-prescription count between family F2 and family F5: 42.\nCo-prescription count between family F2 and family F6: 53.\nCo-prescription count between family F2 and family F7: 15.\nCo-prescription count between family F2 and family F8: 21.\nCo-prescription count between family F2 and family F9: 9.\nCo-prescription count between family F3 and family F1: 4.\nCo-prescription count between family F3 and family F2: 26.\nCo-prescription count between family F3 and family F4: 49.\nCo-prescription count between family F3 and family F5: 37.\nCo-prescription count between family F3 and family F6: 34.\nCo-prescription count between family F3 and family F7: 52.\nCo-prescription count between family F3 and family F8: 68.\nCo-prescription count between family F3 and family F9: 31.\nCo-prescription count between family F4 and family F1: 48.\nCo-prescription count between family F4 and family F2: 51.\nCo-prescription count between family F4 and family F3: 49.\nCo-prescription count between family F4 and family F5: 64.\nCo-prescription count between family F4 and family F6: 65.\nCo-prescription count between family F4 and family F7: 53.\nCo-prescription count between family F4 and family F8: 55.\nCo-prescription count between family F4 and family F9: 62.\nCo-prescription count between family F5 and family F1: 11.\nCo-prescription count between family F5 and family F2: 42.\nCo-prescription count between family F5 and family F3: 37.\nCo-prescription count between family F5 and family F4: 64.\nCo-prescription count between family F5 and family F6: 40.\nCo-prescription count between family F5 and family F7: 15.\nCo-prescription count between family F5 and family F8: 2.\nCo-prescription count between family F5 and family F9: 45.\nCo-prescription count between family F6 and family F1: 38.\nCo-prescription count between family F6 and family F2: 53.\nCo-prescription count between family F6 and family F3: 34.\nCo-prescription count between family F6 and family F4: 65.\nCo-prescription count between family F6 and family F5: 40.\nCo-prescription count between family F6 and family F7: 39.\nCo-prescription count between family F6 and family F8: 23.\nCo-prescription count between family F6 and family F9: 55.\nCo-prescription count between family F7 and family F1: 44.\nCo-prescription count between family F7 and family F2: 15.\nCo-prescription count between family F7 and family F3: 52.\nCo-prescription count between family F7 and family F4: 53.\nCo-prescription count between family F7 and family F5: 15.\nCo-prescription count between family F7 and family F6: 39.\nCo-prescription count between family F7 and family F8: 48.\nCo-prescription count between family F7 and family F9: 18.\nCo-prescription count between family F8 and family F1: 67.\nCo-prescription count between family F8 and family F2: 21.\nCo-prescription count between family F8 and family F3: 68.\nCo-prescription count between family F8 and family F4: 55.\nCo-prescription count between family F8 and family F5: 2.\nCo-prescription count between family F8 and family F6: 23.\nCo-prescription count between family F8 and family F7: 48.\nCo-prescription count between family F8 and family F9: 18.\nCo-prescription count between family F9 and family F1: 45.\nCo-prescription count between family F9 and family F2: 9.\nCo-prescription count between family F9 and family F3: 31.\nCo-prescription count between family F9 and family F4: 62.\nCo-prescription count between family F9 and family F5: 45.\nCo-prescription count between family F9 and family F6: 55.\nCo-prescription count between family F9 and family F7: 18.\nCo-prescription count between family F9 and family F8: 18.\nUse these records to evaluate assignments and compute the total dispensing delay.\n\nWhen you’re ready to return an assignment, just use this simple JSON layout — nothing fancy, just a \"solution\" list that maps each family (in the order they appear in the instance) to a drawer.\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of the array as a fill-in-the-blanks form: the first entry is the drawer assigned to the first family listed in the instance, the second entry is for the second family, and so on. This block is just a sketch of the shape I expect, not the actual assignment.\n\nPlease be careful to use the exact identifiers from the instance input — don’t rename them or invent new labels. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 67, 79, 27, 76, 45, 33, 4, 31 ], [ 67, 0, 63, 22, 37, 19, 74, 69, 78 ], [ 79, 63, 0, 25, 46, 51, 20, 4, 57 ], [ 26, 21, 26, 0, 7, 6, 20, 17, 9 ], [ 76, 38, 47, 6, 0, 42, 73, 79, 32 ], [ 45, 20, 52, 5, 42, 0, 44, 66, 16 ], [ 33, 73, 21, 19, 73, 44, 0, 27, 71 ], [ 4, 69, 4, 17, 79, 66, 27, 0, 71 ], [ 31, 77, 56, 8, 31, 16, 71, 71, 0 ] ], "flow_matrix": [ [ 0, 23, 4, 48, 11, 38, 44, 67, 45 ], [ 23, 0, 26, 51, 42, 53, 15, 21, 9 ], [ 4, 26, 0, 49, 37, 34, 52, 68, 31 ], [ 48, 51, 49, 0, 64, 65, 53, 55, 62 ], [ 11, 42, 37, 64, 0, 40, 15, 2, 45 ], [ 38, 53, 34, 65, 40, 0, 39, 23, 55 ], [ 44, 15, 52, 53, 15, 39, 0, 48, 18 ], [ 67, 21, 68, 55, 2, 23, 48, 0, 18 ], [ 45, 9, 31, 62, 45, 55, 18, 18, 0 ] ], "objective": 81556.0 }, "solution": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ], "obj": 81556.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 67 }, { "from_id": 0, "to_id": 2, "distance": 79 }, { "from_id": 0, "to_id": 3, "distance": 27 }, { "from_id": 0, "to_id": 4, "distance": 76 }, { "from_id": 0, "to_id": 5, "distance": 45 }, { "from_id": 0, "to_id": 6, "distance": 33 }, { "from_id": 0, "to_id": 7, "distance": 4 }, { "from_id": 0, "to_id": 8, "distance": 31 }, { "from_id": 1, "to_id": 0, "distance": 67 }, { "from_id": 1, "to_id": 2, "distance": 63 }, { "from_id": 1, "to_id": 3, "distance": 22 }, { "from_id": 1, "to_id": 4, "distance": 37 }, { "from_id": 1, "to_id": 5, "distance": 19 }, { "from_id": 1, "to_id": 6, "distance": 74 }, { "from_id": 1, "to_id": 7, "distance": 69 }, { "from_id": 1, "to_id": 8, "distance": 78 }, { "from_id": 2, "to_id": 0, "distance": 79 }, { "from_id": 2, "to_id": 1, "distance": 63 }, { "from_id": 2, "to_id": 3, "distance": 25 }, { "from_id": 2, "to_id": 4, "distance": 46 }, { "from_id": 2, "to_id": 5, "distance": 51 }, { "from_id": 2, "to_id": 6, "distance": 20 }, { "from_id": 2, "to_id": 7, "distance": 4 }, { "from_id": 2, "to_id": 8, "distance": 57 }, { "from_id": 3, "to_id": 0, "distance": 26 }, { "from_id": 3, "to_id": 1, "distance": 21 }, { "from_id": 3, "to_id": 2, "distance": 26 }, { "from_id": 3, "to_id": 4, "distance": 7 }, { "from_id": 3, "to_id": 5, "distance": 6 }, { "from_id": 3, "to_id": 6, "distance": 20 }, { "from_id": 3, "to_id": 7, "distance": 17 }, { "from_id": 3, "to_id": 8, "distance": 9 }, { "from_id": 4, "to_id": 0, "distance": 76 }, { "from_id": 4, "to_id": 1, "distance": 38 }, { "from_id": 4, "to_id": 2, "distance": 47 }, { "from_id": 4, "to_id": 3, "distance": 6 }, { "from_id": 4, "to_id": 5, "distance": 42 }, { "from_id": 4, "to_id": 6, "distance": 73 }, { "from_id": 4, "to_id": 7, "distance": 79 }, { "from_id": 4, "to_id": 8, "distance": 32 }, { "from_id": 5, "to_id": 0, "distance": 45 }, { "from_id": 5, "to_id": 1, "distance": 20 }, { "from_id": 5, "to_id": 2, "distance": 52 }, { "from_id": 5, "to_id": 3, "distance": 5 }, { "from_id": 5, "to_id": 4, "distance": 42 }, { "from_id": 5, "to_id": 6, "distance": 44 }, { "from_id": 5, "to_id": 7, "distance": 66 }, { "from_id": 5, "to_id": 8, "distance": 16 }, { "from_id": 6, "to_id": 0, "distance": 33 }, { "from_id": 6, "to_id": 1, "distance": 73 }, { "from_id": 6, "to_id": 2, "distance": 21 }, { "from_id": 6, "to_id": 3, "distance": 19 }, { "from_id": 6, "to_id": 4, "distance": 73 }, { "from_id": 6, "to_id": 5, "distance": 44 }, { "from_id": 6, "to_id": 7, "distance": 27 }, { "from_id": 6, "to_id": 8, "distance": 71 }, { "from_id": 7, "to_id": 0, "distance": 4 }, { "from_id": 7, "to_id": 1, "distance": 69 }, { "from_id": 7, "to_id": 2, "distance": 4 }, { "from_id": 7, "to_id": 3, "distance": 17 }, { "from_id": 7, "to_id": 4, "distance": 79 }, { "from_id": 7, "to_id": 5, "distance": 66 }, { "from_id": 7, "to_id": 6, "distance": 27 }, { "from_id": 7, "to_id": 8, "distance": 71 }, { "from_id": 8, "to_id": 0, "distance": 31 }, { "from_id": 8, "to_id": 1, "distance": 77 }, { "from_id": 8, "to_id": 2, "distance": 56 }, { "from_id": 8, "to_id": 3, "distance": 8 }, { "from_id": 8, "to_id": 4, "distance": 31 }, { "from_id": 8, "to_id": 5, "distance": 16 }, { "from_id": 8, "to_id": 6, "distance": 71 }, { "from_id": 8, "to_id": 7, "distance": 71 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 23 }, { "from_id": "F1", "to_id": "F3", "flow": 4 }, { "from_id": "F1", "to_id": "F4", "flow": 48 }, { "from_id": "F1", "to_id": "F5", "flow": 11 }, { "from_id": "F1", "to_id": "F6", "flow": 38 }, { "from_id": "F1", "to_id": "F7", "flow": 44 }, { "from_id": "F1", "to_id": "F8", "flow": 67 }, { "from_id": "F1", "to_id": "F9", "flow": 45 }, { "from_id": "F2", "to_id": "F1", "flow": 23 }, { "from_id": "F2", "to_id": "F3", "flow": 26 }, { "from_id": "F2", "to_id": "F4", "flow": 51 }, { "from_id": "F2", "to_id": "F5", "flow": 42 }, { "from_id": "F2", "to_id": "F6", "flow": 53 }, { "from_id": "F2", "to_id": "F7", "flow": 15 }, { "from_id": "F2", "to_id": "F8", "flow": 21 }, { "from_id": "F2", "to_id": "F9", "flow": 9 }, { "from_id": "F3", "to_id": "F1", "flow": 4 }, { "from_id": "F3", "to_id": "F2", "flow": 26 }, { "from_id": "F3", "to_id": "F4", "flow": 49 }, { "from_id": "F3", "to_id": "F5", "flow": 37 }, { "from_id": "F3", "to_id": "F6", "flow": 34 }, { "from_id": "F3", "to_id": "F7", "flow": 52 }, { "from_id": "F3", "to_id": "F8", "flow": 68 }, { "from_id": "F3", "to_id": "F9", "flow": 31 }, { "from_id": "F4", "to_id": "F1", "flow": 48 }, { "from_id": "F4", "to_id": "F2", "flow": 51 }, { "from_id": "F4", "to_id": "F3", "flow": 49 }, { "from_id": "F4", "to_id": "F5", "flow": 64 }, { "from_id": "F4", "to_id": "F6", "flow": 65 }, { "from_id": "F4", "to_id": "F7", "flow": 53 }, { "from_id": "F4", "to_id": "F8", "flow": 55 }, { "from_id": "F4", "to_id": "F9", "flow": 62 }, { "from_id": "F5", "to_id": "F1", "flow": 11 }, { "from_id": "F5", "to_id": "F2", "flow": 42 }, { "from_id": "F5", "to_id": "F3", "flow": 37 }, { "from_id": "F5", "to_id": "F4", "flow": 64 }, { "from_id": "F5", "to_id": "F6", "flow": 40 }, { "from_id": "F5", "to_id": "F7", "flow": 15 }, { "from_id": "F5", "to_id": "F8", "flow": 2 }, { "from_id": "F5", "to_id": "F9", "flow": 45 }, { "from_id": "F6", "to_id": "F1", "flow": 38 }, { "from_id": "F6", "to_id": "F2", "flow": 53 }, { "from_id": "F6", "to_id": "F3", "flow": 34 }, { "from_id": "F6", "to_id": "F4", "flow": 65 }, { "from_id": "F6", "to_id": "F5", "flow": 40 }, { "from_id": "F6", "to_id": "F7", "flow": 39 }, { "from_id": "F6", "to_id": "F8", "flow": 23 }, { "from_id": "F6", "to_id": "F9", "flow": 55 }, { "from_id": "F7", "to_id": "F1", "flow": 44 }, { "from_id": "F7", "to_id": "F2", "flow": 15 }, { "from_id": "F7", "to_id": "F3", "flow": 52 }, { "from_id": "F7", "to_id": "F4", "flow": 53 }, { "from_id": "F7", "to_id": "F5", "flow": 15 }, { "from_id": "F7", "to_id": "F6", "flow": 39 }, { "from_id": "F7", "to_id": "F8", "flow": 48 }, { "from_id": "F7", "to_id": "F9", "flow": 18 }, { "from_id": "F8", "to_id": "F1", "flow": 67 }, { "from_id": "F8", "to_id": "F2", "flow": 21 }, { "from_id": "F8", "to_id": "F3", "flow": 68 }, { "from_id": "F8", "to_id": "F4", "flow": 55 }, { "from_id": "F8", "to_id": "F5", "flow": 2 }, { "from_id": "F8", "to_id": "F6", "flow": 23 }, { "from_id": "F8", "to_id": "F7", "flow": 48 }, { "from_id": "F8", "to_id": "F9", "flow": 18 }, { "from_id": "F9", "to_id": "F1", "flow": 45 }, { "from_id": "F9", "to_id": "F2", "flow": 9 }, { "from_id": "F9", "to_id": "F3", "flow": 31 }, { "from_id": "F9", "to_id": "F4", "flow": 62 }, { "from_id": "F9", "to_id": "F5", "flow": 45 }, { "from_id": "F9", "to_id": "F6", "flow": 55 }, { "from_id": "F9", "to_id": "F7", "flow": 18 }, { "from_id": "F9", "to_id": "F8", "flow": 18 } ] }, "solution_variant": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ], "context_index": 18, "input_format": "nl", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "I run the little repair shop and need to decide where to park every repair kit on the benches so techs spend as little time walking as possible. The choice is which kit goes to which bench, with the rule that every kit gets one bench and every bench holds exactly one kit — no duplicates, nothing left out. What makes one layout better is the total walking caused when kits that are commonly used together sit far apart: for every pair of kits, multiply how often they’re used together by how far apart their benches are, then add up all those numbers — the lower that total, the better the bench plan. The exact numbers for how often kits are paired and how far benches are from each other are listed below.\n\n# num_kits_and_benches=10\n# kit_ids=F1, F2, F3, F4, F5, F6, F7, F8, F9, F10\n# bench_ids=A, B, C, D, E, F, G, H, I, J\n\nbench_from_id,bench_to_id,bench_distance\nA,B,5\nA,C,7\nA,D,14\nA,E,0\nA,F,0\nA,G,0\nA,H,0\nA,I,0\nA,J,0\nB,A,5\nB,C,0\nB,D,0\nB,E,0\nB,F,0\nB,G,0\nB,H,0\nB,I,0\nB,J,0\nC,A,7\nC,B,0\nC,D,0\nC,E,0\nC,F,0\nC,G,0\nC,H,0\nC,I,0\nC,J,0\nD,A,14\nD,B,0\nD,C,0\nD,E,0\nD,F,0\nD,G,0\nD,H,0\nD,I,0\nD,J,0\nE,A,0\nE,B,0\nE,C,0\nE,D,0\nE,F,0\nE,G,0\nE,H,0\nE,I,0\nE,J,0\nF,A,0\nF,B,0\nF,C,0\nF,D,0\nF,E,0\nF,G,0\nF,H,0\nF,I,20\nF,J,0\nG,A,0\nG,B,0\nG,C,0\nG,D,0\nG,E,0\nG,F,0\nG,H,0\nG,I,0\nG,J,0\nH,A,0\nH,B,0\nH,C,0\nH,D,0\nH,E,0\nH,F,0\nH,G,0\nH,I,0\nH,J,0\nI,A,0\nI,B,0\nI,C,0\nI,D,0\nI,E,0\nI,F,20\nI,G,0\nI,H,0\nI,J,0\nJ,A,0\nJ,B,0\nJ,C,0\nJ,D,0\nJ,E,0\nJ,F,0\nJ,G,0\nJ,H,0\nJ,I,0\n\nkit_from_id,kit_to_id,pair_usage_frequency\nF1,F2,8\nF1,F3,14\nF1,F4,16\nF1,F5,27\nF1,F6,63\nF1,F7,14\nF1,F8,19\nF1,F9,23\nF1,F10,12\nF2,F1,8\nF2,F3,12\nF2,F4,20\nF2,F5,25\nF2,F6,12\nF2,F7,22\nF2,F8,30\nF2,F9,12\nF2,F10,14\nF3,F1,14\nF3,F2,12\nF3,F4,13\nF3,F5,14\nF3,F6,39\nF3,F7,33\nF3,F8,13\nF3,F9,71\nF3,F10,30\nF4,F1,16\nF4,F2,20\nF4,F3,13\nF4,F5,10\nF4,F6,37\nF4,F7,51\nF4,F8,12\nF4,F9,20\nF4,F10,37\nF5,F1,27\nF5,F2,25\nF5,F3,14\nF5,F4,10\nF5,F6,33\nF5,F7,22\nF5,F8,14\nF5,F9,19\nF5,F10,31\nF6,F1,63\nF6,F2,12\nF6,F3,39\nF6,F4,37\nF6,F5,33\nF6,F7,70\nF6,F8,61\nF6,F9,14\nF6,F10,12\nF7,F1,14\nF7,F2,22\nF7,F3,33\nF7,F4,51\nF7,F5,22\nF7,F6,70\nF7,F8,31\nF7,F9,14\nF7,F10,25\nF8,F1,19\nF8,F2,30\nF8,F3,13\nF8,F4,12\nF8,F5,14\nF8,F6,61\nF8,F7,31\nF8,F9,18\nF8,F10,24\nF9,F1,23\nF9,F2,12\nF9,F3,71\nF9,F4,20\nF9,F5,19\nF9,F6,14\nF9,F7,14\nF9,F8,18\nF9,F10,35\nF10,F1,12\nF10,F2,14\nF10,F3,30\nF10,F4,37\nF10,F5,31\nF10,F6,12\nF10,F7,25\nF10,F8,24\nF10,F9,35\n\nIf you want to hand me a bench plan, just drop it in this simple JSON shape so I can read it straight away — a list that says which bench goes with which kit. For our shop story I’ll show the placeholders using bench-themed names so it’s obvious what goes where:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis is just a sketch of the shape I need: the solution array lists, in order, the bench identifier that the first kit should go to, then the bench for the second kit, and so on until the last kit. Think of it as filling out a simple form where each kit gets one bench labeled by the identifier.\n\nOne quick reminder: use the exact identifiers from the instance input — don’t rename them or invent new labels. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 5, 7, 14, 0, 0, 0, 0, 0, 0 ], [ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 20, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 20, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 8, 14, 16, 27, 63, 14, 19, 23, 12 ], [ 8, 0, 12, 20, 25, 12, 22, 30, 12, 14 ], [ 14, 12, 0, 13, 14, 39, 33, 13, 71, 30 ], [ 16, 20, 13, 0, 10, 37, 51, 12, 20, 37 ], [ 27, 25, 14, 10, 0, 33, 22, 14, 19, 31 ], [ 63, 12, 39, 37, 33, 0, 70, 61, 14, 12 ], [ 14, 22, 33, 51, 22, 70, 0, 31, 14, 25 ], [ 19, 30, 13, 12, 14, 61, 31, 0, 18, 24 ], [ 23, 12, 71, 20, 19, 14, 14, 18, 0, 35 ], [ 12, 14, 30, 37, 31, 12, 25, 24, 35, 0 ] ], "objective": 898.0 }, "solution": [ 8, 5, 1, 0, 3, 4, 6, 2, 7, 9 ], "obj": 898.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 5 }, { "from_id": "A", "to_id": "C", "distance": 7 }, { "from_id": "A", "to_id": "D", "distance": 14 }, { "from_id": "A", "to_id": "E", "distance": 0 }, { "from_id": "A", "to_id": "F", "distance": 0 }, { "from_id": "A", "to_id": "G", "distance": 0 }, { "from_id": "A", "to_id": "H", "distance": 0 }, { "from_id": "A", "to_id": "I", "distance": 0 }, { "from_id": "A", "to_id": "J", "distance": 0 }, { "from_id": "B", "to_id": "A", "distance": 5 }, { "from_id": "B", "to_id": "C", "distance": 0 }, { "from_id": "B", "to_id": "D", "distance": 0 }, { "from_id": "B", "to_id": "E", "distance": 0 }, { "from_id": "B", "to_id": "F", "distance": 0 }, { "from_id": "B", "to_id": "G", "distance": 0 }, { "from_id": "B", "to_id": "H", "distance": 0 }, { "from_id": "B", "to_id": "I", "distance": 0 }, { "from_id": "B", "to_id": "J", "distance": 0 }, { "from_id": "C", "to_id": "A", "distance": 7 }, { "from_id": "C", "to_id": "B", "distance": 0 }, { "from_id": "C", "to_id": "D", "distance": 0 }, { "from_id": "C", "to_id": "E", "distance": 0 }, { "from_id": "C", "to_id": "F", "distance": 0 }, { "from_id": "C", "to_id": "G", "distance": 0 }, { "from_id": "C", "to_id": "H", "distance": 0 }, { "from_id": "C", "to_id": "I", "distance": 0 }, { "from_id": "C", "to_id": "J", "distance": 0 }, { "from_id": "D", "to_id": "A", "distance": 14 }, { "from_id": "D", "to_id": "B", "distance": 0 }, { "from_id": "D", "to_id": "C", "distance": 0 }, { "from_id": "D", "to_id": "E", "distance": 0 }, { "from_id": "D", "to_id": "F", "distance": 0 }, { "from_id": "D", "to_id": "G", "distance": 0 }, { "from_id": "D", "to_id": "H", "distance": 0 }, { "from_id": "D", "to_id": "I", "distance": 0 }, { "from_id": "D", "to_id": "J", "distance": 0 }, { "from_id": "E", "to_id": "A", "distance": 0 }, { "from_id": "E", "to_id": "B", "distance": 0 }, { "from_id": "E", "to_id": "C", "distance": 0 }, { "from_id": "E", "to_id": "D", "distance": 0 }, { "from_id": "E", "to_id": "F", "distance": 0 }, { "from_id": "E", "to_id": "G", "distance": 0 }, { "from_id": "E", "to_id": "H", "distance": 0 }, { "from_id": "E", "to_id": "I", "distance": 0 }, { "from_id": "E", "to_id": "J", "distance": 0 }, { "from_id": "F", "to_id": "A", "distance": 0 }, { "from_id": "F", "to_id": "B", "distance": 0 }, { "from_id": "F", "to_id": "C", "distance": 0 }, { "from_id": "F", "to_id": "D", "distance": 0 }, { "from_id": "F", "to_id": "E", "distance": 0 }, { "from_id": "F", "to_id": "G", "distance": 0 }, { "from_id": "F", "to_id": "H", "distance": 0 }, { "from_id": "F", "to_id": "I", "distance": 20 }, { "from_id": "F", "to_id": "J", "distance": 0 }, { "from_id": "G", "to_id": "A", "distance": 0 }, { "from_id": "G", "to_id": "B", "distance": 0 }, { "from_id": "G", "to_id": "C", "distance": 0 }, { "from_id": "G", "to_id": "D", "distance": 0 }, { "from_id": "G", "to_id": "E", "distance": 0 }, { "from_id": "G", "to_id": "F", "distance": 0 }, { "from_id": "G", "to_id": "H", "distance": 0 }, { "from_id": "G", "to_id": "I", "distance": 0 }, { "from_id": "G", "to_id": "J", "distance": 0 }, { "from_id": "H", "to_id": "A", "distance": 0 }, { "from_id": "H", "to_id": "B", "distance": 0 }, { "from_id": "H", "to_id": "C", "distance": 0 }, { "from_id": "H", "to_id": "D", "distance": 0 }, { "from_id": "H", "to_id": "E", "distance": 0 }, { "from_id": "H", "to_id": "F", "distance": 0 }, { "from_id": "H", "to_id": "G", "distance": 0 }, { "from_id": "H", "to_id": "I", "distance": 0 }, { "from_id": "H", "to_id": "J", "distance": 0 }, { "from_id": "I", "to_id": "A", "distance": 0 }, { "from_id": "I", "to_id": "B", "distance": 0 }, { "from_id": "I", "to_id": "C", "distance": 0 }, { "from_id": "I", "to_id": "D", "distance": 0 }, { "from_id": "I", "to_id": "E", "distance": 0 }, { "from_id": "I", "to_id": "F", "distance": 20 }, { "from_id": "I", "to_id": "G", "distance": 0 }, { "from_id": "I", "to_id": "H", "distance": 0 }, { "from_id": "I", "to_id": "J", "distance": 0 }, { "from_id": "J", "to_id": "A", "distance": 0 }, { "from_id": "J", "to_id": "B", "distance": 0 }, { "from_id": "J", "to_id": "C", "distance": 0 }, { "from_id": "J", "to_id": "D", "distance": 0 }, { "from_id": "J", "to_id": "E", "distance": 0 }, { "from_id": "J", "to_id": "F", "distance": 0 }, { "from_id": "J", "to_id": "G", "distance": 0 }, { "from_id": "J", "to_id": "H", "distance": 0 }, { "from_id": "J", "to_id": "I", "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 8 }, { "from_id": "F1", "to_id": "F3", "flow": 14 }, { "from_id": "F1", "to_id": "F4", "flow": 16 }, { "from_id": "F1", "to_id": "F5", "flow": 27 }, { "from_id": "F1", "to_id": "F6", "flow": 63 }, { "from_id": "F1", "to_id": "F7", "flow": 14 }, { "from_id": "F1", "to_id": "F8", "flow": 19 }, { "from_id": "F1", "to_id": "F9", "flow": 23 }, { "from_id": "F1", "to_id": "F10", "flow": 12 }, { "from_id": "F2", "to_id": "F1", "flow": 8 }, { "from_id": "F2", "to_id": "F3", "flow": 12 }, { "from_id": "F2", "to_id": "F4", "flow": 20 }, { "from_id": "F2", "to_id": "F5", "flow": 25 }, { "from_id": "F2", "to_id": "F6", "flow": 12 }, { "from_id": "F2", "to_id": "F7", "flow": 22 }, { "from_id": "F2", "to_id": "F8", "flow": 30 }, { "from_id": "F2", "to_id": "F9", "flow": 12 }, { "from_id": "F2", "to_id": "F10", "flow": 14 }, { "from_id": "F3", "to_id": "F1", "flow": 14 }, { "from_id": "F3", "to_id": "F2", "flow": 12 }, { "from_id": "F3", "to_id": "F4", "flow": 13 }, { "from_id": "F3", "to_id": "F5", "flow": 14 }, { "from_id": "F3", "to_id": "F6", "flow": 39 }, { "from_id": "F3", "to_id": "F7", "flow": 33 }, { "from_id": "F3", "to_id": "F8", "flow": 13 }, { "from_id": "F3", "to_id": "F9", "flow": 71 }, { "from_id": "F3", "to_id": "F10", "flow": 30 }, { "from_id": "F4", "to_id": "F1", "flow": 16 }, { "from_id": "F4", "to_id": "F2", "flow": 20 }, { "from_id": "F4", "to_id": "F3", "flow": 13 }, { "from_id": "F4", "to_id": "F5", "flow": 10 }, { "from_id": "F4", "to_id": "F6", "flow": 37 }, { "from_id": "F4", "to_id": "F7", "flow": 51 }, { "from_id": "F4", "to_id": "F8", "flow": 12 }, { "from_id": "F4", "to_id": "F9", "flow": 20 }, { "from_id": "F4", "to_id": "F10", "flow": 37 }, { "from_id": "F5", "to_id": "F1", "flow": 27 }, { "from_id": "F5", "to_id": "F2", "flow": 25 }, { "from_id": "F5", "to_id": "F3", "flow": 14 }, { "from_id": "F5", "to_id": "F4", "flow": 10 }, { "from_id": "F5", "to_id": "F6", "flow": 33 }, { "from_id": "F5", "to_id": "F7", "flow": 22 }, { "from_id": "F5", "to_id": "F8", "flow": 14 }, { "from_id": "F5", "to_id": "F9", "flow": 19 }, { "from_id": "F5", "to_id": "F10", "flow": 31 }, { "from_id": "F6", "to_id": "F1", "flow": 63 }, { "from_id": "F6", "to_id": "F2", "flow": 12 }, { "from_id": "F6", "to_id": "F3", "flow": 39 }, { "from_id": "F6", "to_id": "F4", "flow": 37 }, { "from_id": "F6", "to_id": "F5", "flow": 33 }, { "from_id": "F6", "to_id": "F7", "flow": 70 }, { "from_id": "F6", "to_id": "F8", "flow": 61 }, { "from_id": "F6", "to_id": "F9", "flow": 14 }, { "from_id": "F6", "to_id": "F10", "flow": 12 }, { "from_id": "F7", "to_id": "F1", "flow": 14 }, { "from_id": "F7", "to_id": "F2", "flow": 22 }, { "from_id": "F7", "to_id": "F3", "flow": 33 }, { "from_id": "F7", "to_id": "F4", "flow": 51 }, { "from_id": "F7", "to_id": "F5", "flow": 22 }, { "from_id": "F7", "to_id": "F6", "flow": 70 }, { "from_id": "F7", "to_id": "F8", "flow": 31 }, { "from_id": "F7", "to_id": "F9", "flow": 14 }, { "from_id": "F7", "to_id": "F10", "flow": 25 }, { "from_id": "F8", "to_id": "F1", "flow": 19 }, { "from_id": "F8", "to_id": "F2", "flow": 30 }, { "from_id": "F8", "to_id": "F3", "flow": 13 }, { "from_id": "F8", "to_id": "F4", "flow": 12 }, { "from_id": "F8", "to_id": "F5", "flow": 14 }, { "from_id": "F8", "to_id": "F6", "flow": 61 }, { "from_id": "F8", "to_id": "F7", "flow": 31 }, { "from_id": "F8", "to_id": "F9", "flow": 18 }, { "from_id": "F8", "to_id": "F10", "flow": 24 }, { "from_id": "F9", "to_id": "F1", "flow": 23 }, { "from_id": "F9", "to_id": "F2", "flow": 12 }, { "from_id": "F9", "to_id": "F3", "flow": 71 }, { "from_id": "F9", "to_id": "F4", "flow": 20 }, { "from_id": "F9", "to_id": "F5", "flow": 19 }, { "from_id": "F9", "to_id": "F6", "flow": 14 }, { "from_id": "F9", "to_id": "F7", "flow": 14 }, { "from_id": "F9", "to_id": "F8", "flow": 18 }, { "from_id": "F9", "to_id": "F10", "flow": 35 }, { "from_id": "F10", "to_id": "F1", "flow": 12 }, { "from_id": "F10", "to_id": "F2", "flow": 14 }, { "from_id": "F10", "to_id": "F3", "flow": 30 }, { "from_id": "F10", "to_id": "F4", "flow": 37 }, { "from_id": "F10", "to_id": "F5", "flow": 31 }, { "from_id": "F10", "to_id": "F6", "flow": 12 }, { "from_id": "F10", "to_id": "F7", "flow": 25 }, { "from_id": "F10", "to_id": "F8", "flow": 24 }, { "from_id": "F10", "to_id": "F9", "flow": 35 } ] }, "solution_variant": [ "I", "F", "B", "A", "D", "E", "G", "C", "H", "J" ], "context_index": 19, "input_format": "csv", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "We’ve got a set of workshops and the same number of rooms, and the job is to give each workshop one room while making sure no room ends up with two workshops or left empty. What matters is how much walking we cause: for every two workshops, multiply the number of people who switch between them by the distance between the rooms they’re assigned to, then sum those numbers for every pair — the smaller that grand total, the nicer the schedule. The concrete workshop names, room distances and movement counts follow below.\n\n{\n \"num_workshops_rooms\": 10,\n \"workshops\": [\n \"F1\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\",\n \"F10\"\n ],\n \"rooms\": [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9\n ],\n \"distance\": [\n {\n \"room_source\": 0,\n \"room_target\": 1,\n \"walking_distance\": 131\n },\n {\n \"room_source\": 0,\n \"room_target\": 2,\n \"walking_distance\": 1116\n },\n {\n \"room_source\": 0,\n \"room_target\": 3,\n \"walking_distance\": 1665\n },\n {\n \"room_source\": 0,\n \"room_target\": 4,\n \"walking_distance\": 1124\n },\n {\n \"room_source\": 0,\n \"room_target\": 5,\n \"walking_distance\": 1138\n },\n {\n \"room_source\": 0,\n \"room_target\": 6,\n \"walking_distance\": 1090\n },\n {\n \"room_source\": 0,\n \"room_target\": 7,\n \"walking_distance\": 1129\n },\n {\n \"room_source\": 0,\n \"room_target\": 8,\n \"walking_distance\": 569\n },\n {\n \"room_source\": 0,\n \"room_target\": 9,\n \"walking_distance\": 971\n },\n {\n \"room_source\": 1,\n \"room_target\": 0,\n \"walking_distance\": 131\n },\n {\n \"room_source\": 1,\n \"room_target\": 2,\n \"walking_distance\": 1237\n },\n {\n \"room_source\": 1,\n \"room_target\": 3,\n \"walking_distance\": 1776\n },\n {\n \"room_source\": 1,\n \"room_target\": 4,\n \"walking_distance\": 1251\n },\n {\n \"room_source\": 1,\n \"room_target\": 5,\n \"walking_distance\": 1264\n },\n {\n \"room_source\": 1,\n \"room_target\": 6,\n \"walking_distance\": 1216\n },\n {\n \"room_source\": 1,\n \"room_target\": 7,\n \"walking_distance\": 1253\n },\n {\n \"room_source\": 1,\n \"room_target\": 8,\n \"walking_distance\": 696\n },\n {\n \"room_source\": 1,\n \"room_target\": 9,\n \"walking_distance\": 1092\n },\n {\n \"room_source\": 2,\n \"room_target\": 0,\n \"walking_distance\": 1116\n },\n {\n \"room_source\": 2,\n \"room_target\": 1,\n \"walking_distance\": 1237\n },\n {\n \"room_source\": 2,\n \"room_target\": 3,\n \"walking_distance\": 585\n },\n {\n \"room_source\": 2,\n \"room_target\": 4,\n \"walking_distance\": 171\n },\n {\n \"room_source\": 2,\n \"room_target\": 5,\n \"walking_distance\": 132\n },\n {\n \"room_source\": 2,\n \"room_target\": 6,\n \"walking_distance\": 139\n },\n {\n \"room_source\": 2,\n \"room_target\": 7,\n \"walking_distance\": 79\n },\n {\n \"room_source\": 2,\n \"room_target\": 8,\n \"walking_distance\": 561\n },\n {\n \"room_source\": 2,\n \"room_target\": 9,\n \"walking_distance\": 146\n },\n {\n \"room_source\": 3,\n \"room_target\": 0,\n \"walking_distance\": 1665\n },\n {\n \"room_source\": 3,\n \"room_target\": 1,\n \"walking_distance\": 1776\n },\n {\n \"room_source\": 3,\n \"room_target\": 2,\n \"walking_distance\": 585\n },\n {\n \"room_source\": 3,\n \"room_target\": 4,\n \"walking_distance\": 680\n },\n {\n \"room_source\": 3,\n \"room_target\": 5,\n \"walking_distance\": 640\n },\n {\n \"room_source\": 3,\n \"room_target\": 6,\n \"walking_distance\": 682\n },\n {\n \"room_source\": 3,\n \"room_target\": 7,\n \"walking_distance\": 614\n },\n {\n \"room_source\": 3,\n \"room_target\": 8,\n \"walking_distance\": 1135\n },\n {\n \"room_source\": 3,\n \"room_target\": 9,\n \"walking_distance\": 725\n },\n {\n \"room_source\": 4,\n \"room_target\": 0,\n \"walking_distance\": 1124\n },\n {\n \"room_source\": 4,\n \"room_target\": 1,\n \"walking_distance\": 1251\n },\n {\n \"room_source\": 4,\n \"room_target\": 2,\n \"walking_distance\": 171\n },\n {\n \"room_source\": 4,\n \"room_target\": 3,\n \"walking_distance\": 680\n },\n {\n \"room_source\": 4,\n \"room_target\": 5,\n \"walking_distance\": 44\n },\n {\n \"room_source\": 4,\n \"room_target\": 6,\n \"walking_distance\": 46\n },\n {\n \"room_source\": 4,\n \"room_target\": 7,\n \"walking_distance\": 93\n },\n {\n \"room_source\": 4,\n \"room_target\": 8,\n \"walking_distance\": 556\n },\n {\n \"room_source\": 4,\n \"room_target\": 9,\n \"walking_distance\": 210\n },\n {\n \"room_source\": 5,\n \"room_target\": 0,\n \"walking_distance\": 1138\n },\n {\n \"room_source\": 5,\n \"room_target\": 1,\n \"walking_distance\": 1264\n },\n {\n \"room_source\": 5,\n \"room_target\": 2,\n \"walking_distance\": 132\n },\n {\n \"room_source\": 5,\n \"room_target\": 3,\n \"walking_distance\": 640\n },\n {\n \"room_source\": 5,\n \"room_target\": 4,\n \"walking_distance\": 44\n },\n {\n \"room_source\": 5,\n \"room_target\": 6,\n \"walking_distance\": 49\n },\n {\n \"room_source\": 5,\n \"room_target\": 7,\n \"walking_distance\": 52\n },\n {\n \"room_source\": 5,\n \"room_target\": 8,\n \"walking_distance\": 570\n },\n {\n \"room_source\": 5,\n \"room_target\": 9,\n \"walking_distance\": 198\n },\n {\n \"room_source\": 6,\n \"room_target\": 0,\n \"walking_distance\": 1090\n },\n {\n \"room_source\": 6,\n \"room_target\": 1,\n \"walking_distance\": 1216\n },\n {\n \"room_source\": 6,\n \"room_target\": 2,\n \"walking_distance\": 139\n },\n {\n \"room_source\": 6,\n \"room_target\": 3,\n \"walking_distance\": 682\n },\n {\n \"room_source\": 6,\n \"room_target\": 4,\n \"walking_distance\": 46\n },\n {\n \"room_source\": 6,\n \"room_target\": 5,\n \"walking_distance\": 49\n },\n {\n \"room_source\": 6,\n \"room_target\": 7,\n \"walking_distance\": 72\n },\n {\n \"room_source\": 6,\n \"room_target\": 8,\n \"walking_distance\": 522\n },\n {\n \"room_source\": 6,\n \"room_target\": 9,\n \"walking_distance\": 164\n },\n {\n \"room_source\": 7,\n \"room_target\": 0,\n \"walking_distance\": 1129\n },\n {\n \"room_source\": 7,\n \"room_target\": 1,\n \"walking_distance\": 1253\n },\n {\n \"room_source\": 7,\n \"room_target\": 2,\n \"walking_distance\": 79\n },\n {\n \"room_source\": 7,\n \"room_target\": 3,\n \"walking_distance\": 614\n },\n {\n \"room_source\": 7,\n \"room_target\": 4,\n \"walking_distance\": 93\n },\n {\n \"room_source\": 7,\n \"room_target\": 5,\n \"walking_distance\": 52\n },\n {\n \"room_source\": 7,\n \"room_target\": 6,\n \"walking_distance\": 72\n },\n {\n \"room_source\": 7,\n \"room_target\": 8,\n \"walking_distance\": 564\n },\n {\n \"room_source\": 7,\n \"room_target\": 9,\n \"walking_distance\": 169\n },\n {\n \"room_source\": 8,\n \"room_target\": 0,\n \"walking_distance\": 569\n },\n {\n \"room_source\": 8,\n \"room_target\": 1,\n \"walking_distance\": 696\n },\n {\n \"room_source\": 8,\n \"room_target\": 2,\n \"walking_distance\": 561\n },\n {\n \"room_source\": 8,\n \"room_target\": 3,\n \"walking_distance\": 1135\n },\n {\n \"room_source\": 8,\n \"room_target\": 4,\n \"walking_distance\": 556\n },\n {\n \"room_source\": 8,\n \"room_target\": 5,\n \"walking_distance\": 570\n },\n {\n \"room_source\": 8,\n \"room_target\": 6,\n \"walking_distance\": 522\n },\n {\n \"room_source\": 8,\n \"room_target\": 7,\n \"walking_distance\": 564\n },\n {\n \"room_source\": 8,\n \"room_target\": 9,\n \"walking_distance\": 415\n },\n {\n \"room_source\": 9,\n \"room_target\": 0,\n \"walking_distance\": 971\n },\n {\n \"room_source\": 9,\n \"room_target\": 1,\n \"walking_distance\": 1092\n },\n {\n \"room_source\": 9,\n \"room_target\": 2,\n \"walking_distance\": 146\n },\n {\n \"room_source\": 9,\n \"room_target\": 3,\n \"walking_distance\": 725\n },\n {\n \"room_source\": 9,\n \"room_target\": 4,\n \"walking_distance\": 210\n },\n {\n \"room_source\": 9,\n \"room_target\": 5,\n \"walking_distance\": 198\n },\n {\n \"room_source\": 9,\n \"room_target\": 6,\n \"walking_distance\": 164\n },\n {\n \"room_source\": 9,\n \"room_target\": 7,\n \"walking_distance\": 169\n },\n {\n \"room_source\": 9,\n \"room_target\": 8,\n \"walking_distance\": 415\n }\n ],\n \"flow\": [\n {\n \"workshop_source\": \"F1\",\n \"workshop_target\": \"F2\",\n \"attendee_transfers\": 280\n },\n {\n \"workshop_source\": \"F1\",\n \"workshop_target\": \"F3\",\n \"attendee_transfers\": 47\n },\n {\n \"workshop_source\": \"F1\",\n \"workshop_target\": \"F4\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F1\",\n \"workshop_target\": \"F5\",\n \"attendee_transfers\": 6\n },\n {\n \"workshop_source\": \"F1\",\n \"workshop_target\": \"F6\",\n \"attendee_transfers\": 899\n },\n {\n \"workshop_source\": \"F1\",\n \"workshop_target\": \"F7\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F1\",\n \"workshop_target\": \"F8\",\n \"attendee_transfers\": 32\n },\n {\n \"workshop_source\": \"F1\",\n \"workshop_target\": \"F9\",\n \"attendee_transfers\": 1\n },\n {\n \"workshop_source\": \"F1\",\n \"workshop_target\": \"F10\",\n \"attendee_transfers\": 2764\n },\n {\n \"workshop_source\": \"F2\",\n \"workshop_target\": \"F1\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F2\",\n \"workshop_target\": \"F3\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F2\",\n \"workshop_target\": \"F4\",\n \"attendee_transfers\": 15\n },\n {\n \"workshop_source\": \"F2\",\n \"workshop_target\": \"F5\",\n \"attendee_transfers\": 1222\n },\n {\n \"workshop_source\": \"F2\",\n \"workshop_target\": \"F6\",\n \"attendee_transfers\": 2\n },\n {\n \"workshop_source\": \"F2\",\n \"workshop_target\": \"F7\",\n \"attendee_transfers\": 265\n },\n {\n \"workshop_source\": \"F2\",\n \"workshop_target\": \"F8\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F2\",\n \"workshop_target\": \"F9\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F2\",\n \"workshop_target\": \"F10\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F3\",\n \"workshop_target\": \"F1\",\n \"attendee_transfers\": 483\n },\n {\n \"workshop_source\": \"F3\",\n \"workshop_target\": \"F2\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F3\",\n \"workshop_target\": \"F4\",\n \"attendee_transfers\": 1\n },\n {\n \"workshop_source\": \"F3\",\n \"workshop_target\": \"F5\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F3\",\n \"workshop_target\": \"F6\",\n \"attendee_transfers\": 34\n },\n {\n \"workshop_source\": \"F3\",\n \"workshop_target\": \"F7\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F3\",\n \"workshop_target\": \"F8\",\n \"attendee_transfers\": 1\n },\n {\n \"workshop_source\": \"F3\",\n \"workshop_target\": \"F9\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F3\",\n \"workshop_target\": \"F10\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F4\",\n \"workshop_target\": \"F1\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F4\",\n \"workshop_target\": \"F2\",\n \"attendee_transfers\": 3\n },\n {\n \"workshop_source\": \"F4\",\n \"workshop_target\": \"F3\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F4\",\n \"workshop_target\": \"F5\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F4\",\n \"workshop_target\": \"F6\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F4\",\n \"workshop_target\": \"F7\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F4\",\n \"workshop_target\": \"F8\",\n \"attendee_transfers\": 186\n },\n {\n \"workshop_source\": \"F4\",\n \"workshop_target\": \"F9\",\n \"attendee_transfers\": 43\n },\n {\n \"workshop_source\": \"F4\",\n \"workshop_target\": \"F10\",\n \"attendee_transfers\": 102\n },\n {\n \"workshop_source\": \"F5\",\n \"workshop_target\": \"F1\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F5\",\n \"workshop_target\": \"F2\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F5\",\n \"workshop_target\": \"F3\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F5\",\n \"workshop_target\": \"F4\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F5\",\n \"workshop_target\": \"F6\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F5\",\n \"workshop_target\": \"F7\",\n \"attendee_transfers\": 2217\n },\n {\n \"workshop_source\": \"F5\",\n \"workshop_target\": \"F8\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F5\",\n \"workshop_target\": \"F9\",\n \"attendee_transfers\": 203\n },\n {\n \"workshop_source\": \"F5\",\n \"workshop_target\": \"F10\",\n \"attendee_transfers\": 812\n },\n {\n \"workshop_source\": \"F6\",\n \"workshop_target\": \"F1\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F6\",\n \"workshop_target\": \"F2\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F6\",\n \"workshop_target\": \"F3\",\n \"attendee_transfers\": 34\n },\n {\n \"workshop_source\": \"F6\",\n \"workshop_target\": \"F4\",\n \"attendee_transfers\": 1\n },\n {\n \"workshop_source\": \"F6\",\n \"workshop_target\": \"F5\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F6\",\n \"workshop_target\": \"F7\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F6\",\n \"workshop_target\": \"F8\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F6\",\n \"workshop_target\": \"F9\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F6\",\n \"workshop_target\": \"F10\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F7\",\n \"workshop_target\": \"F1\",\n \"attendee_transfers\": 591\n },\n {\n \"workshop_source\": \"F7\",\n \"workshop_target\": \"F2\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F7\",\n \"workshop_target\": \"F3\",\n \"attendee_transfers\": 12\n },\n {\n \"workshop_source\": \"F7\",\n \"workshop_target\": \"F4\",\n \"attendee_transfers\": 120\n },\n {\n \"workshop_source\": \"F7\",\n \"workshop_target\": \"F5\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F7\",\n \"workshop_target\": \"F6\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F7\",\n \"workshop_target\": \"F8\",\n \"attendee_transfers\": 684\n },\n {\n \"workshop_source\": \"F7\",\n \"workshop_target\": \"F9\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F7\",\n \"workshop_target\": \"F10\",\n \"attendee_transfers\": 12\n },\n {\n \"workshop_source\": \"F8\",\n \"workshop_target\": \"F1\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F8\",\n \"workshop_target\": \"F2\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F8\",\n \"workshop_target\": \"F3\",\n \"attendee_transfers\": 1\n },\n {\n \"workshop_source\": \"F8\",\n \"workshop_target\": \"F4\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F8\",\n \"workshop_target\": \"F5\",\n \"attendee_transfers\": 6300\n },\n {\n \"workshop_source\": \"F8\",\n \"workshop_target\": \"F6\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F8\",\n \"workshop_target\": \"F7\",\n \"attendee_transfers\": 11\n },\n {\n \"workshop_source\": \"F8\",\n \"workshop_target\": \"F9\",\n \"attendee_transfers\": 3\n },\n {\n \"workshop_source\": \"F8\",\n \"workshop_target\": \"F10\",\n \"attendee_transfers\": 6\n },\n {\n \"workshop_source\": \"F9\",\n \"workshop_target\": \"F1\",\n \"attendee_transfers\": 90\n },\n {\n \"workshop_source\": \"F9\",\n \"workshop_target\": \"F2\",\n \"attendee_transfers\": 647\n },\n {\n \"workshop_source\": \"F9\",\n \"workshop_target\": \"F3\",\n \"attendee_transfers\": 5117\n },\n {\n \"workshop_source\": \"F9\",\n \"workshop_target\": \"F4\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F9\",\n \"workshop_target\": \"F5\",\n \"attendee_transfers\": 2\n },\n {\n \"workshop_source\": \"F9\",\n \"workshop_target\": \"F6\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F9\",\n \"workshop_target\": \"F7\",\n \"attendee_transfers\": 20\n },\n {\n \"workshop_source\": \"F9\",\n \"workshop_target\": \"F8\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F9\",\n \"workshop_target\": \"F10\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F10\",\n \"workshop_target\": \"F1\",\n \"attendee_transfers\": 2988\n },\n {\n \"workshop_source\": \"F10\",\n \"workshop_target\": \"F2\",\n \"attendee_transfers\": 6091\n },\n {\n \"workshop_source\": \"F10\",\n \"workshop_target\": \"F3\",\n \"attendee_transfers\": 2\n },\n {\n \"workshop_source\": \"F10\",\n \"workshop_target\": \"F4\",\n \"attendee_transfers\": 6133\n },\n {\n \"workshop_source\": \"F10\",\n \"workshop_target\": \"F5\",\n \"attendee_transfers\": 6441\n },\n {\n \"workshop_source\": \"F10\",\n \"workshop_target\": \"F6\",\n \"attendee_transfers\": 1151\n },\n {\n \"workshop_source\": \"F10\",\n \"workshop_target\": \"F7\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F10\",\n \"workshop_target\": \"F8\",\n \"attendee_transfers\": 0\n },\n {\n \"workshop_source\": \"F10\",\n \"workshop_target\": \"F9\",\n \"attendee_transfers\": 29\n }\n ]\n}\n\nWhen you send the final answer, please use a tiny JSON snippet like this so it's straightforward to read and check:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis means: \"solution\" is an ordered list where each entry is the room/location identifier assigned to the corresponding workshop (first list item → first workshop, second → second workshop, and so on). Think of it like filling out a simple form — one room id per workshop in order. The JSON above is just the shape I need, not the actual assignment.\n\nPlease use the exact identifiers from the instance input — don't rename them or invent new ones. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 131, 1116, 1665, 1124, 1138, 1090, 1129, 569, 971 ], [ 131, 0, 1237, 1776, 1251, 1264, 1216, 1253, 696, 1092 ], [ 1116, 1237, 0, 585, 171, 132, 139, 79, 561, 146 ], [ 1665, 1776, 585, 0, 680, 640, 682, 614, 1135, 725 ], [ 1124, 1251, 171, 680, 0, 44, 46, 93, 556, 210 ], [ 1138, 1264, 132, 640, 44, 0, 49, 52, 570, 198 ], [ 1090, 1216, 139, 682, 46, 49, 0, 72, 522, 164 ], [ 1129, 1253, 79, 614, 93, 52, 72, 0, 564, 169 ], [ 569, 696, 561, 1135, 556, 570, 522, 564, 0, 415 ], [ 971, 1092, 146, 725, 210, 198, 164, 169, 415, 0 ] ], "flow_matrix": [ [ 0, 280, 47, 0, 6, 899, 0, 32, 1, 2764 ], [ 0, 0, 0, 15, 1222, 2, 265, 0, 0, 0 ], [ 483, 0, 0, 1, 0, 34, 0, 1, 0, 0 ], [ 0, 3, 0, 0, 0, 0, 0, 186, 43, 102 ], [ 0, 0, 0, 0, 0, 0, 2217, 0, 203, 812 ], [ 0, 0, 34, 1, 0, 0, 0, 0, 0, 0 ], [ 591, 0, 12, 120, 0, 0, 0, 684, 0, 12 ], [ 0, 0, 1, 0, 6300, 0, 11, 0, 3, 6 ], [ 90, 647, 5117, 0, 2, 0, 20, 0, 0, 0 ], [ 2988, 6091, 2, 6133, 6441, 1151, 0, 0, 29, 0 ] ], "objective": 8634456.0 }, "solution": [ 9, 5, 1, 4, 7, 8, 3, 2, 0, 6 ], "obj": 8634456.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 131 }, { "from_id": 0, "to_id": 2, "distance": 1116 }, { "from_id": 0, "to_id": 3, "distance": 1665 }, { "from_id": 0, "to_id": 4, "distance": 1124 }, { "from_id": 0, "to_id": 5, "distance": 1138 }, { "from_id": 0, "to_id": 6, "distance": 1090 }, { "from_id": 0, "to_id": 7, "distance": 1129 }, { "from_id": 0, "to_id": 8, "distance": 569 }, { "from_id": 0, "to_id": 9, "distance": 971 }, { "from_id": 1, "to_id": 0, "distance": 131 }, { "from_id": 1, "to_id": 2, "distance": 1237 }, { "from_id": 1, "to_id": 3, "distance": 1776 }, { "from_id": 1, "to_id": 4, "distance": 1251 }, { "from_id": 1, "to_id": 5, "distance": 1264 }, { "from_id": 1, "to_id": 6, "distance": 1216 }, { "from_id": 1, "to_id": 7, "distance": 1253 }, { "from_id": 1, "to_id": 8, "distance": 696 }, { "from_id": 1, "to_id": 9, "distance": 1092 }, { "from_id": 2, "to_id": 0, "distance": 1116 }, { "from_id": 2, "to_id": 1, "distance": 1237 }, { "from_id": 2, "to_id": 3, "distance": 585 }, { "from_id": 2, "to_id": 4, "distance": 171 }, { "from_id": 2, "to_id": 5, "distance": 132 }, { "from_id": 2, "to_id": 6, "distance": 139 }, { "from_id": 2, "to_id": 7, "distance": 79 }, { "from_id": 2, "to_id": 8, "distance": 561 }, { "from_id": 2, "to_id": 9, "distance": 146 }, { "from_id": 3, "to_id": 0, "distance": 1665 }, { "from_id": 3, "to_id": 1, "distance": 1776 }, { "from_id": 3, "to_id": 2, "distance": 585 }, { "from_id": 3, "to_id": 4, "distance": 680 }, { "from_id": 3, "to_id": 5, "distance": 640 }, { "from_id": 3, "to_id": 6, "distance": 682 }, { "from_id": 3, "to_id": 7, "distance": 614 }, { "from_id": 3, "to_id": 8, "distance": 1135 }, { "from_id": 3, "to_id": 9, "distance": 725 }, { "from_id": 4, "to_id": 0, "distance": 1124 }, { "from_id": 4, "to_id": 1, "distance": 1251 }, { "from_id": 4, "to_id": 2, "distance": 171 }, { "from_id": 4, "to_id": 3, "distance": 680 }, { "from_id": 4, "to_id": 5, "distance": 44 }, { "from_id": 4, "to_id": 6, "distance": 46 }, { "from_id": 4, "to_id": 7, "distance": 93 }, { "from_id": 4, "to_id": 8, "distance": 556 }, { "from_id": 4, "to_id": 9, "distance": 210 }, { "from_id": 5, "to_id": 0, "distance": 1138 }, { "from_id": 5, "to_id": 1, "distance": 1264 }, { "from_id": 5, "to_id": 2, "distance": 132 }, { "from_id": 5, "to_id": 3, "distance": 640 }, { "from_id": 5, "to_id": 4, "distance": 44 }, { "from_id": 5, "to_id": 6, "distance": 49 }, { "from_id": 5, "to_id": 7, "distance": 52 }, { "from_id": 5, "to_id": 8, "distance": 570 }, { "from_id": 5, "to_id": 9, "distance": 198 }, { "from_id": 6, "to_id": 0, "distance": 1090 }, { "from_id": 6, "to_id": 1, "distance": 1216 }, { "from_id": 6, "to_id": 2, "distance": 139 }, { "from_id": 6, "to_id": 3, "distance": 682 }, { "from_id": 6, "to_id": 4, "distance": 46 }, { "from_id": 6, "to_id": 5, "distance": 49 }, { "from_id": 6, "to_id": 7, "distance": 72 }, { "from_id": 6, "to_id": 8, "distance": 522 }, { "from_id": 6, "to_id": 9, "distance": 164 }, { "from_id": 7, "to_id": 0, "distance": 1129 }, { "from_id": 7, "to_id": 1, "distance": 1253 }, { "from_id": 7, "to_id": 2, "distance": 79 }, { "from_id": 7, "to_id": 3, "distance": 614 }, { "from_id": 7, "to_id": 4, "distance": 93 }, { "from_id": 7, "to_id": 5, "distance": 52 }, { "from_id": 7, "to_id": 6, "distance": 72 }, { "from_id": 7, "to_id": 8, "distance": 564 }, { "from_id": 7, "to_id": 9, "distance": 169 }, { "from_id": 8, "to_id": 0, "distance": 569 }, { "from_id": 8, "to_id": 1, "distance": 696 }, { "from_id": 8, "to_id": 2, "distance": 561 }, { "from_id": 8, "to_id": 3, "distance": 1135 }, { "from_id": 8, "to_id": 4, "distance": 556 }, { "from_id": 8, "to_id": 5, "distance": 570 }, { "from_id": 8, "to_id": 6, "distance": 522 }, { "from_id": 8, "to_id": 7, "distance": 564 }, { "from_id": 8, "to_id": 9, "distance": 415 }, { "from_id": 9, "to_id": 0, "distance": 971 }, { "from_id": 9, "to_id": 1, "distance": 1092 }, { "from_id": 9, "to_id": 2, "distance": 146 }, { "from_id": 9, "to_id": 3, "distance": 725 }, { "from_id": 9, "to_id": 4, "distance": 210 }, { "from_id": 9, "to_id": 5, "distance": 198 }, { "from_id": 9, "to_id": 6, "distance": 164 }, { "from_id": 9, "to_id": 7, "distance": 169 }, { "from_id": 9, "to_id": 8, "distance": 415 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 280 }, { "from_id": "F1", "to_id": "F3", "flow": 47 }, { "from_id": "F1", "to_id": "F4", "flow": 0 }, { "from_id": "F1", "to_id": "F5", "flow": 6 }, { "from_id": "F1", "to_id": "F6", "flow": 899 }, { "from_id": "F1", "to_id": "F7", "flow": 0 }, { "from_id": "F1", "to_id": "F8", "flow": 32 }, { "from_id": "F1", "to_id": "F9", "flow": 1 }, { "from_id": "F1", "to_id": "F10", "flow": 2764 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 0 }, { "from_id": "F2", "to_id": "F4", "flow": 15 }, { "from_id": "F2", "to_id": "F5", "flow": 1222 }, { "from_id": "F2", "to_id": "F6", "flow": 2 }, { "from_id": "F2", "to_id": "F7", "flow": 265 }, { "from_id": "F2", "to_id": "F8", "flow": 0 }, { "from_id": "F2", "to_id": "F9", "flow": 0 }, { "from_id": "F2", "to_id": "F10", "flow": 0 }, { "from_id": "F3", "to_id": "F1", "flow": 483 }, { "from_id": "F3", "to_id": "F2", "flow": 0 }, { "from_id": "F3", "to_id": "F4", "flow": 1 }, { "from_id": "F3", "to_id": "F5", "flow": 0 }, { "from_id": "F3", "to_id": "F6", "flow": 34 }, { "from_id": "F3", "to_id": "F7", "flow": 0 }, { "from_id": "F3", "to_id": "F8", "flow": 1 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F3", "to_id": "F10", "flow": 0 }, { "from_id": "F4", "to_id": "F1", "flow": 0 }, { "from_id": "F4", "to_id": "F2", "flow": 3 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 0 }, { "from_id": "F4", "to_id": "F6", "flow": 0 }, { "from_id": "F4", "to_id": "F7", "flow": 0 }, { "from_id": "F4", "to_id": "F8", "flow": 186 }, { "from_id": "F4", "to_id": "F9", "flow": 43 }, { "from_id": "F4", "to_id": "F10", "flow": 102 }, { "from_id": "F5", "to_id": "F1", "flow": 0 }, { "from_id": "F5", "to_id": "F2", "flow": 0 }, { "from_id": "F5", "to_id": "F3", "flow": 0 }, { "from_id": "F5", "to_id": "F4", "flow": 0 }, { "from_id": "F5", "to_id": "F6", "flow": 0 }, { "from_id": "F5", "to_id": "F7", "flow": 2217 }, { "from_id": "F5", "to_id": "F8", "flow": 0 }, { "from_id": "F5", "to_id": "F9", "flow": 203 }, { "from_id": "F5", "to_id": "F10", "flow": 812 }, { "from_id": "F6", "to_id": "F1", "flow": 0 }, { "from_id": "F6", "to_id": "F2", "flow": 0 }, { "from_id": "F6", "to_id": "F3", "flow": 34 }, { "from_id": "F6", "to_id": "F4", "flow": 1 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 0 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 591 }, { "from_id": "F7", "to_id": "F2", "flow": 0 }, { "from_id": "F7", "to_id": "F3", "flow": 12 }, { "from_id": "F7", "to_id": "F4", "flow": 120 }, { "from_id": "F7", "to_id": "F5", "flow": 0 }, { "from_id": "F7", "to_id": "F6", "flow": 0 }, { "from_id": "F7", "to_id": "F8", "flow": 684 }, { "from_id": "F7", "to_id": "F9", "flow": 0 }, { "from_id": "F7", "to_id": "F10", "flow": 12 }, { "from_id": "F8", "to_id": "F1", "flow": 0 }, { "from_id": "F8", "to_id": "F2", "flow": 0 }, { "from_id": "F8", "to_id": "F3", "flow": 1 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 6300 }, { "from_id": "F8", "to_id": "F6", "flow": 0 }, { "from_id": "F8", "to_id": "F7", "flow": 11 }, { "from_id": "F8", "to_id": "F9", "flow": 3 }, { "from_id": "F8", "to_id": "F10", "flow": 6 }, { "from_id": "F9", "to_id": "F1", "flow": 90 }, { "from_id": "F9", "to_id": "F2", "flow": 647 }, { "from_id": "F9", "to_id": "F3", "flow": 5117 }, { "from_id": "F9", "to_id": "F4", "flow": 0 }, { "from_id": "F9", "to_id": "F5", "flow": 2 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 20 }, { "from_id": "F9", "to_id": "F8", "flow": 0 }, { "from_id": "F9", "to_id": "F10", "flow": 0 }, { "from_id": "F10", "to_id": "F1", "flow": 2988 }, { "from_id": "F10", "to_id": "F2", "flow": 6091 }, { "from_id": "F10", "to_id": "F3", "flow": 2 }, { "from_id": "F10", "to_id": "F4", "flow": 6133 }, { "from_id": "F10", "to_id": "F5", "flow": 6441 }, { "from_id": "F10", "to_id": "F6", "flow": 1151 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 0 }, { "from_id": "F10", "to_id": "F9", "flow": 29 } ] }, "solution_variant": [ 9, 5, 1, 4, 7, 8, 3, 2, 0, 6 ], "context_index": 20, "input_format": "json", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Recently the facilities team decided to rearrange where crews park so that the teams swapping the most equipment don’t have to travel far. The way to compare setups is straightforward: for every pair of crews multiply how much they interact by the distance between their assigned bays, then total those numbers; the arrangement with the smallest total is the one that keeps walking and cart trips down. Every crew must be placed into one distinct bay and every bay must be filled by one crew. The detailed exchange counts and bay-to-bay distances follow below.\n\nThe instance below lists 12 crews (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12) and 12 bays (A, B, C, D, E, F, G, H, I, J, K, L).\nFrom bay A to bay B: walking distance 3.\nFrom bay A to bay C: walking distance 4.\nFrom bay A to bay D: walking distance 1.\nFrom bay A to bay E: walking distance 2.\nFrom bay A to bay F: walking distance 4.\nFrom bay A to bay G: walking distance 5.\nFrom bay A to bay H: walking distance 4.\nFrom bay A to bay I: walking distance 5.\nFrom bay A to bay J: walking distance 3.\nFrom bay A to bay K: walking distance 4.\nFrom bay A to bay L: walking distance 5.\nFrom bay B to bay A: walking distance 3.\nFrom bay B to bay C: walking distance 1.\nFrom bay B to bay D: walking distance 4.\nFrom bay B to bay E: walking distance 3.\nFrom bay B to bay F: walking distance 1.\nFrom bay B to bay G: walking distance 2.\nFrom bay B to bay H: walking distance 3.\nFrom bay B to bay I: walking distance 2.\nFrom bay B to bay J: walking distance 6.\nFrom bay B to bay K: walking distance 5.\nFrom bay B to bay L: walking distance 4.\nFrom bay C to bay A: walking distance 4.\nFrom bay C to bay B: walking distance 1.\nFrom bay C to bay D: walking distance 5.\nFrom bay C to bay E: walking distance 4.\nFrom bay C to bay F: walking distance 2.\nFrom bay C to bay G: walking distance 1.\nFrom bay C to bay H: walking distance 4.\nFrom bay C to bay I: walking distance 3.\nFrom bay C to bay J: walking distance 7.\nFrom bay C to bay K: walking distance 6.\nFrom bay C to bay L: walking distance 5.\nFrom bay D to bay A: walking distance 1.\nFrom bay D to bay B: walking distance 4.\nFrom bay D to bay C: walking distance 5.\nFrom bay D to bay E: walking distance 1.\nFrom bay D to bay F: walking distance 3.\nFrom bay D to bay G: walking distance 4.\nFrom bay D to bay H: walking distance 3.\nFrom bay D to bay I: walking distance 4.\nFrom bay D to bay J: walking distance 2.\nFrom bay D to bay K: walking distance 3.\nFrom bay D to bay L: walking distance 4.\nFrom bay E to bay A: walking distance 2.\nFrom bay E to bay B: walking distance 3.\nFrom bay E to bay C: walking distance 4.\nFrom bay E to bay D: walking distance 1.\nFrom bay E to bay F: walking distance 2.\nFrom bay E to bay G: walking distance 3.\nFrom bay E to bay H: walking distance 2.\nFrom bay E to bay I: walking distance 3.\nFrom bay E to bay J: walking distance 3.\nFrom bay E to bay K: walking distance 2.\nFrom bay E to bay L: walking distance 3.\nFrom bay F to bay A: walking distance 4.\nFrom bay F to bay B: walking distance 1.\nFrom bay F to bay C: walking distance 2.\nFrom bay F to bay D: walking distance 3.\nFrom bay F to bay E: walking distance 2.\nFrom bay F to bay G: walking distance 1.\nFrom bay F to bay H: walking distance 2.\nFrom bay F to bay I: walking distance 1.\nFrom bay F to bay J: walking distance 5.\nFrom bay F to bay K: walking distance 4.\nFrom bay F to bay L: walking distance 3.\nFrom bay G to bay A: walking distance 5.\nFrom bay G to bay B: walking distance 2.\nFrom bay G to bay C: walking distance 1.\nFrom bay G to bay D: walking distance 4.\nFrom bay G to bay E: walking distance 3.\nFrom bay G to bay F: walking distance 1.\nFrom bay G to bay H: walking distance 3.\nFrom bay G to bay I: walking distance 2.\nFrom bay G to bay J: walking distance 6.\nFrom bay G to bay K: walking distance 5.\nFrom bay G to bay L: walking distance 4.\nFrom bay H to bay A: walking distance 4.\nFrom bay H to bay B: walking distance 3.\nFrom bay H to bay C: walking distance 4.\nFrom bay H to bay D: walking distance 3.\nFrom bay H to bay E: walking distance 2.\nFrom bay H to bay F: walking distance 2.\nFrom bay H to bay G: walking distance 3.\nFrom bay H to bay I: walking distance 1.\nFrom bay H to bay J: walking distance 3.\nFrom bay H to bay K: walking distance 2.\nFrom bay H to bay L: walking distance 1.\nFrom bay I to bay A: walking distance 5.\nFrom bay I to bay B: walking distance 2.\nFrom bay I to bay C: walking distance 3.\nFrom bay I to bay D: walking distance 4.\nFrom bay I to bay E: walking distance 3.\nFrom bay I to bay F: walking distance 1.\nFrom bay I to bay G: walking distance 2.\nFrom bay I to bay H: walking distance 1.\nFrom bay I to bay J: walking distance 4.\nFrom bay I to bay K: walking distance 3.\nFrom bay I to bay L: walking distance 2.\nFrom bay J to bay A: walking distance 3.\nFrom bay J to bay B: walking distance 6.\nFrom bay J to bay C: walking distance 7.\nFrom bay J to bay D: walking distance 2.\nFrom bay J to bay E: walking distance 3.\nFrom bay J to bay F: walking distance 5.\nFrom bay J to bay G: walking distance 6.\nFrom bay J to bay H: walking distance 3.\nFrom bay J to bay I: walking distance 4.\nFrom bay J to bay K: walking distance 1.\nFrom bay J to bay L: walking distance 2.\nFrom bay K to bay A: walking distance 4.\nFrom bay K to bay B: walking distance 5.\nFrom bay K to bay C: walking distance 6.\nFrom bay K to bay D: walking distance 3.\nFrom bay K to bay E: walking distance 2.\nFrom bay K to bay F: walking distance 4.\nFrom bay K to bay G: walking distance 5.\nFrom bay K to bay H: walking distance 2.\nFrom bay K to bay I: walking distance 3.\nFrom bay K to bay J: walking distance 1.\nFrom bay K to bay L: walking distance 1.\nFrom bay L to bay A: walking distance 5.\nFrom bay L to bay B: walking distance 4.\nFrom bay L to bay C: walking distance 5.\nFrom bay L to bay D: walking distance 4.\nFrom bay L to bay E: walking distance 3.\nFrom bay L to bay F: walking distance 3.\nFrom bay L to bay G: walking distance 4.\nFrom bay L to bay H: walking distance 1.\nFrom bay L to bay I: walking distance 2.\nFrom bay L to bay J: walking distance 2.\nFrom bay L to bay K: walking distance 1.\nFrom crew F1 to crew F2: equipment exchanges 0.\nFrom crew F1 to crew F3: equipment exchanges 5.\nFrom crew F1 to crew F4: equipment exchanges 2.\nFrom crew F1 to crew F5: equipment exchanges 10.\nFrom crew F1 to crew F6: equipment exchanges 1.\nFrom crew F1 to crew F7: equipment exchanges 5.\nFrom crew F1 to crew F8: equipment exchanges 0.\nFrom crew F1 to crew F9: equipment exchanges 0.\nFrom crew F1 to crew F10: equipment exchanges 4.\nFrom crew F1 to crew F11: equipment exchanges 4.\nFrom crew F1 to crew F12: equipment exchanges 0.\nFrom crew F2 to crew F1: equipment exchanges 0.\nFrom crew F2 to crew F3: equipment exchanges 1.\nFrom crew F2 to crew F4: equipment exchanges 0.\nFrom crew F2 to crew F5: equipment exchanges 5.\nFrom crew F2 to crew F6: equipment exchanges 1.\nFrom crew F2 to crew F7: equipment exchanges 0.\nFrom crew F2 to crew F8: equipment exchanges 2.\nFrom crew F2 to crew F9: equipment exchanges 0.\nFrom crew F2 to crew F10: equipment exchanges 1.\nFrom crew F2 to crew F11: equipment exchanges 5.\nFrom crew F2 to crew F12: equipment exchanges 2.\nFrom crew F3 to crew F1: equipment exchanges 5.\nFrom crew F3 to crew F2: equipment exchanges 1.\nFrom crew F3 to crew F4: equipment exchanges 5.\nFrom crew F3 to crew F5: equipment exchanges 6.\nFrom crew F3 to crew F6: equipment exchanges 2.\nFrom crew F3 to crew F7: equipment exchanges 5.\nFrom crew F3 to crew F8: equipment exchanges 5.\nFrom crew F3 to crew F9: equipment exchanges 1.\nFrom crew F3 to crew F10: equipment exchanges 1.\nFrom crew F3 to crew F11: equipment exchanges 5.\nFrom crew F3 to crew F12: equipment exchanges 2.\nFrom crew F4 to crew F1: equipment exchanges 2.\nFrom crew F4 to crew F2: equipment exchanges 0.\nFrom crew F4 to crew F3: equipment exchanges 5.\nFrom crew F4 to crew F5: equipment exchanges 5.\nFrom crew F4 to crew F6: equipment exchanges 1.\nFrom crew F4 to crew F7: equipment exchanges 6.\nFrom crew F4 to crew F8: equipment exchanges 10.\nFrom crew F4 to crew F9: equipment exchanges 0.\nFrom crew F4 to crew F10: equipment exchanges 0.\nFrom crew F4 to crew F11: equipment exchanges 1.\nFrom crew F4 to crew F12: equipment exchanges 0.\nFrom crew F5 to crew F1: equipment exchanges 10.\nFrom crew F5 to crew F2: equipment exchanges 5.\nFrom crew F5 to crew F3: equipment exchanges 6.\nFrom crew F5 to crew F4: equipment exchanges 5.\nFrom crew F5 to crew F6: equipment exchanges 0.\nFrom crew F5 to crew F7: equipment exchanges 0.\nFrom crew F5 to crew F8: equipment exchanges 2.\nFrom crew F5 to crew F9: equipment exchanges 2.\nFrom crew F5 to crew F10: equipment exchanges 1.\nFrom crew F5 to crew F11: equipment exchanges 2.\nFrom crew F5 to crew F12: equipment exchanges 1.\nFrom crew F6 to crew F1: equipment exchanges 1.\nFrom crew F6 to crew F2: equipment exchanges 1.\nFrom crew F6 to crew F3: equipment exchanges 2.\nFrom crew F6 to crew F4: equipment exchanges 1.\nFrom crew F6 to crew F5: equipment exchanges 0.\nFrom crew F6 to crew F7: equipment exchanges 2.\nFrom crew F6 to crew F8: equipment exchanges 5.\nFrom crew F6 to crew F9: equipment exchanges 5.\nFrom crew F6 to crew F10: equipment exchanges 5.\nFrom crew F6 to crew F11: equipment exchanges 0.\nFrom crew F6 to crew F12: equipment exchanges 0.\nFrom crew F7 to crew F1: equipment exchanges 5.\nFrom crew F7 to crew F2: equipment exchanges 0.\nFrom crew F7 to crew F3: equipment exchanges 5.\nFrom crew F7 to crew F4: equipment exchanges 6.\nFrom crew F7 to crew F5: equipment exchanges 0.\nFrom crew F7 to crew F6: equipment exchanges 2.\nFrom crew F7 to crew F8: equipment exchanges 0.\nFrom crew F7 to crew F9: equipment exchanges 5.\nFrom crew F7 to crew F10: equipment exchanges 0.\nFrom crew F7 to crew F11: equipment exchanges 0.\nFrom crew F7 to crew F12: equipment exchanges 5.\nFrom crew F8 to crew F1: equipment exchanges 0.\nFrom crew F8 to crew F2: equipment exchanges 2.\nFrom crew F8 to crew F3: equipment exchanges 5.\nFrom crew F8 to crew F4: equipment exchanges 10.\nFrom crew F8 to crew F5: equipment exchanges 2.\nFrom crew F8 to crew F6: equipment exchanges 5.\nFrom crew F8 to crew F7: equipment exchanges 0.\nFrom crew F8 to crew F9: equipment exchanges 2.\nFrom crew F8 to crew F10: equipment exchanges 1.\nFrom crew F8 to crew F11: equipment exchanges 0.\nFrom crew F8 to crew F12: equipment exchanges 0.\nFrom crew F9 to crew F1: equipment exchanges 0.\nFrom crew F9 to crew F2: equipment exchanges 0.\nFrom crew F9 to crew F3: equipment exchanges 1.\nFrom crew F9 to crew F4: equipment exchanges 0.\nFrom crew F9 to crew F5: equipment exchanges 2.\nFrom crew F9 to crew F6: equipment exchanges 5.\nFrom crew F9 to crew F7: equipment exchanges 5.\nFrom crew F9 to crew F8: equipment exchanges 2.\nFrom crew F9 to crew F10: equipment exchanges 5.\nFrom crew F9 to crew F11: equipment exchanges 1.\nFrom crew F9 to crew F12: equipment exchanges 5.\nFrom crew F10 to crew F1: equipment exchanges 4.\nFrom crew F10 to crew F2: equipment exchanges 1.\nFrom crew F10 to crew F3: equipment exchanges 1.\nFrom crew F10 to crew F4: equipment exchanges 0.\nFrom crew F10 to crew F5: equipment exchanges 1.\nFrom crew F10 to crew F6: equipment exchanges 5.\nFrom crew F10 to crew F7: equipment exchanges 0.\nFrom crew F10 to crew F8: equipment exchanges 1.\nFrom crew F10 to crew F9: equipment exchanges 5.\nFrom crew F10 to crew F11: equipment exchanges 0.\nFrom crew F10 to crew F12: equipment exchanges 0.\nFrom crew F11 to crew F1: equipment exchanges 4.\nFrom crew F11 to crew F2: equipment exchanges 5.\nFrom crew F11 to crew F3: equipment exchanges 5.\nFrom crew F11 to crew F4: equipment exchanges 1.\nFrom crew F11 to crew F5: equipment exchanges 2.\nFrom crew F11 to crew F6: equipment exchanges 0.\nFrom crew F11 to crew F7: equipment exchanges 0.\nFrom crew F11 to crew F8: equipment exchanges 0.\nFrom crew F11 to crew F9: equipment exchanges 1.\nFrom crew F11 to crew F10: equipment exchanges 0.\nFrom crew F11 to crew F12: equipment exchanges 5.\nFrom crew F12 to crew F1: equipment exchanges 0.\nFrom crew F12 to crew F2: equipment exchanges 2.\nFrom crew F12 to crew F3: equipment exchanges 2.\nFrom crew F12 to crew F4: equipment exchanges 0.\nFrom crew F12 to crew F5: equipment exchanges 1.\nFrom crew F12 to crew F6: equipment exchanges 0.\nFrom crew F12 to crew F7: equipment exchanges 5.\nFrom crew F12 to crew F8: equipment exchanges 0.\nFrom crew F12 to crew F9: equipment exchanges 5.\nFrom crew F12 to crew F10: equipment exchanges 0.\nFrom crew F12 to crew F11: equipment exchanges 5.\nUse these distances and exchange counts to compute each assignment's total interaction cost; the arrangement with the smallest total is preferred.\n\nIf you want to submit an arrangement, just reply with a small JSON snippet like this so it's easy to parse. Here's the shape I expect:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis array should list, in order, which bay each crew is assigned to — first entry = first crew, second = second crew, and so on. Think of it like filling out a short form: one bay ID per crew. The block above is only a sketch of the shape I need, not the actual assignment.\n\nPlease use the exact identifiers from the instance input — don't rename them or invent new labels. Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 3, 4, 1, 2, 4, 5, 4, 5, 3, 4, 5 ], [ 3, 0, 1, 4, 3, 1, 2, 3, 2, 6, 5, 4 ], [ 4, 1, 0, 5, 4, 2, 1, 4, 3, 7, 6, 5 ], [ 1, 4, 5, 0, 1, 3, 4, 3, 4, 2, 3, 4 ], [ 2, 3, 4, 1, 0, 2, 3, 2, 3, 3, 2, 3 ], [ 4, 1, 2, 3, 2, 0, 1, 2, 1, 5, 4, 3 ], [ 5, 2, 1, 4, 3, 1, 0, 3, 2, 6, 5, 4 ], [ 4, 3, 4, 3, 2, 2, 3, 0, 1, 3, 2, 1 ], [ 5, 2, 3, 4, 3, 1, 2, 1, 0, 4, 3, 2 ], [ 3, 6, 7, 2, 3, 5, 6, 3, 4, 0, 1, 2 ], [ 4, 5, 6, 3, 2, 4, 5, 2, 3, 1, 0, 1 ], [ 5, 4, 5, 4, 3, 3, 4, 1, 2, 2, 1, 0 ] ], "flow_matrix": [ [ 0, 0, 5, 2, 10, 1, 5, 0, 0, 4, 4, 0 ], [ 0, 0, 1, 0, 5, 1, 0, 2, 0, 1, 5, 2 ], [ 5, 1, 0, 5, 6, 2, 5, 5, 1, 1, 5, 2 ], [ 2, 0, 5, 0, 5, 1, 6, 10, 0, 0, 1, 0 ], [ 10, 5, 6, 5, 0, 0, 0, 2, 2, 1, 2, 1 ], [ 1, 1, 2, 1, 0, 0, 2, 5, 5, 5, 0, 0 ], [ 5, 0, 5, 6, 0, 2, 0, 0, 5, 0, 0, 5 ], [ 0, 2, 5, 10, 2, 5, 0, 0, 2, 1, 0, 0 ], [ 0, 0, 1, 0, 2, 5, 5, 2, 0, 5, 1, 5 ], [ 4, 1, 1, 0, 1, 5, 0, 1, 5, 0, 0, 0 ], [ 4, 5, 5, 1, 2, 0, 0, 0, 1, 0, 0, 5 ], [ 0, 2, 2, 0, 1, 0, 5, 0, 5, 0, 5, 0 ] ], "objective": 690.0 }, "solution": [ 5, 2, 8, 11, 1, 9, 7, 10, 3, 0, 6, 4 ], "obj": 690.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 12, "num_locations": 12, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 3 }, { "from_id": "A", "to_id": "C", "distance": 4 }, { "from_id": "A", "to_id": "D", "distance": 1 }, { "from_id": "A", "to_id": "E", "distance": 2 }, { "from_id": "A", "to_id": "F", "distance": 4 }, { "from_id": "A", "to_id": "G", "distance": 5 }, { "from_id": "A", "to_id": "H", "distance": 4 }, { "from_id": "A", "to_id": "I", "distance": 5 }, { "from_id": "A", "to_id": "J", "distance": 3 }, { "from_id": "A", "to_id": "K", "distance": 4 }, { "from_id": "A", "to_id": "L", "distance": 5 }, { "from_id": "B", "to_id": "A", "distance": 3 }, { "from_id": "B", "to_id": "C", "distance": 1 }, { "from_id": "B", "to_id": "D", "distance": 4 }, { "from_id": "B", "to_id": "E", "distance": 3 }, { "from_id": "B", "to_id": "F", "distance": 1 }, { "from_id": "B", "to_id": "G", "distance": 2 }, { "from_id": "B", "to_id": "H", "distance": 3 }, { "from_id": "B", "to_id": "I", "distance": 2 }, { "from_id": "B", "to_id": "J", "distance": 6 }, { "from_id": "B", "to_id": "K", "distance": 5 }, { "from_id": "B", "to_id": "L", "distance": 4 }, { "from_id": "C", "to_id": "A", "distance": 4 }, { "from_id": "C", "to_id": "B", "distance": 1 }, { "from_id": "C", "to_id": "D", "distance": 5 }, { "from_id": "C", "to_id": "E", "distance": 4 }, { "from_id": "C", "to_id": "F", "distance": 2 }, { "from_id": "C", "to_id": "G", "distance": 1 }, { "from_id": "C", "to_id": "H", "distance": 4 }, { "from_id": "C", "to_id": "I", "distance": 3 }, { "from_id": "C", "to_id": "J", "distance": 7 }, { "from_id": "C", "to_id": "K", "distance": 6 }, { "from_id": "C", "to_id": "L", "distance": 5 }, { "from_id": "D", "to_id": "A", "distance": 1 }, { "from_id": "D", "to_id": "B", "distance": 4 }, { "from_id": "D", "to_id": "C", "distance": 5 }, { "from_id": "D", "to_id": "E", "distance": 1 }, { "from_id": "D", "to_id": "F", "distance": 3 }, { "from_id": "D", "to_id": "G", "distance": 4 }, { "from_id": "D", "to_id": "H", "distance": 3 }, { "from_id": "D", "to_id": "I", "distance": 4 }, { "from_id": "D", "to_id": "J", "distance": 2 }, { "from_id": "D", "to_id": "K", "distance": 3 }, { "from_id": "D", "to_id": "L", "distance": 4 }, { "from_id": "E", "to_id": "A", "distance": 2 }, { "from_id": "E", "to_id": "B", "distance": 3 }, { "from_id": "E", "to_id": "C", "distance": 4 }, { "from_id": "E", "to_id": "D", "distance": 1 }, { "from_id": "E", "to_id": "F", "distance": 2 }, { "from_id": "E", "to_id": "G", "distance": 3 }, { "from_id": "E", "to_id": "H", "distance": 2 }, { "from_id": "E", "to_id": "I", "distance": 3 }, { "from_id": "E", "to_id": "J", "distance": 3 }, { "from_id": "E", "to_id": "K", "distance": 2 }, { "from_id": "E", "to_id": "L", "distance": 3 }, { "from_id": "F", "to_id": "A", "distance": 4 }, { "from_id": "F", "to_id": "B", "distance": 1 }, { "from_id": "F", "to_id": "C", "distance": 2 }, { "from_id": "F", "to_id": "D", "distance": 3 }, { "from_id": "F", "to_id": "E", "distance": 2 }, { "from_id": "F", "to_id": "G", "distance": 1 }, { "from_id": "F", "to_id": "H", "distance": 2 }, { "from_id": "F", "to_id": "I", "distance": 1 }, { "from_id": "F", "to_id": "J", "distance": 5 }, { "from_id": "F", "to_id": "K", "distance": 4 }, { "from_id": "F", "to_id": "L", "distance": 3 }, { "from_id": "G", "to_id": "A", "distance": 5 }, { "from_id": "G", "to_id": "B", "distance": 2 }, { "from_id": "G", "to_id": "C", "distance": 1 }, { "from_id": "G", "to_id": "D", "distance": 4 }, { "from_id": "G", "to_id": "E", "distance": 3 }, { "from_id": "G", "to_id": "F", "distance": 1 }, { "from_id": "G", "to_id": "H", "distance": 3 }, { "from_id": "G", "to_id": "I", "distance": 2 }, { "from_id": "G", "to_id": "J", "distance": 6 }, { "from_id": "G", "to_id": "K", "distance": 5 }, { "from_id": "G", "to_id": "L", "distance": 4 }, { "from_id": "H", "to_id": "A", "distance": 4 }, { "from_id": "H", "to_id": "B", "distance": 3 }, { "from_id": "H", "to_id": "C", "distance": 4 }, { "from_id": "H", "to_id": "D", "distance": 3 }, { "from_id": "H", "to_id": "E", "distance": 2 }, { "from_id": "H", "to_id": "F", "distance": 2 }, { "from_id": "H", "to_id": "G", "distance": 3 }, { "from_id": "H", "to_id": "I", "distance": 1 }, { "from_id": "H", "to_id": "J", "distance": 3 }, { "from_id": "H", "to_id": "K", "distance": 2 }, { "from_id": "H", "to_id": "L", "distance": 1 }, { "from_id": "I", "to_id": "A", "distance": 5 }, { "from_id": "I", "to_id": "B", "distance": 2 }, { "from_id": "I", "to_id": "C", "distance": 3 }, { "from_id": "I", "to_id": "D", "distance": 4 }, { "from_id": "I", "to_id": "E", "distance": 3 }, { "from_id": "I", "to_id": "F", "distance": 1 }, { "from_id": "I", "to_id": "G", "distance": 2 }, { "from_id": "I", "to_id": "H", "distance": 1 }, { "from_id": "I", "to_id": "J", "distance": 4 }, { "from_id": "I", "to_id": "K", "distance": 3 }, { "from_id": "I", "to_id": "L", "distance": 2 }, { "from_id": "J", "to_id": "A", "distance": 3 }, { "from_id": "J", "to_id": "B", "distance": 6 }, { "from_id": "J", "to_id": "C", "distance": 7 }, { "from_id": "J", "to_id": "D", "distance": 2 }, { "from_id": "J", "to_id": "E", "distance": 3 }, { "from_id": "J", "to_id": "F", "distance": 5 }, { "from_id": "J", "to_id": "G", "distance": 6 }, { "from_id": "J", "to_id": "H", "distance": 3 }, { "from_id": "J", "to_id": "I", "distance": 4 }, { "from_id": "J", "to_id": "K", "distance": 1 }, { "from_id": "J", "to_id": "L", "distance": 2 }, { "from_id": "K", "to_id": "A", "distance": 4 }, { "from_id": "K", "to_id": "B", "distance": 5 }, { "from_id": "K", "to_id": "C", "distance": 6 }, { "from_id": "K", "to_id": "D", "distance": 3 }, { "from_id": "K", "to_id": "E", "distance": 2 }, { "from_id": "K", "to_id": "F", "distance": 4 }, { "from_id": "K", "to_id": "G", "distance": 5 }, { "from_id": "K", "to_id": "H", "distance": 2 }, { "from_id": "K", "to_id": "I", "distance": 3 }, { "from_id": "K", "to_id": "J", "distance": 1 }, { "from_id": "K", "to_id": "L", "distance": 1 }, { "from_id": "L", "to_id": "A", "distance": 5 }, { "from_id": "L", "to_id": "B", "distance": 4 }, { "from_id": "L", "to_id": "C", "distance": 5 }, { "from_id": "L", "to_id": "D", "distance": 4 }, { "from_id": "L", "to_id": "E", "distance": 3 }, { "from_id": "L", "to_id": "F", "distance": 3 }, { "from_id": "L", "to_id": "G", "distance": 4 }, { "from_id": "L", "to_id": "H", "distance": 1 }, { "from_id": "L", "to_id": "I", "distance": 2 }, { "from_id": "L", "to_id": "J", "distance": 2 }, { "from_id": "L", "to_id": "K", "distance": 1 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 5 }, { "from_id": "F1", "to_id": "F4", "flow": 2 }, { "from_id": "F1", "to_id": "F5", "flow": 10 }, { "from_id": "F1", "to_id": "F6", "flow": 1 }, { "from_id": "F1", "to_id": "F7", "flow": 5 }, { "from_id": "F1", "to_id": "F8", "flow": 0 }, { "from_id": "F1", "to_id": "F9", "flow": 0 }, { "from_id": "F1", "to_id": "F10", "flow": 4 }, { "from_id": "F1", "to_id": "F11", "flow": 4 }, { "from_id": "F1", "to_id": "F12", "flow": 0 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 1 }, { "from_id": "F2", "to_id": "F4", "flow": 0 }, { "from_id": "F2", "to_id": "F5", "flow": 5 }, { "from_id": "F2", "to_id": "F6", "flow": 1 }, { "from_id": "F2", "to_id": "F7", "flow": 0 }, { "from_id": "F2", "to_id": "F8", "flow": 2 }, { "from_id": "F2", "to_id": "F9", "flow": 0 }, { "from_id": "F2", "to_id": "F10", "flow": 1 }, { "from_id": "F2", "to_id": "F11", "flow": 5 }, { "from_id": "F2", "to_id": "F12", "flow": 2 }, { "from_id": "F3", "to_id": "F1", "flow": 5 }, { "from_id": "F3", "to_id": "F2", "flow": 1 }, { "from_id": "F3", "to_id": "F4", "flow": 5 }, { "from_id": "F3", "to_id": "F5", "flow": 6 }, { "from_id": "F3", "to_id": "F6", "flow": 2 }, { "from_id": "F3", "to_id": "F7", "flow": 5 }, { "from_id": "F3", "to_id": "F8", "flow": 5 }, { "from_id": "F3", "to_id": "F9", "flow": 1 }, { "from_id": "F3", "to_id": "F10", "flow": 1 }, { "from_id": "F3", "to_id": "F11", "flow": 5 }, { "from_id": "F3", "to_id": "F12", "flow": 2 }, { "from_id": "F4", "to_id": "F1", "flow": 2 }, { "from_id": "F4", "to_id": "F2", "flow": 0 }, { "from_id": "F4", "to_id": "F3", "flow": 5 }, { "from_id": "F4", "to_id": "F5", "flow": 5 }, { "from_id": "F4", "to_id": "F6", "flow": 1 }, { "from_id": "F4", "to_id": "F7", "flow": 6 }, { "from_id": "F4", "to_id": "F8", "flow": 10 }, { "from_id": "F4", "to_id": "F9", "flow": 0 }, { "from_id": "F4", "to_id": "F10", "flow": 0 }, { "from_id": "F4", "to_id": "F11", "flow": 1 }, { "from_id": "F4", "to_id": "F12", "flow": 0 }, { "from_id": "F5", "to_id": "F1", "flow": 10 }, { "from_id": "F5", "to_id": "F2", "flow": 5 }, { "from_id": "F5", "to_id": "F3", "flow": 6 }, { "from_id": "F5", "to_id": "F4", "flow": 5 }, { "from_id": "F5", "to_id": "F6", "flow": 0 }, { "from_id": "F5", "to_id": "F7", "flow": 0 }, { "from_id": "F5", "to_id": "F8", "flow": 2 }, { "from_id": "F5", "to_id": "F9", "flow": 2 }, { "from_id": "F5", "to_id": "F10", "flow": 1 }, { "from_id": "F5", "to_id": "F11", "flow": 2 }, { "from_id": "F5", "to_id": "F12", "flow": 1 }, { "from_id": "F6", "to_id": "F1", "flow": 1 }, { "from_id": "F6", "to_id": "F2", "flow": 1 }, { "from_id": "F6", "to_id": "F3", "flow": 2 }, { "from_id": "F6", "to_id": "F4", "flow": 1 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 2 }, { "from_id": "F6", "to_id": "F8", "flow": 5 }, { "from_id": "F6", "to_id": "F9", "flow": 5 }, { "from_id": "F6", "to_id": "F10", "flow": 5 }, { "from_id": "F6", "to_id": "F11", "flow": 0 }, { "from_id": "F6", "to_id": "F12", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 5 }, { "from_id": "F7", "to_id": "F2", "flow": 0 }, { "from_id": "F7", "to_id": "F3", "flow": 5 }, { "from_id": "F7", "to_id": "F4", "flow": 6 }, { "from_id": "F7", "to_id": "F5", "flow": 0 }, { "from_id": "F7", "to_id": "F6", "flow": 2 }, { "from_id": "F7", "to_id": "F8", "flow": 0 }, { "from_id": "F7", "to_id": "F9", "flow": 5 }, { "from_id": "F7", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F11", "flow": 0 }, { "from_id": "F7", "to_id": "F12", "flow": 5 }, { "from_id": "F8", "to_id": "F1", "flow": 0 }, { "from_id": "F8", "to_id": "F2", "flow": 2 }, { "from_id": "F8", "to_id": "F3", "flow": 5 }, { "from_id": "F8", "to_id": "F4", "flow": 10 }, { "from_id": "F8", "to_id": "F5", "flow": 2 }, { "from_id": "F8", "to_id": "F6", "flow": 5 }, { "from_id": "F8", "to_id": "F7", "flow": 0 }, { "from_id": "F8", "to_id": "F9", "flow": 2 }, { "from_id": "F8", "to_id": "F10", "flow": 1 }, { "from_id": "F8", "to_id": "F11", "flow": 0 }, { "from_id": "F8", "to_id": "F12", "flow": 0 }, { "from_id": "F9", "to_id": "F1", "flow": 0 }, { "from_id": "F9", "to_id": "F2", "flow": 0 }, { "from_id": "F9", "to_id": "F3", "flow": 1 }, { "from_id": "F9", "to_id": "F4", "flow": 0 }, { "from_id": "F9", "to_id": "F5", "flow": 2 }, { "from_id": "F9", "to_id": "F6", "flow": 5 }, { "from_id": "F9", "to_id": "F7", "flow": 5 }, { "from_id": "F9", "to_id": "F8", "flow": 2 }, { "from_id": "F9", "to_id": "F10", "flow": 5 }, { "from_id": "F9", "to_id": "F11", "flow": 1 }, { "from_id": "F9", "to_id": "F12", "flow": 5 }, { "from_id": "F10", "to_id": "F1", "flow": 4 }, { "from_id": "F10", "to_id": "F2", "flow": 1 }, { "from_id": "F10", "to_id": "F3", "flow": 1 }, { "from_id": "F10", "to_id": "F4", "flow": 0 }, { "from_id": "F10", "to_id": "F5", "flow": 1 }, { "from_id": "F10", "to_id": "F6", "flow": 5 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 1 }, { "from_id": "F10", "to_id": "F9", "flow": 5 }, { "from_id": "F10", "to_id": "F11", "flow": 0 }, { "from_id": "F10", "to_id": "F12", "flow": 0 }, { "from_id": "F11", "to_id": "F1", "flow": 4 }, { "from_id": "F11", "to_id": "F2", "flow": 5 }, { "from_id": "F11", "to_id": "F3", "flow": 5 }, { "from_id": "F11", "to_id": "F4", "flow": 1 }, { "from_id": "F11", "to_id": "F5", "flow": 2 }, { "from_id": "F11", "to_id": "F6", "flow": 0 }, { "from_id": "F11", "to_id": "F7", "flow": 0 }, { "from_id": "F11", "to_id": "F8", "flow": 0 }, { "from_id": "F11", "to_id": "F9", "flow": 1 }, { "from_id": "F11", "to_id": "F10", "flow": 0 }, { "from_id": "F11", "to_id": "F12", "flow": 5 }, { "from_id": "F12", "to_id": "F1", "flow": 0 }, { "from_id": "F12", "to_id": "F2", "flow": 2 }, { "from_id": "F12", "to_id": "F3", "flow": 2 }, { "from_id": "F12", "to_id": "F4", "flow": 0 }, { "from_id": "F12", "to_id": "F5", "flow": 1 }, { "from_id": "F12", "to_id": "F6", "flow": 0 }, { "from_id": "F12", "to_id": "F7", "flow": 5 }, { "from_id": "F12", "to_id": "F8", "flow": 0 }, { "from_id": "F12", "to_id": "F9", "flow": 5 }, { "from_id": "F12", "to_id": "F10", "flow": 0 }, { "from_id": "F12", "to_id": "F11", "flow": 5 } ] }, "solution_variant": [ "F", "C", "I", "L", "B", "J", "H", "K", "D", "A", "G", "E" ], "context_index": 21, "input_format": "nl", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "I was chatting with a hospital director who wanted to rearrange where the specialty teams sit so the groups that send lots of patients to each other end up nearer. The task is to give every team its own ward area and make sure every ward has exactly one team — no team doubled up and no area left empty. Better layouts are the ones where, for every pair of teams, you take how many patients they transfer, multiply that by how far apart their assigned wards are, and add all those numbers together; the smaller that total, the better the setup. The exact teams, ward areas, distances and transfer counts are listed below.\n\nHere are the 9 specialty teams (F1, F2, F3, F4, F5, F6, F7, F8, F9) and the 9 ward areas (A, B, C, D, E, F, G, H, I):\nWard A to ward B are 12 apart.\nWard A to ward C are 86 apart.\nWard A to ward D are 0 apart.\nWard A to ward E are 0 apart.\nWard A to ward F are 0 apart.\nWard A to ward G are 0 apart.\nWard A to ward H are 0 apart.\nWard A to ward I are 0 apart.\nWard B to ward A are 12 apart.\nWard B to ward C are 0 apart.\nWard B to ward D are 35 apart.\nWard B to ward E are 0 apart.\nWard B to ward F are 0 apart.\nWard B to ward G are 0 apart.\nWard B to ward H are 0 apart.\nWard B to ward I are 0 apart.\nWard C to ward A are 86 apart.\nWard C to ward B are 0 apart.\nWard C to ward D are 0 apart.\nWard C to ward E are 19 apart.\nWard C to ward F are 0 apart.\nWard C to ward G are 0 apart.\nWard C to ward H are 0 apart.\nWard C to ward I are 0 apart.\nWard D to ward A are 0 apart.\nWard D to ward B are 35 apart.\nWard D to ward C are 0 apart.\nWard D to ward E are 0 apart.\nWard D to ward F are 0 apart.\nWard D to ward G are 0 apart.\nWard D to ward H are 0 apart.\nWard D to ward I are 0 apart.\nWard E to ward A are 0 apart.\nWard E to ward B are 0 apart.\nWard E to ward C are 19 apart.\nWard E to ward D are 0 apart.\nWard E to ward F are 0 apart.\nWard E to ward G are 0 apart.\nWard E to ward H are 0 apart.\nWard E to ward I are 0 apart.\nWard F to ward A are 0 apart.\nWard F to ward B are 0 apart.\nWard F to ward C are 0 apart.\nWard F to ward D are 0 apart.\nWard F to ward E are 0 apart.\nWard F to ward G are 0 apart.\nWard F to ward H are 0 apart.\nWard F to ward I are 0 apart.\nWard G to ward A are 0 apart.\nWard G to ward B are 0 apart.\nWard G to ward C are 0 apart.\nWard G to ward D are 0 apart.\nWard G to ward E are 0 apart.\nWard G to ward F are 0 apart.\nWard G to ward H are 0 apart.\nWard G to ward I are 0 apart.\nWard H to ward A are 0 apart.\nWard H to ward B are 0 apart.\nWard H to ward C are 0 apart.\nWard H to ward D are 0 apart.\nWard H to ward E are 0 apart.\nWard H to ward F are 0 apart.\nWard H to ward G are 0 apart.\nWard H to ward I are 0 apart.\nWard I to ward A are 0 apart.\nWard I to ward B are 0 apart.\nWard I to ward C are 0 apart.\nWard I to ward D are 0 apart.\nWard I to ward E are 0 apart.\nWard I to ward F are 0 apart.\nWard I to ward G are 0 apart.\nWard I to ward H are 0 apart.\nTeam F1 sends 84 patients to team F2.\nTeam F1 sends 81 patients to team F3.\nTeam F1 sends 5 patients to team F4.\nTeam F1 sends 83 patients to team F5.\nTeam F1 sends 10 patients to team F6.\nTeam F1 sends 78 patients to team F7.\nTeam F1 sends 74 patients to team F8.\nTeam F1 sends 88 patients to team F9.\nTeam F2 sends 84 patients to team F1.\nTeam F2 sends 39 patients to team F3.\nTeam F2 sends 3 patients to team F4.\nTeam F2 sends 16 patients to team F5.\nTeam F2 sends 43 patients to team F6.\nTeam F2 sends 47 patients to team F7.\nTeam F2 sends 97 patients to team F8.\nTeam F2 sends 4 patients to team F9.\nTeam F3 sends 81 patients to team F1.\nTeam F3 sends 39 patients to team F2.\nTeam F3 sends 98 patients to team F4.\nTeam F3 sends 94 patients to team F5.\nTeam F3 sends 4 patients to team F6.\nTeam F3 sends 16 patients to team F7.\nTeam F3 sends 17 patients to team F8.\nTeam F3 sends 20 patients to team F9.\nTeam F4 sends 5 patients to team F1.\nTeam F4 sends 3 patients to team F2.\nTeam F4 sends 98 patients to team F3.\nTeam F4 sends 53 patients to team F5.\nTeam F4 sends 93 patients to team F6.\nTeam F4 sends 69 patients to team F7.\nTeam F4 sends 27 patients to team F8.\nTeam F4 sends 19 patients to team F9.\nTeam F5 sends 83 patients to team F1.\nTeam F5 sends 16 patients to team F2.\nTeam F5 sends 94 patients to team F3.\nTeam F5 sends 53 patients to team F4.\nTeam F5 sends 30 patients to team F6.\nTeam F5 sends 35 patients to team F7.\nTeam F5 sends 55 patients to team F8.\nTeam F5 sends 25 patients to team F9.\nTeam F6 sends 10 patients to team F1.\nTeam F6 sends 43 patients to team F2.\nTeam F6 sends 4 patients to team F3.\nTeam F6 sends 93 patients to team F4.\nTeam F6 sends 30 patients to team F5.\nTeam F6 sends 16 patients to team F7.\nTeam F6 sends 96 patients to team F8.\nTeam F6 sends 7 patients to team F9.\nTeam F7 sends 78 patients to team F1.\nTeam F7 sends 47 patients to team F2.\nTeam F7 sends 16 patients to team F3.\nTeam F7 sends 69 patients to team F4.\nTeam F7 sends 35 patients to team F5.\nTeam F7 sends 16 patients to team F6.\nTeam F7 sends 13 patients to team F8.\nTeam F7 sends 97 patients to team F9.\nTeam F8 sends 74 patients to team F1.\nTeam F8 sends 97 patients to team F2.\nTeam F8 sends 17 patients to team F3.\nTeam F8 sends 27 patients to team F4.\nTeam F8 sends 55 patients to team F5.\nTeam F8 sends 96 patients to team F6.\nTeam F8 sends 13 patients to team F7.\nTeam F8 sends 48 patients to team F9.\nTeam F9 sends 88 patients to team F1.\nTeam F9 sends 4 patients to team F2.\nTeam F9 sends 20 patients to team F3.\nTeam F9 sends 19 patients to team F4.\nTeam F9 sends 25 patients to team F5.\nTeam F9 sends 7 patients to team F6.\nTeam F9 sends 97 patients to team F7.\nTeam F9 sends 48 patients to team F8.\nThat’s everything—use these lists to compute the total patient-transfer × separation cost for layouts.\n\nIf you want to hand me the layout in a machine-friendly way, just use this simple JSON shape when you reply — keeps things tidy and quick to read.\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis just says: \"solution\" is the ordered list of ward IDs assigned to teams in the same order the instance lists the teams. The first entry is the ward for the first team, the second is for the second team, and so on. It’s just a template — not the real assignment.\n\nPlease make sure to use the exact identifiers that appear in the instance input — do not rename them or invent new labels.\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 12, 86, 0, 0, 0, 0, 0, 0 ], [ 12, 0, 0, 35, 0, 0, 0, 0, 0 ], [ 86, 0, 0, 0, 19, 0, 0, 0, 0 ], [ 0, 35, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 19, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 84, 81, 5, 83, 10, 78, 74, 88 ], [ 84, 0, 39, 3, 16, 43, 47, 97, 4 ], [ 81, 39, 0, 98, 94, 4, 16, 17, 20 ], [ 5, 3, 98, 0, 53, 93, 69, 27, 19 ], [ 83, 16, 94, 53, 0, 30, 35, 55, 25 ], [ 10, 43, 4, 93, 30, 0, 16, 96, 7 ], [ 78, 47, 16, 69, 35, 16, 0, 13, 97 ], [ 74, 97, 17, 27, 55, 96, 13, 0, 48 ], [ 88, 4, 20, 19, 25, 7, 97, 48, 0 ] ], "objective": 1250.0 }, "solution": [ 7, 2, 3, 4, 5, 1, 8, 6, 0 ], "obj": 1250.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 12 }, { "from_id": "A", "to_id": "C", "distance": 86 }, { "from_id": "A", "to_id": "D", "distance": 0 }, { "from_id": "A", "to_id": "E", "distance": 0 }, { "from_id": "A", "to_id": "F", "distance": 0 }, { "from_id": "A", "to_id": "G", "distance": 0 }, { "from_id": "A", "to_id": "H", "distance": 0 }, { "from_id": "A", "to_id": "I", "distance": 0 }, { "from_id": "B", "to_id": "A", "distance": 12 }, { "from_id": "B", "to_id": "C", "distance": 0 }, { "from_id": "B", "to_id": "D", "distance": 35 }, { "from_id": "B", "to_id": "E", "distance": 0 }, { "from_id": "B", "to_id": "F", "distance": 0 }, { "from_id": "B", "to_id": "G", "distance": 0 }, { "from_id": "B", "to_id": "H", "distance": 0 }, { "from_id": "B", "to_id": "I", "distance": 0 }, { "from_id": "C", "to_id": "A", "distance": 86 }, { "from_id": "C", "to_id": "B", "distance": 0 }, { "from_id": "C", "to_id": "D", "distance": 0 }, { "from_id": "C", "to_id": "E", "distance": 19 }, { "from_id": "C", "to_id": "F", "distance": 0 }, { "from_id": "C", "to_id": "G", "distance": 0 }, { "from_id": "C", "to_id": "H", "distance": 0 }, { "from_id": "C", "to_id": "I", "distance": 0 }, { "from_id": "D", "to_id": "A", "distance": 0 }, { "from_id": "D", "to_id": "B", "distance": 35 }, { "from_id": "D", "to_id": "C", "distance": 0 }, { "from_id": "D", "to_id": "E", "distance": 0 }, { "from_id": "D", "to_id": "F", "distance": 0 }, { "from_id": "D", "to_id": "G", "distance": 0 }, { "from_id": "D", "to_id": "H", "distance": 0 }, { "from_id": "D", "to_id": "I", "distance": 0 }, { "from_id": "E", "to_id": "A", "distance": 0 }, { "from_id": "E", "to_id": "B", "distance": 0 }, { "from_id": "E", "to_id": "C", "distance": 19 }, { "from_id": "E", "to_id": "D", "distance": 0 }, { "from_id": "E", "to_id": "F", "distance": 0 }, { "from_id": "E", "to_id": "G", "distance": 0 }, { "from_id": "E", "to_id": "H", "distance": 0 }, { "from_id": "E", "to_id": "I", "distance": 0 }, { "from_id": "F", "to_id": "A", "distance": 0 }, { "from_id": "F", "to_id": "B", "distance": 0 }, { "from_id": "F", "to_id": "C", "distance": 0 }, { "from_id": "F", "to_id": "D", "distance": 0 }, { "from_id": "F", "to_id": "E", "distance": 0 }, { "from_id": "F", "to_id": "G", "distance": 0 }, { "from_id": "F", "to_id": "H", "distance": 0 }, { "from_id": "F", "to_id": "I", "distance": 0 }, { "from_id": "G", "to_id": "A", "distance": 0 }, { "from_id": "G", "to_id": "B", "distance": 0 }, { "from_id": "G", "to_id": "C", "distance": 0 }, { "from_id": "G", "to_id": "D", "distance": 0 }, { "from_id": "G", "to_id": "E", "distance": 0 }, { "from_id": "G", "to_id": "F", "distance": 0 }, { "from_id": "G", "to_id": "H", "distance": 0 }, { "from_id": "G", "to_id": "I", "distance": 0 }, { "from_id": "H", "to_id": "A", "distance": 0 }, { "from_id": "H", "to_id": "B", "distance": 0 }, { "from_id": "H", "to_id": "C", "distance": 0 }, { "from_id": "H", "to_id": "D", "distance": 0 }, { "from_id": "H", "to_id": "E", "distance": 0 }, { "from_id": "H", "to_id": "F", "distance": 0 }, { "from_id": "H", "to_id": "G", "distance": 0 }, { "from_id": "H", "to_id": "I", "distance": 0 }, { "from_id": "I", "to_id": "A", "distance": 0 }, { "from_id": "I", "to_id": "B", "distance": 0 }, { "from_id": "I", "to_id": "C", "distance": 0 }, { "from_id": "I", "to_id": "D", "distance": 0 }, { "from_id": "I", "to_id": "E", "distance": 0 }, { "from_id": "I", "to_id": "F", "distance": 0 }, { "from_id": "I", "to_id": "G", "distance": 0 }, { "from_id": "I", "to_id": "H", "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 84 }, { "from_id": "F1", "to_id": "F3", "flow": 81 }, { "from_id": "F1", "to_id": "F4", "flow": 5 }, { "from_id": "F1", "to_id": "F5", "flow": 83 }, { "from_id": "F1", "to_id": "F6", "flow": 10 }, { "from_id": "F1", "to_id": "F7", "flow": 78 }, { "from_id": "F1", "to_id": "F8", "flow": 74 }, { "from_id": "F1", "to_id": "F9", "flow": 88 }, { "from_id": "F2", "to_id": "F1", "flow": 84 }, { "from_id": "F2", "to_id": "F3", "flow": 39 }, { "from_id": "F2", "to_id": "F4", "flow": 3 }, { "from_id": "F2", "to_id": "F5", "flow": 16 }, { "from_id": "F2", "to_id": "F6", "flow": 43 }, { "from_id": "F2", "to_id": "F7", "flow": 47 }, { "from_id": "F2", "to_id": "F8", "flow": 97 }, { "from_id": "F2", "to_id": "F9", "flow": 4 }, { "from_id": "F3", "to_id": "F1", "flow": 81 }, { "from_id": "F3", "to_id": "F2", "flow": 39 }, { "from_id": "F3", "to_id": "F4", "flow": 98 }, { "from_id": "F3", "to_id": "F5", "flow": 94 }, { "from_id": "F3", "to_id": "F6", "flow": 4 }, { "from_id": "F3", "to_id": "F7", "flow": 16 }, { "from_id": "F3", "to_id": "F8", "flow": 17 }, { "from_id": "F3", "to_id": "F9", "flow": 20 }, { "from_id": "F4", "to_id": "F1", "flow": 5 }, { "from_id": "F4", "to_id": "F2", "flow": 3 }, { "from_id": "F4", "to_id": "F3", "flow": 98 }, { "from_id": "F4", "to_id": "F5", "flow": 53 }, { "from_id": "F4", "to_id": "F6", "flow": 93 }, { "from_id": "F4", "to_id": "F7", "flow": 69 }, { "from_id": "F4", "to_id": "F8", "flow": 27 }, { "from_id": "F4", "to_id": "F9", "flow": 19 }, { "from_id": "F5", "to_id": "F1", "flow": 83 }, { "from_id": "F5", "to_id": "F2", "flow": 16 }, { "from_id": "F5", "to_id": "F3", "flow": 94 }, { "from_id": "F5", "to_id": "F4", "flow": 53 }, { "from_id": "F5", "to_id": "F6", "flow": 30 }, { "from_id": "F5", "to_id": "F7", "flow": 35 }, { "from_id": "F5", "to_id": "F8", "flow": 55 }, { "from_id": "F5", "to_id": "F9", "flow": 25 }, { "from_id": "F6", "to_id": "F1", "flow": 10 }, { "from_id": "F6", "to_id": "F2", "flow": 43 }, { "from_id": "F6", "to_id": "F3", "flow": 4 }, { "from_id": "F6", "to_id": "F4", "flow": 93 }, { "from_id": "F6", "to_id": "F5", "flow": 30 }, { "from_id": "F6", "to_id": "F7", "flow": 16 }, { "from_id": "F6", "to_id": "F8", "flow": 96 }, { "from_id": "F6", "to_id": "F9", "flow": 7 }, { "from_id": "F7", "to_id": "F1", "flow": 78 }, { "from_id": "F7", "to_id": "F2", "flow": 47 }, { "from_id": "F7", "to_id": "F3", "flow": 16 }, { "from_id": "F7", "to_id": "F4", "flow": 69 }, { "from_id": "F7", "to_id": "F5", "flow": 35 }, { "from_id": "F7", "to_id": "F6", "flow": 16 }, { "from_id": "F7", "to_id": "F8", "flow": 13 }, { "from_id": "F7", "to_id": "F9", "flow": 97 }, { "from_id": "F8", "to_id": "F1", "flow": 74 }, { "from_id": "F8", "to_id": "F2", "flow": 97 }, { "from_id": "F8", "to_id": "F3", "flow": 17 }, { "from_id": "F8", "to_id": "F4", "flow": 27 }, { "from_id": "F8", "to_id": "F5", "flow": 55 }, { "from_id": "F8", "to_id": "F6", "flow": 96 }, { "from_id": "F8", "to_id": "F7", "flow": 13 }, { "from_id": "F8", "to_id": "F9", "flow": 48 }, { "from_id": "F9", "to_id": "F1", "flow": 88 }, { "from_id": "F9", "to_id": "F2", "flow": 4 }, { "from_id": "F9", "to_id": "F3", "flow": 20 }, { "from_id": "F9", "to_id": "F4", "flow": 19 }, { "from_id": "F9", "to_id": "F5", "flow": 25 }, { "from_id": "F9", "to_id": "F6", "flow": 7 }, { "from_id": "F9", "to_id": "F7", "flow": 97 }, { "from_id": "F9", "to_id": "F8", "flow": 48 } ] }, "solution_variant": [ "H", "C", "D", "E", "F", "B", "I", "G", "A" ], "context_index": 22, "input_format": "nl", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "We’re reshuffling the aisles and have to decide which category goes into which dedicated shelf zone — one category per zone and every zone filled once. A good plan keeps category pairs that trade customers close together; you score any plan by going through all pairs, multiplying their mutual sales by the distance between the zones you put them in, and summing those values, so lower sums mean better groupings. The exact cross-sales figures and the map of zone distances are listed below.\n\nWe have 10 product categories F1, F2, F3, F4, F5, F6, F7, F8, F9, F10 and the same number of shelf zones 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 to assign.\nBetween zones 1 and 2, we measure a distance of 0.\nBetween zones 1 and 3, we measure a distance of 0.\nBetween zones 1 and 4, we measure a distance of 0.\nBetween zones 1 and 5, we measure a distance of 0.\nBetween zones 1 and 6, we measure a distance of 0.\nBetween zones 1 and 7, we measure a distance of 0.\nBetween zones 1 and 8, we measure a distance of 0.\nBetween zones 1 and 9, we measure a distance of 0.\nBetween zones 1 and 10, we measure a distance of 0.\nBetween zones 2 and 1, we measure a distance of 0.\nBetween zones 2 and 3, we measure a distance of 0.\nBetween zones 2 and 4, we measure a distance of 0.\nBetween zones 2 and 5, we measure a distance of 0.\nBetween zones 2 and 6, we measure a distance of 0.\nBetween zones 2 and 7, we measure a distance of 0.\nBetween zones 2 and 8, we measure a distance of 0.\nBetween zones 2 and 9, we measure a distance of 0.\nBetween zones 2 and 10, we measure a distance of 0.\nBetween zones 3 and 1, we measure a distance of 0.\nBetween zones 3 and 2, we measure a distance of 0.\nBetween zones 3 and 4, we measure a distance of 47.\nBetween zones 3 and 5, we measure a distance of 0.\nBetween zones 3 and 6, we measure a distance of 0.\nBetween zones 3 and 7, we measure a distance of 0.\nBetween zones 3 and 8, we measure a distance of 0.\nBetween zones 3 and 9, we measure a distance of 0.\nBetween zones 3 and 10, we measure a distance of 0.\nBetween zones 4 and 1, we measure a distance of 0.\nBetween zones 4 and 2, we measure a distance of 0.\nBetween zones 4 and 3, we measure a distance of 47.\nBetween zones 4 and 5, we measure a distance of 77.\nBetween zones 4 and 6, we measure a distance of 0.\nBetween zones 4 and 7, we measure a distance of 0.\nBetween zones 4 and 8, we measure a distance of 0.\nBetween zones 4 and 9, we measure a distance of 0.\nBetween zones 4 and 10, we measure a distance of 0.\nBetween zones 5 and 1, we measure a distance of 0.\nBetween zones 5 and 2, we measure a distance of 0.\nBetween zones 5 and 3, we measure a distance of 0.\nBetween zones 5 and 4, we measure a distance of 77.\nBetween zones 5 and 6, we measure a distance of 0.\nBetween zones 5 and 7, we measure a distance of 75.\nBetween zones 5 and 8, we measure a distance of 0.\nBetween zones 5 and 9, we measure a distance of 0.\nBetween zones 5 and 10, we measure a distance of 0.\nBetween zones 6 and 1, we measure a distance of 0.\nBetween zones 6 and 2, we measure a distance of 0.\nBetween zones 6 and 3, we measure a distance of 0.\nBetween zones 6 and 4, we measure a distance of 0.\nBetween zones 6 and 5, we measure a distance of 0.\nBetween zones 6 and 7, we measure a distance of 0.\nBetween zones 6 and 8, we measure a distance of 73.\nBetween zones 6 and 9, we measure a distance of 0.\nBetween zones 6 and 10, we measure a distance of 0.\nBetween zones 7 and 1, we measure a distance of 0.\nBetween zones 7 and 2, we measure a distance of 0.\nBetween zones 7 and 3, we measure a distance of 0.\nBetween zones 7 and 4, we measure a distance of 0.\nBetween zones 7 and 5, we measure a distance of 75.\nBetween zones 7 and 6, we measure a distance of 0.\nBetween zones 7 and 8, we measure a distance of 0.\nBetween zones 7 and 9, we measure a distance of 52.\nBetween zones 7 and 10, we measure a distance of 0.\nBetween zones 8 and 1, we measure a distance of 0.\nBetween zones 8 and 2, we measure a distance of 0.\nBetween zones 8 and 3, we measure a distance of 0.\nBetween zones 8 and 4, we measure a distance of 0.\nBetween zones 8 and 5, we measure a distance of 0.\nBetween zones 8 and 6, we measure a distance of 73.\nBetween zones 8 and 7, we measure a distance of 0.\nBetween zones 8 and 9, we measure a distance of 0.\nBetween zones 8 and 10, we measure a distance of 0.\nBetween zones 9 and 1, we measure a distance of 0.\nBetween zones 9 and 2, we measure a distance of 0.\nBetween zones 9 and 3, we measure a distance of 0.\nBetween zones 9 and 4, we measure a distance of 0.\nBetween zones 9 and 5, we measure a distance of 0.\nBetween zones 9 and 6, we measure a distance of 0.\nBetween zones 9 and 7, we measure a distance of 52.\nBetween zones 9 and 8, we measure a distance of 0.\nBetween zones 9 and 10, we measure a distance of 0.\nBetween zones 10 and 1, we measure a distance of 0.\nBetween zones 10 and 2, we measure a distance of 0.\nBetween zones 10 and 3, we measure a distance of 0.\nBetween zones 10 and 4, we measure a distance of 0.\nBetween zones 10 and 5, we measure a distance of 0.\nBetween zones 10 and 6, we measure a distance of 0.\nBetween zones 10 and 7, we measure a distance of 0.\nBetween zones 10 and 8, we measure a distance of 0.\nBetween zones 10 and 9, we measure a distance of 0.\nFrom category F1 to category F2, we record cross-sales of 5.\nFrom category F1 to category F3, we record cross-sales of 6.\nFrom category F1 to category F4, we record cross-sales of 2.\nFrom category F1 to category F5, we record cross-sales of 8.\nFrom category F1 to category F6, we record cross-sales of 4.\nFrom category F1 to category F7, we record cross-sales of 8.\nFrom category F1 to category F8, we record cross-sales of 7.\nFrom category F1 to category F9, we record cross-sales of 7.\nFrom category F1 to category F10, we record cross-sales of 1.\nFrom category F2 to category F1, we record cross-sales of 5.\nFrom category F2 to category F3, we record cross-sales of 9.\nFrom category F2 to category F4, we record cross-sales of 1.\nFrom category F2 to category F5, we record cross-sales of 6.\nFrom category F2 to category F6, we record cross-sales of 1.\nFrom category F2 to category F7, we record cross-sales of 1.\nFrom category F2 to category F8, we record cross-sales of 2.\nFrom category F2 to category F9, we record cross-sales of 2.\nFrom category F2 to category F10, we record cross-sales of 8.\nFrom category F3 to category F1, we record cross-sales of 6.\nFrom category F3 to category F2, we record cross-sales of 9.\nFrom category F3 to category F4, we record cross-sales of 1.\nFrom category F3 to category F5, we record cross-sales of 7.\nFrom category F3 to category F6, we record cross-sales of 3.\nFrom category F3 to category F7, we record cross-sales of 9.\nFrom category F3 to category F8, we record cross-sales of 4.\nFrom category F3 to category F9, we record cross-sales of 1.\nFrom category F3 to category F10, we record cross-sales of 1.\nFrom category F4 to category F1, we record cross-sales of 2.\nFrom category F4 to category F2, we record cross-sales of 1.\nFrom category F4 to category F3, we record cross-sales of 1.\nFrom category F4 to category F5, we record cross-sales of 3.\nFrom category F4 to category F6, we record cross-sales of 9.\nFrom category F4 to category F7, we record cross-sales of 3.\nFrom category F4 to category F8, we record cross-sales of 3.\nFrom category F4 to category F9, we record cross-sales of 6.\nFrom category F4 to category F10, we record cross-sales of 6.\nFrom category F5 to category F1, we record cross-sales of 8.\nFrom category F5 to category F2, we record cross-sales of 6.\nFrom category F5 to category F3, we record cross-sales of 7.\nFrom category F5 to category F4, we record cross-sales of 3.\nFrom category F5 to category F6, we record cross-sales of 8.\nFrom category F5 to category F7, we record cross-sales of 2.\nFrom category F5 to category F8, we record cross-sales of 7.\nFrom category F5 to category F9, we record cross-sales of 6.\nFrom category F5 to category F10, we record cross-sales of 1.\nFrom category F6 to category F1, we record cross-sales of 4.\nFrom category F6 to category F2, we record cross-sales of 1.\nFrom category F6 to category F3, we record cross-sales of 3.\nFrom category F6 to category F4, we record cross-sales of 9.\nFrom category F6 to category F5, we record cross-sales of 8.\nFrom category F6 to category F7, we record cross-sales of 4.\nFrom category F6 to category F8, we record cross-sales of 4.\nFrom category F6 to category F9, we record cross-sales of 2.\nFrom category F6 to category F10, we record cross-sales of 9.\nFrom category F7 to category F1, we record cross-sales of 8.\nFrom category F7 to category F2, we record cross-sales of 1.\nFrom category F7 to category F3, we record cross-sales of 9.\nFrom category F7 to category F4, we record cross-sales of 3.\nFrom category F7 to category F5, we record cross-sales of 2.\nFrom category F7 to category F6, we record cross-sales of 4.\nFrom category F7 to category F8, we record cross-sales of 3.\nFrom category F7 to category F9, we record cross-sales of 2.\nFrom category F7 to category F10, we record cross-sales of 8.\nFrom category F8 to category F1, we record cross-sales of 7.\nFrom category F8 to category F2, we record cross-sales of 2.\nFrom category F8 to category F3, we record cross-sales of 4.\nFrom category F8 to category F4, we record cross-sales of 3.\nFrom category F8 to category F5, we record cross-sales of 7.\nFrom category F8 to category F6, we record cross-sales of 4.\nFrom category F8 to category F7, we record cross-sales of 3.\nFrom category F8 to category F9, we record cross-sales of 4.\nFrom category F8 to category F10, we record cross-sales of 4.\nFrom category F9 to category F1, we record cross-sales of 7.\nFrom category F9 to category F2, we record cross-sales of 2.\nFrom category F9 to category F3, we record cross-sales of 1.\nFrom category F9 to category F4, we record cross-sales of 6.\nFrom category F9 to category F5, we record cross-sales of 6.\nFrom category F9 to category F6, we record cross-sales of 2.\nFrom category F9 to category F7, we record cross-sales of 2.\nFrom category F9 to category F8, we record cross-sales of 4.\nFrom category F9 to category F10, we record cross-sales of 9.\nFrom category F10 to category F1, we record cross-sales of 1.\nFrom category F10 to category F2, we record cross-sales of 8.\nFrom category F10 to category F3, we record cross-sales of 1.\nFrom category F10 to category F4, we record cross-sales of 6.\nFrom category F10 to category F5, we record cross-sales of 1.\nFrom category F10 to category F6, we record cross-sales of 9.\nFrom category F10 to category F7, we record cross-sales of 8.\nFrom category F10 to category F8, we record cross-sales of 4.\nFrom category F10 to category F9, we record cross-sales of 9.\nWe'll assign categories to minimize the total sum of cross-sales times zone distances.\n\nWhen you send your suggested shelving plan back, just drop it into a tiny JSON snippet like the one below — nothing fancy, just a straight list showing which zone each category goes into.\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis shows the mapping in order: the first entry is the zone you want for the first category, the second entry is the zone for the second category, and so on. Think of it like filling out a simple form — one slot per category.\n\nThis is only a sketch of the shape I expect, not your actual answer. Please use the exact identifiers from the instance input with no renaming or invented labels — no changing \"A1\" to \"aisle1\" or the like. \n\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 47, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 47, 0, 77, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 77, 0, 0, 75, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 73, 0, 0 ], [ 0, 0, 0, 0, 75, 0, 0, 0, 52, 0 ], [ 0, 0, 0, 0, 0, 73, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 52, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 5, 6, 2, 8, 4, 8, 7, 7, 1 ], [ 5, 0, 9, 1, 6, 1, 1, 2, 2, 8 ], [ 6, 9, 0, 1, 7, 3, 9, 4, 1, 1 ], [ 2, 1, 1, 0, 3, 9, 3, 3, 6, 6 ], [ 8, 6, 7, 3, 0, 8, 2, 7, 6, 1 ], [ 4, 1, 3, 9, 8, 0, 4, 4, 2, 9 ], [ 8, 1, 9, 3, 2, 4, 0, 3, 2, 8 ], [ 7, 2, 4, 3, 7, 4, 3, 0, 4, 4 ], [ 7, 2, 1, 6, 6, 2, 2, 4, 0, 9 ], [ 1, 8, 1, 6, 1, 9, 8, 4, 9, 0 ] ], "objective": 648.0 }, "solution": [ 1, 3, 6, 4, 5, 2, 9, 0, 8, 7 ], "obj": 648.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 0 }, { "from_id": 1, "to_id": 3, "distance": 0 }, { "from_id": 1, "to_id": 4, "distance": 0 }, { "from_id": 1, "to_id": 5, "distance": 0 }, { "from_id": 1, "to_id": 6, "distance": 0 }, { "from_id": 1, "to_id": 7, "distance": 0 }, { "from_id": 1, "to_id": 8, "distance": 0 }, { "from_id": 1, "to_id": 9, "distance": 0 }, { "from_id": 1, "to_id": 10, "distance": 0 }, { "from_id": 2, "to_id": 1, "distance": 0 }, { "from_id": 2, "to_id": 3, "distance": 0 }, { "from_id": 2, "to_id": 4, "distance": 0 }, { "from_id": 2, "to_id": 5, "distance": 0 }, { "from_id": 2, "to_id": 6, "distance": 0 }, { "from_id": 2, "to_id": 7, "distance": 0 }, { "from_id": 2, "to_id": 8, "distance": 0 }, { "from_id": 2, "to_id": 9, "distance": 0 }, { "from_id": 2, "to_id": 10, "distance": 0 }, { "from_id": 3, "to_id": 1, "distance": 0 }, { "from_id": 3, "to_id": 2, "distance": 0 }, { "from_id": 3, "to_id": 4, "distance": 47 }, { "from_id": 3, "to_id": 5, "distance": 0 }, { "from_id": 3, "to_id": 6, "distance": 0 }, { "from_id": 3, "to_id": 7, "distance": 0 }, { "from_id": 3, "to_id": 8, "distance": 0 }, { "from_id": 3, "to_id": 9, "distance": 0 }, { "from_id": 3, "to_id": 10, "distance": 0 }, { "from_id": 4, "to_id": 1, "distance": 0 }, { "from_id": 4, "to_id": 2, "distance": 0 }, { "from_id": 4, "to_id": 3, "distance": 47 }, { "from_id": 4, "to_id": 5, "distance": 77 }, { "from_id": 4, "to_id": 6, "distance": 0 }, { "from_id": 4, "to_id": 7, "distance": 0 }, { "from_id": 4, "to_id": 8, "distance": 0 }, { "from_id": 4, "to_id": 9, "distance": 0 }, { "from_id": 4, "to_id": 10, "distance": 0 }, { "from_id": 5, "to_id": 1, "distance": 0 }, { "from_id": 5, "to_id": 2, "distance": 0 }, { "from_id": 5, "to_id": 3, "distance": 0 }, { "from_id": 5, "to_id": 4, "distance": 77 }, { "from_id": 5, "to_id": 6, "distance": 0 }, { "from_id": 5, "to_id": 7, "distance": 75 }, { "from_id": 5, "to_id": 8, "distance": 0 }, { "from_id": 5, "to_id": 9, "distance": 0 }, { "from_id": 5, "to_id": 10, "distance": 0 }, { "from_id": 6, "to_id": 1, "distance": 0 }, { "from_id": 6, "to_id": 2, "distance": 0 }, { "from_id": 6, "to_id": 3, "distance": 0 }, { "from_id": 6, "to_id": 4, "distance": 0 }, { "from_id": 6, "to_id": 5, "distance": 0 }, { "from_id": 6, "to_id": 7, "distance": 0 }, { "from_id": 6, "to_id": 8, "distance": 73 }, { "from_id": 6, "to_id": 9, "distance": 0 }, { "from_id": 6, "to_id": 10, "distance": 0 }, { "from_id": 7, "to_id": 1, "distance": 0 }, { "from_id": 7, "to_id": 2, "distance": 0 }, { "from_id": 7, "to_id": 3, "distance": 0 }, { "from_id": 7, "to_id": 4, "distance": 0 }, { "from_id": 7, "to_id": 5, "distance": 75 }, { "from_id": 7, "to_id": 6, "distance": 0 }, { "from_id": 7, "to_id": 8, "distance": 0 }, { "from_id": 7, "to_id": 9, "distance": 52 }, { "from_id": 7, "to_id": 10, "distance": 0 }, { "from_id": 8, "to_id": 1, "distance": 0 }, { "from_id": 8, "to_id": 2, "distance": 0 }, { "from_id": 8, "to_id": 3, "distance": 0 }, { "from_id": 8, "to_id": 4, "distance": 0 }, { "from_id": 8, "to_id": 5, "distance": 0 }, { "from_id": 8, "to_id": 6, "distance": 73 }, { "from_id": 8, "to_id": 7, "distance": 0 }, { "from_id": 8, "to_id": 9, "distance": 0 }, { "from_id": 8, "to_id": 10, "distance": 0 }, { "from_id": 9, "to_id": 1, "distance": 0 }, { "from_id": 9, "to_id": 2, "distance": 0 }, { "from_id": 9, "to_id": 3, "distance": 0 }, { "from_id": 9, "to_id": 4, "distance": 0 }, { "from_id": 9, "to_id": 5, "distance": 0 }, { "from_id": 9, "to_id": 6, "distance": 0 }, { "from_id": 9, "to_id": 7, "distance": 52 }, { "from_id": 9, "to_id": 8, "distance": 0 }, { "from_id": 9, "to_id": 10, "distance": 0 }, { "from_id": 10, "to_id": 1, "distance": 0 }, { "from_id": 10, "to_id": 2, "distance": 0 }, { "from_id": 10, "to_id": 3, "distance": 0 }, { "from_id": 10, "to_id": 4, "distance": 0 }, { "from_id": 10, "to_id": 5, "distance": 0 }, { "from_id": 10, "to_id": 6, "distance": 0 }, { "from_id": 10, "to_id": 7, "distance": 0 }, { "from_id": 10, "to_id": 8, "distance": 0 }, { "from_id": 10, "to_id": 9, "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 5 }, { "from_id": "F1", "to_id": "F3", "flow": 6 }, { "from_id": "F1", "to_id": "F4", "flow": 2 }, { "from_id": "F1", "to_id": "F5", "flow": 8 }, { "from_id": "F1", "to_id": "F6", "flow": 4 }, { "from_id": "F1", "to_id": "F7", "flow": 8 }, { "from_id": "F1", "to_id": "F8", "flow": 7 }, { "from_id": "F1", "to_id": "F9", "flow": 7 }, { "from_id": "F1", "to_id": "F10", "flow": 1 }, { "from_id": "F2", "to_id": "F1", "flow": 5 }, { "from_id": "F2", "to_id": "F3", "flow": 9 }, { "from_id": "F2", "to_id": "F4", "flow": 1 }, { "from_id": "F2", "to_id": "F5", "flow": 6 }, { "from_id": "F2", "to_id": "F6", "flow": 1 }, { "from_id": "F2", "to_id": "F7", "flow": 1 }, { "from_id": "F2", "to_id": "F8", "flow": 2 }, { "from_id": "F2", "to_id": "F9", "flow": 2 }, { "from_id": "F2", "to_id": "F10", "flow": 8 }, { "from_id": "F3", "to_id": "F1", "flow": 6 }, { "from_id": "F3", "to_id": "F2", "flow": 9 }, { "from_id": "F3", "to_id": "F4", "flow": 1 }, { "from_id": "F3", "to_id": "F5", "flow": 7 }, { "from_id": "F3", "to_id": "F6", "flow": 3 }, { "from_id": "F3", "to_id": "F7", "flow": 9 }, { "from_id": "F3", "to_id": "F8", "flow": 4 }, { "from_id": "F3", "to_id": "F9", "flow": 1 }, { "from_id": "F3", "to_id": "F10", "flow": 1 }, { "from_id": "F4", "to_id": "F1", "flow": 2 }, { "from_id": "F4", "to_id": "F2", "flow": 1 }, { "from_id": "F4", "to_id": "F3", "flow": 1 }, { "from_id": "F4", "to_id": "F5", "flow": 3 }, { "from_id": "F4", "to_id": "F6", "flow": 9 }, { "from_id": "F4", "to_id": "F7", "flow": 3 }, { "from_id": "F4", "to_id": "F8", "flow": 3 }, { "from_id": "F4", "to_id": "F9", "flow": 6 }, { "from_id": "F4", "to_id": "F10", "flow": 6 }, { "from_id": "F5", "to_id": "F1", "flow": 8 }, { "from_id": "F5", "to_id": "F2", "flow": 6 }, { "from_id": "F5", "to_id": "F3", "flow": 7 }, { "from_id": "F5", "to_id": "F4", "flow": 3 }, { "from_id": "F5", "to_id": "F6", "flow": 8 }, { "from_id": "F5", "to_id": "F7", "flow": 2 }, { "from_id": "F5", "to_id": "F8", "flow": 7 }, { "from_id": "F5", "to_id": "F9", "flow": 6 }, { "from_id": "F5", "to_id": "F10", "flow": 1 }, { "from_id": "F6", "to_id": "F1", "flow": 4 }, { "from_id": "F6", "to_id": "F2", "flow": 1 }, { "from_id": "F6", "to_id": "F3", "flow": 3 }, { "from_id": "F6", "to_id": "F4", "flow": 9 }, { "from_id": "F6", "to_id": "F5", "flow": 8 }, { "from_id": "F6", "to_id": "F7", "flow": 4 }, { "from_id": "F6", "to_id": "F8", "flow": 4 }, { "from_id": "F6", "to_id": "F9", "flow": 2 }, { "from_id": "F6", "to_id": "F10", "flow": 9 }, { "from_id": "F7", "to_id": "F1", "flow": 8 }, { "from_id": "F7", "to_id": "F2", "flow": 1 }, { "from_id": "F7", "to_id": "F3", "flow": 9 }, { "from_id": "F7", "to_id": "F4", "flow": 3 }, { "from_id": "F7", "to_id": "F5", "flow": 2 }, { "from_id": "F7", "to_id": "F6", "flow": 4 }, { "from_id": "F7", "to_id": "F8", "flow": 3 }, { "from_id": "F7", "to_id": "F9", "flow": 2 }, { "from_id": "F7", "to_id": "F10", "flow": 8 }, { "from_id": "F8", "to_id": "F1", "flow": 7 }, { "from_id": "F8", "to_id": "F2", "flow": 2 }, { "from_id": "F8", "to_id": "F3", "flow": 4 }, { "from_id": "F8", "to_id": "F4", "flow": 3 }, { "from_id": "F8", "to_id": "F5", "flow": 7 }, { "from_id": "F8", "to_id": "F6", "flow": 4 }, { "from_id": "F8", "to_id": "F7", "flow": 3 }, { "from_id": "F8", "to_id": "F9", "flow": 4 }, { "from_id": "F8", "to_id": "F10", "flow": 4 }, { "from_id": "F9", "to_id": "F1", "flow": 7 }, { "from_id": "F9", "to_id": "F2", "flow": 2 }, { "from_id": "F9", "to_id": "F3", "flow": 1 }, { "from_id": "F9", "to_id": "F4", "flow": 6 }, { "from_id": "F9", "to_id": "F5", "flow": 6 }, { "from_id": "F9", "to_id": "F6", "flow": 2 }, { "from_id": "F9", "to_id": "F7", "flow": 2 }, { "from_id": "F9", "to_id": "F8", "flow": 4 }, { "from_id": "F9", "to_id": "F10", "flow": 9 }, { "from_id": "F10", "to_id": "F1", "flow": 1 }, { "from_id": "F10", "to_id": "F2", "flow": 8 }, { "from_id": "F10", "to_id": "F3", "flow": 1 }, { "from_id": "F10", "to_id": "F4", "flow": 6 }, { "from_id": "F10", "to_id": "F5", "flow": 1 }, { "from_id": "F10", "to_id": "F6", "flow": 9 }, { "from_id": "F10", "to_id": "F7", "flow": 8 }, { "from_id": "F10", "to_id": "F8", "flow": 4 }, { "from_id": "F10", "to_id": "F9", "flow": 9 } ] }, "solution_variant": [ 2, 4, 7, 5, 6, 3, 10, 1, 9, 8 ], "context_index": 23, "input_format": "nl", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "We’ve got a stack of bands and a handful of stages, and the job is to match each band to a single stage in a way that keeps crews and gear movement to a minimum. Picture checking every pair of bands, seeing how much crew or kit they need in common, multiplying that by the distance between their assigned stages, and summing all those results — a smaller sum means less lugging and fewer crossover headaches. Each band gets one stage and each stage gets only one band. The exact acts, distances, and shared-resource numbers are listed below.\n\n# num_bands_and_stages=9\n# bands_list=F1, F2, F3, F4, F5, F6, F7, F8, F9\n# stages_list=A, B, C, D, E, F, G, H, I\n\nstage_from_id,stage_to_id,stage_distance\nA,B,0\nA,C,0\nA,D,0\nA,E,0\nA,F,0\nA,G,0\nA,H,0\nA,I,0\nB,A,0\nB,C,0\nB,D,0\nB,E,0\nB,F,0\nB,G,0\nB,H,0\nB,I,0\nC,A,0\nC,B,0\nC,D,0\nC,E,0\nC,F,0\nC,G,0\nC,H,0\nC,I,0\nD,A,0\nD,B,0\nD,C,0\nD,E,0\nD,F,0\nD,G,0\nD,H,0\nD,I,0\nE,A,0\nE,B,0\nE,C,0\nE,D,0\nE,F,0\nE,G,0\nE,H,10\nE,I,0\nF,A,0\nF,B,0\nF,C,0\nF,D,0\nF,E,0\nF,G,0\nF,H,0\nF,I,20\nG,A,0\nG,B,0\nG,C,0\nG,D,0\nG,E,0\nG,F,0\nG,H,0\nG,I,0\nH,A,0\nH,B,0\nH,C,0\nH,D,0\nH,E,10\nH,F,0\nH,G,0\nH,I,0\nI,A,0\nI,B,0\nI,C,0\nI,D,0\nI,E,0\nI,F,20\nI,G,0\nI,H,0\n\nband_from_id,band_to_id,shared_resource_flow\nF1,F2,12\nF1,F3,10\nF1,F4,50\nF1,F5,38\nF1,F6,13\nF1,F7,19\nF1,F8,24\nF1,F9,13\nF2,F1,12\nF2,F3,10\nF2,F4,14\nF2,F5,80\nF2,F6,52\nF2,F7,12\nF2,F8,14\nF2,F9,39\nF3,F1,10\nF3,F2,10\nF3,F4,30\nF3,F5,12\nF3,F6,26\nF3,F7,37\nF3,F8,14\nF3,F9,19\nF4,F1,50\nF4,F2,14\nF4,F3,30\nF4,F5,33\nF4,F6,27\nF4,F7,15\nF4,F8,19\nF4,F9,20\nF5,F1,38\nF5,F2,80\nF5,F3,12\nF5,F4,33\nF5,F6,50\nF5,F7,44\nF5,F8,31\nF5,F9,13\nF6,F1,13\nF6,F2,52\nF6,F3,26\nF6,F4,27\nF6,F5,50\nF6,F7,24\nF6,F8,39\nF6,F9,12\nF7,F1,19\nF7,F2,12\nF7,F3,37\nF7,F4,15\nF7,F5,44\nF7,F6,24\nF7,F8,29\nF7,F9,14\nF8,F1,24\nF8,F2,14\nF8,F3,14\nF8,F4,19\nF8,F5,31\nF8,F6,39\nF8,F7,29\nF8,F9,16\nF9,F1,13\nF9,F2,39\nF9,F3,19\nF9,F4,20\nF9,F5,13\nF9,F6,12\nF9,F7,14\nF9,F8,16\n\nOh, and when you send back the matching, please use this simple JSON layout so it's easy to read by whatever's checking it:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of \"solution\" as just a list: the first item is the stage (location) you pick for the first band (facility), the second item is the stage for the second band, and so on down the line. Super informal — it's just a form showing who goes where.\n\nThis JSON is only a sketch of the shape I need, not your final answer. Please use the exact identifiers from the instance input — don't rename them and don't invent new labels. \n\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 10, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 20 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 10, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 20, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 12, 10, 50, 38, 13, 19, 24, 13 ], [ 12, 0, 10, 14, 80, 52, 12, 14, 39 ], [ 10, 10, 0, 30, 12, 26, 37, 14, 19 ], [ 50, 14, 30, 0, 33, 27, 15, 19, 20 ], [ 38, 80, 12, 33, 0, 50, 44, 31, 13 ], [ 13, 52, 26, 27, 50, 0, 24, 39, 12 ], [ 19, 12, 37, 15, 44, 24, 0, 29, 14 ], [ 24, 14, 14, 19, 31, 39, 29, 0, 16 ], [ 13, 39, 19, 20, 13, 12, 14, 16, 0 ] ], "objective": 640.0 }, "solution": [ 6, 5, 8, 1, 2, 7, 0, 3, 4 ], "obj": 640.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 0 }, { "from_id": "A", "to_id": "C", "distance": 0 }, { "from_id": "A", "to_id": "D", "distance": 0 }, { "from_id": "A", "to_id": "E", "distance": 0 }, { "from_id": "A", "to_id": "F", "distance": 0 }, { "from_id": "A", "to_id": "G", "distance": 0 }, { "from_id": "A", "to_id": "H", "distance": 0 }, { "from_id": "A", "to_id": "I", "distance": 0 }, { "from_id": "B", "to_id": "A", "distance": 0 }, { "from_id": "B", "to_id": "C", "distance": 0 }, { "from_id": "B", "to_id": "D", "distance": 0 }, { "from_id": "B", "to_id": "E", "distance": 0 }, { "from_id": "B", "to_id": "F", "distance": 0 }, { "from_id": "B", "to_id": "G", "distance": 0 }, { "from_id": "B", "to_id": "H", "distance": 0 }, { "from_id": "B", "to_id": "I", "distance": 0 }, { "from_id": "C", "to_id": "A", "distance": 0 }, { "from_id": "C", "to_id": "B", "distance": 0 }, { "from_id": "C", "to_id": "D", "distance": 0 }, { "from_id": "C", "to_id": "E", "distance": 0 }, { "from_id": "C", "to_id": "F", "distance": 0 }, { "from_id": "C", "to_id": "G", "distance": 0 }, { "from_id": "C", "to_id": "H", "distance": 0 }, { "from_id": "C", "to_id": "I", "distance": 0 }, { "from_id": "D", "to_id": "A", "distance": 0 }, { "from_id": "D", "to_id": "B", "distance": 0 }, { "from_id": "D", "to_id": "C", "distance": 0 }, { "from_id": "D", "to_id": "E", "distance": 0 }, { "from_id": "D", "to_id": "F", "distance": 0 }, { "from_id": "D", "to_id": "G", "distance": 0 }, { "from_id": "D", "to_id": "H", "distance": 0 }, { "from_id": "D", "to_id": "I", "distance": 0 }, { "from_id": "E", "to_id": "A", "distance": 0 }, { "from_id": "E", "to_id": "B", "distance": 0 }, { "from_id": "E", "to_id": "C", "distance": 0 }, { "from_id": "E", "to_id": "D", "distance": 0 }, { "from_id": "E", "to_id": "F", "distance": 0 }, { "from_id": "E", "to_id": "G", "distance": 0 }, { "from_id": "E", "to_id": "H", "distance": 10 }, { "from_id": "E", "to_id": "I", "distance": 0 }, { "from_id": "F", "to_id": "A", "distance": 0 }, { "from_id": "F", "to_id": "B", "distance": 0 }, { "from_id": "F", "to_id": "C", "distance": 0 }, { "from_id": "F", "to_id": "D", "distance": 0 }, { "from_id": "F", "to_id": "E", "distance": 0 }, { "from_id": "F", "to_id": "G", "distance": 0 }, { "from_id": "F", "to_id": "H", "distance": 0 }, { "from_id": "F", "to_id": "I", "distance": 20 }, { "from_id": "G", "to_id": "A", "distance": 0 }, { "from_id": "G", "to_id": "B", "distance": 0 }, { "from_id": "G", "to_id": "C", "distance": 0 }, { "from_id": "G", "to_id": "D", "distance": 0 }, { "from_id": "G", "to_id": "E", "distance": 0 }, { "from_id": "G", "to_id": "F", "distance": 0 }, { "from_id": "G", "to_id": "H", "distance": 0 }, { "from_id": "G", "to_id": "I", "distance": 0 }, { "from_id": "H", "to_id": "A", "distance": 0 }, { "from_id": "H", "to_id": "B", "distance": 0 }, { "from_id": "H", "to_id": "C", "distance": 0 }, { "from_id": "H", "to_id": "D", "distance": 0 }, { "from_id": "H", "to_id": "E", "distance": 10 }, { "from_id": "H", "to_id": "F", "distance": 0 }, { "from_id": "H", "to_id": "G", "distance": 0 }, { "from_id": "H", "to_id": "I", "distance": 0 }, { "from_id": "I", "to_id": "A", "distance": 0 }, { "from_id": "I", "to_id": "B", "distance": 0 }, { "from_id": "I", "to_id": "C", "distance": 0 }, { "from_id": "I", "to_id": "D", "distance": 0 }, { "from_id": "I", "to_id": "E", "distance": 0 }, { "from_id": "I", "to_id": "F", "distance": 20 }, { "from_id": "I", "to_id": "G", "distance": 0 }, { "from_id": "I", "to_id": "H", "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 12 }, { "from_id": "F1", "to_id": "F3", "flow": 10 }, { "from_id": "F1", "to_id": "F4", "flow": 50 }, { "from_id": "F1", "to_id": "F5", "flow": 38 }, { "from_id": "F1", "to_id": "F6", "flow": 13 }, { "from_id": "F1", "to_id": "F7", "flow": 19 }, { "from_id": "F1", "to_id": "F8", "flow": 24 }, { "from_id": "F1", "to_id": "F9", "flow": 13 }, { "from_id": "F2", "to_id": "F1", "flow": 12 }, { "from_id": "F2", "to_id": "F3", "flow": 10 }, { "from_id": "F2", "to_id": "F4", "flow": 14 }, { "from_id": "F2", "to_id": "F5", "flow": 80 }, { "from_id": "F2", "to_id": "F6", "flow": 52 }, { "from_id": "F2", "to_id": "F7", "flow": 12 }, { "from_id": "F2", "to_id": "F8", "flow": 14 }, { "from_id": "F2", "to_id": "F9", "flow": 39 }, { "from_id": "F3", "to_id": "F1", "flow": 10 }, { "from_id": "F3", "to_id": "F2", "flow": 10 }, { "from_id": "F3", "to_id": "F4", "flow": 30 }, { "from_id": "F3", "to_id": "F5", "flow": 12 }, { "from_id": "F3", "to_id": "F6", "flow": 26 }, { "from_id": "F3", "to_id": "F7", "flow": 37 }, { "from_id": "F3", "to_id": "F8", "flow": 14 }, { "from_id": "F3", "to_id": "F9", "flow": 19 }, { "from_id": "F4", "to_id": "F1", "flow": 50 }, { "from_id": "F4", "to_id": "F2", "flow": 14 }, { "from_id": "F4", "to_id": "F3", "flow": 30 }, { "from_id": "F4", "to_id": "F5", "flow": 33 }, { "from_id": "F4", "to_id": "F6", "flow": 27 }, { "from_id": "F4", "to_id": "F7", "flow": 15 }, { "from_id": "F4", "to_id": "F8", "flow": 19 }, { "from_id": "F4", "to_id": "F9", "flow": 20 }, { "from_id": "F5", "to_id": "F1", "flow": 38 }, { "from_id": "F5", "to_id": "F2", "flow": 80 }, { "from_id": "F5", "to_id": "F3", "flow": 12 }, { "from_id": "F5", "to_id": "F4", "flow": 33 }, { "from_id": "F5", "to_id": "F6", "flow": 50 }, { "from_id": "F5", "to_id": "F7", "flow": 44 }, { "from_id": "F5", "to_id": "F8", "flow": 31 }, { "from_id": "F5", "to_id": "F9", "flow": 13 }, { "from_id": "F6", "to_id": "F1", "flow": 13 }, { "from_id": "F6", "to_id": "F2", "flow": 52 }, { "from_id": "F6", "to_id": "F3", "flow": 26 }, { "from_id": "F6", "to_id": "F4", "flow": 27 }, { "from_id": "F6", "to_id": "F5", "flow": 50 }, { "from_id": "F6", "to_id": "F7", "flow": 24 }, { "from_id": "F6", "to_id": "F8", "flow": 39 }, { "from_id": "F6", "to_id": "F9", "flow": 12 }, { "from_id": "F7", "to_id": "F1", "flow": 19 }, { "from_id": "F7", "to_id": "F2", "flow": 12 }, { "from_id": "F7", "to_id": "F3", "flow": 37 }, { "from_id": "F7", "to_id": "F4", "flow": 15 }, { "from_id": "F7", "to_id": "F5", "flow": 44 }, { "from_id": "F7", "to_id": "F6", "flow": 24 }, { "from_id": "F7", "to_id": "F8", "flow": 29 }, { "from_id": "F7", "to_id": "F9", "flow": 14 }, { "from_id": "F8", "to_id": "F1", "flow": 24 }, { "from_id": "F8", "to_id": "F2", "flow": 14 }, { "from_id": "F8", "to_id": "F3", "flow": 14 }, { "from_id": "F8", "to_id": "F4", "flow": 19 }, { "from_id": "F8", "to_id": "F5", "flow": 31 }, { "from_id": "F8", "to_id": "F6", "flow": 39 }, { "from_id": "F8", "to_id": "F7", "flow": 29 }, { "from_id": "F8", "to_id": "F9", "flow": 16 }, { "from_id": "F9", "to_id": "F1", "flow": 13 }, { "from_id": "F9", "to_id": "F2", "flow": 39 }, { "from_id": "F9", "to_id": "F3", "flow": 19 }, { "from_id": "F9", "to_id": "F4", "flow": 20 }, { "from_id": "F9", "to_id": "F5", "flow": 13 }, { "from_id": "F9", "to_id": "F6", "flow": 12 }, { "from_id": "F9", "to_id": "F7", "flow": 14 }, { "from_id": "F9", "to_id": "F8", "flow": 16 } ] }, "solution_variant": [ "G", "F", "I", "B", "C", "H", "A", "D", "E" ], "context_index": 24, "input_format": "csv", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "I’m picturing a campus office where someone has to put each research group into one of the available lab rooms so that groups who work together a lot end up near each other. The rule is simple: every group gets one unique room and every room gets exactly one group — no duplicates and no empty slots. To judge any layout, take every pair of groups, multiply how much they collaborate by how far apart their assigned rooms are, and add all those products together; lower totals mean a friendlier setup. The concrete details are shown below.\n\nThere are 11 groups and rooms; the group ids are F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11 and the room ids are A, B, C, D, E, F, G, H, I, J, K.\n\n| room_from | room_to | room_distance |\n|---|---|---|\n| A | B | 36 |\n| A | C | 49 |\n| A | D | 29 |\n| A | E | 65 |\n| A | F | 6 |\n| A | G | 12 |\n| A | H | 18 |\n| A | I | 11 |\n| A | J | 34 |\n| A | K | 15 |\n| B | A | 37 |\n| B | C | 21 |\n| B | D | 8 |\n| B | E | 62 |\n| B | F | 46 |\n| B | G | 45 |\n| B | H | 0 |\n| B | I | 4 |\n| B | J | 32 |\n| B | K | 46 |\n| C | A | 49 |\n| C | B | 21 |\n| C | D | 59 |\n| C | E | 6 |\n| C | F | 33 |\n| C | G | 9 |\n| C | H | 17 |\n| C | I | 64 |\n| C | J | 51 |\n| C | K | 21 |\n| D | A | 31 |\n| D | B | 8 |\n| D | C | 58 |\n| D | E | 65 |\n| D | F | 57 |\n| D | G | 51 |\n| D | H | 13 |\n| D | I | 12 |\n| D | J | 25 |\n| D | K | 29 |\n| E | A | 65 |\n| E | B | 61 |\n| E | C | 7 |\n| E | D | 65 |\n| E | F | 41 |\n| E | G | 0 |\n| E | H | 44 |\n| E | I | 22 |\n| E | J | 24 |\n| E | K | 14 |\n| F | A | 6 |\n| F | B | 47 |\n| F | C | 33 |\n| F | D | 57 |\n| F | E | 41 |\n| F | G | 13 |\n| F | H | 47 |\n| F | I | 67 |\n| F | J | 35 |\n| F | K | 29 |\n| G | A | 12 |\n| G | B | 46 |\n| G | C | 9 |\n| G | D | 51 |\n| G | E | 0 |\n| G | F | 13 |\n| G | H | 5 |\n| G | I | 65 |\n| G | J | 26 |\n| G | K | 53 |\n| H | A | 19 |\n| H | B | 0 |\n| H | C | 17 |\n| H | D | 14 |\n| H | E | 44 |\n| H | F | 47 |\n| H | G | 5 |\n| H | I | 41 |\n| H | J | 52 |\n| H | K | 26 |\n| I | A | 11 |\n| I | B | 4 |\n| I | C | 63 |\n| I | D | 11 |\n| I | E | 23 |\n| I | F | 67 |\n| I | G | 65 |\n| I | H | 41 |\n| I | J | 6 |\n| I | K | 35 |\n| J | A | 35 |\n| J | B | 32 |\n| J | C | 51 |\n| J | D | 26 |\n| J | E | 24 |\n| J | F | 35 |\n| J | G | 25 |\n| J | H | 51 |\n| J | I | 6 |\n| J | K | 66 |\n| K | A | 15 |\n| K | B | 45 |\n| K | C | 21 |\n| K | D | 29 |\n| K | E | 14 |\n| K | F | 29 |\n| K | G | 53 |\n| K | H | 26 |\n| K | I | 34 |\n| K | J | 66 |\n\n| group_from | group_to | collaboration_flow |\n|---|---|---|\n| F1 | F2 | 35 |\n| F1 | F3 | 28 |\n| F1 | F4 | 38 |\n| F1 | F5 | 13 |\n| F1 | F6 | 56 |\n| F1 | F7 | 50 |\n| F1 | F8 | 46 |\n| F1 | F9 | 50 |\n| F1 | F10 | 36 |\n| F1 | F11 | 48 |\n| F2 | F1 | 35 |\n| F2 | F3 | 44 |\n| F2 | F4 | 54 |\n| F2 | F5 | 18 |\n| F2 | F6 | 29 |\n| F2 | F7 | 30 |\n| F2 | F8 | 65 |\n| F2 | F9 | 58 |\n| F2 | F10 | 37 |\n| F2 | F11 | 30 |\n| F3 | F1 | 28 |\n| F3 | F2 | 44 |\n| F3 | F4 | 21 |\n| F3 | F5 | 55 |\n| F3 | F6 | 37 |\n| F3 | F7 | 52 |\n| F3 | F8 | 47 |\n| F3 | F9 | 15 |\n| F3 | F10 | 26 |\n| F3 | F11 | 44 |\n| F4 | F1 | 38 |\n| F4 | F2 | 54 |\n| F4 | F3 | 21 |\n| F4 | F5 | 13 |\n| F4 | F6 | 22 |\n| F4 | F7 | 27 |\n| F4 | F8 | 49 |\n| F4 | F9 | 50 |\n| F4 | F10 | 41 |\n| F4 | F11 | 39 |\n| F5 | F1 | 13 |\n| F5 | F2 | 18 |\n| F5 | F3 | 55 |\n| F5 | F4 | 13 |\n| F5 | F6 | 33 |\n| F5 | F7 | 69 |\n| F5 | F8 | 31 |\n| F5 | F9 | 43 |\n| F5 | F10 | 42 |\n| F5 | F11 | 49 |\n| F6 | F1 | 56 |\n| F6 | F2 | 29 |\n| F6 | F3 | 37 |\n| F6 | F4 | 22 |\n| F6 | F5 | 33 |\n| F6 | F7 | 49 |\n| F6 | F8 | 29 |\n| F6 | F9 | 10 |\n| F6 | F10 | 36 |\n| F6 | F11 | 39 |\n| F7 | F1 | 50 |\n| F7 | F2 | 30 |\n| F7 | F3 | 52 |\n| F7 | F4 | 27 |\n| F7 | F5 | 69 |\n| F7 | F6 | 49 |\n| F7 | F8 | 57 |\n| F7 | F9 | 13 |\n| F7 | F10 | 41 |\n| F7 | F11 | 25 |\n| F8 | F1 | 46 |\n| F8 | F2 | 65 |\n| F8 | F3 | 47 |\n| F8 | F4 | 49 |\n| F8 | F5 | 31 |\n| F8 | F6 | 29 |\n| F8 | F7 | 57 |\n| F8 | F9 | 33 |\n| F8 | F10 | 26 |\n| F8 | F11 | 40 |\n| F9 | F1 | 50 |\n| F9 | F2 | 58 |\n| F9 | F3 | 15 |\n| F9 | F4 | 50 |\n| F9 | F5 | 43 |\n| F9 | F6 | 10 |\n| F9 | F7 | 13 |\n| F9 | F8 | 33 |\n| F9 | F10 | 56 |\n| F9 | F11 | 36 |\n| F10 | F1 | 36 |\n| F10 | F2 | 37 |\n| F10 | F3 | 26 |\n| F10 | F4 | 41 |\n| F10 | F5 | 42 |\n| F10 | F6 | 36 |\n| F10 | F7 | 41 |\n| F10 | F8 | 26 |\n| F10 | F9 | 56 |\n| F10 | F11 | 11 |\n| F11 | F1 | 48 |\n| F11 | F2 | 30 |\n| F11 | F3 | 44 |\n| F11 | F4 | 39 |\n| F11 | F5 | 49 |\n| F11 | F6 | 39 |\n| F11 | F7 | 25 |\n| F11 | F8 | 40 |\n| F11 | F9 | 36 |\n| F11 | F10 | 11 |\n\nI'll use these 11 entries to compute the layout friendliness by the rule above.\n\nIf you want to send back a suggested layout, just use this simple JSON shape so I know which room goes to which group:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\n\"solution\" is just a list: the first item is the room assigned to the first research group, the second item is the room for the second group, and so on. Treat this as a sketch of the expected shape — not the final assignment itself.\n\nPlease use the exact identifiers from the instance input — don't rename them or invent new ones. \nValid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 36, 49, 29, 65, 6, 12, 18, 11, 34, 15 ], [ 37, 0, 21, 8, 62, 46, 45, 0, 4, 32, 46 ], [ 49, 21, 0, 59, 6, 33, 9, 17, 64, 51, 21 ], [ 31, 8, 58, 0, 65, 57, 51, 13, 12, 25, 29 ], [ 65, 61, 7, 65, 0, 41, 0, 44, 22, 24, 14 ], [ 6, 47, 33, 57, 41, 0, 13, 47, 67, 35, 29 ], [ 12, 46, 9, 51, 0, 13, 0, 5, 65, 26, 53 ], [ 19, 0, 17, 14, 44, 47, 5, 0, 41, 52, 26 ], [ 11, 4, 63, 11, 23, 67, 65, 41, 0, 6, 35 ], [ 35, 32, 51, 26, 24, 35, 25, 51, 6, 0, 66 ], [ 15, 45, 21, 29, 14, 29, 53, 26, 34, 66, 0 ] ], "flow_matrix": [ [ 0, 35, 28, 38, 13, 56, 50, 46, 50, 36, 48 ], [ 35, 0, 44, 54, 18, 29, 30, 65, 58, 37, 30 ], [ 28, 44, 0, 21, 55, 37, 52, 47, 15, 26, 44 ], [ 38, 54, 21, 0, 13, 22, 27, 49, 50, 41, 39 ], [ 13, 18, 55, 13, 0, 33, 69, 31, 43, 42, 49 ], [ 56, 29, 37, 22, 33, 0, 49, 29, 10, 36, 39 ], [ 50, 30, 52, 27, 69, 49, 0, 57, 13, 41, 25 ], [ 46, 65, 47, 49, 31, 29, 57, 0, 33, 26, 40 ], [ 50, 58, 15, 50, 43, 10, 13, 33, 0, 56, 36 ], [ 36, 37, 26, 41, 42, 36, 41, 26, 56, 0, 11 ], [ 48, 30, 44, 39, 49, 39, 25, 40, 36, 11, 0 ] ], "objective": 102065.0 }, "solution": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "obj": 102065.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 11, "num_locations": 11, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 36 }, { "from_id": "A", "to_id": "C", "distance": 49 }, { "from_id": "A", "to_id": "D", "distance": 29 }, { "from_id": "A", "to_id": "E", "distance": 65 }, { "from_id": "A", "to_id": "F", "distance": 6 }, { "from_id": "A", "to_id": "G", "distance": 12 }, { "from_id": "A", "to_id": "H", "distance": 18 }, { "from_id": "A", "to_id": "I", "distance": 11 }, { "from_id": "A", "to_id": "J", "distance": 34 }, { "from_id": "A", "to_id": "K", "distance": 15 }, { "from_id": "B", "to_id": "A", "distance": 37 }, { "from_id": "B", "to_id": "C", "distance": 21 }, { "from_id": "B", "to_id": "D", "distance": 8 }, { "from_id": "B", "to_id": "E", "distance": 62 }, { "from_id": "B", "to_id": "F", "distance": 46 }, { "from_id": "B", "to_id": "G", "distance": 45 }, { "from_id": "B", "to_id": "H", "distance": 0 }, { "from_id": "B", "to_id": "I", "distance": 4 }, { "from_id": "B", "to_id": "J", "distance": 32 }, { "from_id": "B", "to_id": "K", "distance": 46 }, { "from_id": "C", "to_id": "A", "distance": 49 }, { "from_id": "C", "to_id": "B", "distance": 21 }, { "from_id": "C", "to_id": "D", "distance": 59 }, { "from_id": "C", "to_id": "E", "distance": 6 }, { "from_id": "C", "to_id": "F", "distance": 33 }, { "from_id": "C", "to_id": "G", "distance": 9 }, { "from_id": "C", "to_id": "H", "distance": 17 }, { "from_id": "C", "to_id": "I", "distance": 64 }, { "from_id": "C", "to_id": "J", "distance": 51 }, { "from_id": "C", "to_id": "K", "distance": 21 }, { "from_id": "D", "to_id": "A", "distance": 31 }, { "from_id": "D", "to_id": "B", "distance": 8 }, { "from_id": "D", "to_id": "C", "distance": 58 }, { "from_id": "D", "to_id": "E", "distance": 65 }, { "from_id": "D", "to_id": "F", "distance": 57 }, { "from_id": "D", "to_id": "G", "distance": 51 }, { "from_id": "D", "to_id": "H", "distance": 13 }, { "from_id": "D", "to_id": "I", "distance": 12 }, { "from_id": "D", "to_id": "J", "distance": 25 }, { "from_id": "D", "to_id": "K", "distance": 29 }, { "from_id": "E", "to_id": "A", "distance": 65 }, { "from_id": "E", "to_id": "B", "distance": 61 }, { "from_id": "E", "to_id": "C", "distance": 7 }, { "from_id": "E", "to_id": "D", "distance": 65 }, { "from_id": "E", "to_id": "F", "distance": 41 }, { "from_id": "E", "to_id": "G", "distance": 0 }, { "from_id": "E", "to_id": "H", "distance": 44 }, { "from_id": "E", "to_id": "I", "distance": 22 }, { "from_id": "E", "to_id": "J", "distance": 24 }, { "from_id": "E", "to_id": "K", "distance": 14 }, { "from_id": "F", "to_id": "A", "distance": 6 }, { "from_id": "F", "to_id": "B", "distance": 47 }, { "from_id": "F", "to_id": "C", "distance": 33 }, { "from_id": "F", "to_id": "D", "distance": 57 }, { "from_id": "F", "to_id": "E", "distance": 41 }, { "from_id": "F", "to_id": "G", "distance": 13 }, { "from_id": "F", "to_id": "H", "distance": 47 }, { "from_id": "F", "to_id": "I", "distance": 67 }, { "from_id": "F", "to_id": "J", "distance": 35 }, { "from_id": "F", "to_id": "K", "distance": 29 }, { "from_id": "G", "to_id": "A", "distance": 12 }, { "from_id": "G", "to_id": "B", "distance": 46 }, { "from_id": "G", "to_id": "C", "distance": 9 }, { "from_id": "G", "to_id": "D", "distance": 51 }, { "from_id": "G", "to_id": "E", "distance": 0 }, { "from_id": "G", "to_id": "F", "distance": 13 }, { "from_id": "G", "to_id": "H", "distance": 5 }, { "from_id": "G", "to_id": "I", "distance": 65 }, { "from_id": "G", "to_id": "J", "distance": 26 }, { "from_id": "G", "to_id": "K", "distance": 53 }, { "from_id": "H", "to_id": "A", "distance": 19 }, { "from_id": "H", "to_id": "B", "distance": 0 }, { "from_id": "H", "to_id": "C", "distance": 17 }, { "from_id": "H", "to_id": "D", "distance": 14 }, { "from_id": "H", "to_id": "E", "distance": 44 }, { "from_id": "H", "to_id": "F", "distance": 47 }, { "from_id": "H", "to_id": "G", "distance": 5 }, { "from_id": "H", "to_id": "I", "distance": 41 }, { "from_id": "H", "to_id": "J", "distance": 52 }, { "from_id": "H", "to_id": "K", "distance": 26 }, { "from_id": "I", "to_id": "A", "distance": 11 }, { "from_id": "I", "to_id": "B", "distance": 4 }, { "from_id": "I", "to_id": "C", "distance": 63 }, { "from_id": "I", "to_id": "D", "distance": 11 }, { "from_id": "I", "to_id": "E", "distance": 23 }, { "from_id": "I", "to_id": "F", "distance": 67 }, { "from_id": "I", "to_id": "G", "distance": 65 }, { "from_id": "I", "to_id": "H", "distance": 41 }, { "from_id": "I", "to_id": "J", "distance": 6 }, { "from_id": "I", "to_id": "K", "distance": 35 }, { "from_id": "J", "to_id": "A", "distance": 35 }, { "from_id": "J", "to_id": "B", "distance": 32 }, { "from_id": "J", "to_id": "C", "distance": 51 }, { "from_id": "J", "to_id": "D", "distance": 26 }, { "from_id": "J", "to_id": "E", "distance": 24 }, { "from_id": "J", "to_id": "F", "distance": 35 }, { "from_id": "J", "to_id": "G", "distance": 25 }, { "from_id": "J", "to_id": "H", "distance": 51 }, { "from_id": "J", "to_id": "I", "distance": 6 }, { "from_id": "J", "to_id": "K", "distance": 66 }, { "from_id": "K", "to_id": "A", "distance": 15 }, { "from_id": "K", "to_id": "B", "distance": 45 }, { "from_id": "K", "to_id": "C", "distance": 21 }, { "from_id": "K", "to_id": "D", "distance": 29 }, { "from_id": "K", "to_id": "E", "distance": 14 }, { "from_id": "K", "to_id": "F", "distance": 29 }, { "from_id": "K", "to_id": "G", "distance": 53 }, { "from_id": "K", "to_id": "H", "distance": 26 }, { "from_id": "K", "to_id": "I", "distance": 34 }, { "from_id": "K", "to_id": "J", "distance": 66 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 35 }, { "from_id": "F1", "to_id": "F3", "flow": 28 }, { "from_id": "F1", "to_id": "F4", "flow": 38 }, { "from_id": "F1", "to_id": "F5", "flow": 13 }, { "from_id": "F1", "to_id": "F6", "flow": 56 }, { "from_id": "F1", "to_id": "F7", "flow": 50 }, { "from_id": "F1", "to_id": "F8", "flow": 46 }, { "from_id": "F1", "to_id": "F9", "flow": 50 }, { "from_id": "F1", "to_id": "F10", "flow": 36 }, { "from_id": "F1", "to_id": "F11", "flow": 48 }, { "from_id": "F2", "to_id": "F1", "flow": 35 }, { "from_id": "F2", "to_id": "F3", "flow": 44 }, { "from_id": "F2", "to_id": "F4", "flow": 54 }, { "from_id": "F2", "to_id": "F5", "flow": 18 }, { "from_id": "F2", "to_id": "F6", "flow": 29 }, { "from_id": "F2", "to_id": "F7", "flow": 30 }, { "from_id": "F2", "to_id": "F8", "flow": 65 }, { "from_id": "F2", "to_id": "F9", "flow": 58 }, { "from_id": "F2", "to_id": "F10", "flow": 37 }, { "from_id": "F2", "to_id": "F11", "flow": 30 }, { "from_id": "F3", "to_id": "F1", "flow": 28 }, { "from_id": "F3", "to_id": "F2", "flow": 44 }, { "from_id": "F3", "to_id": "F4", "flow": 21 }, { "from_id": "F3", "to_id": "F5", "flow": 55 }, { "from_id": "F3", "to_id": "F6", "flow": 37 }, { "from_id": "F3", "to_id": "F7", "flow": 52 }, { "from_id": "F3", "to_id": "F8", "flow": 47 }, { "from_id": "F3", "to_id": "F9", "flow": 15 }, { "from_id": "F3", "to_id": "F10", "flow": 26 }, { "from_id": "F3", "to_id": "F11", "flow": 44 }, { "from_id": "F4", "to_id": "F1", "flow": 38 }, { "from_id": "F4", "to_id": "F2", "flow": 54 }, { "from_id": "F4", "to_id": "F3", "flow": 21 }, { "from_id": "F4", "to_id": "F5", "flow": 13 }, { "from_id": "F4", "to_id": "F6", "flow": 22 }, { "from_id": "F4", "to_id": "F7", "flow": 27 }, { "from_id": "F4", "to_id": "F8", "flow": 49 }, { "from_id": "F4", "to_id": "F9", "flow": 50 }, { "from_id": "F4", "to_id": "F10", "flow": 41 }, { "from_id": "F4", "to_id": "F11", "flow": 39 }, { "from_id": "F5", "to_id": "F1", "flow": 13 }, { "from_id": "F5", "to_id": "F2", "flow": 18 }, { "from_id": "F5", "to_id": "F3", "flow": 55 }, { "from_id": "F5", "to_id": "F4", "flow": 13 }, { "from_id": "F5", "to_id": "F6", "flow": 33 }, { "from_id": "F5", "to_id": "F7", "flow": 69 }, { "from_id": "F5", "to_id": "F8", "flow": 31 }, { "from_id": "F5", "to_id": "F9", "flow": 43 }, { "from_id": "F5", "to_id": "F10", "flow": 42 }, { "from_id": "F5", "to_id": "F11", "flow": 49 }, { "from_id": "F6", "to_id": "F1", "flow": 56 }, { "from_id": "F6", "to_id": "F2", "flow": 29 }, { "from_id": "F6", "to_id": "F3", "flow": 37 }, { "from_id": "F6", "to_id": "F4", "flow": 22 }, { "from_id": "F6", "to_id": "F5", "flow": 33 }, { "from_id": "F6", "to_id": "F7", "flow": 49 }, { "from_id": "F6", "to_id": "F8", "flow": 29 }, { "from_id": "F6", "to_id": "F9", "flow": 10 }, { "from_id": "F6", "to_id": "F10", "flow": 36 }, { "from_id": "F6", "to_id": "F11", "flow": 39 }, { "from_id": "F7", "to_id": "F1", "flow": 50 }, { "from_id": "F7", "to_id": "F2", "flow": 30 }, { "from_id": "F7", "to_id": "F3", "flow": 52 }, { "from_id": "F7", "to_id": "F4", "flow": 27 }, { "from_id": "F7", "to_id": "F5", "flow": 69 }, { "from_id": "F7", "to_id": "F6", "flow": 49 }, { "from_id": "F7", "to_id": "F8", "flow": 57 }, { "from_id": "F7", "to_id": "F9", "flow": 13 }, { "from_id": "F7", "to_id": "F10", "flow": 41 }, { "from_id": "F7", "to_id": "F11", "flow": 25 }, { "from_id": "F8", "to_id": "F1", "flow": 46 }, { "from_id": "F8", "to_id": "F2", "flow": 65 }, { "from_id": "F8", "to_id": "F3", "flow": 47 }, { "from_id": "F8", "to_id": "F4", "flow": 49 }, { "from_id": "F8", "to_id": "F5", "flow": 31 }, { "from_id": "F8", "to_id": "F6", "flow": 29 }, { "from_id": "F8", "to_id": "F7", "flow": 57 }, { "from_id": "F8", "to_id": "F9", "flow": 33 }, { "from_id": "F8", "to_id": "F10", "flow": 26 }, { "from_id": "F8", "to_id": "F11", "flow": 40 }, { "from_id": "F9", "to_id": "F1", "flow": 50 }, { "from_id": "F9", "to_id": "F2", "flow": 58 }, { "from_id": "F9", "to_id": "F3", "flow": 15 }, { "from_id": "F9", "to_id": "F4", "flow": 50 }, { "from_id": "F9", "to_id": "F5", "flow": 43 }, { "from_id": "F9", "to_id": "F6", "flow": 10 }, { "from_id": "F9", "to_id": "F7", "flow": 13 }, { "from_id": "F9", "to_id": "F8", "flow": 33 }, { "from_id": "F9", "to_id": "F10", "flow": 56 }, { "from_id": "F9", "to_id": "F11", "flow": 36 }, { "from_id": "F10", "to_id": "F1", "flow": 36 }, { "from_id": "F10", "to_id": "F2", "flow": 37 }, { "from_id": "F10", "to_id": "F3", "flow": 26 }, { "from_id": "F10", "to_id": "F4", "flow": 41 }, { "from_id": "F10", "to_id": "F5", "flow": 42 }, { "from_id": "F10", "to_id": "F6", "flow": 36 }, { "from_id": "F10", "to_id": "F7", "flow": 41 }, { "from_id": "F10", "to_id": "F8", "flow": 26 }, { "from_id": "F10", "to_id": "F9", "flow": 56 }, { "from_id": "F10", "to_id": "F11", "flow": 11 }, { "from_id": "F11", "to_id": "F1", "flow": 48 }, { "from_id": "F11", "to_id": "F2", "flow": 30 }, { "from_id": "F11", "to_id": "F3", "flow": 44 }, { "from_id": "F11", "to_id": "F4", "flow": 39 }, { "from_id": "F11", "to_id": "F5", "flow": 49 }, { "from_id": "F11", "to_id": "F6", "flow": 39 }, { "from_id": "F11", "to_id": "F7", "flow": 25 }, { "from_id": "F11", "to_id": "F8", "flow": 40 }, { "from_id": "F11", "to_id": "F9", "flow": 36 }, { "from_id": "F11", "to_id": "F10", "flow": 11 } ] }, "solution_variant": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K" ], "context_index": 25, "input_format": "markdown_table", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Picture this: a row of racks and a list of services, and the goal is to seat each service at a single rack so those that exchange lots of requests sit close together. Every service must be placed and no rack holds more than one service — it's a one-to-one pairing. To rank different seatings, for each pair multiply how much they talk by how long it takes between their racks, then sum all those products; the smaller that overall sum, the less communication overhead the system has. The instance details with actual traffic and distances are shown below.\n\nHere are the instance details: 9 total services and racks; the service identifiers are F1, F2, F3, F4, F5, F6, F7, F8, F9; the rack identifiers are 0, 1, 2, 3, 4, 5, 6, 7, 8.\nFrom rack 0 to rack 1: latency 0.\nFrom rack 0 to rack 2: latency 0.\nFrom rack 0 to rack 3: latency 0.\nFrom rack 0 to rack 4: latency 0.\nFrom rack 0 to rack 5: latency 0.\nFrom rack 0 to rack 6: latency 0.\nFrom rack 0 to rack 7: latency 0.\nFrom rack 0 to rack 8: latency 0.\nFrom rack 1 to rack 0: latency 0.\nFrom rack 1 to rack 2: latency 0.\nFrom rack 1 to rack 3: latency 0.\nFrom rack 1 to rack 4: latency 0.\nFrom rack 1 to rack 5: latency 0.\nFrom rack 1 to rack 6: latency 0.\nFrom rack 1 to rack 7: latency 0.\nFrom rack 1 to rack 8: latency 0.\nFrom rack 2 to rack 0: latency 0.\nFrom rack 2 to rack 1: latency 0.\nFrom rack 2 to rack 3: latency 0.\nFrom rack 2 to rack 4: latency 19.\nFrom rack 2 to rack 5: latency 0.\nFrom rack 2 to rack 6: latency 0.\nFrom rack 2 to rack 7: latency 0.\nFrom rack 2 to rack 8: latency 0.\nFrom rack 3 to rack 0: latency 0.\nFrom rack 3 to rack 1: latency 0.\nFrom rack 3 to rack 2: latency 0.\nFrom rack 3 to rack 4: latency 0.\nFrom rack 3 to rack 5: latency 38.\nFrom rack 3 to rack 6: latency 0.\nFrom rack 3 to rack 7: latency 0.\nFrom rack 3 to rack 8: latency 0.\nFrom rack 4 to rack 0: latency 0.\nFrom rack 4 to rack 1: latency 0.\nFrom rack 4 to rack 2: latency 19.\nFrom rack 4 to rack 3: latency 0.\nFrom rack 4 to rack 5: latency 0.\nFrom rack 4 to rack 6: latency 0.\nFrom rack 4 to rack 7: latency 0.\nFrom rack 4 to rack 8: latency 0.\nFrom rack 5 to rack 0: latency 0.\nFrom rack 5 to rack 1: latency 0.\nFrom rack 5 to rack 2: latency 0.\nFrom rack 5 to rack 3: latency 38.\nFrom rack 5 to rack 4: latency 0.\nFrom rack 5 to rack 6: latency 0.\nFrom rack 5 to rack 7: latency 0.\nFrom rack 5 to rack 8: latency 0.\nFrom rack 6 to rack 0: latency 0.\nFrom rack 6 to rack 1: latency 0.\nFrom rack 6 to rack 2: latency 0.\nFrom rack 6 to rack 3: latency 0.\nFrom rack 6 to rack 4: latency 0.\nFrom rack 6 to rack 5: latency 0.\nFrom rack 6 to rack 7: latency 0.\nFrom rack 6 to rack 8: latency 0.\nFrom rack 7 to rack 0: latency 0.\nFrom rack 7 to rack 1: latency 0.\nFrom rack 7 to rack 2: latency 0.\nFrom rack 7 to rack 3: latency 0.\nFrom rack 7 to rack 4: latency 0.\nFrom rack 7 to rack 5: latency 0.\nFrom rack 7 to rack 6: latency 0.\nFrom rack 7 to rack 8: latency 0.\nFrom rack 8 to rack 0: latency 0.\nFrom rack 8 to rack 1: latency 0.\nFrom rack 8 to rack 2: latency 0.\nFrom rack 8 to rack 3: latency 0.\nFrom rack 8 to rack 4: latency 0.\nFrom rack 8 to rack 5: latency 0.\nFrom rack 8 to rack 6: latency 0.\nFrom rack 8 to rack 7: latency 0.\nFrom service F1 to service F2: traffic 19.\nFrom service F1 to service F3: traffic 70.\nFrom service F1 to service F4: traffic 96.\nFrom service F1 to service F5: traffic 85.\nFrom service F1 to service F6: traffic 6.\nFrom service F1 to service F7: traffic 49.\nFrom service F1 to service F8: traffic 7.\nFrom service F1 to service F9: traffic 63.\nFrom service F2 to service F1: traffic 19.\nFrom service F2 to service F3: traffic 3.\nFrom service F2 to service F4: traffic 13.\nFrom service F2 to service F5: traffic 93.\nFrom service F2 to service F6: traffic 78.\nFrom service F2 to service F7: traffic 23.\nFrom service F2 to service F8: traffic 45.\nFrom service F2 to service F9: traffic 26.\nFrom service F3 to service F1: traffic 70.\nFrom service F3 to service F2: traffic 3.\nFrom service F3 to service F4: traffic 96.\nFrom service F3 to service F5: traffic 91.\nFrom service F3 to service F6: traffic 95.\nFrom service F3 to service F7: traffic 86.\nFrom service F3 to service F8: traffic 13.\nFrom service F3 to service F9: traffic 90.\nFrom service F4 to service F1: traffic 96.\nFrom service F4 to service F2: traffic 13.\nFrom service F4 to service F3: traffic 96.\nFrom service F4 to service F5: traffic 78.\nFrom service F4 to service F6: traffic 95.\nFrom service F4 to service F7: traffic 95.\nFrom service F4 to service F8: traffic 30.\nFrom service F4 to service F9: traffic 30.\nFrom service F5 to service F1: traffic 85.\nFrom service F5 to service F2: traffic 93.\nFrom service F5 to service F3: traffic 91.\nFrom service F5 to service F4: traffic 78.\nFrom service F5 to service F6: traffic 70.\nFrom service F5 to service F7: traffic 61.\nFrom service F5 to service F8: traffic 76.\nFrom service F5 to service F9: traffic 40.\nFrom service F6 to service F1: traffic 6.\nFrom service F6 to service F2: traffic 78.\nFrom service F6 to service F3: traffic 95.\nFrom service F6 to service F4: traffic 95.\nFrom service F6 to service F5: traffic 70.\nFrom service F6 to service F7: traffic 50.\nFrom service F6 to service F8: traffic 46.\nFrom service F6 to service F9: traffic 94.\nFrom service F7 to service F1: traffic 49.\nFrom service F7 to service F2: traffic 23.\nFrom service F7 to service F3: traffic 86.\nFrom service F7 to service F4: traffic 95.\nFrom service F7 to service F5: traffic 61.\nFrom service F7 to service F6: traffic 50.\nFrom service F7 to service F8: traffic 30.\nFrom service F7 to service F9: traffic 37.\nFrom service F8 to service F1: traffic 7.\nFrom service F8 to service F2: traffic 45.\nFrom service F8 to service F3: traffic 13.\nFrom service F8 to service F4: traffic 30.\nFrom service F8 to service F5: traffic 76.\nFrom service F8 to service F6: traffic 46.\nFrom service F8 to service F7: traffic 30.\nFrom service F8 to service F9: traffic 11.\nFrom service F9 to service F1: traffic 63.\nFrom service F9 to service F2: traffic 26.\nFrom service F9 to service F3: traffic 90.\nFrom service F9 to service F4: traffic 30.\nFrom service F9 to service F5: traffic 40.\nFrom service F9 to service F6: traffic 94.\nFrom service F9 to service F7: traffic 37.\nFrom service F9 to service F8: traffic 11.\nUse these traffic and latency lines to compute the summed traffic×latency cost for any seating.\n\nAlso, when you reply with the actual seating plan, a simple JSON snippet like this is the shape I expect — just so it's easy to read and machine-friendly:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of \"solution\" as a list where each position is a service and the value is the rack it gets assigned to: first list entry → first service, second → second service, and so on. This block is just a sketch of the shape I want, not the real assignment.\n\nPlease make sure to use the exact identifiers from the instance input — do not rename or invent labels. \nFor example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 19, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 38, 0, 0, 0 ], [ 0, 0, 19, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 38, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 19, 70, 96, 85, 6, 49, 7, 63 ], [ 19, 0, 3, 13, 93, 78, 23, 45, 26 ], [ 70, 3, 0, 96, 91, 95, 86, 13, 90 ], [ 96, 13, 96, 0, 78, 95, 95, 30, 30 ], [ 85, 93, 91, 78, 0, 70, 61, 76, 40 ], [ 6, 78, 95, 95, 70, 0, 50, 46, 94 ], [ 49, 23, 86, 95, 61, 50, 0, 30, 37 ], [ 7, 45, 13, 30, 76, 46, 30, 0, 11 ], [ 63, 26, 90, 30, 40, 94, 37, 11, 0 ] ], "objective": 456.0 }, "solution": [ 2, 3, 5, 7, 8, 4, 6, 0, 1 ], "obj": 456.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 0 }, { "from_id": 0, "to_id": 2, "distance": 0 }, { "from_id": 0, "to_id": 3, "distance": 0 }, { "from_id": 0, "to_id": 4, "distance": 0 }, { "from_id": 0, "to_id": 5, "distance": 0 }, { "from_id": 0, "to_id": 6, "distance": 0 }, { "from_id": 0, "to_id": 7, "distance": 0 }, { "from_id": 0, "to_id": 8, "distance": 0 }, { "from_id": 1, "to_id": 0, "distance": 0 }, { "from_id": 1, "to_id": 2, "distance": 0 }, { "from_id": 1, "to_id": 3, "distance": 0 }, { "from_id": 1, "to_id": 4, "distance": 0 }, { "from_id": 1, "to_id": 5, "distance": 0 }, { "from_id": 1, "to_id": 6, "distance": 0 }, { "from_id": 1, "to_id": 7, "distance": 0 }, { "from_id": 1, "to_id": 8, "distance": 0 }, { "from_id": 2, "to_id": 0, "distance": 0 }, { "from_id": 2, "to_id": 1, "distance": 0 }, { "from_id": 2, "to_id": 3, "distance": 0 }, { "from_id": 2, "to_id": 4, "distance": 19 }, { "from_id": 2, "to_id": 5, "distance": 0 }, { "from_id": 2, "to_id": 6, "distance": 0 }, { "from_id": 2, "to_id": 7, "distance": 0 }, { "from_id": 2, "to_id": 8, "distance": 0 }, { "from_id": 3, "to_id": 0, "distance": 0 }, { "from_id": 3, "to_id": 1, "distance": 0 }, { "from_id": 3, "to_id": 2, "distance": 0 }, { "from_id": 3, "to_id": 4, "distance": 0 }, { "from_id": 3, "to_id": 5, "distance": 38 }, { "from_id": 3, "to_id": 6, "distance": 0 }, { "from_id": 3, "to_id": 7, "distance": 0 }, { "from_id": 3, "to_id": 8, "distance": 0 }, { "from_id": 4, "to_id": 0, "distance": 0 }, { "from_id": 4, "to_id": 1, "distance": 0 }, { "from_id": 4, "to_id": 2, "distance": 19 }, { "from_id": 4, "to_id": 3, "distance": 0 }, { "from_id": 4, "to_id": 5, "distance": 0 }, { "from_id": 4, "to_id": 6, "distance": 0 }, { "from_id": 4, "to_id": 7, "distance": 0 }, { "from_id": 4, "to_id": 8, "distance": 0 }, { "from_id": 5, "to_id": 0, "distance": 0 }, { "from_id": 5, "to_id": 1, "distance": 0 }, { "from_id": 5, "to_id": 2, "distance": 0 }, { "from_id": 5, "to_id": 3, "distance": 38 }, { "from_id": 5, "to_id": 4, "distance": 0 }, { "from_id": 5, "to_id": 6, "distance": 0 }, { "from_id": 5, "to_id": 7, "distance": 0 }, { "from_id": 5, "to_id": 8, "distance": 0 }, { "from_id": 6, "to_id": 0, "distance": 0 }, { "from_id": 6, "to_id": 1, "distance": 0 }, { "from_id": 6, "to_id": 2, "distance": 0 }, { "from_id": 6, "to_id": 3, "distance": 0 }, { "from_id": 6, "to_id": 4, "distance": 0 }, { "from_id": 6, "to_id": 5, "distance": 0 }, { "from_id": 6, "to_id": 7, "distance": 0 }, { "from_id": 6, "to_id": 8, "distance": 0 }, { "from_id": 7, "to_id": 0, "distance": 0 }, { "from_id": 7, "to_id": 1, "distance": 0 }, { "from_id": 7, "to_id": 2, "distance": 0 }, { "from_id": 7, "to_id": 3, "distance": 0 }, { "from_id": 7, "to_id": 4, "distance": 0 }, { "from_id": 7, "to_id": 5, "distance": 0 }, { "from_id": 7, "to_id": 6, "distance": 0 }, { "from_id": 7, "to_id": 8, "distance": 0 }, { "from_id": 8, "to_id": 0, "distance": 0 }, { "from_id": 8, "to_id": 1, "distance": 0 }, { "from_id": 8, "to_id": 2, "distance": 0 }, { "from_id": 8, "to_id": 3, "distance": 0 }, { "from_id": 8, "to_id": 4, "distance": 0 }, { "from_id": 8, "to_id": 5, "distance": 0 }, { "from_id": 8, "to_id": 6, "distance": 0 }, { "from_id": 8, "to_id": 7, "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 19 }, { "from_id": "F1", "to_id": "F3", "flow": 70 }, { "from_id": "F1", "to_id": "F4", "flow": 96 }, { "from_id": "F1", "to_id": "F5", "flow": 85 }, { "from_id": "F1", "to_id": "F6", "flow": 6 }, { "from_id": "F1", "to_id": "F7", "flow": 49 }, { "from_id": "F1", "to_id": "F8", "flow": 7 }, { "from_id": "F1", "to_id": "F9", "flow": 63 }, { "from_id": "F2", "to_id": "F1", "flow": 19 }, { "from_id": "F2", "to_id": "F3", "flow": 3 }, { "from_id": "F2", "to_id": "F4", "flow": 13 }, { "from_id": "F2", "to_id": "F5", "flow": 93 }, { "from_id": "F2", "to_id": "F6", "flow": 78 }, { "from_id": "F2", "to_id": "F7", "flow": 23 }, { "from_id": "F2", "to_id": "F8", "flow": 45 }, { "from_id": "F2", "to_id": "F9", "flow": 26 }, { "from_id": "F3", "to_id": "F1", "flow": 70 }, { "from_id": "F3", "to_id": "F2", "flow": 3 }, { "from_id": "F3", "to_id": "F4", "flow": 96 }, { "from_id": "F3", "to_id": "F5", "flow": 91 }, { "from_id": "F3", "to_id": "F6", "flow": 95 }, { "from_id": "F3", "to_id": "F7", "flow": 86 }, { "from_id": "F3", "to_id": "F8", "flow": 13 }, { "from_id": "F3", "to_id": "F9", "flow": 90 }, { "from_id": "F4", "to_id": "F1", "flow": 96 }, { "from_id": "F4", "to_id": "F2", "flow": 13 }, { "from_id": "F4", "to_id": "F3", "flow": 96 }, { "from_id": "F4", "to_id": "F5", "flow": 78 }, { "from_id": "F4", "to_id": "F6", "flow": 95 }, { "from_id": "F4", "to_id": "F7", "flow": 95 }, { "from_id": "F4", "to_id": "F8", "flow": 30 }, { "from_id": "F4", "to_id": "F9", "flow": 30 }, { "from_id": "F5", "to_id": "F1", "flow": 85 }, { "from_id": "F5", "to_id": "F2", "flow": 93 }, { "from_id": "F5", "to_id": "F3", "flow": 91 }, { "from_id": "F5", "to_id": "F4", "flow": 78 }, { "from_id": "F5", "to_id": "F6", "flow": 70 }, { "from_id": "F5", "to_id": "F7", "flow": 61 }, { "from_id": "F5", "to_id": "F8", "flow": 76 }, { "from_id": "F5", "to_id": "F9", "flow": 40 }, { "from_id": "F6", "to_id": "F1", "flow": 6 }, { "from_id": "F6", "to_id": "F2", "flow": 78 }, { "from_id": "F6", "to_id": "F3", "flow": 95 }, { "from_id": "F6", "to_id": "F4", "flow": 95 }, { "from_id": "F6", "to_id": "F5", "flow": 70 }, { "from_id": "F6", "to_id": "F7", "flow": 50 }, { "from_id": "F6", "to_id": "F8", "flow": 46 }, { "from_id": "F6", "to_id": "F9", "flow": 94 }, { "from_id": "F7", "to_id": "F1", "flow": 49 }, { "from_id": "F7", "to_id": "F2", "flow": 23 }, { "from_id": "F7", "to_id": "F3", "flow": 86 }, { "from_id": "F7", "to_id": "F4", "flow": 95 }, { "from_id": "F7", "to_id": "F5", "flow": 61 }, { "from_id": "F7", "to_id": "F6", "flow": 50 }, { "from_id": "F7", "to_id": "F8", "flow": 30 }, { "from_id": "F7", "to_id": "F9", "flow": 37 }, { "from_id": "F8", "to_id": "F1", "flow": 7 }, { "from_id": "F8", "to_id": "F2", "flow": 45 }, { "from_id": "F8", "to_id": "F3", "flow": 13 }, { "from_id": "F8", "to_id": "F4", "flow": 30 }, { "from_id": "F8", "to_id": "F5", "flow": 76 }, { "from_id": "F8", "to_id": "F6", "flow": 46 }, { "from_id": "F8", "to_id": "F7", "flow": 30 }, { "from_id": "F8", "to_id": "F9", "flow": 11 }, { "from_id": "F9", "to_id": "F1", "flow": 63 }, { "from_id": "F9", "to_id": "F2", "flow": 26 }, { "from_id": "F9", "to_id": "F3", "flow": 90 }, { "from_id": "F9", "to_id": "F4", "flow": 30 }, { "from_id": "F9", "to_id": "F5", "flow": 40 }, { "from_id": "F9", "to_id": "F6", "flow": 94 }, { "from_id": "F9", "to_id": "F7", "flow": 37 }, { "from_id": "F9", "to_id": "F8", "flow": 11 } ] }, "solution_variant": [ 2, 3, 5, 7, 8, 4, 6, 0, 1 ], "context_index": 26, "input_format": "nl", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Recently the loading team talked about reordering the slots: give each cargo category one slot and make sure no slot is shared or left empty. If two categories end up frequently on the same shipments, put their slots near each other so the overall strain goes down — compute that strain by multiplying each pair’s co-loading frequency by how far apart their slots are, then add everything up; the arrangement with the smallest sum cuts time and cost. The precise category list, pairwise frequencies, and distances appear below.\n\nBelow are the 11 categories and available slots: F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11 and 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.\nSeparation from slot 1 to slot 2 is 1.\nSeparation from slot 1 to slot 3 is 4.\nSeparation from slot 1 to slot 4 is 1.\nSeparation from slot 1 to slot 5 is 4.\nSeparation from slot 1 to slot 6 is 5.\nSeparation from slot 1 to slot 7 is 2.\nSeparation from slot 1 to slot 8 is 3.\nSeparation from slot 1 to slot 9 is 4.\nSeparation from slot 1 to slot 10 is 6.\nSeparation from slot 1 to slot 11 is 3.\nSeparation from slot 2 to slot 1 is 1.\nSeparation from slot 2 to slot 3 is 3.\nSeparation from slot 2 to slot 4 is 2.\nSeparation from slot 2 to slot 5 is 3.\nSeparation from slot 2 to slot 6 is 4.\nSeparation from slot 2 to slot 7 is 3.\nSeparation from slot 2 to slot 8 is 2.\nSeparation from slot 2 to slot 9 is 3.\nSeparation from slot 2 to slot 10 is 5.\nSeparation from slot 2 to slot 11 is 4.\nSeparation from slot 3 to slot 1 is 4.\nSeparation from slot 3 to slot 2 is 3.\nSeparation from slot 3 to slot 4 is 5.\nSeparation from slot 3 to slot 5 is 2.\nSeparation from slot 3 to slot 6 is 1.\nSeparation from slot 3 to slot 7 is 6.\nSeparation from slot 3 to slot 8 is 5.\nSeparation from slot 3 to slot 9 is 4.\nSeparation from slot 3 to slot 10 is 2.\nSeparation from slot 3 to slot 11 is 7.\nSeparation from slot 4 to slot 1 is 1.\nSeparation from slot 4 to slot 2 is 2.\nSeparation from slot 4 to slot 3 is 5.\nSeparation from slot 4 to slot 5 is 3.\nSeparation from slot 4 to slot 6 is 4.\nSeparation from slot 4 to slot 7 is 1.\nSeparation from slot 4 to slot 8 is 2.\nSeparation from slot 4 to slot 9 is 3.\nSeparation from slot 4 to slot 10 is 5.\nSeparation from slot 4 to slot 11 is 2.\nSeparation from slot 5 to slot 1 is 4.\nSeparation from slot 5 to slot 2 is 3.\nSeparation from slot 5 to slot 3 is 2.\nSeparation from slot 5 to slot 4 is 3.\nSeparation from slot 5 to slot 6 is 1.\nSeparation from slot 5 to slot 7 is 4.\nSeparation from slot 5 to slot 8 is 3.\nSeparation from slot 5 to slot 9 is 2.\nSeparation from slot 5 to slot 10 is 2.\nSeparation from slot 5 to slot 11 is 5.\nSeparation from slot 6 to slot 1 is 5.\nSeparation from slot 6 to slot 2 is 4.\nSeparation from slot 6 to slot 3 is 1.\nSeparation from slot 6 to slot 4 is 4.\nSeparation from slot 6 to slot 5 is 1.\nSeparation from slot 6 to slot 7 is 5.\nSeparation from slot 6 to slot 8 is 4.\nSeparation from slot 6 to slot 9 is 3.\nSeparation from slot 6 to slot 10 is 1.\nSeparation from slot 6 to slot 11 is 6.\nSeparation from slot 7 to slot 1 is 2.\nSeparation from slot 7 to slot 2 is 3.\nSeparation from slot 7 to slot 3 is 6.\nSeparation from slot 7 to slot 4 is 1.\nSeparation from slot 7 to slot 5 is 4.\nSeparation from slot 7 to slot 6 is 5.\nSeparation from slot 7 to slot 8 is 1.\nSeparation from slot 7 to slot 9 is 2.\nSeparation from slot 7 to slot 10 is 4.\nSeparation from slot 7 to slot 11 is 1.\nSeparation from slot 8 to slot 1 is 3.\nSeparation from slot 8 to slot 2 is 2.\nSeparation from slot 8 to slot 3 is 5.\nSeparation from slot 8 to slot 4 is 2.\nSeparation from slot 8 to slot 5 is 3.\nSeparation from slot 8 to slot 6 is 4.\nSeparation from slot 8 to slot 7 is 1.\nSeparation from slot 8 to slot 9 is 1.\nSeparation from slot 8 to slot 10 is 3.\nSeparation from slot 8 to slot 11 is 2.\nSeparation from slot 9 to slot 1 is 4.\nSeparation from slot 9 to slot 2 is 3.\nSeparation from slot 9 to slot 3 is 4.\nSeparation from slot 9 to slot 4 is 3.\nSeparation from slot 9 to slot 5 is 2.\nSeparation from slot 9 to slot 6 is 3.\nSeparation from slot 9 to slot 7 is 2.\nSeparation from slot 9 to slot 8 is 1.\nSeparation from slot 9 to slot 10 is 2.\nSeparation from slot 9 to slot 11 is 3.\nSeparation from slot 10 to slot 1 is 6.\nSeparation from slot 10 to slot 2 is 5.\nSeparation from slot 10 to slot 3 is 2.\nSeparation from slot 10 to slot 4 is 5.\nSeparation from slot 10 to slot 5 is 2.\nSeparation from slot 10 to slot 6 is 1.\nSeparation from slot 10 to slot 7 is 4.\nSeparation from slot 10 to slot 8 is 3.\nSeparation from slot 10 to slot 9 is 2.\nSeparation from slot 10 to slot 11 is 5.\nSeparation from slot 11 to slot 1 is 3.\nSeparation from slot 11 to slot 2 is 4.\nSeparation from slot 11 to slot 3 is 7.\nSeparation from slot 11 to slot 4 is 2.\nSeparation from slot 11 to slot 5 is 5.\nSeparation from slot 11 to slot 6 is 6.\nSeparation from slot 11 to slot 7 is 1.\nSeparation from slot 11 to slot 8 is 2.\nSeparation from slot 11 to slot 9 is 3.\nSeparation from slot 11 to slot 10 is 5.\nCo-load frequency between category F1 and category F2 is 0.\nCo-load frequency between category F1 and category F3 is 5.\nCo-load frequency between category F1 and category F4 is 2.\nCo-load frequency between category F1 and category F5 is 1.\nCo-load frequency between category F1 and category F6 is 5.\nCo-load frequency between category F1 and category F7 is 5.\nCo-load frequency between category F1 and category F8 is 5.\nCo-load frequency between category F1 and category F9 is 0.\nCo-load frequency between category F1 and category F10 is 5.\nCo-load frequency between category F1 and category F11 is 4.\nCo-load frequency between category F2 and category F1 is 0.\nCo-load frequency between category F2 and category F3 is 5.\nCo-load frequency between category F2 and category F4 is 1.\nCo-load frequency between category F2 and category F5 is 2.\nCo-load frequency between category F2 and category F6 is 4.\nCo-load frequency between category F2 and category F7 is 2.\nCo-load frequency between category F2 and category F8 is 5.\nCo-load frequency between category F2 and category F9 is 0.\nCo-load frequency between category F2 and category F10 is 10.\nCo-load frequency between category F2 and category F11 is 3.\nCo-load frequency between category F3 and category F1 is 5.\nCo-load frequency between category F3 and category F2 is 5.\nCo-load frequency between category F3 and category F4 is 5.\nCo-load frequency between category F3 and category F5 is 2.\nCo-load frequency between category F3 and category F6 is 5.\nCo-load frequency between category F3 and category F7 is 2.\nCo-load frequency between category F3 and category F8 is 0.\nCo-load frequency between category F3 and category F9 is 5.\nCo-load frequency between category F3 and category F10 is 1.\nCo-load frequency between category F3 and category F11 is 1.\nCo-load frequency between category F4 and category F1 is 2.\nCo-load frequency between category F4 and category F2 is 1.\nCo-load frequency between category F4 and category F3 is 5.\nCo-load frequency between category F4 and category F5 is 1.\nCo-load frequency between category F4 and category F6 is 6.\nCo-load frequency between category F4 and category F7 is 0.\nCo-load frequency between category F4 and category F8 is 0.\nCo-load frequency between category F4 and category F9 is 10.\nCo-load frequency between category F4 and category F10 is 2.\nCo-load frequency between category F4 and category F11 is 0.\nCo-load frequency between category F5 and category F1 is 1.\nCo-load frequency between category F5 and category F2 is 2.\nCo-load frequency between category F5 and category F3 is 2.\nCo-load frequency between category F5 and category F4 is 1.\nCo-load frequency between category F5 and category F6 is 2.\nCo-load frequency between category F5 and category F7 is 0.\nCo-load frequency between category F5 and category F8 is 3.\nCo-load frequency between category F5 and category F9 is 5.\nCo-load frequency between category F5 and category F10 is 0.\nCo-load frequency between category F5 and category F11 is 5.\nCo-load frequency between category F6 and category F1 is 5.\nCo-load frequency between category F6 and category F2 is 4.\nCo-load frequency between category F6 and category F3 is 5.\nCo-load frequency between category F6 and category F4 is 6.\nCo-load frequency between category F6 and category F5 is 2.\nCo-load frequency between category F6 and category F7 is 5.\nCo-load frequency between category F6 and category F8 is 5.\nCo-load frequency between category F6 and category F9 is 0.\nCo-load frequency between category F6 and category F10 is 1.\nCo-load frequency between category F6 and category F11 is 0.\nCo-load frequency between category F7 and category F1 is 5.\nCo-load frequency between category F7 and category F2 is 2.\nCo-load frequency between category F7 and category F3 is 2.\nCo-load frequency between category F7 and category F4 is 0.\nCo-load frequency between category F7 and category F5 is 0.\nCo-load frequency between category F7 and category F6 is 5.\nCo-load frequency between category F7 and category F8 is 5.\nCo-load frequency between category F7 and category F9 is 2.\nCo-load frequency between category F7 and category F10 is 1.\nCo-load frequency between category F7 and category F11 is 10.\nCo-load frequency between category F8 and category F1 is 5.\nCo-load frequency between category F8 and category F2 is 5.\nCo-load frequency between category F8 and category F3 is 0.\nCo-load frequency between category F8 and category F4 is 0.\nCo-load frequency between category F8 and category F5 is 3.\nCo-load frequency between category F8 and category F6 is 5.\nCo-load frequency between category F8 and category F7 is 5.\nCo-load frequency between category F8 and category F9 is 2.\nCo-load frequency between category F8 and category F10 is 5.\nCo-load frequency between category F8 and category F11 is 0.\nCo-load frequency between category F9 and category F1 is 0.\nCo-load frequency between category F9 and category F2 is 0.\nCo-load frequency between category F9 and category F3 is 5.\nCo-load frequency between category F9 and category F4 is 10.\nCo-load frequency between category F9 and category F5 is 5.\nCo-load frequency between category F9 and category F6 is 0.\nCo-load frequency between category F9 and category F7 is 2.\nCo-load frequency between category F9 and category F8 is 2.\nCo-load frequency between category F9 and category F10 is 2.\nCo-load frequency between category F9 and category F11 is 1.\nCo-load frequency between category F10 and category F1 is 5.\nCo-load frequency between category F10 and category F2 is 10.\nCo-load frequency between category F10 and category F3 is 1.\nCo-load frequency between category F10 and category F4 is 2.\nCo-load frequency between category F10 and category F5 is 0.\nCo-load frequency between category F10 and category F6 is 1.\nCo-load frequency between category F10 and category F7 is 1.\nCo-load frequency between category F10 and category F8 is 5.\nCo-load frequency between category F10 and category F9 is 2.\nCo-load frequency between category F10 and category F11 is 3.\nCo-load frequency between category F11 and category F1 is 4.\nCo-load frequency between category F11 and category F2 is 3.\nCo-load frequency between category F11 and category F3 is 1.\nCo-load frequency between category F11 and category F4 is 0.\nCo-load frequency between category F11 and category F5 is 5.\nCo-load frequency between category F11 and category F6 is 0.\nCo-load frequency between category F11 and category F7 is 10.\nCo-load frequency between category F11 and category F8 is 0.\nCo-load frequency between category F11 and category F9 is 1.\nCo-load frequency between category F11 and category F10 is 3.\nUse these records to compute the total strain and pick the assignment with the smallest sum.\n\nAlso, when you send back the arrangement, please follow this simple JSON layout so it's easy to read by the team — nothing fancy, just a single list that says which slot goes with which category.\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nHere the \"solution\" array is just an ordered checklist: the first entry is the slot assigned to the first cargo category, the second entry is the slot for the second category, and so on down the line. Think of it like filling out a form — one slot per category in order.\n\nThis JSON block is only a sketch of the expected shape, not the actual answer — replace the placeholders with the exact identifiers from the instance.\n\nPlease be careful to use the identifiers exactly as they appear in the input — no renaming and no new labels.\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 1, 4, 1, 4, 5, 2, 3, 4, 6, 3 ], [ 1, 0, 3, 2, 3, 4, 3, 2, 3, 5, 4 ], [ 4, 3, 0, 5, 2, 1, 6, 5, 4, 2, 7 ], [ 1, 2, 5, 0, 3, 4, 1, 2, 3, 5, 2 ], [ 4, 3, 2, 3, 0, 1, 4, 3, 2, 2, 5 ], [ 5, 4, 1, 4, 1, 0, 5, 4, 3, 1, 6 ], [ 2, 3, 6, 1, 4, 5, 0, 1, 2, 4, 1 ], [ 3, 2, 5, 2, 3, 4, 1, 0, 1, 3, 2 ], [ 4, 3, 4, 3, 2, 3, 2, 1, 0, 2, 3 ], [ 6, 5, 2, 5, 2, 1, 4, 3, 2, 0, 5 ], [ 3, 4, 7, 2, 5, 6, 1, 2, 3, 5, 0 ] ], "flow_matrix": [ [ 0, 0, 5, 2, 1, 5, 5, 5, 0, 5, 4 ], [ 0, 0, 5, 1, 2, 4, 2, 5, 0, 10, 3 ], [ 5, 5, 0, 5, 2, 5, 2, 0, 5, 1, 1 ], [ 2, 1, 5, 0, 1, 6, 0, 0, 10, 2, 0 ], [ 1, 2, 2, 1, 0, 2, 0, 3, 5, 0, 5 ], [ 5, 4, 5, 6, 2, 0, 5, 5, 0, 1, 0 ], [ 5, 2, 2, 0, 0, 5, 0, 5, 2, 1, 10 ], [ 5, 5, 0, 0, 3, 5, 5, 0, 2, 5, 0 ], [ 0, 0, 5, 10, 5, 0, 2, 2, 0, 2, 1 ], [ 5, 10, 1, 2, 0, 1, 1, 5, 2, 0, 3 ], [ 4, 3, 1, 0, 5, 0, 10, 0, 1, 3, 0 ] ], "objective": 750.0 }, "solution": [ 3, 6, 4, 9, 2, 8, 1, 7, 5, 10, 0 ], "obj": 750.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 11, "num_locations": 11, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 1 }, { "from_id": 1, "to_id": 3, "distance": 4 }, { "from_id": 1, "to_id": 4, "distance": 1 }, { "from_id": 1, "to_id": 5, "distance": 4 }, { "from_id": 1, "to_id": 6, "distance": 5 }, { "from_id": 1, "to_id": 7, "distance": 2 }, { "from_id": 1, "to_id": 8, "distance": 3 }, { "from_id": 1, "to_id": 9, "distance": 4 }, { "from_id": 1, "to_id": 10, "distance": 6 }, { "from_id": 1, "to_id": 11, "distance": 3 }, { "from_id": 2, "to_id": 1, "distance": 1 }, { "from_id": 2, "to_id": 3, "distance": 3 }, { "from_id": 2, "to_id": 4, "distance": 2 }, { "from_id": 2, "to_id": 5, "distance": 3 }, { "from_id": 2, "to_id": 6, "distance": 4 }, { "from_id": 2, "to_id": 7, "distance": 3 }, { "from_id": 2, "to_id": 8, "distance": 2 }, { "from_id": 2, "to_id": 9, "distance": 3 }, { "from_id": 2, "to_id": 10, "distance": 5 }, { "from_id": 2, "to_id": 11, "distance": 4 }, { "from_id": 3, "to_id": 1, "distance": 4 }, { "from_id": 3, "to_id": 2, "distance": 3 }, { "from_id": 3, "to_id": 4, "distance": 5 }, { "from_id": 3, "to_id": 5, "distance": 2 }, { "from_id": 3, "to_id": 6, "distance": 1 }, { "from_id": 3, "to_id": 7, "distance": 6 }, { "from_id": 3, "to_id": 8, "distance": 5 }, { "from_id": 3, "to_id": 9, "distance": 4 }, { "from_id": 3, "to_id": 10, "distance": 2 }, { "from_id": 3, "to_id": 11, "distance": 7 }, { "from_id": 4, "to_id": 1, "distance": 1 }, { "from_id": 4, "to_id": 2, "distance": 2 }, { "from_id": 4, "to_id": 3, "distance": 5 }, { "from_id": 4, "to_id": 5, "distance": 3 }, { "from_id": 4, "to_id": 6, "distance": 4 }, { "from_id": 4, "to_id": 7, "distance": 1 }, { "from_id": 4, "to_id": 8, "distance": 2 }, { "from_id": 4, "to_id": 9, "distance": 3 }, { "from_id": 4, "to_id": 10, "distance": 5 }, { "from_id": 4, "to_id": 11, "distance": 2 }, { "from_id": 5, "to_id": 1, "distance": 4 }, { "from_id": 5, "to_id": 2, "distance": 3 }, { "from_id": 5, "to_id": 3, "distance": 2 }, { "from_id": 5, "to_id": 4, "distance": 3 }, { "from_id": 5, "to_id": 6, "distance": 1 }, { "from_id": 5, "to_id": 7, "distance": 4 }, { "from_id": 5, "to_id": 8, "distance": 3 }, { "from_id": 5, "to_id": 9, "distance": 2 }, { "from_id": 5, "to_id": 10, "distance": 2 }, { "from_id": 5, "to_id": 11, "distance": 5 }, { "from_id": 6, "to_id": 1, "distance": 5 }, { "from_id": 6, "to_id": 2, "distance": 4 }, { "from_id": 6, "to_id": 3, "distance": 1 }, { "from_id": 6, "to_id": 4, "distance": 4 }, { "from_id": 6, "to_id": 5, "distance": 1 }, { "from_id": 6, "to_id": 7, "distance": 5 }, { "from_id": 6, "to_id": 8, "distance": 4 }, { "from_id": 6, "to_id": 9, "distance": 3 }, { "from_id": 6, "to_id": 10, "distance": 1 }, { "from_id": 6, "to_id": 11, "distance": 6 }, { "from_id": 7, "to_id": 1, "distance": 2 }, { "from_id": 7, "to_id": 2, "distance": 3 }, { "from_id": 7, "to_id": 3, "distance": 6 }, { "from_id": 7, "to_id": 4, "distance": 1 }, { "from_id": 7, "to_id": 5, "distance": 4 }, { "from_id": 7, "to_id": 6, "distance": 5 }, { "from_id": 7, "to_id": 8, "distance": 1 }, { "from_id": 7, "to_id": 9, "distance": 2 }, { "from_id": 7, "to_id": 10, "distance": 4 }, { "from_id": 7, "to_id": 11, "distance": 1 }, { "from_id": 8, "to_id": 1, "distance": 3 }, { "from_id": 8, "to_id": 2, "distance": 2 }, { "from_id": 8, "to_id": 3, "distance": 5 }, { "from_id": 8, "to_id": 4, "distance": 2 }, { "from_id": 8, "to_id": 5, "distance": 3 }, { "from_id": 8, "to_id": 6, "distance": 4 }, { "from_id": 8, "to_id": 7, "distance": 1 }, { "from_id": 8, "to_id": 9, "distance": 1 }, { "from_id": 8, "to_id": 10, "distance": 3 }, { "from_id": 8, "to_id": 11, "distance": 2 }, { "from_id": 9, "to_id": 1, "distance": 4 }, { "from_id": 9, "to_id": 2, "distance": 3 }, { "from_id": 9, "to_id": 3, "distance": 4 }, { "from_id": 9, "to_id": 4, "distance": 3 }, { "from_id": 9, "to_id": 5, "distance": 2 }, { "from_id": 9, "to_id": 6, "distance": 3 }, { "from_id": 9, "to_id": 7, "distance": 2 }, { "from_id": 9, "to_id": 8, "distance": 1 }, { "from_id": 9, "to_id": 10, "distance": 2 }, { "from_id": 9, "to_id": 11, "distance": 3 }, { "from_id": 10, "to_id": 1, "distance": 6 }, { "from_id": 10, "to_id": 2, "distance": 5 }, { "from_id": 10, "to_id": 3, "distance": 2 }, { "from_id": 10, "to_id": 4, "distance": 5 }, { "from_id": 10, "to_id": 5, "distance": 2 }, { "from_id": 10, "to_id": 6, "distance": 1 }, { "from_id": 10, "to_id": 7, "distance": 4 }, { "from_id": 10, "to_id": 8, "distance": 3 }, { "from_id": 10, "to_id": 9, "distance": 2 }, { "from_id": 10, "to_id": 11, "distance": 5 }, { "from_id": 11, "to_id": 1, "distance": 3 }, { "from_id": 11, "to_id": 2, "distance": 4 }, { "from_id": 11, "to_id": 3, "distance": 7 }, { "from_id": 11, "to_id": 4, "distance": 2 }, { "from_id": 11, "to_id": 5, "distance": 5 }, { "from_id": 11, "to_id": 6, "distance": 6 }, { "from_id": 11, "to_id": 7, "distance": 1 }, { "from_id": 11, "to_id": 8, "distance": 2 }, { "from_id": 11, "to_id": 9, "distance": 3 }, { "from_id": 11, "to_id": 10, "distance": 5 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 5 }, { "from_id": "F1", "to_id": "F4", "flow": 2 }, { "from_id": "F1", "to_id": "F5", "flow": 1 }, { "from_id": "F1", "to_id": "F6", "flow": 5 }, { "from_id": "F1", "to_id": "F7", "flow": 5 }, { "from_id": "F1", "to_id": "F8", "flow": 5 }, { "from_id": "F1", "to_id": "F9", "flow": 0 }, { "from_id": "F1", "to_id": "F10", "flow": 5 }, { "from_id": "F1", "to_id": "F11", "flow": 4 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 5 }, { "from_id": "F2", "to_id": "F4", "flow": 1 }, { "from_id": "F2", "to_id": "F5", "flow": 2 }, { "from_id": "F2", "to_id": "F6", "flow": 4 }, { "from_id": "F2", "to_id": "F7", "flow": 2 }, { "from_id": "F2", "to_id": "F8", "flow": 5 }, { "from_id": "F2", "to_id": "F9", "flow": 0 }, { "from_id": "F2", "to_id": "F10", "flow": 10 }, { "from_id": "F2", "to_id": "F11", "flow": 3 }, { "from_id": "F3", "to_id": "F1", "flow": 5 }, { "from_id": "F3", "to_id": "F2", "flow": 5 }, { "from_id": "F3", "to_id": "F4", "flow": 5 }, { "from_id": "F3", "to_id": "F5", "flow": 2 }, { "from_id": "F3", "to_id": "F6", "flow": 5 }, { "from_id": "F3", "to_id": "F7", "flow": 2 }, { "from_id": "F3", "to_id": "F8", "flow": 0 }, { "from_id": "F3", "to_id": "F9", "flow": 5 }, { "from_id": "F3", "to_id": "F10", "flow": 1 }, { "from_id": "F3", "to_id": "F11", "flow": 1 }, { "from_id": "F4", "to_id": "F1", "flow": 2 }, { "from_id": "F4", "to_id": "F2", "flow": 1 }, { "from_id": "F4", "to_id": "F3", "flow": 5 }, { "from_id": "F4", "to_id": "F5", "flow": 1 }, { "from_id": "F4", "to_id": "F6", "flow": 6 }, { "from_id": "F4", "to_id": "F7", "flow": 0 }, { "from_id": "F4", "to_id": "F8", "flow": 0 }, { "from_id": "F4", "to_id": "F9", "flow": 10 }, { "from_id": "F4", "to_id": "F10", "flow": 2 }, { "from_id": "F4", "to_id": "F11", "flow": 0 }, { "from_id": "F5", "to_id": "F1", "flow": 1 }, { "from_id": "F5", "to_id": "F2", "flow": 2 }, { "from_id": "F5", "to_id": "F3", "flow": 2 }, { "from_id": "F5", "to_id": "F4", "flow": 1 }, { "from_id": "F5", "to_id": "F6", "flow": 2 }, { "from_id": "F5", "to_id": "F7", "flow": 0 }, { "from_id": "F5", "to_id": "F8", "flow": 3 }, { "from_id": "F5", "to_id": "F9", "flow": 5 }, { "from_id": "F5", "to_id": "F10", "flow": 0 }, { "from_id": "F5", "to_id": "F11", "flow": 5 }, { "from_id": "F6", "to_id": "F1", "flow": 5 }, { "from_id": "F6", "to_id": "F2", "flow": 4 }, { "from_id": "F6", "to_id": "F3", "flow": 5 }, { "from_id": "F6", "to_id": "F4", "flow": 6 }, { "from_id": "F6", "to_id": "F5", "flow": 2 }, { "from_id": "F6", "to_id": "F7", "flow": 5 }, { "from_id": "F6", "to_id": "F8", "flow": 5 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F10", "flow": 1 }, { "from_id": "F6", "to_id": "F11", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 5 }, { "from_id": "F7", "to_id": "F2", "flow": 2 }, { "from_id": "F7", "to_id": "F3", "flow": 2 }, { "from_id": "F7", "to_id": "F4", "flow": 0 }, { "from_id": "F7", "to_id": "F5", "flow": 0 }, { "from_id": "F7", "to_id": "F6", "flow": 5 }, { "from_id": "F7", "to_id": "F8", "flow": 5 }, { "from_id": "F7", "to_id": "F9", "flow": 2 }, { "from_id": "F7", "to_id": "F10", "flow": 1 }, { "from_id": "F7", "to_id": "F11", "flow": 10 }, { "from_id": "F8", "to_id": "F1", "flow": 5 }, { "from_id": "F8", "to_id": "F2", "flow": 5 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 3 }, { "from_id": "F8", "to_id": "F6", "flow": 5 }, { "from_id": "F8", "to_id": "F7", "flow": 5 }, { "from_id": "F8", "to_id": "F9", "flow": 2 }, { "from_id": "F8", "to_id": "F10", "flow": 5 }, { "from_id": "F8", "to_id": "F11", "flow": 0 }, { "from_id": "F9", "to_id": "F1", "flow": 0 }, { "from_id": "F9", "to_id": "F2", "flow": 0 }, { "from_id": "F9", "to_id": "F3", "flow": 5 }, { "from_id": "F9", "to_id": "F4", "flow": 10 }, { "from_id": "F9", "to_id": "F5", "flow": 5 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 2 }, { "from_id": "F9", "to_id": "F8", "flow": 2 }, { "from_id": "F9", "to_id": "F10", "flow": 2 }, { "from_id": "F9", "to_id": "F11", "flow": 1 }, { "from_id": "F10", "to_id": "F1", "flow": 5 }, { "from_id": "F10", "to_id": "F2", "flow": 10 }, { "from_id": "F10", "to_id": "F3", "flow": 1 }, { "from_id": "F10", "to_id": "F4", "flow": 2 }, { "from_id": "F10", "to_id": "F5", "flow": 0 }, { "from_id": "F10", "to_id": "F6", "flow": 1 }, { "from_id": "F10", "to_id": "F7", "flow": 1 }, { "from_id": "F10", "to_id": "F8", "flow": 5 }, { "from_id": "F10", "to_id": "F9", "flow": 2 }, { "from_id": "F10", "to_id": "F11", "flow": 3 }, { "from_id": "F11", "to_id": "F1", "flow": 4 }, { "from_id": "F11", "to_id": "F2", "flow": 3 }, { "from_id": "F11", "to_id": "F3", "flow": 1 }, { "from_id": "F11", "to_id": "F4", "flow": 0 }, { "from_id": "F11", "to_id": "F5", "flow": 5 }, { "from_id": "F11", "to_id": "F6", "flow": 0 }, { "from_id": "F11", "to_id": "F7", "flow": 10 }, { "from_id": "F11", "to_id": "F8", "flow": 0 }, { "from_id": "F11", "to_id": "F9", "flow": 1 }, { "from_id": "F11", "to_id": "F10", "flow": 3 } ] }, "solution_variant": [ 4, 7, 5, 10, 3, 9, 2, 8, 6, 11, 1 ], "context_index": 27, "input_format": "nl", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Someone in the admin office needs to arrange class groups into individual rooms so that groups who commonly share resources end up nearer to each other. The layout’s quality is measured by looking at each pair of groups, multiplying how often they share by how far apart their assigned rooms are, and summing those products; lower totals indicate more convenient setups. Nothing gets left out or duplicated — one group per room, one room per group. The precise data for rooms, groups, sharing rates and distances follows below.\n\n{\n \"num_groups_and_rooms\": 10,\n \"class_groups\": [\n \"F1\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\",\n \"F10\"\n ],\n \"classrooms\": [\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\",\n \"J\"\n ],\n \"distance\": [\n {\n \"room_from_id\": \"A\",\n \"room_to_id\": \"B\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"A\",\n \"room_to_id\": \"C\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"A\",\n \"room_to_id\": \"D\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"A\",\n \"room_to_id\": \"E\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"A\",\n \"room_to_id\": \"F\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"A\",\n \"room_to_id\": \"G\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"A\",\n \"room_to_id\": \"H\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"A\",\n \"room_to_id\": \"I\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"A\",\n \"room_to_id\": \"J\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"B\",\n \"room_to_id\": \"A\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"B\",\n \"room_to_id\": \"C\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"B\",\n \"room_to_id\": \"D\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"B\",\n \"room_to_id\": \"E\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"B\",\n \"room_to_id\": \"F\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"B\",\n \"room_to_id\": \"G\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"B\",\n \"room_to_id\": \"H\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"B\",\n \"room_to_id\": \"I\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"B\",\n \"room_to_id\": \"J\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"C\",\n \"room_to_id\": \"A\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"C\",\n \"room_to_id\": \"B\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"C\",\n \"room_to_id\": \"D\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"C\",\n \"room_to_id\": \"E\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"C\",\n \"room_to_id\": \"F\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"C\",\n \"room_to_id\": \"G\",\n \"walking_distance_between_rooms\": 6\n },\n {\n \"room_from_id\": \"C\",\n \"room_to_id\": \"H\",\n \"walking_distance_between_rooms\": 5\n },\n {\n \"room_from_id\": \"C\",\n \"room_to_id\": \"I\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"C\",\n \"room_to_id\": \"J\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"D\",\n \"room_to_id\": \"A\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"D\",\n \"room_to_id\": \"B\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"D\",\n \"room_to_id\": \"C\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"D\",\n \"room_to_id\": \"E\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"D\",\n \"room_to_id\": \"F\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"D\",\n \"room_to_id\": \"G\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"D\",\n \"room_to_id\": \"H\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"D\",\n \"room_to_id\": \"I\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"D\",\n \"room_to_id\": \"J\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"E\",\n \"room_to_id\": \"A\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"E\",\n \"room_to_id\": \"B\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"E\",\n \"room_to_id\": \"C\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"E\",\n \"room_to_id\": \"D\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"E\",\n \"room_to_id\": \"F\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"E\",\n \"room_to_id\": \"G\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"E\",\n \"room_to_id\": \"H\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"E\",\n \"room_to_id\": \"I\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"E\",\n \"room_to_id\": \"J\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"F\",\n \"room_to_id\": \"A\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"F\",\n \"room_to_id\": \"B\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"F\",\n \"room_to_id\": \"C\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"F\",\n \"room_to_id\": \"D\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"F\",\n \"room_to_id\": \"E\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"F\",\n \"room_to_id\": \"G\",\n \"walking_distance_between_rooms\": 5\n },\n {\n \"room_from_id\": \"F\",\n \"room_to_id\": \"H\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"F\",\n \"room_to_id\": \"I\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"F\",\n \"room_to_id\": \"J\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"G\",\n \"room_to_id\": \"A\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"G\",\n \"room_to_id\": \"B\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"G\",\n \"room_to_id\": \"C\",\n \"walking_distance_between_rooms\": 6\n },\n {\n \"room_from_id\": \"G\",\n \"room_to_id\": \"D\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"G\",\n \"room_to_id\": \"E\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"G\",\n \"room_to_id\": \"F\",\n \"walking_distance_between_rooms\": 5\n },\n {\n \"room_from_id\": \"G\",\n \"room_to_id\": \"H\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"G\",\n \"room_to_id\": \"I\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"G\",\n \"room_to_id\": \"J\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"H\",\n \"room_to_id\": \"A\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"H\",\n \"room_to_id\": \"B\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"H\",\n \"room_to_id\": \"C\",\n \"walking_distance_between_rooms\": 5\n },\n {\n \"room_from_id\": \"H\",\n \"room_to_id\": \"D\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"H\",\n \"room_to_id\": \"E\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"H\",\n \"room_to_id\": \"F\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"H\",\n \"room_to_id\": \"G\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"H\",\n \"room_to_id\": \"I\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"H\",\n \"room_to_id\": \"J\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"I\",\n \"room_to_id\": \"A\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"I\",\n \"room_to_id\": \"B\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"I\",\n \"room_to_id\": \"C\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"I\",\n \"room_to_id\": \"D\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"I\",\n \"room_to_id\": \"E\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"I\",\n \"room_to_id\": \"F\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"I\",\n \"room_to_id\": \"G\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"I\",\n \"room_to_id\": \"H\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"I\",\n \"room_to_id\": \"J\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"J\",\n \"room_to_id\": \"A\",\n \"walking_distance_between_rooms\": 4\n },\n {\n \"room_from_id\": \"J\",\n \"room_to_id\": \"B\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"J\",\n \"room_to_id\": \"C\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"J\",\n \"room_to_id\": \"D\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"J\",\n \"room_to_id\": \"E\",\n \"walking_distance_between_rooms\": 1\n },\n {\n \"room_from_id\": \"J\",\n \"room_to_id\": \"F\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"J\",\n \"room_to_id\": \"G\",\n \"walking_distance_between_rooms\": 3\n },\n {\n \"room_from_id\": \"J\",\n \"room_to_id\": \"H\",\n \"walking_distance_between_rooms\": 2\n },\n {\n \"room_from_id\": \"J\",\n \"room_to_id\": \"I\",\n \"walking_distance_between_rooms\": 1\n }\n ],\n \"flow\": [\n {\n \"group_from_id\": \"F1\",\n \"group_to_id\": \"F2\",\n \"resource_sharing_rate\": 1\n },\n {\n \"group_from_id\": \"F1\",\n \"group_to_id\": \"F3\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F1\",\n \"group_to_id\": \"F4\",\n \"resource_sharing_rate\": 3\n },\n {\n \"group_from_id\": \"F1\",\n \"group_to_id\": \"F5\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F1\",\n \"group_to_id\": \"F6\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F1\",\n \"group_to_id\": \"F7\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F1\",\n \"group_to_id\": \"F8\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F1\",\n \"group_to_id\": \"F9\",\n \"resource_sharing_rate\": 10\n },\n {\n \"group_from_id\": \"F1\",\n \"group_to_id\": \"F10\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F2\",\n \"group_to_id\": \"F1\",\n \"resource_sharing_rate\": 1\n },\n {\n \"group_from_id\": \"F2\",\n \"group_to_id\": \"F3\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F2\",\n \"group_to_id\": \"F4\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F2\",\n \"group_to_id\": \"F5\",\n \"resource_sharing_rate\": 4\n },\n {\n \"group_from_id\": \"F2\",\n \"group_to_id\": \"F6\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F2\",\n \"group_to_id\": \"F7\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F2\",\n \"group_to_id\": \"F8\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F2\",\n \"group_to_id\": \"F9\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F2\",\n \"group_to_id\": \"F10\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F3\",\n \"group_to_id\": \"F1\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F3\",\n \"group_to_id\": \"F2\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F3\",\n \"group_to_id\": \"F4\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F3\",\n \"group_to_id\": \"F5\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F3\",\n \"group_to_id\": \"F6\",\n \"resource_sharing_rate\": 1\n },\n {\n \"group_from_id\": \"F3\",\n \"group_to_id\": \"F7\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F3\",\n \"group_to_id\": \"F8\",\n \"resource_sharing_rate\": 3\n },\n {\n \"group_from_id\": \"F3\",\n \"group_to_id\": \"F9\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F3\",\n \"group_to_id\": \"F10\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F4\",\n \"group_to_id\": \"F1\",\n \"resource_sharing_rate\": 3\n },\n {\n \"group_from_id\": \"F4\",\n \"group_to_id\": \"F2\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F4\",\n \"group_to_id\": \"F3\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F4\",\n \"group_to_id\": \"F5\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F4\",\n \"group_to_id\": \"F6\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F4\",\n \"group_to_id\": \"F7\",\n \"resource_sharing_rate\": 10\n },\n {\n \"group_from_id\": \"F4\",\n \"group_to_id\": \"F8\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F4\",\n \"group_to_id\": \"F9\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F4\",\n \"group_to_id\": \"F10\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F5\",\n \"group_to_id\": \"F1\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F5\",\n \"group_to_id\": \"F2\",\n \"resource_sharing_rate\": 4\n },\n {\n \"group_from_id\": \"F5\",\n \"group_to_id\": \"F3\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F5\",\n \"group_to_id\": \"F4\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F5\",\n \"group_to_id\": \"F6\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F5\",\n \"group_to_id\": \"F7\",\n \"resource_sharing_rate\": 10\n },\n {\n \"group_from_id\": \"F5\",\n \"group_to_id\": \"F8\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F5\",\n \"group_to_id\": \"F9\",\n \"resource_sharing_rate\": 10\n },\n {\n \"group_from_id\": \"F5\",\n \"group_to_id\": \"F10\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F6\",\n \"group_to_id\": \"F1\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F6\",\n \"group_to_id\": \"F2\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F6\",\n \"group_to_id\": \"F3\",\n \"resource_sharing_rate\": 1\n },\n {\n \"group_from_id\": \"F6\",\n \"group_to_id\": \"F4\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F6\",\n \"group_to_id\": \"F5\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F6\",\n \"group_to_id\": \"F7\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F6\",\n \"group_to_id\": \"F8\",\n \"resource_sharing_rate\": 4\n },\n {\n \"group_from_id\": \"F6\",\n \"group_to_id\": \"F9\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F6\",\n \"group_to_id\": \"F10\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F7\",\n \"group_to_id\": \"F1\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F7\",\n \"group_to_id\": \"F2\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F7\",\n \"group_to_id\": \"F3\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F7\",\n \"group_to_id\": \"F4\",\n \"resource_sharing_rate\": 10\n },\n {\n \"group_from_id\": \"F7\",\n \"group_to_id\": \"F5\",\n \"resource_sharing_rate\": 10\n },\n {\n \"group_from_id\": \"F7\",\n \"group_to_id\": \"F6\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F7\",\n \"group_to_id\": \"F8\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F7\",\n \"group_to_id\": \"F9\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F7\",\n \"group_to_id\": \"F10\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F8\",\n \"group_to_id\": \"F1\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F8\",\n \"group_to_id\": \"F2\",\n \"resource_sharing_rate\": 2\n },\n {\n \"group_from_id\": \"F8\",\n \"group_to_id\": \"F3\",\n \"resource_sharing_rate\": 3\n },\n {\n \"group_from_id\": \"F8\",\n \"group_to_id\": \"F4\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F8\",\n \"group_to_id\": \"F5\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F8\",\n \"group_to_id\": \"F6\",\n \"resource_sharing_rate\": 4\n },\n {\n \"group_from_id\": \"F8\",\n \"group_to_id\": \"F7\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F8\",\n \"group_to_id\": \"F9\",\n \"resource_sharing_rate\": 3\n },\n {\n \"group_from_id\": \"F8\",\n \"group_to_id\": \"F10\",\n \"resource_sharing_rate\": 3\n },\n {\n \"group_from_id\": \"F9\",\n \"group_to_id\": \"F1\",\n \"resource_sharing_rate\": 10\n },\n {\n \"group_from_id\": \"F9\",\n \"group_to_id\": \"F2\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F9\",\n \"group_to_id\": \"F3\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F9\",\n \"group_to_id\": \"F4\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F9\",\n \"group_to_id\": \"F5\",\n \"resource_sharing_rate\": 10\n },\n {\n \"group_from_id\": \"F9\",\n \"group_to_id\": \"F6\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F9\",\n \"group_to_id\": \"F7\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F9\",\n \"group_to_id\": \"F8\",\n \"resource_sharing_rate\": 3\n },\n {\n \"group_from_id\": \"F9\",\n \"group_to_id\": \"F10\",\n \"resource_sharing_rate\": 10\n },\n {\n \"group_from_id\": \"F10\",\n \"group_to_id\": \"F1\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F10\",\n \"group_to_id\": \"F2\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F10\",\n \"group_to_id\": \"F3\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F10\",\n \"group_to_id\": \"F4\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F10\",\n \"group_to_id\": \"F5\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F10\",\n \"group_to_id\": \"F6\",\n \"resource_sharing_rate\": 0\n },\n {\n \"group_from_id\": \"F10\",\n \"group_to_id\": \"F7\",\n \"resource_sharing_rate\": 5\n },\n {\n \"group_from_id\": \"F10\",\n \"group_to_id\": \"F8\",\n \"resource_sharing_rate\": 3\n },\n {\n \"group_from_id\": \"F10\",\n \"group_to_id\": \"F9\",\n \"resource_sharing_rate\": 10\n }\n ]\n}\n\nOh, and when you send back the actual room assignment, please use this simple JSON layout so it's clear which group goes to which room:\n\n{\n \"solution\": [\n \"\",\n \"\",\n ...,\n \"\"\n ]\n}\n\nThis just means the array lists, in order, the room id chosen for each group — first entry = first group, second = second group, and so on. It's just a sketch of the shape I need, not the real assignment.\n\nPlease be careful to use the exact identifiers from the instance input — don't rename them or invent new ones. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 1, 3, 2, 3, 4, 3, 2, 3, 4 ], [ 1, 0, 2, 1, 2, 3, 4, 3, 2, 3 ], [ 3, 2, 0, 3, 2, 1, 6, 5, 4, 3 ], [ 2, 1, 3, 0, 1, 2, 3, 2, 1, 2 ], [ 3, 2, 2, 1, 0, 1, 4, 3, 2, 1 ], [ 4, 3, 1, 2, 1, 0, 5, 4, 3, 2 ], [ 3, 4, 6, 3, 4, 5, 0, 1, 2, 3 ], [ 2, 3, 5, 2, 3, 4, 1, 0, 1, 2 ], [ 3, 2, 4, 1, 2, 3, 2, 1, 0, 1 ], [ 4, 3, 3, 2, 1, 2, 3, 2, 1, 0 ] ], "flow_matrix": [ [ 0, 1, 2, 3, 2, 0, 2, 0, 10, 5 ], [ 1, 0, 2, 5, 4, 5, 2, 2, 5, 5 ], [ 2, 2, 0, 5, 5, 1, 0, 3, 0, 5 ], [ 3, 5, 5, 0, 5, 2, 10, 0, 5, 0 ], [ 2, 4, 5, 5, 0, 0, 10, 5, 10, 0 ], [ 0, 5, 1, 2, 0, 0, 0, 4, 0, 0 ], [ 2, 2, 0, 10, 10, 0, 0, 5, 0, 5 ], [ 0, 2, 3, 0, 5, 4, 5, 0, 3, 3 ], [ 10, 5, 0, 5, 10, 0, 0, 3, 0, 10 ], [ 5, 5, 5, 0, 0, 0, 5, 3, 10, 0 ] ], "objective": 582.0 }, "solution": [ 6, 9, 0, 1, 3, 2, 4, 5, 8, 7 ], "obj": 582.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 1 }, { "from_id": "A", "to_id": "C", "distance": 3 }, { "from_id": "A", "to_id": "D", "distance": 2 }, { "from_id": "A", "to_id": "E", "distance": 3 }, { "from_id": "A", "to_id": "F", "distance": 4 }, { "from_id": "A", "to_id": "G", "distance": 3 }, { "from_id": "A", "to_id": "H", "distance": 2 }, { "from_id": "A", "to_id": "I", "distance": 3 }, { "from_id": "A", "to_id": "J", "distance": 4 }, { "from_id": "B", "to_id": "A", "distance": 1 }, { "from_id": "B", "to_id": "C", "distance": 2 }, { "from_id": "B", "to_id": "D", "distance": 1 }, { "from_id": "B", "to_id": "E", "distance": 2 }, { "from_id": "B", "to_id": "F", "distance": 3 }, { "from_id": "B", "to_id": "G", "distance": 4 }, { "from_id": "B", "to_id": "H", "distance": 3 }, { "from_id": "B", "to_id": "I", "distance": 2 }, { "from_id": "B", "to_id": "J", "distance": 3 }, { "from_id": "C", "to_id": "A", "distance": 3 }, { "from_id": "C", "to_id": "B", "distance": 2 }, { "from_id": "C", "to_id": "D", "distance": 3 }, { "from_id": "C", "to_id": "E", "distance": 2 }, { "from_id": "C", "to_id": "F", "distance": 1 }, { "from_id": "C", "to_id": "G", "distance": 6 }, { "from_id": "C", "to_id": "H", "distance": 5 }, { "from_id": "C", "to_id": "I", "distance": 4 }, { "from_id": "C", "to_id": "J", "distance": 3 }, { "from_id": "D", "to_id": "A", "distance": 2 }, { "from_id": "D", "to_id": "B", "distance": 1 }, { "from_id": "D", "to_id": "C", "distance": 3 }, { "from_id": "D", "to_id": "E", "distance": 1 }, { "from_id": "D", "to_id": "F", "distance": 2 }, { "from_id": "D", "to_id": "G", "distance": 3 }, { "from_id": "D", "to_id": "H", "distance": 2 }, { "from_id": "D", "to_id": "I", "distance": 1 }, { "from_id": "D", "to_id": "J", "distance": 2 }, { "from_id": "E", "to_id": "A", "distance": 3 }, { "from_id": "E", "to_id": "B", "distance": 2 }, { "from_id": "E", "to_id": "C", "distance": 2 }, { "from_id": "E", "to_id": "D", "distance": 1 }, { "from_id": "E", "to_id": "F", "distance": 1 }, { "from_id": "E", "to_id": "G", "distance": 4 }, { "from_id": "E", "to_id": "H", "distance": 3 }, { "from_id": "E", "to_id": "I", "distance": 2 }, { "from_id": "E", "to_id": "J", "distance": 1 }, { "from_id": "F", "to_id": "A", "distance": 4 }, { "from_id": "F", "to_id": "B", "distance": 3 }, { "from_id": "F", "to_id": "C", "distance": 1 }, { "from_id": "F", "to_id": "D", "distance": 2 }, { "from_id": "F", "to_id": "E", "distance": 1 }, { "from_id": "F", "to_id": "G", "distance": 5 }, { "from_id": "F", "to_id": "H", "distance": 4 }, { "from_id": "F", "to_id": "I", "distance": 3 }, { "from_id": "F", "to_id": "J", "distance": 2 }, { "from_id": "G", "to_id": "A", "distance": 3 }, { "from_id": "G", "to_id": "B", "distance": 4 }, { "from_id": "G", "to_id": "C", "distance": 6 }, { "from_id": "G", "to_id": "D", "distance": 3 }, { "from_id": "G", "to_id": "E", "distance": 4 }, { "from_id": "G", "to_id": "F", "distance": 5 }, { "from_id": "G", "to_id": "H", "distance": 1 }, { "from_id": "G", "to_id": "I", "distance": 2 }, { "from_id": "G", "to_id": "J", "distance": 3 }, { "from_id": "H", "to_id": "A", "distance": 2 }, { "from_id": "H", "to_id": "B", "distance": 3 }, { "from_id": "H", "to_id": "C", "distance": 5 }, { "from_id": "H", "to_id": "D", "distance": 2 }, { "from_id": "H", "to_id": "E", "distance": 3 }, { "from_id": "H", "to_id": "F", "distance": 4 }, { "from_id": "H", "to_id": "G", "distance": 1 }, { "from_id": "H", "to_id": "I", "distance": 1 }, { "from_id": "H", "to_id": "J", "distance": 2 }, { "from_id": "I", "to_id": "A", "distance": 3 }, { "from_id": "I", "to_id": "B", "distance": 2 }, { "from_id": "I", "to_id": "C", "distance": 4 }, { "from_id": "I", "to_id": "D", "distance": 1 }, { "from_id": "I", "to_id": "E", "distance": 2 }, { "from_id": "I", "to_id": "F", "distance": 3 }, { "from_id": "I", "to_id": "G", "distance": 2 }, { "from_id": "I", "to_id": "H", "distance": 1 }, { "from_id": "I", "to_id": "J", "distance": 1 }, { "from_id": "J", "to_id": "A", "distance": 4 }, { "from_id": "J", "to_id": "B", "distance": 3 }, { "from_id": "J", "to_id": "C", "distance": 3 }, { "from_id": "J", "to_id": "D", "distance": 2 }, { "from_id": "J", "to_id": "E", "distance": 1 }, { "from_id": "J", "to_id": "F", "distance": 2 }, { "from_id": "J", "to_id": "G", "distance": 3 }, { "from_id": "J", "to_id": "H", "distance": 2 }, { "from_id": "J", "to_id": "I", "distance": 1 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 1 }, { "from_id": "F1", "to_id": "F3", "flow": 2 }, { "from_id": "F1", "to_id": "F4", "flow": 3 }, { "from_id": "F1", "to_id": "F5", "flow": 2 }, { "from_id": "F1", "to_id": "F6", "flow": 0 }, { "from_id": "F1", "to_id": "F7", "flow": 2 }, { "from_id": "F1", "to_id": "F8", "flow": 0 }, { "from_id": "F1", "to_id": "F9", "flow": 10 }, { "from_id": "F1", "to_id": "F10", "flow": 5 }, { "from_id": "F2", "to_id": "F1", "flow": 1 }, { "from_id": "F2", "to_id": "F3", "flow": 2 }, { "from_id": "F2", "to_id": "F4", "flow": 5 }, { "from_id": "F2", "to_id": "F5", "flow": 4 }, { "from_id": "F2", "to_id": "F6", "flow": 5 }, { "from_id": "F2", "to_id": "F7", "flow": 2 }, { "from_id": "F2", "to_id": "F8", "flow": 2 }, { "from_id": "F2", "to_id": "F9", "flow": 5 }, { "from_id": "F2", "to_id": "F10", "flow": 5 }, { "from_id": "F3", "to_id": "F1", "flow": 2 }, { "from_id": "F3", "to_id": "F2", "flow": 2 }, { "from_id": "F3", "to_id": "F4", "flow": 5 }, { "from_id": "F3", "to_id": "F5", "flow": 5 }, { "from_id": "F3", "to_id": "F6", "flow": 1 }, { "from_id": "F3", "to_id": "F7", "flow": 0 }, { "from_id": "F3", "to_id": "F8", "flow": 3 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F3", "to_id": "F10", "flow": 5 }, { "from_id": "F4", "to_id": "F1", "flow": 3 }, { "from_id": "F4", "to_id": "F2", "flow": 5 }, { "from_id": "F4", "to_id": "F3", "flow": 5 }, { "from_id": "F4", "to_id": "F5", "flow": 5 }, { "from_id": "F4", "to_id": "F6", "flow": 2 }, { "from_id": "F4", "to_id": "F7", "flow": 10 }, { "from_id": "F4", "to_id": "F8", "flow": 0 }, { "from_id": "F4", "to_id": "F9", "flow": 5 }, { "from_id": "F4", "to_id": "F10", "flow": 0 }, { "from_id": "F5", "to_id": "F1", "flow": 2 }, { "from_id": "F5", "to_id": "F2", "flow": 4 }, { "from_id": "F5", "to_id": "F3", "flow": 5 }, { "from_id": "F5", "to_id": "F4", "flow": 5 }, { "from_id": "F5", "to_id": "F6", "flow": 0 }, { "from_id": "F5", "to_id": "F7", "flow": 10 }, { "from_id": "F5", "to_id": "F8", "flow": 5 }, { "from_id": "F5", "to_id": "F9", "flow": 10 }, { "from_id": "F5", "to_id": "F10", "flow": 0 }, { "from_id": "F6", "to_id": "F1", "flow": 0 }, { "from_id": "F6", "to_id": "F2", "flow": 5 }, { "from_id": "F6", "to_id": "F3", "flow": 1 }, { "from_id": "F6", "to_id": "F4", "flow": 2 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 4 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 2 }, { "from_id": "F7", "to_id": "F2", "flow": 2 }, { "from_id": "F7", "to_id": "F3", "flow": 0 }, { "from_id": "F7", "to_id": "F4", "flow": 10 }, { "from_id": "F7", "to_id": "F5", "flow": 10 }, { "from_id": "F7", "to_id": "F6", "flow": 0 }, { "from_id": "F7", "to_id": "F8", "flow": 5 }, { "from_id": "F7", "to_id": "F9", "flow": 0 }, { "from_id": "F7", "to_id": "F10", "flow": 5 }, { "from_id": "F8", "to_id": "F1", "flow": 0 }, { "from_id": "F8", "to_id": "F2", "flow": 2 }, { "from_id": "F8", "to_id": "F3", "flow": 3 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 5 }, { "from_id": "F8", "to_id": "F6", "flow": 4 }, { "from_id": "F8", "to_id": "F7", "flow": 5 }, { "from_id": "F8", "to_id": "F9", "flow": 3 }, { "from_id": "F8", "to_id": "F10", "flow": 3 }, { "from_id": "F9", "to_id": "F1", "flow": 10 }, { "from_id": "F9", "to_id": "F2", "flow": 5 }, { "from_id": "F9", "to_id": "F3", "flow": 0 }, { "from_id": "F9", "to_id": "F4", "flow": 5 }, { "from_id": "F9", "to_id": "F5", "flow": 10 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 0 }, { "from_id": "F9", "to_id": "F8", "flow": 3 }, { "from_id": "F9", "to_id": "F10", "flow": 10 }, { "from_id": "F10", "to_id": "F1", "flow": 5 }, { "from_id": "F10", "to_id": "F2", "flow": 5 }, { "from_id": "F10", "to_id": "F3", "flow": 5 }, { "from_id": "F10", "to_id": "F4", "flow": 0 }, { "from_id": "F10", "to_id": "F5", "flow": 0 }, { "from_id": "F10", "to_id": "F6", "flow": 0 }, { "from_id": "F10", "to_id": "F7", "flow": 5 }, { "from_id": "F10", "to_id": "F8", "flow": 3 }, { "from_id": "F10", "to_id": "F9", "flow": 10 } ] }, "solution_variant": [ "G", "J", "A", "B", "D", "C", "E", "F", "I", "H" ], "context_index": 28, "input_format": "json", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Out on the tarmac the challenge is to park each ground crew in its own apron spot so the teams that exchange the most calls and handoffs sit close by. It’s simple logistics: one team per zone, and each zone gets exactly one team — no overlaps, no omissions. Evaluate any layout by taking each pair of teams, multiplying how often they need to coordinate by how far apart their zones are, and summing every resulting product; the smaller that total, the better the layout. The detailed figures and distances are listed below.\n\nBelow are the 10 ground crew teams (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10) and apron zones (A, B, C, D, E, F, G, H, I, J), followed by each directed zone separation and coordination record.\nApron zone A → apron zone B: separation 1.\nApron zone A → apron zone C: separation 2.\nApron zone A → apron zone D: separation 4.\nApron zone A → apron zone E: separation 2.\nApron zone A → apron zone F: separation 3.\nApron zone A → apron zone G: separation 4.\nApron zone A → apron zone H: separation 2.\nApron zone A → apron zone I: separation 3.\nApron zone A → apron zone J: separation 5.\nApron zone B → apron zone A: separation 1.\nApron zone B → apron zone C: separation 1.\nApron zone B → apron zone D: separation 3.\nApron zone B → apron zone E: separation 1.\nApron zone B → apron zone F: separation 2.\nApron zone B → apron zone G: separation 3.\nApron zone B → apron zone H: separation 3.\nApron zone B → apron zone I: separation 2.\nApron zone B → apron zone J: separation 4.\nApron zone C → apron zone A: separation 2.\nApron zone C → apron zone B: separation 1.\nApron zone C → apron zone D: separation 2.\nApron zone C → apron zone E: separation 2.\nApron zone C → apron zone F: separation 1.\nApron zone C → apron zone G: separation 2.\nApron zone C → apron zone H: separation 4.\nApron zone C → apron zone I: separation 3.\nApron zone C → apron zone J: separation 3.\nApron zone D → apron zone A: separation 4.\nApron zone D → apron zone B: separation 3.\nApron zone D → apron zone C: separation 2.\nApron zone D → apron zone E: separation 4.\nApron zone D → apron zone F: separation 3.\nApron zone D → apron zone G: separation 2.\nApron zone D → apron zone H: separation 6.\nApron zone D → apron zone I: separation 5.\nApron zone D → apron zone J: separation 3.\nApron zone E → apron zone A: separation 2.\nApron zone E → apron zone B: separation 1.\nApron zone E → apron zone C: separation 2.\nApron zone E → apron zone D: separation 4.\nApron zone E → apron zone F: separation 1.\nApron zone E → apron zone G: separation 2.\nApron zone E → apron zone H: separation 2.\nApron zone E → apron zone I: separation 1.\nApron zone E → apron zone J: separation 3.\nApron zone F → apron zone A: separation 3.\nApron zone F → apron zone B: separation 2.\nApron zone F → apron zone C: separation 1.\nApron zone F → apron zone D: separation 3.\nApron zone F → apron zone E: separation 1.\nApron zone F → apron zone G: separation 1.\nApron zone F → apron zone H: separation 3.\nApron zone F → apron zone I: separation 2.\nApron zone F → apron zone J: separation 2.\nApron zone G → apron zone A: separation 4.\nApron zone G → apron zone B: separation 3.\nApron zone G → apron zone C: separation 2.\nApron zone G → apron zone D: separation 2.\nApron zone G → apron zone E: separation 2.\nApron zone G → apron zone F: separation 1.\nApron zone G → apron zone H: separation 4.\nApron zone G → apron zone I: separation 3.\nApron zone G → apron zone J: separation 1.\nApron zone H → apron zone A: separation 2.\nApron zone H → apron zone B: separation 3.\nApron zone H → apron zone C: separation 4.\nApron zone H → apron zone D: separation 6.\nApron zone H → apron zone E: separation 2.\nApron zone H → apron zone F: separation 3.\nApron zone H → apron zone G: separation 4.\nApron zone H → apron zone I: separation 1.\nApron zone H → apron zone J: separation 3.\nApron zone I → apron zone A: separation 3.\nApron zone I → apron zone B: separation 2.\nApron zone I → apron zone C: separation 3.\nApron zone I → apron zone D: separation 5.\nApron zone I → apron zone E: separation 1.\nApron zone I → apron zone F: separation 2.\nApron zone I → apron zone G: separation 3.\nApron zone I → apron zone H: separation 1.\nApron zone I → apron zone J: separation 2.\nApron zone J → apron zone A: separation 5.\nApron zone J → apron zone B: separation 4.\nApron zone J → apron zone C: separation 3.\nApron zone J → apron zone D: separation 3.\nApron zone J → apron zone E: separation 3.\nApron zone J → apron zone F: separation 2.\nApron zone J → apron zone G: separation 1.\nApron zone J → apron zone H: separation 3.\nApron zone J → apron zone I: separation 2.\nTeam F1 → team F2: coordination frequency 10.\nTeam F1 → team F3: coordination frequency 0.\nTeam F1 → team F4: coordination frequency 1.\nTeam F1 → team F5: coordination frequency 1.\nTeam F1 → team F6: coordination frequency 2.\nTeam F1 → team F7: coordination frequency 2.\nTeam F1 → team F8: coordination frequency 2.\nTeam F1 → team F9: coordination frequency 0.\nTeam F1 → team F10: coordination frequency 0.\nTeam F2 → team F1: coordination frequency 10.\nTeam F2 → team F3: coordination frequency 1.\nTeam F2 → team F4: coordination frequency 2.\nTeam F2 → team F5: coordination frequency 2.\nTeam F2 → team F6: coordination frequency 3.\nTeam F2 → team F7: coordination frequency 2.\nTeam F2 → team F8: coordination frequency 2.\nTeam F2 → team F9: coordination frequency 0.\nTeam F2 → team F10: coordination frequency 5.\nTeam F3 → team F1: coordination frequency 0.\nTeam F3 → team F2: coordination frequency 1.\nTeam F3 → team F4: coordination frequency 2.\nTeam F3 → team F5: coordination frequency 2.\nTeam F3 → team F6: coordination frequency 5.\nTeam F3 → team F7: coordination frequency 4.\nTeam F3 → team F8: coordination frequency 2.\nTeam F3 → team F9: coordination frequency 2.\nTeam F3 → team F10: coordination frequency 5.\nTeam F4 → team F1: coordination frequency 1.\nTeam F4 → team F2: coordination frequency 2.\nTeam F4 → team F3: coordination frequency 2.\nTeam F4 → team F5: coordination frequency 5.\nTeam F4 → team F6: coordination frequency 5.\nTeam F4 → team F7: coordination frequency 5.\nTeam F4 → team F8: coordination frequency 0.\nTeam F4 → team F9: coordination frequency 3.\nTeam F4 → team F10: coordination frequency 5.\nTeam F5 → team F1: coordination frequency 1.\nTeam F5 → team F2: coordination frequency 2.\nTeam F5 → team F3: coordination frequency 2.\nTeam F5 → team F4: coordination frequency 5.\nTeam F5 → team F6: coordination frequency 6.\nTeam F5 → team F7: coordination frequency 0.\nTeam F5 → team F8: coordination frequency 5.\nTeam F5 → team F9: coordination frequency 5.\nTeam F5 → team F10: coordination frequency 1.\nTeam F6 → team F1: coordination frequency 2.\nTeam F6 → team F2: coordination frequency 3.\nTeam F6 → team F3: coordination frequency 5.\nTeam F6 → team F4: coordination frequency 5.\nTeam F6 → team F5: coordination frequency 6.\nTeam F6 → team F7: coordination frequency 5.\nTeam F6 → team F8: coordination frequency 10.\nTeam F6 → team F9: coordination frequency 0.\nTeam F6 → team F10: coordination frequency 0.\nTeam F7 → team F1: coordination frequency 2.\nTeam F7 → team F2: coordination frequency 2.\nTeam F7 → team F3: coordination frequency 4.\nTeam F7 → team F4: coordination frequency 5.\nTeam F7 → team F5: coordination frequency 0.\nTeam F7 → team F6: coordination frequency 5.\nTeam F7 → team F8: coordination frequency 10.\nTeam F7 → team F9: coordination frequency 5.\nTeam F7 → team F10: coordination frequency 0.\nTeam F8 → team F1: coordination frequency 2.\nTeam F8 → team F2: coordination frequency 2.\nTeam F8 → team F3: coordination frequency 2.\nTeam F8 → team F4: coordination frequency 0.\nTeam F8 → team F5: coordination frequency 5.\nTeam F8 → team F6: coordination frequency 10.\nTeam F8 → team F7: coordination frequency 10.\nTeam F8 → team F9: coordination frequency 5.\nTeam F8 → team F10: coordination frequency 5.\nTeam F9 → team F1: coordination frequency 0.\nTeam F9 → team F2: coordination frequency 0.\nTeam F9 → team F3: coordination frequency 2.\nTeam F9 → team F4: coordination frequency 3.\nTeam F9 → team F5: coordination frequency 5.\nTeam F9 → team F6: coordination frequency 0.\nTeam F9 → team F7: coordination frequency 5.\nTeam F9 → team F8: coordination frequency 5.\nTeam F9 → team F10: coordination frequency 3.\nTeam F10 → team F1: coordination frequency 0.\nTeam F10 → team F2: coordination frequency 5.\nTeam F10 → team F3: coordination frequency 5.\nTeam F10 → team F4: coordination frequency 5.\nTeam F10 → team F5: coordination frequency 1.\nTeam F10 → team F6: coordination frequency 0.\nTeam F10 → team F7: coordination frequency 0.\nTeam F10 → team F8: coordination frequency 5.\nTeam F10 → team F9: coordination frequency 3.\nUse these figures to compute the summed products of coordination frequency and zone separation to evaluate layouts for the 10 teams.\n\nAnd when you reply with a proposed layout, a neat little JSON snippet like this is easiest for me to read:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of that as a simple form: the array lists the spot (location) for each crew in order — first entry for the first team, second for the second team, and so on. It's just a sketch of the shape I expect, not the actual answer.\n\nPlease use the exact identifiers from the instance input — no renaming, no extra labels. Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 1, 2, 4, 2, 3, 4, 2, 3, 5 ], [ 1, 0, 1, 3, 1, 2, 3, 3, 2, 4 ], [ 2, 1, 0, 2, 2, 1, 2, 4, 3, 3 ], [ 4, 3, 2, 0, 4, 3, 2, 6, 5, 3 ], [ 2, 1, 2, 4, 0, 1, 2, 2, 1, 3 ], [ 3, 2, 1, 3, 1, 0, 1, 3, 2, 2 ], [ 4, 3, 2, 2, 2, 1, 0, 4, 3, 1 ], [ 2, 3, 4, 6, 2, 3, 4, 0, 1, 3 ], [ 3, 2, 3, 5, 1, 2, 3, 1, 0, 2 ], [ 5, 4, 3, 3, 3, 2, 1, 3, 2, 0 ] ], "flow_matrix": [ [ 0, 10, 0, 1, 1, 2, 2, 2, 0, 0 ], [ 10, 0, 1, 2, 2, 3, 2, 2, 0, 5 ], [ 0, 1, 0, 2, 2, 5, 4, 2, 2, 5 ], [ 1, 2, 2, 0, 5, 5, 5, 0, 3, 5 ], [ 1, 2, 2, 5, 0, 6, 0, 5, 5, 1 ], [ 2, 3, 5, 5, 6, 0, 5, 10, 0, 0 ], [ 2, 2, 4, 5, 0, 5, 0, 10, 5, 0 ], [ 2, 2, 2, 0, 5, 10, 10, 0, 5, 5 ], [ 0, 0, 2, 3, 5, 0, 5, 5, 0, 3 ], [ 0, 5, 5, 5, 1, 0, 0, 5, 3, 0 ] ], "objective": 564.0 }, "solution": [ 7, 8, 3, 2, 0, 1, 5, 4, 6, 9 ], "obj": 564.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 1 }, { "from_id": "A", "to_id": "C", "distance": 2 }, { "from_id": "A", "to_id": "D", "distance": 4 }, { "from_id": "A", "to_id": "E", "distance": 2 }, { "from_id": "A", "to_id": "F", "distance": 3 }, { "from_id": "A", "to_id": "G", "distance": 4 }, { "from_id": "A", "to_id": "H", "distance": 2 }, { "from_id": "A", "to_id": "I", "distance": 3 }, { "from_id": "A", "to_id": "J", "distance": 5 }, { "from_id": "B", "to_id": "A", "distance": 1 }, { "from_id": "B", "to_id": "C", "distance": 1 }, { "from_id": "B", "to_id": "D", "distance": 3 }, { "from_id": "B", "to_id": "E", "distance": 1 }, { "from_id": "B", "to_id": "F", "distance": 2 }, { "from_id": "B", "to_id": "G", "distance": 3 }, { "from_id": "B", "to_id": "H", "distance": 3 }, { "from_id": "B", "to_id": "I", "distance": 2 }, { "from_id": "B", "to_id": "J", "distance": 4 }, { "from_id": "C", "to_id": "A", "distance": 2 }, { "from_id": "C", "to_id": "B", "distance": 1 }, { "from_id": "C", "to_id": "D", "distance": 2 }, { "from_id": "C", "to_id": "E", "distance": 2 }, { "from_id": "C", "to_id": "F", "distance": 1 }, { "from_id": "C", "to_id": "G", "distance": 2 }, { "from_id": "C", "to_id": "H", "distance": 4 }, { "from_id": "C", "to_id": "I", "distance": 3 }, { "from_id": "C", "to_id": "J", "distance": 3 }, { "from_id": "D", "to_id": "A", "distance": 4 }, { "from_id": "D", "to_id": "B", "distance": 3 }, { "from_id": "D", "to_id": "C", "distance": 2 }, { "from_id": "D", "to_id": "E", "distance": 4 }, { "from_id": "D", "to_id": "F", "distance": 3 }, { "from_id": "D", "to_id": "G", "distance": 2 }, { "from_id": "D", "to_id": "H", "distance": 6 }, { "from_id": "D", "to_id": "I", "distance": 5 }, { "from_id": "D", "to_id": "J", "distance": 3 }, { "from_id": "E", "to_id": "A", "distance": 2 }, { "from_id": "E", "to_id": "B", "distance": 1 }, { "from_id": "E", "to_id": "C", "distance": 2 }, { "from_id": "E", "to_id": "D", "distance": 4 }, { "from_id": "E", "to_id": "F", "distance": 1 }, { "from_id": "E", "to_id": "G", "distance": 2 }, { "from_id": "E", "to_id": "H", "distance": 2 }, { "from_id": "E", "to_id": "I", "distance": 1 }, { "from_id": "E", "to_id": "J", "distance": 3 }, { "from_id": "F", "to_id": "A", "distance": 3 }, { "from_id": "F", "to_id": "B", "distance": 2 }, { "from_id": "F", "to_id": "C", "distance": 1 }, { "from_id": "F", "to_id": "D", "distance": 3 }, { "from_id": "F", "to_id": "E", "distance": 1 }, { "from_id": "F", "to_id": "G", "distance": 1 }, { "from_id": "F", "to_id": "H", "distance": 3 }, { "from_id": "F", "to_id": "I", "distance": 2 }, { "from_id": "F", "to_id": "J", "distance": 2 }, { "from_id": "G", "to_id": "A", "distance": 4 }, { "from_id": "G", "to_id": "B", "distance": 3 }, { "from_id": "G", "to_id": "C", "distance": 2 }, { "from_id": "G", "to_id": "D", "distance": 2 }, { "from_id": "G", "to_id": "E", "distance": 2 }, { "from_id": "G", "to_id": "F", "distance": 1 }, { "from_id": "G", "to_id": "H", "distance": 4 }, { "from_id": "G", "to_id": "I", "distance": 3 }, { "from_id": "G", "to_id": "J", "distance": 1 }, { "from_id": "H", "to_id": "A", "distance": 2 }, { "from_id": "H", "to_id": "B", "distance": 3 }, { "from_id": "H", "to_id": "C", "distance": 4 }, { "from_id": "H", "to_id": "D", "distance": 6 }, { "from_id": "H", "to_id": "E", "distance": 2 }, { "from_id": "H", "to_id": "F", "distance": 3 }, { "from_id": "H", "to_id": "G", "distance": 4 }, { "from_id": "H", "to_id": "I", "distance": 1 }, { "from_id": "H", "to_id": "J", "distance": 3 }, { "from_id": "I", "to_id": "A", "distance": 3 }, { "from_id": "I", "to_id": "B", "distance": 2 }, { "from_id": "I", "to_id": "C", "distance": 3 }, { "from_id": "I", "to_id": "D", "distance": 5 }, { "from_id": "I", "to_id": "E", "distance": 1 }, { "from_id": "I", "to_id": "F", "distance": 2 }, { "from_id": "I", "to_id": "G", "distance": 3 }, { "from_id": "I", "to_id": "H", "distance": 1 }, { "from_id": "I", "to_id": "J", "distance": 2 }, { "from_id": "J", "to_id": "A", "distance": 5 }, { "from_id": "J", "to_id": "B", "distance": 4 }, { "from_id": "J", "to_id": "C", "distance": 3 }, { "from_id": "J", "to_id": "D", "distance": 3 }, { "from_id": "J", "to_id": "E", "distance": 3 }, { "from_id": "J", "to_id": "F", "distance": 2 }, { "from_id": "J", "to_id": "G", "distance": 1 }, { "from_id": "J", "to_id": "H", "distance": 3 }, { "from_id": "J", "to_id": "I", "distance": 2 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 10 }, { "from_id": "F1", "to_id": "F3", "flow": 0 }, { "from_id": "F1", "to_id": "F4", "flow": 1 }, { "from_id": "F1", "to_id": "F5", "flow": 1 }, { "from_id": "F1", "to_id": "F6", "flow": 2 }, { "from_id": "F1", "to_id": "F7", "flow": 2 }, { "from_id": "F1", "to_id": "F8", "flow": 2 }, { "from_id": "F1", "to_id": "F9", "flow": 0 }, { "from_id": "F1", "to_id": "F10", "flow": 0 }, { "from_id": "F2", "to_id": "F1", "flow": 10 }, { "from_id": "F2", "to_id": "F3", "flow": 1 }, { "from_id": "F2", "to_id": "F4", "flow": 2 }, { "from_id": "F2", "to_id": "F5", "flow": 2 }, { "from_id": "F2", "to_id": "F6", "flow": 3 }, { "from_id": "F2", "to_id": "F7", "flow": 2 }, { "from_id": "F2", "to_id": "F8", "flow": 2 }, { "from_id": "F2", "to_id": "F9", "flow": 0 }, { "from_id": "F2", "to_id": "F10", "flow": 5 }, { "from_id": "F3", "to_id": "F1", "flow": 0 }, { "from_id": "F3", "to_id": "F2", "flow": 1 }, { "from_id": "F3", "to_id": "F4", "flow": 2 }, { "from_id": "F3", "to_id": "F5", "flow": 2 }, { "from_id": "F3", "to_id": "F6", "flow": 5 }, { "from_id": "F3", "to_id": "F7", "flow": 4 }, { "from_id": "F3", "to_id": "F8", "flow": 2 }, { "from_id": "F3", "to_id": "F9", "flow": 2 }, { "from_id": "F3", "to_id": "F10", "flow": 5 }, { "from_id": "F4", "to_id": "F1", "flow": 1 }, { "from_id": "F4", "to_id": "F2", "flow": 2 }, { "from_id": "F4", "to_id": "F3", "flow": 2 }, { "from_id": "F4", "to_id": "F5", "flow": 5 }, { "from_id": "F4", "to_id": "F6", "flow": 5 }, { "from_id": "F4", "to_id": "F7", "flow": 5 }, { "from_id": "F4", "to_id": "F8", "flow": 0 }, { "from_id": "F4", "to_id": "F9", "flow": 3 }, { "from_id": "F4", "to_id": "F10", "flow": 5 }, { "from_id": "F5", "to_id": "F1", "flow": 1 }, { "from_id": "F5", "to_id": "F2", "flow": 2 }, { "from_id": "F5", "to_id": "F3", "flow": 2 }, { "from_id": "F5", "to_id": "F4", "flow": 5 }, { "from_id": "F5", "to_id": "F6", "flow": 6 }, { "from_id": "F5", "to_id": "F7", "flow": 0 }, { "from_id": "F5", "to_id": "F8", "flow": 5 }, { "from_id": "F5", "to_id": "F9", "flow": 5 }, { "from_id": "F5", "to_id": "F10", "flow": 1 }, { "from_id": "F6", "to_id": "F1", "flow": 2 }, { "from_id": "F6", "to_id": "F2", "flow": 3 }, { "from_id": "F6", "to_id": "F3", "flow": 5 }, { "from_id": "F6", "to_id": "F4", "flow": 5 }, { "from_id": "F6", "to_id": "F5", "flow": 6 }, { "from_id": "F6", "to_id": "F7", "flow": 5 }, { "from_id": "F6", "to_id": "F8", "flow": 10 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 2 }, { "from_id": "F7", "to_id": "F2", "flow": 2 }, { "from_id": "F7", "to_id": "F3", "flow": 4 }, { "from_id": "F7", "to_id": "F4", "flow": 5 }, { "from_id": "F7", "to_id": "F5", "flow": 0 }, { "from_id": "F7", "to_id": "F6", "flow": 5 }, { "from_id": "F7", "to_id": "F8", "flow": 10 }, { "from_id": "F7", "to_id": "F9", "flow": 5 }, { "from_id": "F7", "to_id": "F10", "flow": 0 }, { "from_id": "F8", "to_id": "F1", "flow": 2 }, { "from_id": "F8", "to_id": "F2", "flow": 2 }, { "from_id": "F8", "to_id": "F3", "flow": 2 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 5 }, { "from_id": "F8", "to_id": "F6", "flow": 10 }, { "from_id": "F8", "to_id": "F7", "flow": 10 }, { "from_id": "F8", "to_id": "F9", "flow": 5 }, { "from_id": "F8", "to_id": "F10", "flow": 5 }, { "from_id": "F9", "to_id": "F1", "flow": 0 }, { "from_id": "F9", "to_id": "F2", "flow": 0 }, { "from_id": "F9", "to_id": "F3", "flow": 2 }, { "from_id": "F9", "to_id": "F4", "flow": 3 }, { "from_id": "F9", "to_id": "F5", "flow": 5 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 5 }, { "from_id": "F9", "to_id": "F8", "flow": 5 }, { "from_id": "F9", "to_id": "F10", "flow": 3 }, { "from_id": "F10", "to_id": "F1", "flow": 0 }, { "from_id": "F10", "to_id": "F2", "flow": 5 }, { "from_id": "F10", "to_id": "F3", "flow": 5 }, { "from_id": "F10", "to_id": "F4", "flow": 5 }, { "from_id": "F10", "to_id": "F5", "flow": 1 }, { "from_id": "F10", "to_id": "F6", "flow": 0 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 5 }, { "from_id": "F10", "to_id": "F9", "flow": 3 } ] }, "solution_variant": [ "H", "I", "D", "C", "A", "B", "F", "E", "G", "J" ], "context_index": 29, "input_format": "nl", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "In town there’s a small reshuffle coming: public service offices will be placed into the set of municipal buildings, and the aim is to cut down on needless walking between offices. The requirement is straightforward — one office per building and one building per office, so everything’s matched up without extras. To evaluate any particular plan, go through every pair of offices, multiply how many people travel between them by how far apart their buildings are, and total those values; plans with smaller totals keep overall travel down. The concrete details about offices, how often people move between them, and building distances are shown below.\n\n# number_of_offices_and_buildings=10\n# office_ids=F1, F2, F3, F4, F5, F6, F7, F8, F9, F10\n# building_ids=1, 2, 3, 4, 5, 6, 7, 8, 9, 10\n\norigin_building_id,destination_building_id,walking_distance_between_buildings\n1,2,1\n1,3,2\n1,4,2\n1,5,3\n1,6,4\n1,7,5\n1,8,2\n1,9,3\n1,10,4\n2,1,1\n2,3,1\n2,4,1\n2,5,2\n2,6,3\n2,7,4\n2,8,3\n2,9,2\n2,10,3\n3,1,2\n3,2,1\n3,4,2\n3,5,1\n3,6,2\n3,7,3\n3,8,4\n3,9,3\n3,10,2\n4,1,2\n4,2,1\n4,3,2\n4,5,1\n4,6,2\n4,7,3\n4,8,2\n4,9,1\n4,10,2\n5,1,3\n5,2,2\n5,3,1\n5,4,1\n5,6,1\n5,7,2\n5,8,3\n5,9,2\n5,10,1\n6,1,4\n6,2,3\n6,3,2\n6,4,2\n6,5,1\n6,7,1\n6,8,4\n6,9,3\n6,10,2\n7,1,5\n7,2,4\n7,3,3\n7,4,3\n7,5,2\n7,6,1\n7,8,5\n7,9,4\n7,10,3\n8,1,2\n8,2,3\n8,3,4\n8,4,2\n8,5,3\n8,6,4\n8,7,5\n8,9,1\n8,10,2\n9,1,3\n9,2,2\n9,3,3\n9,4,1\n9,5,2\n9,6,3\n9,7,4\n9,8,1\n9,10,1\n10,1,4\n10,2,3\n10,3,2\n10,4,2\n10,5,1\n10,6,2\n10,7,3\n10,8,2\n10,9,1\n\norigin_office_id,destination_office_id,citizen_flow_between_offices\nF1,F2,10\nF1,F3,0\nF1,F4,1\nF1,F5,2\nF1,F6,2\nF1,F7,2\nF1,F8,2\nF1,F9,0\nF1,F10,4\nF2,F1,10\nF2,F3,1\nF2,F4,2\nF2,F5,3\nF2,F6,2\nF2,F7,0\nF2,F8,2\nF2,F9,0\nF2,F10,10\nF3,F1,0\nF3,F2,1\nF3,F4,2\nF3,F5,5\nF3,F6,4\nF3,F7,5\nF3,F8,2\nF3,F9,2\nF3,F10,5\nF4,F1,1\nF4,F2,2\nF4,F3,2\nF4,F5,6\nF4,F6,0\nF4,F7,1\nF4,F8,5\nF4,F9,5\nF4,F10,5\nF5,F1,2\nF5,F2,3\nF5,F3,5\nF5,F4,6\nF5,F6,5\nF5,F7,2\nF5,F8,10\nF5,F9,0\nF5,F10,5\nF6,F1,2\nF6,F2,2\nF6,F3,4\nF6,F4,0\nF6,F5,5\nF6,F7,0\nF6,F8,10\nF6,F9,5\nF6,F10,10\nF7,F1,2\nF7,F2,0\nF7,F3,5\nF7,F4,1\nF7,F5,2\nF7,F6,0\nF7,F8,0\nF7,F9,4\nF7,F10,0\nF8,F1,2\nF8,F2,2\nF8,F3,2\nF8,F4,5\nF8,F5,10\nF8,F6,10\nF8,F7,0\nF8,F9,5\nF8,F10,0\nF9,F1,0\nF9,F2,0\nF9,F3,2\nF9,F4,5\nF9,F5,0\nF9,F6,5\nF9,F7,4\nF9,F8,5\nF9,F10,3\nF10,F1,4\nF10,F2,10\nF10,F3,5\nF10,F4,5\nF10,F5,5\nF10,F6,10\nF10,F7,0\nF10,F8,0\nF10,F9,3\n\nIf you want to send a plan back, it's handy to use a small JSON snippet like this so everything lines up cleanly with the instance format:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of that list as a simple form: the first entry is the building chosen for the first office, the second entry is the building for the second office, and so on down the list. This JSON is just a sketch of the expected shape — not the actual answer itself.\n\nAlso, please make sure to use the exact identifiers that appear in the instance input — do not rename them or invent new labels. For example: Valid identifiers look like plain numbers such as \"1\" or \"23\", single capital letters like \"A\" or \"B\", or a capital letter followed by digits like \"A1\" or \"X7\".", "instance": { "distance_matrix": [ [ 0, 1, 2, 2, 3, 4, 5, 2, 3, 4 ], [ 1, 0, 1, 1, 2, 3, 4, 3, 2, 3 ], [ 2, 1, 0, 2, 1, 2, 3, 4, 3, 2 ], [ 2, 1, 2, 0, 1, 2, 3, 2, 1, 2 ], [ 3, 2, 1, 1, 0, 1, 2, 3, 2, 1 ], [ 4, 3, 2, 2, 1, 0, 1, 4, 3, 2 ], [ 5, 4, 3, 3, 2, 1, 0, 5, 4, 3 ], [ 2, 3, 4, 2, 3, 4, 5, 0, 1, 2 ], [ 3, 2, 3, 1, 2, 3, 4, 1, 0, 1 ], [ 4, 3, 2, 2, 1, 2, 3, 2, 1, 0 ] ], "flow_matrix": [ [ 0, 10, 0, 1, 2, 2, 2, 2, 0, 4 ], [ 10, 0, 1, 2, 3, 2, 0, 2, 0, 10 ], [ 0, 1, 0, 2, 5, 4, 5, 2, 2, 5 ], [ 1, 2, 2, 0, 6, 0, 1, 5, 5, 5 ], [ 2, 3, 5, 6, 0, 5, 2, 10, 0, 5 ], [ 2, 2, 4, 0, 5, 0, 0, 10, 5, 10 ], [ 2, 0, 5, 1, 2, 0, 0, 0, 4, 0 ], [ 2, 2, 2, 5, 10, 10, 0, 0, 5, 0 ], [ 0, 0, 2, 5, 0, 5, 4, 5, 0, 3 ], [ 4, 10, 5, 5, 5, 10, 0, 0, 3, 0 ] ], "objective": 516.0 }, "solution": [ 6, 5, 9, 8, 3, 2, 7, 1, 0, 4 ], "obj": 516.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 1 }, { "from_id": 1, "to_id": 3, "distance": 2 }, { "from_id": 1, "to_id": 4, "distance": 2 }, { "from_id": 1, "to_id": 5, "distance": 3 }, { "from_id": 1, "to_id": 6, "distance": 4 }, { "from_id": 1, "to_id": 7, "distance": 5 }, { "from_id": 1, "to_id": 8, "distance": 2 }, { "from_id": 1, "to_id": 9, "distance": 3 }, { "from_id": 1, "to_id": 10, "distance": 4 }, { "from_id": 2, "to_id": 1, "distance": 1 }, { "from_id": 2, "to_id": 3, "distance": 1 }, { "from_id": 2, "to_id": 4, "distance": 1 }, { "from_id": 2, "to_id": 5, "distance": 2 }, { "from_id": 2, "to_id": 6, "distance": 3 }, { "from_id": 2, "to_id": 7, "distance": 4 }, { "from_id": 2, "to_id": 8, "distance": 3 }, { "from_id": 2, "to_id": 9, "distance": 2 }, { "from_id": 2, "to_id": 10, "distance": 3 }, { "from_id": 3, "to_id": 1, "distance": 2 }, { "from_id": 3, "to_id": 2, "distance": 1 }, { "from_id": 3, "to_id": 4, "distance": 2 }, { "from_id": 3, "to_id": 5, "distance": 1 }, { "from_id": 3, "to_id": 6, "distance": 2 }, { "from_id": 3, "to_id": 7, "distance": 3 }, { "from_id": 3, "to_id": 8, "distance": 4 }, { "from_id": 3, "to_id": 9, "distance": 3 }, { "from_id": 3, "to_id": 10, "distance": 2 }, { "from_id": 4, "to_id": 1, "distance": 2 }, { "from_id": 4, "to_id": 2, "distance": 1 }, { "from_id": 4, "to_id": 3, "distance": 2 }, { "from_id": 4, "to_id": 5, "distance": 1 }, { "from_id": 4, "to_id": 6, "distance": 2 }, { "from_id": 4, "to_id": 7, "distance": 3 }, { "from_id": 4, "to_id": 8, "distance": 2 }, { "from_id": 4, "to_id": 9, "distance": 1 }, { "from_id": 4, "to_id": 10, "distance": 2 }, { "from_id": 5, "to_id": 1, "distance": 3 }, { "from_id": 5, "to_id": 2, "distance": 2 }, { "from_id": 5, "to_id": 3, "distance": 1 }, { "from_id": 5, "to_id": 4, "distance": 1 }, { "from_id": 5, "to_id": 6, "distance": 1 }, { "from_id": 5, "to_id": 7, "distance": 2 }, { "from_id": 5, "to_id": 8, "distance": 3 }, { "from_id": 5, "to_id": 9, "distance": 2 }, { "from_id": 5, "to_id": 10, "distance": 1 }, { "from_id": 6, "to_id": 1, "distance": 4 }, { "from_id": 6, "to_id": 2, "distance": 3 }, { "from_id": 6, "to_id": 3, "distance": 2 }, { "from_id": 6, "to_id": 4, "distance": 2 }, { "from_id": 6, "to_id": 5, "distance": 1 }, { "from_id": 6, "to_id": 7, "distance": 1 }, { "from_id": 6, "to_id": 8, "distance": 4 }, { "from_id": 6, "to_id": 9, "distance": 3 }, { "from_id": 6, "to_id": 10, "distance": 2 }, { "from_id": 7, "to_id": 1, "distance": 5 }, { "from_id": 7, "to_id": 2, "distance": 4 }, { "from_id": 7, "to_id": 3, "distance": 3 }, { "from_id": 7, "to_id": 4, "distance": 3 }, { "from_id": 7, "to_id": 5, "distance": 2 }, { "from_id": 7, "to_id": 6, "distance": 1 }, { "from_id": 7, "to_id": 8, "distance": 5 }, { "from_id": 7, "to_id": 9, "distance": 4 }, { "from_id": 7, "to_id": 10, "distance": 3 }, { "from_id": 8, "to_id": 1, "distance": 2 }, { "from_id": 8, "to_id": 2, "distance": 3 }, { "from_id": 8, "to_id": 3, "distance": 4 }, { "from_id": 8, "to_id": 4, "distance": 2 }, { "from_id": 8, "to_id": 5, "distance": 3 }, { "from_id": 8, "to_id": 6, "distance": 4 }, { "from_id": 8, "to_id": 7, "distance": 5 }, { "from_id": 8, "to_id": 9, "distance": 1 }, { "from_id": 8, "to_id": 10, "distance": 2 }, { "from_id": 9, "to_id": 1, "distance": 3 }, { "from_id": 9, "to_id": 2, "distance": 2 }, { "from_id": 9, "to_id": 3, "distance": 3 }, { "from_id": 9, "to_id": 4, "distance": 1 }, { "from_id": 9, "to_id": 5, "distance": 2 }, { "from_id": 9, "to_id": 6, "distance": 3 }, { "from_id": 9, "to_id": 7, "distance": 4 }, { "from_id": 9, "to_id": 8, "distance": 1 }, { "from_id": 9, "to_id": 10, "distance": 1 }, { "from_id": 10, "to_id": 1, "distance": 4 }, { "from_id": 10, "to_id": 2, "distance": 3 }, { "from_id": 10, "to_id": 3, "distance": 2 }, { "from_id": 10, "to_id": 4, "distance": 2 }, { "from_id": 10, "to_id": 5, "distance": 1 }, { "from_id": 10, "to_id": 6, "distance": 2 }, { "from_id": 10, "to_id": 7, "distance": 3 }, { "from_id": 10, "to_id": 8, "distance": 2 }, { "from_id": 10, "to_id": 9, "distance": 1 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 10 }, { "from_id": "F1", "to_id": "F3", "flow": 0 }, { "from_id": "F1", "to_id": "F4", "flow": 1 }, { "from_id": "F1", "to_id": "F5", "flow": 2 }, { "from_id": "F1", "to_id": "F6", "flow": 2 }, { "from_id": "F1", "to_id": "F7", "flow": 2 }, { "from_id": "F1", "to_id": "F8", "flow": 2 }, { "from_id": "F1", "to_id": "F9", "flow": 0 }, { "from_id": "F1", "to_id": "F10", "flow": 4 }, { "from_id": "F2", "to_id": "F1", "flow": 10 }, { "from_id": "F2", "to_id": "F3", "flow": 1 }, { "from_id": "F2", "to_id": "F4", "flow": 2 }, { "from_id": "F2", "to_id": "F5", "flow": 3 }, { "from_id": "F2", "to_id": "F6", "flow": 2 }, { "from_id": "F2", "to_id": "F7", "flow": 0 }, { "from_id": "F2", "to_id": "F8", "flow": 2 }, { "from_id": "F2", "to_id": "F9", "flow": 0 }, { "from_id": "F2", "to_id": "F10", "flow": 10 }, { "from_id": "F3", "to_id": "F1", "flow": 0 }, { "from_id": "F3", "to_id": "F2", "flow": 1 }, { "from_id": "F3", "to_id": "F4", "flow": 2 }, { "from_id": "F3", "to_id": "F5", "flow": 5 }, { "from_id": "F3", "to_id": "F6", "flow": 4 }, { "from_id": "F3", "to_id": "F7", "flow": 5 }, { "from_id": "F3", "to_id": "F8", "flow": 2 }, { "from_id": "F3", "to_id": "F9", "flow": 2 }, { "from_id": "F3", "to_id": "F10", "flow": 5 }, { "from_id": "F4", "to_id": "F1", "flow": 1 }, { "from_id": "F4", "to_id": "F2", "flow": 2 }, { "from_id": "F4", "to_id": "F3", "flow": 2 }, { "from_id": "F4", "to_id": "F5", "flow": 6 }, { "from_id": "F4", "to_id": "F6", "flow": 0 }, { "from_id": "F4", "to_id": "F7", "flow": 1 }, { "from_id": "F4", "to_id": "F8", "flow": 5 }, { "from_id": "F4", "to_id": "F9", "flow": 5 }, { "from_id": "F4", "to_id": "F10", "flow": 5 }, { "from_id": "F5", "to_id": "F1", "flow": 2 }, { "from_id": "F5", "to_id": "F2", "flow": 3 }, { "from_id": "F5", "to_id": "F3", "flow": 5 }, { "from_id": "F5", "to_id": "F4", "flow": 6 }, { "from_id": "F5", "to_id": "F6", "flow": 5 }, { "from_id": "F5", "to_id": "F7", "flow": 2 }, { "from_id": "F5", "to_id": "F8", "flow": 10 }, { "from_id": "F5", "to_id": "F9", "flow": 0 }, { "from_id": "F5", "to_id": "F10", "flow": 5 }, { "from_id": "F6", "to_id": "F1", "flow": 2 }, { "from_id": "F6", "to_id": "F2", "flow": 2 }, { "from_id": "F6", "to_id": "F3", "flow": 4 }, { "from_id": "F6", "to_id": "F4", "flow": 0 }, { "from_id": "F6", "to_id": "F5", "flow": 5 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 10 }, { "from_id": "F6", "to_id": "F9", "flow": 5 }, { "from_id": "F6", "to_id": "F10", "flow": 10 }, { "from_id": "F7", "to_id": "F1", "flow": 2 }, { "from_id": "F7", "to_id": "F2", "flow": 0 }, { "from_id": "F7", "to_id": "F3", "flow": 5 }, { "from_id": "F7", "to_id": "F4", "flow": 1 }, { "from_id": "F7", "to_id": "F5", "flow": 2 }, { "from_id": "F7", "to_id": "F6", "flow": 0 }, { "from_id": "F7", "to_id": "F8", "flow": 0 }, { "from_id": "F7", "to_id": "F9", "flow": 4 }, { "from_id": "F7", "to_id": "F10", "flow": 0 }, { "from_id": "F8", "to_id": "F1", "flow": 2 }, { "from_id": "F8", "to_id": "F2", "flow": 2 }, { "from_id": "F8", "to_id": "F3", "flow": 2 }, { "from_id": "F8", "to_id": "F4", "flow": 5 }, { "from_id": "F8", "to_id": "F5", "flow": 10 }, { "from_id": "F8", "to_id": "F6", "flow": 10 }, { "from_id": "F8", "to_id": "F7", "flow": 0 }, { "from_id": "F8", "to_id": "F9", "flow": 5 }, { "from_id": "F8", "to_id": "F10", "flow": 0 }, { "from_id": "F9", "to_id": "F1", "flow": 0 }, { "from_id": "F9", "to_id": "F2", "flow": 0 }, { "from_id": "F9", "to_id": "F3", "flow": 2 }, { "from_id": "F9", "to_id": "F4", "flow": 5 }, { "from_id": "F9", "to_id": "F5", "flow": 0 }, { "from_id": "F9", "to_id": "F6", "flow": 5 }, { "from_id": "F9", "to_id": "F7", "flow": 4 }, { "from_id": "F9", "to_id": "F8", "flow": 5 }, { "from_id": "F9", "to_id": "F10", "flow": 3 }, { "from_id": "F10", "to_id": "F1", "flow": 4 }, { "from_id": "F10", "to_id": "F2", "flow": 10 }, { "from_id": "F10", "to_id": "F3", "flow": 5 }, { "from_id": "F10", "to_id": "F4", "flow": 5 }, { "from_id": "F10", "to_id": "F5", "flow": 5 }, { "from_id": "F10", "to_id": "F6", "flow": 10 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 0 }, { "from_id": "F10", "to_id": "F9", "flow": 3 } ] }, "solution_variant": [ 7, 6, 10, 9, 4, 3, 8, 2, 1, 5 ], "context_index": 30, "input_format": "csv", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Recently the sysadmin sketched a map where every node must host just one service and each service must pick one node. The trick is to put services that exchange lots of requests close to each other: for each pair you check how many requests flow between them and how long it takes to get from one node to the other, multiply those two to get that pair’s share, and then sum everything up — arrangements with a smaller overall sum are preferable. The detailed list of services, nodes, call volumes, and inter-node times is given below.\n\n# num_services_nodes=9\n# service_ids=F1, F2, F3, F4, F5, F6, F7, F8, F9\n# node_ids=0, 1, 2, 3, 4, 5, 6, 7, 8\n\nnode_source_id,node_target_id,node_latency\n0,1,2\n0,2,1\n0,3,5\n0,4,3\n0,5,7\n0,6,7\n0,7,5\n0,8,7\n1,0,2\n1,2,1\n1,3,5\n1,4,3\n1,5,7\n1,6,5\n1,7,5\n1,8,5\n2,0,1\n2,1,1\n2,3,4\n2,4,2\n2,5,6\n2,6,6\n2,7,4\n2,8,6\n3,0,5\n3,1,5\n3,2,4\n3,4,4\n3,5,2\n3,6,8\n3,7,6\n3,8,8\n4,0,3\n4,1,3\n4,2,2\n4,3,4\n4,5,4\n4,6,4\n4,7,2\n4,8,4\n5,0,7\n5,1,7\n5,2,6\n5,3,2\n5,4,4\n5,6,8\n5,7,6\n5,8,8\n6,0,7\n6,1,5\n6,2,6\n6,3,8\n6,4,4\n6,5,8\n6,7,2\n6,8,2\n7,0,5\n7,1,5\n7,2,4\n7,3,6\n7,4,2\n7,5,6\n7,6,2\n7,8,2\n8,0,7\n8,1,5\n8,2,6\n8,3,8\n8,4,4\n8,5,8\n8,6,2\n8,7,2\n\nservice_source_id,service_target_id,call_volume\nF1,F2,0\nF1,F3,0\nF1,F4,2\nF1,F5,1\nF1,F6,3\nF1,F7,0\nF1,F8,5\nF1,F9,3\nF2,F1,0\nF2,F3,10\nF2,F4,4\nF2,F5,10\nF2,F6,0\nF2,F7,4\nF2,F8,5\nF2,F9,5\nF3,F1,0\nF3,F2,10\nF3,F4,0\nF3,F5,1\nF3,F6,2\nF3,F7,1\nF3,F8,2\nF3,F9,0\nF4,F1,2\nF4,F2,4\nF4,F3,0\nF4,F5,1\nF4,F6,10\nF4,F7,0\nF4,F8,0\nF4,F9,4\nF5,F1,1\nF5,F2,10\nF5,F3,1\nF5,F4,1\nF5,F6,1\nF5,F7,10\nF5,F8,2\nF5,F9,1\nF6,F1,3\nF6,F2,0\nF6,F3,2\nF6,F4,10\nF6,F5,1\nF6,F7,2\nF6,F8,6\nF6,F9,0\nF7,F1,0\nF7,F2,4\nF7,F3,1\nF7,F4,0\nF7,F5,10\nF7,F6,2\nF7,F8,0\nF7,F9,0\nF8,F1,5\nF8,F2,5\nF8,F3,2\nF8,F4,0\nF8,F5,2\nF8,F6,6\nF8,F7,0\nF8,F9,5\nF9,F1,3\nF9,F2,5\nF9,F3,0\nF9,F4,4\nF9,F5,1\nF9,F6,0\nF9,F7,0\nF9,F8,5\n\nOh, and when you send back your chosen assignment, just drop it in a tiny JSON snippet like this so it's easy to parse:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis is just a simple sketch: the \"solution\" array should list, in order, which node each service gets — the first entry is the node for the first service, the second entry for the second service, and so on. Replace each placeholder with the actual node identifier from the instance when you answer; the block above is just showing the expected shape, not the real assignment.\n\nPlease use the identifiers exactly as they appear in the instance input — do not rename them or invent new labels.\n- for example: \"Valid identifiers look like plain numbers such as \"1\" or \"23\", single capital letters like \"A\" or \"B\", or a capital letter followed by digits like \"A1\" or \"X7\".\"", "instance": { "distance_matrix": [ [ 0, 2, 1, 5, 3, 7, 7, 5, 7 ], [ 2, 0, 1, 5, 3, 7, 5, 5, 5 ], [ 1, 1, 0, 4, 2, 6, 6, 4, 6 ], [ 5, 5, 4, 0, 4, 2, 8, 6, 8 ], [ 3, 3, 2, 4, 0, 4, 4, 2, 4 ], [ 7, 7, 6, 2, 4, 0, 8, 6, 8 ], [ 7, 5, 6, 8, 4, 8, 0, 2, 2 ], [ 5, 5, 4, 6, 2, 6, 2, 0, 2 ], [ 7, 5, 6, 8, 4, 8, 2, 2, 0 ] ], "flow_matrix": [ [ 0, 0, 0, 2, 1, 3, 0, 5, 3 ], [ 0, 0, 10, 4, 10, 0, 4, 5, 5 ], [ 0, 10, 0, 0, 1, 2, 1, 2, 0 ], [ 2, 4, 0, 0, 1, 10, 0, 0, 4 ], [ 1, 10, 1, 1, 0, 1, 10, 2, 1 ], [ 3, 0, 2, 10, 1, 0, 2, 6, 0 ], [ 0, 4, 1, 0, 10, 2, 0, 0, 0 ], [ 5, 5, 2, 0, 2, 6, 0, 0, 5 ], [ 3, 5, 0, 4, 1, 0, 0, 5, 0 ] ], "objective": 640.0 }, "solution": [ 8, 2, 0, 6, 3, 7, 5, 4, 1 ], "obj": 640.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 2 }, { "from_id": 0, "to_id": 2, "distance": 1 }, { "from_id": 0, "to_id": 3, "distance": 5 }, { "from_id": 0, "to_id": 4, "distance": 3 }, { "from_id": 0, "to_id": 5, "distance": 7 }, { "from_id": 0, "to_id": 6, "distance": 7 }, { "from_id": 0, "to_id": 7, "distance": 5 }, { "from_id": 0, "to_id": 8, "distance": 7 }, { "from_id": 1, "to_id": 0, "distance": 2 }, { "from_id": 1, "to_id": 2, "distance": 1 }, { "from_id": 1, "to_id": 3, "distance": 5 }, { "from_id": 1, "to_id": 4, "distance": 3 }, { "from_id": 1, "to_id": 5, "distance": 7 }, { "from_id": 1, "to_id": 6, "distance": 5 }, { "from_id": 1, "to_id": 7, "distance": 5 }, { "from_id": 1, "to_id": 8, "distance": 5 }, { "from_id": 2, "to_id": 0, "distance": 1 }, { "from_id": 2, "to_id": 1, "distance": 1 }, { "from_id": 2, "to_id": 3, "distance": 4 }, { "from_id": 2, "to_id": 4, "distance": 2 }, { "from_id": 2, "to_id": 5, "distance": 6 }, { "from_id": 2, "to_id": 6, "distance": 6 }, { "from_id": 2, "to_id": 7, "distance": 4 }, { "from_id": 2, "to_id": 8, "distance": 6 }, { "from_id": 3, "to_id": 0, "distance": 5 }, { "from_id": 3, "to_id": 1, "distance": 5 }, { "from_id": 3, "to_id": 2, "distance": 4 }, { "from_id": 3, "to_id": 4, "distance": 4 }, { "from_id": 3, "to_id": 5, "distance": 2 }, { "from_id": 3, "to_id": 6, "distance": 8 }, { "from_id": 3, "to_id": 7, "distance": 6 }, { "from_id": 3, "to_id": 8, "distance": 8 }, { "from_id": 4, "to_id": 0, "distance": 3 }, { "from_id": 4, "to_id": 1, "distance": 3 }, { "from_id": 4, "to_id": 2, "distance": 2 }, { "from_id": 4, "to_id": 3, "distance": 4 }, { "from_id": 4, "to_id": 5, "distance": 4 }, { "from_id": 4, "to_id": 6, "distance": 4 }, { "from_id": 4, "to_id": 7, "distance": 2 }, { "from_id": 4, "to_id": 8, "distance": 4 }, { "from_id": 5, "to_id": 0, "distance": 7 }, { "from_id": 5, "to_id": 1, "distance": 7 }, { "from_id": 5, "to_id": 2, "distance": 6 }, { "from_id": 5, "to_id": 3, "distance": 2 }, { "from_id": 5, "to_id": 4, "distance": 4 }, { "from_id": 5, "to_id": 6, "distance": 8 }, { "from_id": 5, "to_id": 7, "distance": 6 }, { "from_id": 5, "to_id": 8, "distance": 8 }, { "from_id": 6, "to_id": 0, "distance": 7 }, { "from_id": 6, "to_id": 1, "distance": 5 }, { "from_id": 6, "to_id": 2, "distance": 6 }, { "from_id": 6, "to_id": 3, "distance": 8 }, { "from_id": 6, "to_id": 4, "distance": 4 }, { "from_id": 6, "to_id": 5, "distance": 8 }, { "from_id": 6, "to_id": 7, "distance": 2 }, { "from_id": 6, "to_id": 8, "distance": 2 }, { "from_id": 7, "to_id": 0, "distance": 5 }, { "from_id": 7, "to_id": 1, "distance": 5 }, { "from_id": 7, "to_id": 2, "distance": 4 }, { "from_id": 7, "to_id": 3, "distance": 6 }, { "from_id": 7, "to_id": 4, "distance": 2 }, { "from_id": 7, "to_id": 5, "distance": 6 }, { "from_id": 7, "to_id": 6, "distance": 2 }, { "from_id": 7, "to_id": 8, "distance": 2 }, { "from_id": 8, "to_id": 0, "distance": 7 }, { "from_id": 8, "to_id": 1, "distance": 5 }, { "from_id": 8, "to_id": 2, "distance": 6 }, { "from_id": 8, "to_id": 3, "distance": 8 }, { "from_id": 8, "to_id": 4, "distance": 4 }, { "from_id": 8, "to_id": 5, "distance": 8 }, { "from_id": 8, "to_id": 6, "distance": 2 }, { "from_id": 8, "to_id": 7, "distance": 2 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 0 }, { "from_id": "F1", "to_id": "F4", "flow": 2 }, { "from_id": "F1", "to_id": "F5", "flow": 1 }, { "from_id": "F1", "to_id": "F6", "flow": 3 }, { "from_id": "F1", "to_id": "F7", "flow": 0 }, { "from_id": "F1", "to_id": "F8", "flow": 5 }, { "from_id": "F1", "to_id": "F9", "flow": 3 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 10 }, { "from_id": "F2", "to_id": "F4", "flow": 4 }, { "from_id": "F2", "to_id": "F5", "flow": 10 }, { "from_id": "F2", "to_id": "F6", "flow": 0 }, { "from_id": "F2", "to_id": "F7", "flow": 4 }, { "from_id": "F2", "to_id": "F8", "flow": 5 }, { "from_id": "F2", "to_id": "F9", "flow": 5 }, { "from_id": "F3", "to_id": "F1", "flow": 0 }, { "from_id": "F3", "to_id": "F2", "flow": 10 }, { "from_id": "F3", "to_id": "F4", "flow": 0 }, { "from_id": "F3", "to_id": "F5", "flow": 1 }, { "from_id": "F3", "to_id": "F6", "flow": 2 }, { "from_id": "F3", "to_id": "F7", "flow": 1 }, { "from_id": "F3", "to_id": "F8", "flow": 2 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F4", "to_id": "F1", "flow": 2 }, { "from_id": "F4", "to_id": "F2", "flow": 4 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 1 }, { "from_id": "F4", "to_id": "F6", "flow": 10 }, { "from_id": "F4", "to_id": "F7", "flow": 0 }, { "from_id": "F4", "to_id": "F8", "flow": 0 }, { "from_id": "F4", "to_id": "F9", "flow": 4 }, { "from_id": "F5", "to_id": "F1", "flow": 1 }, { "from_id": "F5", "to_id": "F2", "flow": 10 }, { "from_id": "F5", "to_id": "F3", "flow": 1 }, { "from_id": "F5", "to_id": "F4", "flow": 1 }, { "from_id": "F5", "to_id": "F6", "flow": 1 }, { "from_id": "F5", "to_id": "F7", "flow": 10 }, { "from_id": "F5", "to_id": "F8", "flow": 2 }, { "from_id": "F5", "to_id": "F9", "flow": 1 }, { "from_id": "F6", "to_id": "F1", "flow": 3 }, { "from_id": "F6", "to_id": "F2", "flow": 0 }, { "from_id": "F6", "to_id": "F3", "flow": 2 }, { "from_id": "F6", "to_id": "F4", "flow": 10 }, { "from_id": "F6", "to_id": "F5", "flow": 1 }, { "from_id": "F6", "to_id": "F7", "flow": 2 }, { "from_id": "F6", "to_id": "F8", "flow": 6 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 0 }, { "from_id": "F7", "to_id": "F2", "flow": 4 }, { "from_id": "F7", "to_id": "F3", "flow": 1 }, { "from_id": "F7", "to_id": "F4", "flow": 0 }, { "from_id": "F7", "to_id": "F5", "flow": 10 }, { "from_id": "F7", "to_id": "F6", "flow": 2 }, { "from_id": "F7", "to_id": "F8", "flow": 0 }, { "from_id": "F7", "to_id": "F9", "flow": 0 }, { "from_id": "F8", "to_id": "F1", "flow": 5 }, { "from_id": "F8", "to_id": "F2", "flow": 5 }, { "from_id": "F8", "to_id": "F3", "flow": 2 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 2 }, { "from_id": "F8", "to_id": "F6", "flow": 6 }, { "from_id": "F8", "to_id": "F7", "flow": 0 }, { "from_id": "F8", "to_id": "F9", "flow": 5 }, { "from_id": "F9", "to_id": "F1", "flow": 3 }, { "from_id": "F9", "to_id": "F2", "flow": 5 }, { "from_id": "F9", "to_id": "F3", "flow": 0 }, { "from_id": "F9", "to_id": "F4", "flow": 4 }, { "from_id": "F9", "to_id": "F5", "flow": 1 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 0 }, { "from_id": "F9", "to_id": "F8", "flow": 5 } ] }, "solution_variant": [ 8, 2, 0, 6, 3, 7, 5, 4, 1 ], "context_index": 31, "input_format": "csv", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "I run the produce section and I’m trying to figure out where to put each vendor so things feel natural. The idea is: vendors who share lots of customers should be nearer to each other so people don’t have to zigzag the whole market. The practical rule is simple — every vendor gets a single stall and every stall gets one vendor, no doubling up or leaving spots empty. To judge a layout, look at every pair of vendors, multiply how many customers they share by how far apart their stalls are, and then add up all those products; the smaller that total, the easier customers’ trips will be. The concrete stall map and customer-overlap numbers are shown below.\n\nI'll list the 11 vendors and stalls now: vendors F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11 and stalls 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.\nI measure the walking distance from stall 1 to stall 2 as 20.\nI measure the walking distance from stall 1 to stall 3 as 19.\nI measure the walking distance from stall 1 to stall 4 as 15.\nI measure the walking distance from stall 1 to stall 5 as 7.\nI measure the walking distance from stall 1 to stall 6 as 23.\nI measure the walking distance from stall 1 to stall 7 as 0.\nI measure the walking distance from stall 1 to stall 8 as 22.\nI measure the walking distance from stall 1 to stall 9 as 23.\nI measure the walking distance from stall 1 to stall 10 as 10.\nI measure the walking distance from stall 1 to stall 11 as 26.\nI measure the walking distance from stall 2 to stall 1 as 20.\nI measure the walking distance from stall 2 to stall 3 as 26.\nI measure the walking distance from stall 2 to stall 4 as 8.\nI measure the walking distance from stall 2 to stall 5 as 9.\nI measure the walking distance from stall 2 to stall 6 as 21.\nI measure the walking distance from stall 2 to stall 7 as 16.\nI measure the walking distance from stall 2 to stall 8 as 6.\nI measure the walking distance from stall 2 to stall 9 as 10.\nI measure the walking distance from stall 2 to stall 10 as 3.\nI measure the walking distance from stall 2 to stall 11 as 22.\nI measure the walking distance from stall 3 to stall 1 as 19.\nI measure the walking distance from stall 3 to stall 2 as 25.\nI measure the walking distance from stall 3 to stall 4 as 26.\nI measure the walking distance from stall 3 to stall 5 as 11.\nI measure the walking distance from stall 3 to stall 6 as 29.\nI measure the walking distance from stall 3 to stall 7 as 15.\nI measure the walking distance from stall 3 to stall 8 as 14.\nI measure the walking distance from stall 3 to stall 9 as 18.\nI measure the walking distance from stall 3 to stall 10 as 18.\nI measure the walking distance from stall 3 to stall 11 as 2.\nI measure the walking distance from stall 4 to stall 1 as 15.\nI measure the walking distance from stall 4 to stall 2 as 8.\nI measure the walking distance from stall 4 to stall 3 as 26.\nI measure the walking distance from stall 4 to stall 5 as 12.\nI measure the walking distance from stall 4 to stall 6 as 25.\nI measure the walking distance from stall 4 to stall 7 as 18.\nI measure the walking distance from stall 4 to stall 8 as 20.\nI measure the walking distance from stall 4 to stall 9 as 9.\nI measure the walking distance from stall 4 to stall 10 as 4.\nI measure the walking distance from stall 4 to stall 11 as 8.\nI measure the walking distance from stall 5 to stall 1 as 8.\nI measure the walking distance from stall 5 to stall 2 as 9.\nI measure the walking distance from stall 5 to stall 3 as 12.\nI measure the walking distance from stall 5 to stall 4 as 12.\nI measure the walking distance from stall 5 to stall 6 as 7.\nI measure the walking distance from stall 5 to stall 7 as 1.\nI measure the walking distance from stall 5 to stall 8 as 18.\nI measure the walking distance from stall 5 to stall 9 as 4.\nI measure the walking distance from stall 5 to stall 10 as 1.\nI measure the walking distance from stall 5 to stall 11 as 27.\nI measure the walking distance from stall 6 to stall 1 as 23.\nI measure the walking distance from stall 6 to stall 2 as 21.\nI measure the walking distance from stall 6 to stall 3 as 28.\nI measure the walking distance from stall 6 to stall 4 as 25.\nI measure the walking distance from stall 6 to stall 5 as 7.\nI measure the walking distance from stall 6 to stall 7 as 5.\nI measure the walking distance from stall 6 to stall 8 as 5.\nI measure the walking distance from stall 6 to stall 9 as 1.\nI measure the walking distance from stall 6 to stall 10 as 2.\nI measure the walking distance from stall 6 to stall 11 as 25.\nI measure the walking distance from stall 7 to stall 1 as 0.\nI measure the walking distance from stall 7 to stall 2 as 16.\nI measure the walking distance from stall 7 to stall 3 as 16.\nI measure the walking distance from stall 7 to stall 4 as 18.\nI measure the walking distance from stall 7 to stall 5 as 2.\nI measure the walking distance from stall 7 to stall 6 as 5.\nI measure the walking distance from stall 7 to stall 8 as 11.\nI measure the walking distance from stall 7 to stall 9 as 12.\nI measure the walking distance from stall 7 to stall 10 as 6.\nI measure the walking distance from stall 7 to stall 11 as 18.\nI measure the walking distance from stall 8 to stall 1 as 22.\nI measure the walking distance from stall 8 to stall 2 as 6.\nI measure the walking distance from stall 8 to stall 3 as 14.\nI measure the walking distance from stall 8 to stall 4 as 19.\nI measure the walking distance from stall 8 to stall 5 as 17.\nI measure the walking distance from stall 8 to stall 6 as 5.\nI measure the walking distance from stall 8 to stall 7 as 10.\nI measure the walking distance from stall 8 to stall 9 as 17.\nI measure the walking distance from stall 8 to stall 10 as 17.\nI measure the walking distance from stall 8 to stall 11 as 0.\nI measure the walking distance from stall 9 to stall 1 as 23.\nI measure the walking distance from stall 9 to stall 2 as 10.\nI measure the walking distance from stall 9 to stall 3 as 17.\nI measure the walking distance from stall 9 to stall 4 as 9.\nI measure the walking distance from stall 9 to stall 5 as 5.\nI measure the walking distance from stall 9 to stall 6 as 1.\nI measure the walking distance from stall 9 to stall 7 as 12.\nI measure the walking distance from stall 9 to stall 8 as 17.\nI measure the walking distance from stall 9 to stall 10 as 20.\nI measure the walking distance from stall 9 to stall 11 as 20.\nI measure the walking distance from stall 10 to stall 1 as 9.\nI measure the walking distance from stall 10 to stall 2 as 3.\nI measure the walking distance from stall 10 to stall 3 as 17.\nI measure the walking distance from stall 10 to stall 4 as 4.\nI measure the walking distance from stall 10 to stall 5 as 1.\nI measure the walking distance from stall 10 to stall 6 as 1.\nI measure the walking distance from stall 10 to stall 7 as 5.\nI measure the walking distance from stall 10 to stall 8 as 17.\nI measure the walking distance from stall 10 to stall 9 as 20.\nI measure the walking distance from stall 10 to stall 11 as 27.\nI measure the walking distance from stall 11 to stall 1 as 24.\nI measure the walking distance from stall 11 to stall 2 as 22.\nI measure the walking distance from stall 11 to stall 3 as 2.\nI measure the walking distance from stall 11 to stall 4 as 8.\nI measure the walking distance from stall 11 to stall 5 as 27.\nI measure the walking distance from stall 11 to stall 6 as 24.\nI measure the walking distance from stall 11 to stall 7 as 16.\nI measure the walking distance from stall 11 to stall 8 as 0.\nI measure the walking distance from stall 11 to stall 9 as 20.\nI measure the walking distance from stall 11 to stall 10 as 27.\nI note that vendor F1 and vendor F2 share 13 customers.\nI note that vendor F1 and vendor F3 share 13 customers.\nI note that vendor F1 and vendor F4 share 15 customers.\nI note that vendor F1 and vendor F5 share 20 customers.\nI note that vendor F1 and vendor F6 share 10 customers.\nI note that vendor F1 and vendor F7 share 28 customers.\nI note that vendor F1 and vendor F8 share 11 customers.\nI note that vendor F1 and vendor F9 share 10 customers.\nI note that vendor F1 and vendor F10 share 18 customers.\nI note that vendor F1 and vendor F11 share 9 customers.\nI note that vendor F2 and vendor F1 share 13 customers.\nI note that vendor F2 and vendor F3 share 9 customers.\nI note that vendor F2 and vendor F4 share 20 customers.\nI note that vendor F2 and vendor F5 share 19 customers.\nI note that vendor F2 and vendor F6 share 12 customers.\nI note that vendor F2 and vendor F7 share 15 customers.\nI note that vendor F2 and vendor F8 share 20 customers.\nI note that vendor F2 and vendor F9 share 18 customers.\nI note that vendor F2 and vendor F10 share 24 customers.\nI note that vendor F2 and vendor F11 share 11 customers.\nI note that vendor F3 and vendor F1 share 13 customers.\nI note that vendor F3 and vendor F2 share 9 customers.\nI note that vendor F3 and vendor F4 share 8 customers.\nI note that vendor F3 and vendor F5 share 17 customers.\nI note that vendor F3 and vendor F6 share 5 customers.\nI note that vendor F3 and vendor F7 share 15 customers.\nI note that vendor F3 and vendor F8 share 16 customers.\nI note that vendor F3 and vendor F9 share 14 customers.\nI note that vendor F3 and vendor F10 share 14 customers.\nI note that vendor F3 and vendor F11 share 25 customers.\nI note that vendor F4 and vendor F1 share 15 customers.\nI note that vendor F4 and vendor F2 share 20 customers.\nI note that vendor F4 and vendor F3 share 8 customers.\nI note that vendor F4 and vendor F5 share 17 customers.\nI note that vendor F4 and vendor F6 share 9 customers.\nI note that vendor F4 and vendor F7 share 14 customers.\nI note that vendor F4 and vendor F8 share 13 customers.\nI note that vendor F4 and vendor F9 share 19 customers.\nI note that vendor F4 and vendor F10 share 22 customers.\nI note that vendor F4 and vendor F11 share 19 customers.\nI note that vendor F5 and vendor F1 share 20 customers.\nI note that vendor F5 and vendor F2 share 19 customers.\nI note that vendor F5 and vendor F3 share 17 customers.\nI note that vendor F5 and vendor F4 share 17 customers.\nI note that vendor F5 and vendor F6 share 20 customers.\nI note that vendor F5 and vendor F7 share 26 customers.\nI note that vendor F5 and vendor F8 share 14 customers.\nI note that vendor F5 and vendor F9 share 22 customers.\nI note that vendor F5 and vendor F10 share 26 customers.\nI note that vendor F5 and vendor F11 share 7 customers.\nI note that vendor F6 and vendor F1 share 10 customers.\nI note that vendor F6 and vendor F2 share 12 customers.\nI note that vendor F6 and vendor F3 share 5 customers.\nI note that vendor F6 and vendor F4 share 9 customers.\nI note that vendor F6 and vendor F5 share 20 customers.\nI note that vendor F6 and vendor F7 share 22 customers.\nI note that vendor F6 and vendor F8 share 22 customers.\nI note that vendor F6 and vendor F9 share 26 customers.\nI note that vendor F6 and vendor F10 share 26 customers.\nI note that vendor F6 and vendor F11 share 9 customers.\nI note that vendor F7 and vendor F1 share 28 customers.\nI note that vendor F7 and vendor F2 share 15 customers.\nI note that vendor F7 and vendor F3 share 15 customers.\nI note that vendor F7 and vendor F4 share 14 customers.\nI note that vendor F7 and vendor F5 share 26 customers.\nI note that vendor F7 and vendor F6 share 22 customers.\nI note that vendor F7 and vendor F8 share 18 customers.\nI note that vendor F7 and vendor F9 share 17 customers.\nI note that vendor F7 and vendor F10 share 21 customers.\nI note that vendor F7 and vendor F11 share 14 customers.\nI note that vendor F8 and vendor F1 share 11 customers.\nI note that vendor F8 and vendor F2 share 20 customers.\nI note that vendor F8 and vendor F3 share 16 customers.\nI note that vendor F8 and vendor F4 share 13 customers.\nI note that vendor F8 and vendor F5 share 14 customers.\nI note that vendor F8 and vendor F6 share 22 customers.\nI note that vendor F8 and vendor F7 share 18 customers.\nI note that vendor F8 and vendor F9 share 14 customers.\nI note that vendor F8 and vendor F10 share 14 customers.\nI note that vendor F8 and vendor F11 share 29 customers.\nI note that vendor F9 and vendor F1 share 10 customers.\nI note that vendor F9 and vendor F2 share 18 customers.\nI note that vendor F9 and vendor F3 share 14 customers.\nI note that vendor F9 and vendor F4 share 19 customers.\nI note that vendor F9 and vendor F5 share 22 customers.\nI note that vendor F9 and vendor F6 share 26 customers.\nI note that vendor F9 and vendor F7 share 17 customers.\nI note that vendor F9 and vendor F8 share 14 customers.\nI note that vendor F9 and vendor F10 share 12 customers.\nI note that vendor F9 and vendor F11 share 12 customers.\nI note that vendor F10 and vendor F1 share 18 customers.\nI note that vendor F10 and vendor F2 share 24 customers.\nI note that vendor F10 and vendor F3 share 14 customers.\nI note that vendor F10 and vendor F4 share 22 customers.\nI note that vendor F10 and vendor F5 share 26 customers.\nI note that vendor F10 and vendor F6 share 26 customers.\nI note that vendor F10 and vendor F7 share 21 customers.\nI note that vendor F10 and vendor F8 share 14 customers.\nI note that vendor F10 and vendor F9 share 12 customers.\nI note that vendor F10 and vendor F11 share 7 customers.\nI note that vendor F11 and vendor F1 share 9 customers.\nI note that vendor F11 and vendor F2 share 11 customers.\nI note that vendor F11 and vendor F3 share 25 customers.\nI note that vendor F11 and vendor F4 share 19 customers.\nI note that vendor F11 and vendor F5 share 7 customers.\nI note that vendor F11 and vendor F6 share 9 customers.\nI note that vendor F11 and vendor F7 share 14 customers.\nI note that vendor F11 and vendor F8 share 29 customers.\nI note that vendor F11 and vendor F9 share 12 customers.\nI note that vendor F11 and vendor F10 share 7 customers.\nI'll use these entries with the rule above to score each layout.\n\nIf you want to hand me a proposed layout, just drop it in this simple JSON shape so I can read it easily:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of that as a short form: \"solution\" is a list where the first entry is the stall you’d put the first vendor in, the second entry is the stall for the second vendor, and so on down the line. It’s just a sketch of the expected shape — not the final answer itself.\n\nPlease make sure to use the exact stall/vendor identifiers from the instance input — don’t rename them or invent new ones. \nFor example: Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 20, 19, 15, 7, 23, 0, 22, 23, 10, 26 ], [ 20, 0, 26, 8, 9, 21, 16, 6, 10, 3, 22 ], [ 19, 25, 0, 26, 11, 29, 15, 14, 18, 18, 2 ], [ 15, 8, 26, 0, 12, 25, 18, 20, 9, 4, 8 ], [ 8, 9, 12, 12, 0, 7, 1, 18, 4, 1, 27 ], [ 23, 21, 28, 25, 7, 0, 5, 5, 1, 2, 25 ], [ 0, 16, 16, 18, 2, 5, 0, 11, 12, 6, 18 ], [ 22, 6, 14, 19, 17, 5, 10, 0, 17, 17, 0 ], [ 23, 10, 17, 9, 5, 1, 12, 17, 0, 20, 20 ], [ 9, 3, 17, 4, 1, 1, 5, 17, 20, 0, 27 ], [ 24, 22, 2, 8, 27, 24, 16, 0, 20, 27, 0 ] ], "flow_matrix": [ [ 0, 13, 13, 15, 20, 10, 28, 11, 10, 18, 9 ], [ 13, 0, 9, 20, 19, 12, 15, 20, 18, 24, 11 ], [ 13, 9, 0, 8, 17, 5, 15, 16, 14, 14, 25 ], [ 15, 20, 8, 0, 17, 9, 14, 13, 19, 22, 19 ], [ 20, 19, 17, 17, 0, 20, 26, 14, 22, 26, 7 ], [ 10, 12, 5, 9, 20, 0, 22, 22, 26, 26, 9 ], [ 28, 15, 15, 14, 26, 22, 0, 18, 17, 21, 14 ], [ 11, 20, 16, 13, 14, 22, 18, 0, 14, 14, 29 ], [ 10, 18, 14, 19, 22, 26, 17, 14, 0, 12, 12 ], [ 18, 24, 14, 22, 26, 26, 21, 14, 12, 0, 7 ], [ 9, 11, 25, 19, 7, 9, 14, 29, 12, 7, 0 ] ], "objective": 19339.0 }, "solution": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "obj": 19339.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 11, "num_locations": 11, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 20 }, { "from_id": 1, "to_id": 3, "distance": 19 }, { "from_id": 1, "to_id": 4, "distance": 15 }, { "from_id": 1, "to_id": 5, "distance": 7 }, { "from_id": 1, "to_id": 6, "distance": 23 }, { "from_id": 1, "to_id": 7, "distance": 0 }, { "from_id": 1, "to_id": 8, "distance": 22 }, { "from_id": 1, "to_id": 9, "distance": 23 }, { "from_id": 1, "to_id": 10, "distance": 10 }, { "from_id": 1, "to_id": 11, "distance": 26 }, { "from_id": 2, "to_id": 1, "distance": 20 }, { "from_id": 2, "to_id": 3, "distance": 26 }, { "from_id": 2, "to_id": 4, "distance": 8 }, { "from_id": 2, "to_id": 5, "distance": 9 }, { "from_id": 2, "to_id": 6, "distance": 21 }, { "from_id": 2, "to_id": 7, "distance": 16 }, { "from_id": 2, "to_id": 8, "distance": 6 }, { "from_id": 2, "to_id": 9, "distance": 10 }, { "from_id": 2, "to_id": 10, "distance": 3 }, { "from_id": 2, "to_id": 11, "distance": 22 }, { "from_id": 3, "to_id": 1, "distance": 19 }, { "from_id": 3, "to_id": 2, "distance": 25 }, { "from_id": 3, "to_id": 4, "distance": 26 }, { "from_id": 3, "to_id": 5, "distance": 11 }, { "from_id": 3, "to_id": 6, "distance": 29 }, { "from_id": 3, "to_id": 7, "distance": 15 }, { "from_id": 3, "to_id": 8, "distance": 14 }, { "from_id": 3, "to_id": 9, "distance": 18 }, { "from_id": 3, "to_id": 10, "distance": 18 }, { "from_id": 3, "to_id": 11, "distance": 2 }, { "from_id": 4, "to_id": 1, "distance": 15 }, { "from_id": 4, "to_id": 2, "distance": 8 }, { "from_id": 4, "to_id": 3, "distance": 26 }, { "from_id": 4, "to_id": 5, "distance": 12 }, { "from_id": 4, "to_id": 6, "distance": 25 }, { "from_id": 4, "to_id": 7, "distance": 18 }, { "from_id": 4, "to_id": 8, "distance": 20 }, { "from_id": 4, "to_id": 9, "distance": 9 }, { "from_id": 4, "to_id": 10, "distance": 4 }, { "from_id": 4, "to_id": 11, "distance": 8 }, { "from_id": 5, "to_id": 1, "distance": 8 }, { "from_id": 5, "to_id": 2, "distance": 9 }, { "from_id": 5, "to_id": 3, "distance": 12 }, { "from_id": 5, "to_id": 4, "distance": 12 }, { "from_id": 5, "to_id": 6, "distance": 7 }, { "from_id": 5, "to_id": 7, "distance": 1 }, { "from_id": 5, "to_id": 8, "distance": 18 }, { "from_id": 5, "to_id": 9, "distance": 4 }, { "from_id": 5, "to_id": 10, "distance": 1 }, { "from_id": 5, "to_id": 11, "distance": 27 }, { "from_id": 6, "to_id": 1, "distance": 23 }, { "from_id": 6, "to_id": 2, "distance": 21 }, { "from_id": 6, "to_id": 3, "distance": 28 }, { "from_id": 6, "to_id": 4, "distance": 25 }, { "from_id": 6, "to_id": 5, "distance": 7 }, { "from_id": 6, "to_id": 7, "distance": 5 }, { "from_id": 6, "to_id": 8, "distance": 5 }, { "from_id": 6, "to_id": 9, "distance": 1 }, { "from_id": 6, "to_id": 10, "distance": 2 }, { "from_id": 6, "to_id": 11, "distance": 25 }, { "from_id": 7, "to_id": 1, "distance": 0 }, { "from_id": 7, "to_id": 2, "distance": 16 }, { "from_id": 7, "to_id": 3, "distance": 16 }, { "from_id": 7, "to_id": 4, "distance": 18 }, { "from_id": 7, "to_id": 5, "distance": 2 }, { "from_id": 7, "to_id": 6, "distance": 5 }, { "from_id": 7, "to_id": 8, "distance": 11 }, { "from_id": 7, "to_id": 9, "distance": 12 }, { "from_id": 7, "to_id": 10, "distance": 6 }, { "from_id": 7, "to_id": 11, "distance": 18 }, { "from_id": 8, "to_id": 1, "distance": 22 }, { "from_id": 8, "to_id": 2, "distance": 6 }, { "from_id": 8, "to_id": 3, "distance": 14 }, { "from_id": 8, "to_id": 4, "distance": 19 }, { "from_id": 8, "to_id": 5, "distance": 17 }, { "from_id": 8, "to_id": 6, "distance": 5 }, { "from_id": 8, "to_id": 7, "distance": 10 }, { "from_id": 8, "to_id": 9, "distance": 17 }, { "from_id": 8, "to_id": 10, "distance": 17 }, { "from_id": 8, "to_id": 11, "distance": 0 }, { "from_id": 9, "to_id": 1, "distance": 23 }, { "from_id": 9, "to_id": 2, "distance": 10 }, { "from_id": 9, "to_id": 3, "distance": 17 }, { "from_id": 9, "to_id": 4, "distance": 9 }, { "from_id": 9, "to_id": 5, "distance": 5 }, { "from_id": 9, "to_id": 6, "distance": 1 }, { "from_id": 9, "to_id": 7, "distance": 12 }, { "from_id": 9, "to_id": 8, "distance": 17 }, { "from_id": 9, "to_id": 10, "distance": 20 }, { "from_id": 9, "to_id": 11, "distance": 20 }, { "from_id": 10, "to_id": 1, "distance": 9 }, { "from_id": 10, "to_id": 2, "distance": 3 }, { "from_id": 10, "to_id": 3, "distance": 17 }, { "from_id": 10, "to_id": 4, "distance": 4 }, { "from_id": 10, "to_id": 5, "distance": 1 }, { "from_id": 10, "to_id": 6, "distance": 1 }, { "from_id": 10, "to_id": 7, "distance": 5 }, { "from_id": 10, "to_id": 8, "distance": 17 }, { "from_id": 10, "to_id": 9, "distance": 20 }, { "from_id": 10, "to_id": 11, "distance": 27 }, { "from_id": 11, "to_id": 1, "distance": 24 }, { "from_id": 11, "to_id": 2, "distance": 22 }, { "from_id": 11, "to_id": 3, "distance": 2 }, { "from_id": 11, "to_id": 4, "distance": 8 }, { "from_id": 11, "to_id": 5, "distance": 27 }, { "from_id": 11, "to_id": 6, "distance": 24 }, { "from_id": 11, "to_id": 7, "distance": 16 }, { "from_id": 11, "to_id": 8, "distance": 0 }, { "from_id": 11, "to_id": 9, "distance": 20 }, { "from_id": 11, "to_id": 10, "distance": 27 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 13 }, { "from_id": "F1", "to_id": "F3", "flow": 13 }, { "from_id": "F1", "to_id": "F4", "flow": 15 }, { "from_id": "F1", "to_id": "F5", "flow": 20 }, { "from_id": "F1", "to_id": "F6", "flow": 10 }, { "from_id": "F1", "to_id": "F7", "flow": 28 }, { "from_id": "F1", "to_id": "F8", "flow": 11 }, { "from_id": "F1", "to_id": "F9", "flow": 10 }, { "from_id": "F1", "to_id": "F10", "flow": 18 }, { "from_id": "F1", "to_id": "F11", "flow": 9 }, { "from_id": "F2", "to_id": "F1", "flow": 13 }, { "from_id": "F2", "to_id": "F3", "flow": 9 }, { "from_id": "F2", "to_id": "F4", "flow": 20 }, { "from_id": "F2", "to_id": "F5", "flow": 19 }, { "from_id": "F2", "to_id": "F6", "flow": 12 }, { "from_id": "F2", "to_id": "F7", "flow": 15 }, { "from_id": "F2", "to_id": "F8", "flow": 20 }, { "from_id": "F2", "to_id": "F9", "flow": 18 }, { "from_id": "F2", "to_id": "F10", "flow": 24 }, { "from_id": "F2", "to_id": "F11", "flow": 11 }, { "from_id": "F3", "to_id": "F1", "flow": 13 }, { "from_id": "F3", "to_id": "F2", "flow": 9 }, { "from_id": "F3", "to_id": "F4", "flow": 8 }, { "from_id": "F3", "to_id": "F5", "flow": 17 }, { "from_id": "F3", "to_id": "F6", "flow": 5 }, { "from_id": "F3", "to_id": "F7", "flow": 15 }, { "from_id": "F3", "to_id": "F8", "flow": 16 }, { "from_id": "F3", "to_id": "F9", "flow": 14 }, { "from_id": "F3", "to_id": "F10", "flow": 14 }, { "from_id": "F3", "to_id": "F11", "flow": 25 }, { "from_id": "F4", "to_id": "F1", "flow": 15 }, { "from_id": "F4", "to_id": "F2", "flow": 20 }, { "from_id": "F4", "to_id": "F3", "flow": 8 }, { "from_id": "F4", "to_id": "F5", "flow": 17 }, { "from_id": "F4", "to_id": "F6", "flow": 9 }, { "from_id": "F4", "to_id": "F7", "flow": 14 }, { "from_id": "F4", "to_id": "F8", "flow": 13 }, { "from_id": "F4", "to_id": "F9", "flow": 19 }, { "from_id": "F4", "to_id": "F10", "flow": 22 }, { "from_id": "F4", "to_id": "F11", "flow": 19 }, { "from_id": "F5", "to_id": "F1", "flow": 20 }, { "from_id": "F5", "to_id": "F2", "flow": 19 }, { "from_id": "F5", "to_id": "F3", "flow": 17 }, { "from_id": "F5", "to_id": "F4", "flow": 17 }, { "from_id": "F5", "to_id": "F6", "flow": 20 }, { "from_id": "F5", "to_id": "F7", "flow": 26 }, { "from_id": "F5", "to_id": "F8", "flow": 14 }, { "from_id": "F5", "to_id": "F9", "flow": 22 }, { "from_id": "F5", "to_id": "F10", "flow": 26 }, { "from_id": "F5", "to_id": "F11", "flow": 7 }, { "from_id": "F6", "to_id": "F1", "flow": 10 }, { "from_id": "F6", "to_id": "F2", "flow": 12 }, { "from_id": "F6", "to_id": "F3", "flow": 5 }, { "from_id": "F6", "to_id": "F4", "flow": 9 }, { "from_id": "F6", "to_id": "F5", "flow": 20 }, { "from_id": "F6", "to_id": "F7", "flow": 22 }, { "from_id": "F6", "to_id": "F8", "flow": 22 }, { "from_id": "F6", "to_id": "F9", "flow": 26 }, { "from_id": "F6", "to_id": "F10", "flow": 26 }, { "from_id": "F6", "to_id": "F11", "flow": 9 }, { "from_id": "F7", "to_id": "F1", "flow": 28 }, { "from_id": "F7", "to_id": "F2", "flow": 15 }, { "from_id": "F7", "to_id": "F3", "flow": 15 }, { "from_id": "F7", "to_id": "F4", "flow": 14 }, { "from_id": "F7", "to_id": "F5", "flow": 26 }, { "from_id": "F7", "to_id": "F6", "flow": 22 }, { "from_id": "F7", "to_id": "F8", "flow": 18 }, { "from_id": "F7", "to_id": "F9", "flow": 17 }, { "from_id": "F7", "to_id": "F10", "flow": 21 }, { "from_id": "F7", "to_id": "F11", "flow": 14 }, { "from_id": "F8", "to_id": "F1", "flow": 11 }, { "from_id": "F8", "to_id": "F2", "flow": 20 }, { "from_id": "F8", "to_id": "F3", "flow": 16 }, { "from_id": "F8", "to_id": "F4", "flow": 13 }, { "from_id": "F8", "to_id": "F5", "flow": 14 }, { "from_id": "F8", "to_id": "F6", "flow": 22 }, { "from_id": "F8", "to_id": "F7", "flow": 18 }, { "from_id": "F8", "to_id": "F9", "flow": 14 }, { "from_id": "F8", "to_id": "F10", "flow": 14 }, { "from_id": "F8", "to_id": "F11", "flow": 29 }, { "from_id": "F9", "to_id": "F1", "flow": 10 }, { "from_id": "F9", "to_id": "F2", "flow": 18 }, { "from_id": "F9", "to_id": "F3", "flow": 14 }, { "from_id": "F9", "to_id": "F4", "flow": 19 }, { "from_id": "F9", "to_id": "F5", "flow": 22 }, { "from_id": "F9", "to_id": "F6", "flow": 26 }, { "from_id": "F9", "to_id": "F7", "flow": 17 }, { "from_id": "F9", "to_id": "F8", "flow": 14 }, { "from_id": "F9", "to_id": "F10", "flow": 12 }, { "from_id": "F9", "to_id": "F11", "flow": 12 }, { "from_id": "F10", "to_id": "F1", "flow": 18 }, { "from_id": "F10", "to_id": "F2", "flow": 24 }, { "from_id": "F10", "to_id": "F3", "flow": 14 }, { "from_id": "F10", "to_id": "F4", "flow": 22 }, { "from_id": "F10", "to_id": "F5", "flow": 26 }, { "from_id": "F10", "to_id": "F6", "flow": 26 }, { "from_id": "F10", "to_id": "F7", "flow": 21 }, { "from_id": "F10", "to_id": "F8", "flow": 14 }, { "from_id": "F10", "to_id": "F9", "flow": 12 }, { "from_id": "F10", "to_id": "F11", "flow": 7 }, { "from_id": "F11", "to_id": "F1", "flow": 9 }, { "from_id": "F11", "to_id": "F2", "flow": 11 }, { "from_id": "F11", "to_id": "F3", "flow": 25 }, { "from_id": "F11", "to_id": "F4", "flow": 19 }, { "from_id": "F11", "to_id": "F5", "flow": 7 }, { "from_id": "F11", "to_id": "F6", "flow": 9 }, { "from_id": "F11", "to_id": "F7", "flow": 14 }, { "from_id": "F11", "to_id": "F8", "flow": 29 }, { "from_id": "F11", "to_id": "F9", "flow": 12 }, { "from_id": "F11", "to_id": "F10", "flow": 7 } ] }, "solution_variant": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "context_index": 32, "input_format": "nl", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "There’s a plan to rearrange the shop floor: put each machine type into a distinct production cell and try to seat machines that exchange many parts close together. The rule is strict — each machine type gets exactly one cell and each cell hosts exactly one machine. To judge a plan, take each pair of machines, multiply how many parts flow between them by how far apart their cells end up, and add everything up; the lower that total, the better. The concrete flows and distances appear below.\n\nDetails for 10 machine types F1, F2, F3, F4, F5, F6, F7, F8, F9, F10 and production cells A, B, C, D, E, F, G, H, I, J follow:\nBetween production cell A and production cell B: distance 2.\nBetween production cell A and production cell C: distance 3.\nBetween production cell A and production cell D: distance 4.\nBetween production cell A and production cell E: distance 4.\nBetween production cell A and production cell F: distance 6.\nBetween production cell A and production cell G: distance 7.\nBetween production cell A and production cell H: distance 8.\nBetween production cell A and production cell I: distance 9.\nBetween production cell A and production cell J: distance 8.\nBetween production cell B and production cell A: distance 2.\nBetween production cell B and production cell C: distance 1.\nBetween production cell B and production cell D: distance 2.\nBetween production cell B and production cell E: distance 2.\nBetween production cell B and production cell F: distance 4.\nBetween production cell B and production cell G: distance 5.\nBetween production cell B and production cell H: distance 6.\nBetween production cell B and production cell I: distance 7.\nBetween production cell B and production cell J: distance 6.\nBetween production cell C and production cell A: distance 3.\nBetween production cell C and production cell B: distance 1.\nBetween production cell C and production cell D: distance 1.\nBetween production cell C and production cell E: distance 1.\nBetween production cell C and production cell F: distance 3.\nBetween production cell C and production cell G: distance 4.\nBetween production cell C and production cell H: distance 5.\nBetween production cell C and production cell I: distance 6.\nBetween production cell C and production cell J: distance 5.\nBetween production cell D and production cell A: distance 4.\nBetween production cell D and production cell B: distance 2.\nBetween production cell D and production cell C: distance 1.\nBetween production cell D and production cell E: distance 2.\nBetween production cell D and production cell F: distance 2.\nBetween production cell D and production cell G: distance 3.\nBetween production cell D and production cell H: distance 4.\nBetween production cell D and production cell I: distance 5.\nBetween production cell D and production cell J: distance 4.\nBetween production cell E and production cell A: distance 4.\nBetween production cell E and production cell B: distance 2.\nBetween production cell E and production cell C: distance 1.\nBetween production cell E and production cell D: distance 2.\nBetween production cell E and production cell F: distance 2.\nBetween production cell E and production cell G: distance 3.\nBetween production cell E and production cell H: distance 4.\nBetween production cell E and production cell I: distance 5.\nBetween production cell E and production cell J: distance 4.\nBetween production cell F and production cell A: distance 6.\nBetween production cell F and production cell B: distance 4.\nBetween production cell F and production cell C: distance 3.\nBetween production cell F and production cell D: distance 2.\nBetween production cell F and production cell E: distance 2.\nBetween production cell F and production cell G: distance 1.\nBetween production cell F and production cell H: distance 2.\nBetween production cell F and production cell I: distance 3.\nBetween production cell F and production cell J: distance 2.\nBetween production cell G and production cell A: distance 7.\nBetween production cell G and production cell B: distance 5.\nBetween production cell G and production cell C: distance 4.\nBetween production cell G and production cell D: distance 3.\nBetween production cell G and production cell E: distance 3.\nBetween production cell G and production cell F: distance 1.\nBetween production cell G and production cell H: distance 1.\nBetween production cell G and production cell I: distance 2.\nBetween production cell G and production cell J: distance 3.\nBetween production cell H and production cell A: distance 8.\nBetween production cell H and production cell B: distance 6.\nBetween production cell H and production cell C: distance 5.\nBetween production cell H and production cell D: distance 4.\nBetween production cell H and production cell E: distance 4.\nBetween production cell H and production cell F: distance 2.\nBetween production cell H and production cell G: distance 1.\nBetween production cell H and production cell I: distance 1.\nBetween production cell H and production cell J: distance 2.\nBetween production cell I and production cell A: distance 9.\nBetween production cell I and production cell B: distance 7.\nBetween production cell I and production cell C: distance 6.\nBetween production cell I and production cell D: distance 5.\nBetween production cell I and production cell E: distance 5.\nBetween production cell I and production cell F: distance 3.\nBetween production cell I and production cell G: distance 2.\nBetween production cell I and production cell H: distance 1.\nBetween production cell I and production cell J: distance 1.\nBetween production cell J and production cell A: distance 8.\nBetween production cell J and production cell B: distance 6.\nBetween production cell J and production cell C: distance 5.\nBetween production cell J and production cell D: distance 4.\nBetween production cell J and production cell E: distance 4.\nBetween production cell J and production cell F: distance 2.\nBetween production cell J and production cell G: distance 3.\nBetween production cell J and production cell H: distance 2.\nBetween production cell J and production cell I: distance 1.\nFrom machine F1 to machine F2: 6 parts.\nFrom machine F1 to machine F3: 8 parts.\nFrom machine F1 to machine F4: 5 parts.\nFrom machine F1 to machine F5: 6 parts.\nFrom machine F1 to machine F6: 4 parts.\nFrom machine F1 to machine F7: 6 parts.\nFrom machine F1 to machine F8: 1 parts.\nFrom machine F1 to machine F9: 5 parts.\nFrom machine F1 to machine F10: 5 parts.\nFrom machine F2 to machine F1: 6 parts.\nFrom machine F2 to machine F3: 5 parts.\nFrom machine F2 to machine F4: 5 parts.\nFrom machine F2 to machine F5: 3 parts.\nFrom machine F2 to machine F6: 3 parts.\nFrom machine F2 to machine F7: 6 parts.\nFrom machine F2 to machine F8: 3 parts.\nFrom machine F2 to machine F9: 4 parts.\nFrom machine F2 to machine F10: 8 parts.\nFrom machine F3 to machine F1: 8 parts.\nFrom machine F3 to machine F2: 5 parts.\nFrom machine F3 to machine F4: 4 parts.\nFrom machine F3 to machine F5: 3 parts.\nFrom machine F3 to machine F6: 6 parts.\nFrom machine F3 to machine F7: 7 parts.\nFrom machine F3 to machine F8: 7 parts.\nFrom machine F3 to machine F9: 3 parts.\nFrom machine F3 to machine F10: 3 parts.\nFrom machine F4 to machine F1: 5 parts.\nFrom machine F4 to machine F2: 5 parts.\nFrom machine F4 to machine F3: 4 parts.\nFrom machine F4 to machine F5: 8 parts.\nFrom machine F4 to machine F6: 7 parts.\nFrom machine F4 to machine F7: 5 parts.\nFrom machine F4 to machine F8: 1 parts.\nFrom machine F4 to machine F9: 8 parts.\nFrom machine F4 to machine F10: 4 parts.\nFrom machine F5 to machine F1: 6 parts.\nFrom machine F5 to machine F2: 3 parts.\nFrom machine F5 to machine F3: 3 parts.\nFrom machine F5 to machine F4: 8 parts.\nFrom machine F5 to machine F6: 6 parts.\nFrom machine F5 to machine F7: 7 parts.\nFrom machine F5 to machine F8: 1 parts.\nFrom machine F5 to machine F9: 8 parts.\nFrom machine F5 to machine F10: 6 parts.\nFrom machine F6 to machine F1: 4 parts.\nFrom machine F6 to machine F2: 3 parts.\nFrom machine F6 to machine F3: 6 parts.\nFrom machine F6 to machine F4: 7 parts.\nFrom machine F6 to machine F5: 6 parts.\nFrom machine F6 to machine F7: 9 parts.\nFrom machine F6 to machine F8: 6 parts.\nFrom machine F6 to machine F9: 5 parts.\nFrom machine F6 to machine F10: 8 parts.\nFrom machine F7 to machine F1: 6 parts.\nFrom machine F7 to machine F2: 6 parts.\nFrom machine F7 to machine F3: 7 parts.\nFrom machine F7 to machine F4: 5 parts.\nFrom machine F7 to machine F5: 7 parts.\nFrom machine F7 to machine F6: 9 parts.\nFrom machine F7 to machine F8: 6 parts.\nFrom machine F7 to machine F9: 5 parts.\nFrom machine F7 to machine F10: 5 parts.\nFrom machine F8 to machine F1: 1 parts.\nFrom machine F8 to machine F2: 3 parts.\nFrom machine F8 to machine F3: 7 parts.\nFrom machine F8 to machine F4: 1 parts.\nFrom machine F8 to machine F5: 1 parts.\nFrom machine F8 to machine F6: 6 parts.\nFrom machine F8 to machine F7: 6 parts.\nFrom machine F8 to machine F9: 5 parts.\nFrom machine F8 to machine F10: 4 parts.\nFrom machine F9 to machine F1: 5 parts.\nFrom machine F9 to machine F2: 4 parts.\nFrom machine F9 to machine F3: 3 parts.\nFrom machine F9 to machine F4: 8 parts.\nFrom machine F9 to machine F5: 8 parts.\nFrom machine F9 to machine F6: 5 parts.\nFrom machine F9 to machine F7: 5 parts.\nFrom machine F9 to machine F8: 5 parts.\nFrom machine F9 to machine F10: 3 parts.\nFrom machine F10 to machine F1: 5 parts.\nFrom machine F10 to machine F2: 8 parts.\nFrom machine F10 to machine F3: 3 parts.\nFrom machine F10 to machine F4: 4 parts.\nFrom machine F10 to machine F5: 6 parts.\nFrom machine F10 to machine F6: 8 parts.\nFrom machine F10 to machine F7: 5 parts.\nFrom machine F10 to machine F8: 4 parts.\nFrom machine F10 to machine F9: 3 parts.\nPlans are compared by summing each flow multiplied by the distance between assigned cells; the smaller the total, the better.\n\nIf you want to hand me a proposed layout, a small JSON snippet like this is an easy, predictable way to send it over:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis just means: \"solution\" is a list in order — the first entry is the cell (location) you assign to the first machine type, the second entry is where the second machine type goes, and so on. Think of it as a simple checklist of which location each machine ends up in.\n\nThis JSON is only a sketch of the shape I expect, not the actual answer. Please use the exact identifiers from the instance input — no renaming and no inventing new labels. \nValid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 2, 3, 4, 4, 6, 7, 8, 9, 8 ], [ 2, 0, 1, 2, 2, 4, 5, 6, 7, 6 ], [ 3, 1, 0, 1, 1, 3, 4, 5, 6, 5 ], [ 4, 2, 1, 0, 2, 2, 3, 4, 5, 4 ], [ 4, 2, 1, 2, 0, 2, 3, 4, 5, 4 ], [ 6, 4, 3, 2, 2, 0, 1, 2, 3, 2 ], [ 7, 5, 4, 3, 3, 1, 0, 1, 2, 3 ], [ 8, 6, 5, 4, 4, 2, 1, 0, 1, 2 ], [ 9, 7, 6, 5, 5, 3, 2, 1, 0, 1 ], [ 8, 6, 5, 4, 4, 2, 3, 2, 1, 0 ] ], "flow_matrix": [ [ 0, 6, 8, 5, 6, 4, 6, 1, 5, 5 ], [ 6, 0, 5, 5, 3, 3, 6, 3, 4, 8 ], [ 8, 5, 0, 4, 3, 6, 7, 7, 3, 3 ], [ 5, 5, 4, 0, 8, 7, 5, 1, 8, 4 ], [ 6, 3, 3, 8, 0, 6, 7, 1, 8, 6 ], [ 4, 3, 6, 7, 6, 0, 9, 6, 5, 8 ], [ 6, 6, 7, 5, 7, 9, 0, 6, 5, 5 ], [ 1, 3, 7, 1, 1, 6, 6, 0, 5, 4 ], [ 5, 4, 3, 8, 8, 5, 5, 5, 0, 3 ], [ 5, 8, 3, 4, 6, 8, 5, 4, 3, 0 ] ], "objective": 1480.0 }, "solution": [ 6, 5, 1, 9, 7, 2, 4, 0, 8, 3 ], "obj": 1480.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 2 }, { "from_id": "A", "to_id": "C", "distance": 3 }, { "from_id": "A", "to_id": "D", "distance": 4 }, { "from_id": "A", "to_id": "E", "distance": 4 }, { "from_id": "A", "to_id": "F", "distance": 6 }, { "from_id": "A", "to_id": "G", "distance": 7 }, { "from_id": "A", "to_id": "H", "distance": 8 }, { "from_id": "A", "to_id": "I", "distance": 9 }, { "from_id": "A", "to_id": "J", "distance": 8 }, { "from_id": "B", "to_id": "A", "distance": 2 }, { "from_id": "B", "to_id": "C", "distance": 1 }, { "from_id": "B", "to_id": "D", "distance": 2 }, { "from_id": "B", "to_id": "E", "distance": 2 }, { "from_id": "B", "to_id": "F", "distance": 4 }, { "from_id": "B", "to_id": "G", "distance": 5 }, { "from_id": "B", "to_id": "H", "distance": 6 }, { "from_id": "B", "to_id": "I", "distance": 7 }, { "from_id": "B", "to_id": "J", "distance": 6 }, { "from_id": "C", "to_id": "A", "distance": 3 }, { "from_id": "C", "to_id": "B", "distance": 1 }, { "from_id": "C", "to_id": "D", "distance": 1 }, { "from_id": "C", "to_id": "E", "distance": 1 }, { "from_id": "C", "to_id": "F", "distance": 3 }, { "from_id": "C", "to_id": "G", "distance": 4 }, { "from_id": "C", "to_id": "H", "distance": 5 }, { "from_id": "C", "to_id": "I", "distance": 6 }, { "from_id": "C", "to_id": "J", "distance": 5 }, { "from_id": "D", "to_id": "A", "distance": 4 }, { "from_id": "D", "to_id": "B", "distance": 2 }, { "from_id": "D", "to_id": "C", "distance": 1 }, { "from_id": "D", "to_id": "E", "distance": 2 }, { "from_id": "D", "to_id": "F", "distance": 2 }, { "from_id": "D", "to_id": "G", "distance": 3 }, { "from_id": "D", "to_id": "H", "distance": 4 }, { "from_id": "D", "to_id": "I", "distance": 5 }, { "from_id": "D", "to_id": "J", "distance": 4 }, { "from_id": "E", "to_id": "A", "distance": 4 }, { "from_id": "E", "to_id": "B", "distance": 2 }, { "from_id": "E", "to_id": "C", "distance": 1 }, { "from_id": "E", "to_id": "D", "distance": 2 }, { "from_id": "E", "to_id": "F", "distance": 2 }, { "from_id": "E", "to_id": "G", "distance": 3 }, { "from_id": "E", "to_id": "H", "distance": 4 }, { "from_id": "E", "to_id": "I", "distance": 5 }, { "from_id": "E", "to_id": "J", "distance": 4 }, { "from_id": "F", "to_id": "A", "distance": 6 }, { "from_id": "F", "to_id": "B", "distance": 4 }, { "from_id": "F", "to_id": "C", "distance": 3 }, { "from_id": "F", "to_id": "D", "distance": 2 }, { "from_id": "F", "to_id": "E", "distance": 2 }, { "from_id": "F", "to_id": "G", "distance": 1 }, { "from_id": "F", "to_id": "H", "distance": 2 }, { "from_id": "F", "to_id": "I", "distance": 3 }, { "from_id": "F", "to_id": "J", "distance": 2 }, { "from_id": "G", "to_id": "A", "distance": 7 }, { "from_id": "G", "to_id": "B", "distance": 5 }, { "from_id": "G", "to_id": "C", "distance": 4 }, { "from_id": "G", "to_id": "D", "distance": 3 }, { "from_id": "G", "to_id": "E", "distance": 3 }, { "from_id": "G", "to_id": "F", "distance": 1 }, { "from_id": "G", "to_id": "H", "distance": 1 }, { "from_id": "G", "to_id": "I", "distance": 2 }, { "from_id": "G", "to_id": "J", "distance": 3 }, { "from_id": "H", "to_id": "A", "distance": 8 }, { "from_id": "H", "to_id": "B", "distance": 6 }, { "from_id": "H", "to_id": "C", "distance": 5 }, { "from_id": "H", "to_id": "D", "distance": 4 }, { "from_id": "H", "to_id": "E", "distance": 4 }, { "from_id": "H", "to_id": "F", "distance": 2 }, { "from_id": "H", "to_id": "G", "distance": 1 }, { "from_id": "H", "to_id": "I", "distance": 1 }, { "from_id": "H", "to_id": "J", "distance": 2 }, { "from_id": "I", "to_id": "A", "distance": 9 }, { "from_id": "I", "to_id": "B", "distance": 7 }, { "from_id": "I", "to_id": "C", "distance": 6 }, { "from_id": "I", "to_id": "D", "distance": 5 }, { "from_id": "I", "to_id": "E", "distance": 5 }, { "from_id": "I", "to_id": "F", "distance": 3 }, { "from_id": "I", "to_id": "G", "distance": 2 }, { "from_id": "I", "to_id": "H", "distance": 1 }, { "from_id": "I", "to_id": "J", "distance": 1 }, { "from_id": "J", "to_id": "A", "distance": 8 }, { "from_id": "J", "to_id": "B", "distance": 6 }, { "from_id": "J", "to_id": "C", "distance": 5 }, { "from_id": "J", "to_id": "D", "distance": 4 }, { "from_id": "J", "to_id": "E", "distance": 4 }, { "from_id": "J", "to_id": "F", "distance": 2 }, { "from_id": "J", "to_id": "G", "distance": 3 }, { "from_id": "J", "to_id": "H", "distance": 2 }, { "from_id": "J", "to_id": "I", "distance": 1 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 6 }, { "from_id": "F1", "to_id": "F3", "flow": 8 }, { "from_id": "F1", "to_id": "F4", "flow": 5 }, { "from_id": "F1", "to_id": "F5", "flow": 6 }, { "from_id": "F1", "to_id": "F6", "flow": 4 }, { "from_id": "F1", "to_id": "F7", "flow": 6 }, { "from_id": "F1", "to_id": "F8", "flow": 1 }, { "from_id": "F1", "to_id": "F9", "flow": 5 }, { "from_id": "F1", "to_id": "F10", "flow": 5 }, { "from_id": "F2", "to_id": "F1", "flow": 6 }, { "from_id": "F2", "to_id": "F3", "flow": 5 }, { "from_id": "F2", "to_id": "F4", "flow": 5 }, { "from_id": "F2", "to_id": "F5", "flow": 3 }, { "from_id": "F2", "to_id": "F6", "flow": 3 }, { "from_id": "F2", "to_id": "F7", "flow": 6 }, { "from_id": "F2", "to_id": "F8", "flow": 3 }, { "from_id": "F2", "to_id": "F9", "flow": 4 }, { "from_id": "F2", "to_id": "F10", "flow": 8 }, { "from_id": "F3", "to_id": "F1", "flow": 8 }, { "from_id": "F3", "to_id": "F2", "flow": 5 }, { "from_id": "F3", "to_id": "F4", "flow": 4 }, { "from_id": "F3", "to_id": "F5", "flow": 3 }, { "from_id": "F3", "to_id": "F6", "flow": 6 }, { "from_id": "F3", "to_id": "F7", "flow": 7 }, { "from_id": "F3", "to_id": "F8", "flow": 7 }, { "from_id": "F3", "to_id": "F9", "flow": 3 }, { "from_id": "F3", "to_id": "F10", "flow": 3 }, { "from_id": "F4", "to_id": "F1", "flow": 5 }, { "from_id": "F4", "to_id": "F2", "flow": 5 }, { "from_id": "F4", "to_id": "F3", "flow": 4 }, { "from_id": "F4", "to_id": "F5", "flow": 8 }, { "from_id": "F4", "to_id": "F6", "flow": 7 }, { "from_id": "F4", "to_id": "F7", "flow": 5 }, { "from_id": "F4", "to_id": "F8", "flow": 1 }, { "from_id": "F4", "to_id": "F9", "flow": 8 }, { "from_id": "F4", "to_id": "F10", "flow": 4 }, { "from_id": "F5", "to_id": "F1", "flow": 6 }, { "from_id": "F5", "to_id": "F2", "flow": 3 }, { "from_id": "F5", "to_id": "F3", "flow": 3 }, { "from_id": "F5", "to_id": "F4", "flow": 8 }, { "from_id": "F5", "to_id": "F6", "flow": 6 }, { "from_id": "F5", "to_id": "F7", "flow": 7 }, { "from_id": "F5", "to_id": "F8", "flow": 1 }, { "from_id": "F5", "to_id": "F9", "flow": 8 }, { "from_id": "F5", "to_id": "F10", "flow": 6 }, { "from_id": "F6", "to_id": "F1", "flow": 4 }, { "from_id": "F6", "to_id": "F2", "flow": 3 }, { "from_id": "F6", "to_id": "F3", "flow": 6 }, { "from_id": "F6", "to_id": "F4", "flow": 7 }, { "from_id": "F6", "to_id": "F5", "flow": 6 }, { "from_id": "F6", "to_id": "F7", "flow": 9 }, { "from_id": "F6", "to_id": "F8", "flow": 6 }, { "from_id": "F6", "to_id": "F9", "flow": 5 }, { "from_id": "F6", "to_id": "F10", "flow": 8 }, { "from_id": "F7", "to_id": "F1", "flow": 6 }, { "from_id": "F7", "to_id": "F2", "flow": 6 }, { "from_id": "F7", "to_id": "F3", "flow": 7 }, { "from_id": "F7", "to_id": "F4", "flow": 5 }, { "from_id": "F7", "to_id": "F5", "flow": 7 }, { "from_id": "F7", "to_id": "F6", "flow": 9 }, { "from_id": "F7", "to_id": "F8", "flow": 6 }, { "from_id": "F7", "to_id": "F9", "flow": 5 }, { "from_id": "F7", "to_id": "F10", "flow": 5 }, { "from_id": "F8", "to_id": "F1", "flow": 1 }, { "from_id": "F8", "to_id": "F2", "flow": 3 }, { "from_id": "F8", "to_id": "F3", "flow": 7 }, { "from_id": "F8", "to_id": "F4", "flow": 1 }, { "from_id": "F8", "to_id": "F5", "flow": 1 }, { "from_id": "F8", "to_id": "F6", "flow": 6 }, { "from_id": "F8", "to_id": "F7", "flow": 6 }, { "from_id": "F8", "to_id": "F9", "flow": 5 }, { "from_id": "F8", "to_id": "F10", "flow": 4 }, { "from_id": "F9", "to_id": "F1", "flow": 5 }, { "from_id": "F9", "to_id": "F2", "flow": 4 }, { "from_id": "F9", "to_id": "F3", "flow": 3 }, { "from_id": "F9", "to_id": "F4", "flow": 8 }, { "from_id": "F9", "to_id": "F5", "flow": 8 }, { "from_id": "F9", "to_id": "F6", "flow": 5 }, { "from_id": "F9", "to_id": "F7", "flow": 5 }, { "from_id": "F9", "to_id": "F8", "flow": 5 }, { "from_id": "F9", "to_id": "F10", "flow": 3 }, { "from_id": "F10", "to_id": "F1", "flow": 5 }, { "from_id": "F10", "to_id": "F2", "flow": 8 }, { "from_id": "F10", "to_id": "F3", "flow": 3 }, { "from_id": "F10", "to_id": "F4", "flow": 4 }, { "from_id": "F10", "to_id": "F5", "flow": 6 }, { "from_id": "F10", "to_id": "F6", "flow": 8 }, { "from_id": "F10", "to_id": "F7", "flow": 5 }, { "from_id": "F10", "to_id": "F8", "flow": 4 }, { "from_id": "F10", "to_id": "F9", "flow": 3 } ] }, "solution_variant": [ "G", "F", "B", "J", "H", "C", "E", "A", "I", "D" ], "context_index": 33, "input_format": "nl", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "There’s a practical puzzle on the cruise: put each entertainment group into a single venue so groups that often swap amps and lights end up close together. Each venue hosts exactly one group and every group must be assigned somewhere — no sharing, no vacancies. To see which arrangement is best, for every pair of groups multiply their gear‑swap frequency by the distance separating their venues and add up all those results; the arrangement with the smallest sum wins. Specific groups, venues, distances and swap counts appear below.\n\nAssign each of the F1, F2, F3, F4, F5, F6, F7, F8, F9, F10 to one of the 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; there are 10 groups and 10 venues.\n\n| from_venue_id | to_venue_id | venue_separation_distance |\n|---|---|---|\n| 1 | 2 | 1 |\n| 1 | 3 | 1 |\n| 1 | 4 | 0 |\n| 1 | 5 | 0 |\n| 1 | 6 | 0 |\n| 1 | 7 | 0 |\n| 1 | 8 | 0 |\n| 1 | 9 | 0 |\n| 1 | 10 | 0 |\n| 2 | 1 | 1 |\n| 2 | 3 | 1 |\n| 2 | 4 | 0 |\n| 2 | 5 | 0 |\n| 2 | 6 | 0 |\n| 2 | 7 | 0 |\n| 2 | 8 | 0 |\n| 2 | 9 | 0 |\n| 2 | 10 | 0 |\n| 3 | 1 | 1 |\n| 3 | 2 | 1 |\n| 3 | 4 | 0 |\n| 3 | 5 | 0 |\n| 3 | 6 | 0 |\n| 3 | 7 | 0 |\n| 3 | 8 | 0 |\n| 3 | 9 | 0 |\n| 3 | 10 | 0 |\n| 4 | 1 | 0 |\n| 4 | 2 | 0 |\n| 4 | 3 | 0 |\n| 4 | 5 | 0 |\n| 4 | 6 | 0 |\n| 4 | 7 | 0 |\n| 4 | 8 | 0 |\n| 4 | 9 | 0 |\n| 4 | 10 | 0 |\n| 5 | 1 | 0 |\n| 5 | 2 | 0 |\n| 5 | 3 | 0 |\n| 5 | 4 | 0 |\n| 5 | 6 | 0 |\n| 5 | 7 | 1 |\n| 5 | 8 | 0 |\n| 5 | 9 | 0 |\n| 5 | 10 | 0 |\n| 6 | 1 | 0 |\n| 6 | 2 | 0 |\n| 6 | 3 | 0 |\n| 6 | 4 | 0 |\n| 6 | 5 | 0 |\n| 6 | 7 | 0 |\n| 6 | 8 | 0 |\n| 6 | 9 | 0 |\n| 6 | 10 | 0 |\n| 7 | 1 | 0 |\n| 7 | 2 | 0 |\n| 7 | 3 | 0 |\n| 7 | 4 | 0 |\n| 7 | 5 | 1 |\n| 7 | 6 | 0 |\n| 7 | 8 | 1 |\n| 7 | 9 | 1 |\n| 7 | 10 | 0 |\n| 8 | 1 | 0 |\n| 8 | 2 | 0 |\n| 8 | 3 | 0 |\n| 8 | 4 | 0 |\n| 8 | 5 | 0 |\n| 8 | 6 | 0 |\n| 8 | 7 | 1 |\n| 8 | 9 | 1 |\n| 8 | 10 | 0 |\n| 9 | 1 | 0 |\n| 9 | 2 | 0 |\n| 9 | 3 | 0 |\n| 9 | 4 | 0 |\n| 9 | 5 | 0 |\n| 9 | 6 | 0 |\n| 9 | 7 | 1 |\n| 9 | 8 | 1 |\n| 9 | 10 | 0 |\n| 10 | 1 | 0 |\n| 10 | 2 | 0 |\n| 10 | 3 | 0 |\n| 10 | 4 | 0 |\n| 10 | 5 | 0 |\n| 10 | 6 | 0 |\n| 10 | 7 | 0 |\n| 10 | 8 | 0 |\n| 10 | 9 | 0 |\n\n| from_group_id | to_group_id | equipment_swap_frequency |\n|---|---|---|\n| F1 | F2 | 1 |\n| F1 | F3 | 0 |\n| F1 | F4 | 1 |\n| F1 | F5 | 1 |\n| F1 | F6 | 2 |\n| F1 | F7 | 2 |\n| F1 | F8 | 1 |\n| F1 | F9 | 2 |\n| F1 | F10 | 3 |\n| F2 | F1 | 1 |\n| F2 | F3 | 2 |\n| F2 | F4 | 1 |\n| F2 | F5 | 1 |\n| F2 | F6 | 0 |\n| F2 | F7 | 0 |\n| F2 | F8 | 3 |\n| F2 | F9 | 2 |\n| F2 | F10 | 1 |\n| F3 | F1 | 0 |\n| F3 | F2 | 2 |\n| F3 | F4 | 0 |\n| F3 | F5 | 0 |\n| F3 | F6 | 1 |\n| F3 | F7 | 3 |\n| F3 | F8 | 0 |\n| F3 | F9 | 1 |\n| F3 | F10 | 2 |\n| F4 | F1 | 1 |\n| F4 | F2 | 1 |\n| F4 | F3 | 0 |\n| F4 | F5 | 1 |\n| F4 | F6 | 0 |\n| F4 | F7 | 2 |\n| F4 | F8 | 1 |\n| F4 | F9 | 0 |\n| F4 | F10 | 1 |\n| F5 | F1 | 1 |\n| F5 | F2 | 1 |\n| F5 | F3 | 0 |\n| F5 | F4 | 1 |\n| F5 | F6 | 0 |\n| F5 | F7 | 2 |\n| F5 | F8 | 1 |\n| F5 | F9 | 2 |\n| F5 | F10 | 1 |\n| F6 | F1 | 2 |\n| F6 | F2 | 0 |\n| F6 | F3 | 1 |\n| F6 | F4 | 0 |\n| F6 | F5 | 0 |\n| F6 | F7 | 1 |\n| F6 | F8 | 2 |\n| F6 | F9 | 1 |\n| F6 | F10 | 0 |\n| F7 | F1 | 2 |\n| F7 | F2 | 0 |\n| F7 | F3 | 3 |\n| F7 | F4 | 2 |\n| F7 | F5 | 2 |\n| F7 | F6 | 1 |\n| F7 | F8 | 2 |\n| F7 | F9 | 1 |\n| F7 | F10 | 0 |\n| F8 | F1 | 1 |\n| F8 | F2 | 3 |\n| F8 | F3 | 0 |\n| F8 | F4 | 1 |\n| F8 | F5 | 1 |\n| F8 | F6 | 2 |\n| F8 | F7 | 2 |\n| F8 | F9 | 0 |\n| F8 | F10 | 1 |\n| F9 | F1 | 2 |\n| F9 | F2 | 2 |\n| F9 | F3 | 1 |\n| F9 | F4 | 0 |\n| F9 | F5 | 2 |\n| F9 | F6 | 1 |\n| F9 | F7 | 1 |\n| F9 | F8 | 0 |\n| F9 | F10 | 0 |\n| F10 | F1 | 3 |\n| F10 | F2 | 1 |\n| F10 | F3 | 2 |\n| F10 | F4 | 1 |\n| F10 | F5 | 1 |\n| F10 | F6 | 0 |\n| F10 | F7 | 0 |\n| F10 | F8 | 1 |\n| F10 | F9 | 0 |\n\nSelect the assignment that yields the smallest total transfer cost.\n\nAlso, when you send back your chosen layout, just stick to this simple JSON shape so it's easy to read and check:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\n\"solution\" is just a list: the first entry is the venue ID for the first entertainment group, the second entry is the venue for the second group, and so on. Think of it like filling out a lineup form — one spot per group, in order. This JSON is just the expected shape, not the actual assignment.\n\nPlease use the exact identifiers from the instance input — don't rename them or introduce new labels.\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 1, 1, 0, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0 ], [ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 1, 0, 0, 1, 1, 0 ], [ 0, 0, 0, 0, 0, 0, 1, 0, 1, 0 ], [ 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 1, 0, 1, 1, 2, 2, 1, 2, 3 ], [ 1, 0, 2, 1, 1, 0, 0, 3, 2, 1 ], [ 0, 2, 0, 0, 0, 1, 3, 0, 1, 2 ], [ 1, 1, 0, 0, 1, 0, 2, 1, 0, 1 ], [ 1, 1, 0, 1, 0, 0, 2, 1, 2, 1 ], [ 2, 0, 1, 0, 0, 0, 1, 2, 1, 0 ], [ 2, 0, 3, 2, 2, 1, 0, 2, 1, 0 ], [ 1, 3, 0, 1, 1, 2, 2, 0, 0, 1 ], [ 2, 2, 1, 0, 2, 1, 1, 0, 0, 0 ], [ 3, 1, 2, 1, 1, 0, 0, 1, 0, 0 ] ], "objective": 4.0 }, "solution": [ 0, 7, 1, 9, 8, 6, 5, 2, 3, 4 ], "obj": 4.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 1 }, { "from_id": 1, "to_id": 3, "distance": 1 }, { "from_id": 1, "to_id": 4, "distance": 0 }, { "from_id": 1, "to_id": 5, "distance": 0 }, { "from_id": 1, "to_id": 6, "distance": 0 }, { "from_id": 1, "to_id": 7, "distance": 0 }, { "from_id": 1, "to_id": 8, "distance": 0 }, { "from_id": 1, "to_id": 9, "distance": 0 }, { "from_id": 1, "to_id": 10, "distance": 0 }, { "from_id": 2, "to_id": 1, "distance": 1 }, { "from_id": 2, "to_id": 3, "distance": 1 }, { "from_id": 2, "to_id": 4, "distance": 0 }, { "from_id": 2, "to_id": 5, "distance": 0 }, { "from_id": 2, "to_id": 6, "distance": 0 }, { "from_id": 2, "to_id": 7, "distance": 0 }, { "from_id": 2, "to_id": 8, "distance": 0 }, { "from_id": 2, "to_id": 9, "distance": 0 }, { "from_id": 2, "to_id": 10, "distance": 0 }, { "from_id": 3, "to_id": 1, "distance": 1 }, { "from_id": 3, "to_id": 2, "distance": 1 }, { "from_id": 3, "to_id": 4, "distance": 0 }, { "from_id": 3, "to_id": 5, "distance": 0 }, { "from_id": 3, "to_id": 6, "distance": 0 }, { "from_id": 3, "to_id": 7, "distance": 0 }, { "from_id": 3, "to_id": 8, "distance": 0 }, { "from_id": 3, "to_id": 9, "distance": 0 }, { "from_id": 3, "to_id": 10, "distance": 0 }, { "from_id": 4, "to_id": 1, "distance": 0 }, { "from_id": 4, "to_id": 2, "distance": 0 }, { "from_id": 4, "to_id": 3, "distance": 0 }, { "from_id": 4, "to_id": 5, "distance": 0 }, { "from_id": 4, "to_id": 6, "distance": 0 }, { "from_id": 4, "to_id": 7, "distance": 0 }, { "from_id": 4, "to_id": 8, "distance": 0 }, { "from_id": 4, "to_id": 9, "distance": 0 }, { "from_id": 4, "to_id": 10, "distance": 0 }, { "from_id": 5, "to_id": 1, "distance": 0 }, { "from_id": 5, "to_id": 2, "distance": 0 }, { "from_id": 5, "to_id": 3, "distance": 0 }, { "from_id": 5, "to_id": 4, "distance": 0 }, { "from_id": 5, "to_id": 6, "distance": 0 }, { "from_id": 5, "to_id": 7, "distance": 1 }, { "from_id": 5, "to_id": 8, "distance": 0 }, { "from_id": 5, "to_id": 9, "distance": 0 }, { "from_id": 5, "to_id": 10, "distance": 0 }, { "from_id": 6, "to_id": 1, "distance": 0 }, { "from_id": 6, "to_id": 2, "distance": 0 }, { "from_id": 6, "to_id": 3, "distance": 0 }, { "from_id": 6, "to_id": 4, "distance": 0 }, { "from_id": 6, "to_id": 5, "distance": 0 }, { "from_id": 6, "to_id": 7, "distance": 0 }, { "from_id": 6, "to_id": 8, "distance": 0 }, { "from_id": 6, "to_id": 9, "distance": 0 }, { "from_id": 6, "to_id": 10, "distance": 0 }, { "from_id": 7, "to_id": 1, "distance": 0 }, { "from_id": 7, "to_id": 2, "distance": 0 }, { "from_id": 7, "to_id": 3, "distance": 0 }, { "from_id": 7, "to_id": 4, "distance": 0 }, { "from_id": 7, "to_id": 5, "distance": 1 }, { "from_id": 7, "to_id": 6, "distance": 0 }, { "from_id": 7, "to_id": 8, "distance": 1 }, { "from_id": 7, "to_id": 9, "distance": 1 }, { "from_id": 7, "to_id": 10, "distance": 0 }, { "from_id": 8, "to_id": 1, "distance": 0 }, { "from_id": 8, "to_id": 2, "distance": 0 }, { "from_id": 8, "to_id": 3, "distance": 0 }, { "from_id": 8, "to_id": 4, "distance": 0 }, { "from_id": 8, "to_id": 5, "distance": 0 }, { "from_id": 8, "to_id": 6, "distance": 0 }, { "from_id": 8, "to_id": 7, "distance": 1 }, { "from_id": 8, "to_id": 9, "distance": 1 }, { "from_id": 8, "to_id": 10, "distance": 0 }, { "from_id": 9, "to_id": 1, "distance": 0 }, { "from_id": 9, "to_id": 2, "distance": 0 }, { "from_id": 9, "to_id": 3, "distance": 0 }, { "from_id": 9, "to_id": 4, "distance": 0 }, { "from_id": 9, "to_id": 5, "distance": 0 }, { "from_id": 9, "to_id": 6, "distance": 0 }, { "from_id": 9, "to_id": 7, "distance": 1 }, { "from_id": 9, "to_id": 8, "distance": 1 }, { "from_id": 9, "to_id": 10, "distance": 0 }, { "from_id": 10, "to_id": 1, "distance": 0 }, { "from_id": 10, "to_id": 2, "distance": 0 }, { "from_id": 10, "to_id": 3, "distance": 0 }, { "from_id": 10, "to_id": 4, "distance": 0 }, { "from_id": 10, "to_id": 5, "distance": 0 }, { "from_id": 10, "to_id": 6, "distance": 0 }, { "from_id": 10, "to_id": 7, "distance": 0 }, { "from_id": 10, "to_id": 8, "distance": 0 }, { "from_id": 10, "to_id": 9, "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 1 }, { "from_id": "F1", "to_id": "F3", "flow": 0 }, { "from_id": "F1", "to_id": "F4", "flow": 1 }, { "from_id": "F1", "to_id": "F5", "flow": 1 }, { "from_id": "F1", "to_id": "F6", "flow": 2 }, { "from_id": "F1", "to_id": "F7", "flow": 2 }, { "from_id": "F1", "to_id": "F8", "flow": 1 }, { "from_id": "F1", "to_id": "F9", "flow": 2 }, { "from_id": "F1", "to_id": "F10", "flow": 3 }, { "from_id": "F2", "to_id": "F1", "flow": 1 }, { "from_id": "F2", "to_id": "F3", "flow": 2 }, { "from_id": "F2", "to_id": "F4", "flow": 1 }, { "from_id": "F2", "to_id": "F5", "flow": 1 }, { "from_id": "F2", "to_id": "F6", "flow": 0 }, { "from_id": "F2", "to_id": "F7", "flow": 0 }, { "from_id": "F2", "to_id": "F8", "flow": 3 }, { "from_id": "F2", "to_id": "F9", "flow": 2 }, { "from_id": "F2", "to_id": "F10", "flow": 1 }, { "from_id": "F3", "to_id": "F1", "flow": 0 }, { "from_id": "F3", "to_id": "F2", "flow": 2 }, { "from_id": "F3", "to_id": "F4", "flow": 0 }, { "from_id": "F3", "to_id": "F5", "flow": 0 }, { "from_id": "F3", "to_id": "F6", "flow": 1 }, { "from_id": "F3", "to_id": "F7", "flow": 3 }, { "from_id": "F3", "to_id": "F8", "flow": 0 }, { "from_id": "F3", "to_id": "F9", "flow": 1 }, { "from_id": "F3", "to_id": "F10", "flow": 2 }, { "from_id": "F4", "to_id": "F1", "flow": 1 }, { "from_id": "F4", "to_id": "F2", "flow": 1 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 1 }, { "from_id": "F4", "to_id": "F6", "flow": 0 }, { "from_id": "F4", "to_id": "F7", "flow": 2 }, { "from_id": "F4", "to_id": "F8", "flow": 1 }, { "from_id": "F4", "to_id": "F9", "flow": 0 }, { "from_id": "F4", "to_id": "F10", "flow": 1 }, { "from_id": "F5", "to_id": "F1", "flow": 1 }, { "from_id": "F5", "to_id": "F2", "flow": 1 }, { "from_id": "F5", "to_id": "F3", "flow": 0 }, { "from_id": "F5", "to_id": "F4", "flow": 1 }, { "from_id": "F5", "to_id": "F6", "flow": 0 }, { "from_id": "F5", "to_id": "F7", "flow": 2 }, { "from_id": "F5", "to_id": "F8", "flow": 1 }, { "from_id": "F5", "to_id": "F9", "flow": 2 }, { "from_id": "F5", "to_id": "F10", "flow": 1 }, { "from_id": "F6", "to_id": "F1", "flow": 2 }, { "from_id": "F6", "to_id": "F2", "flow": 0 }, { "from_id": "F6", "to_id": "F3", "flow": 1 }, { "from_id": "F6", "to_id": "F4", "flow": 0 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 1 }, { "from_id": "F6", "to_id": "F8", "flow": 2 }, { "from_id": "F6", "to_id": "F9", "flow": 1 }, { "from_id": "F6", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 2 }, { "from_id": "F7", "to_id": "F2", "flow": 0 }, { "from_id": "F7", "to_id": "F3", "flow": 3 }, { "from_id": "F7", "to_id": "F4", "flow": 2 }, { "from_id": "F7", "to_id": "F5", "flow": 2 }, { "from_id": "F7", "to_id": "F6", "flow": 1 }, { "from_id": "F7", "to_id": "F8", "flow": 2 }, { "from_id": "F7", "to_id": "F9", "flow": 1 }, { "from_id": "F7", "to_id": "F10", "flow": 0 }, { "from_id": "F8", "to_id": "F1", "flow": 1 }, { "from_id": "F8", "to_id": "F2", "flow": 3 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 1 }, { "from_id": "F8", "to_id": "F5", "flow": 1 }, { "from_id": "F8", "to_id": "F6", "flow": 2 }, { "from_id": "F8", "to_id": "F7", "flow": 2 }, { "from_id": "F8", "to_id": "F9", "flow": 0 }, { "from_id": "F8", "to_id": "F10", "flow": 1 }, { "from_id": "F9", "to_id": "F1", "flow": 2 }, { "from_id": "F9", "to_id": "F2", "flow": 2 }, { "from_id": "F9", "to_id": "F3", "flow": 1 }, { "from_id": "F9", "to_id": "F4", "flow": 0 }, { "from_id": "F9", "to_id": "F5", "flow": 2 }, { "from_id": "F9", "to_id": "F6", "flow": 1 }, { "from_id": "F9", "to_id": "F7", "flow": 1 }, { "from_id": "F9", "to_id": "F8", "flow": 0 }, { "from_id": "F9", "to_id": "F10", "flow": 0 }, { "from_id": "F10", "to_id": "F1", "flow": 3 }, { "from_id": "F10", "to_id": "F2", "flow": 1 }, { "from_id": "F10", "to_id": "F3", "flow": 2 }, { "from_id": "F10", "to_id": "F4", "flow": 1 }, { "from_id": "F10", "to_id": "F5", "flow": 1 }, { "from_id": "F10", "to_id": "F6", "flow": 0 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 1 }, { "from_id": "F10", "to_id": "F9", "flow": 0 } ] }, "solution_variant": [ 1, 8, 2, 10, 9, 7, 6, 3, 4, 5 ], "context_index": 34, "input_format": "markdown_table", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Picture this: a warehouse with a grid of permanent slots and a set of delivery hubs that must each be placed into one of those slots. The best setups put hubs that exchange a ton of parcels near each other. To see which setup is best, for every pair of hubs multiply the number of parcels they send between them by how far apart their slots are, then add up all those products — the smaller that sum, the better the layout. The concrete details are coming up below.\n\n{\n \"num_hubs\": 10,\n \"hub_ids\": [\n \"F1\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\",\n \"F10\"\n ],\n \"slot_ids\": [\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\",\n \"J\"\n ],\n \"distance\": [\n {\n \"slot_from_id\": \"A\",\n \"slot_to_id\": \"B\",\n \"slot_distance\": 17\n },\n {\n \"slot_from_id\": \"A\",\n \"slot_to_id\": \"C\",\n \"slot_distance\": 32\n },\n {\n \"slot_from_id\": \"A\",\n \"slot_to_id\": \"D\",\n \"slot_distance\": 25\n },\n {\n \"slot_from_id\": \"A\",\n \"slot_to_id\": \"E\",\n \"slot_distance\": 11\n },\n {\n \"slot_from_id\": \"A\",\n \"slot_to_id\": \"F\",\n \"slot_distance\": 29\n },\n {\n \"slot_from_id\": \"A\",\n \"slot_to_id\": \"G\",\n \"slot_distance\": 27\n },\n {\n \"slot_from_id\": \"A\",\n \"slot_to_id\": \"H\",\n \"slot_distance\": 28\n },\n {\n \"slot_from_id\": \"A\",\n \"slot_to_id\": \"I\",\n \"slot_distance\": 44\n },\n {\n \"slot_from_id\": \"A\",\n \"slot_to_id\": \"J\",\n \"slot_distance\": 19\n },\n {\n \"slot_from_id\": \"B\",\n \"slot_to_id\": \"A\",\n \"slot_distance\": 18\n },\n {\n \"slot_from_id\": \"B\",\n \"slot_to_id\": \"C\",\n \"slot_distance\": 23\n },\n {\n \"slot_from_id\": \"B\",\n \"slot_to_id\": \"D\",\n \"slot_distance\": 9\n },\n {\n \"slot_from_id\": \"B\",\n \"slot_to_id\": \"E\",\n \"slot_distance\": 40\n },\n {\n \"slot_from_id\": \"B\",\n \"slot_to_id\": \"F\",\n \"slot_distance\": 20\n },\n {\n \"slot_from_id\": \"B\",\n \"slot_to_id\": \"G\",\n \"slot_distance\": 26\n },\n {\n \"slot_from_id\": \"B\",\n \"slot_to_id\": \"H\",\n \"slot_distance\": 19\n },\n {\n \"slot_from_id\": \"B\",\n \"slot_to_id\": \"I\",\n \"slot_distance\": 23\n },\n {\n \"slot_from_id\": \"B\",\n \"slot_to_id\": \"J\",\n \"slot_distance\": 9\n },\n {\n \"slot_from_id\": \"C\",\n \"slot_to_id\": \"A\",\n \"slot_distance\": 33\n },\n {\n \"slot_from_id\": \"C\",\n \"slot_to_id\": \"B\",\n \"slot_distance\": 24\n },\n {\n \"slot_from_id\": \"C\",\n \"slot_to_id\": \"D\",\n \"slot_distance\": 3\n },\n {\n \"slot_from_id\": \"C\",\n \"slot_to_id\": \"E\",\n \"slot_distance\": 12\n },\n {\n \"slot_from_id\": \"C\",\n \"slot_to_id\": \"F\",\n \"slot_distance\": 23\n },\n {\n \"slot_from_id\": \"C\",\n \"slot_to_id\": \"G\",\n \"slot_distance\": 44\n },\n {\n \"slot_from_id\": \"C\",\n \"slot_to_id\": \"H\",\n \"slot_distance\": 38\n },\n {\n \"slot_from_id\": \"C\",\n \"slot_to_id\": \"I\",\n \"slot_distance\": 15\n },\n {\n \"slot_from_id\": \"C\",\n \"slot_to_id\": \"J\",\n \"slot_distance\": 13\n },\n {\n \"slot_from_id\": \"D\",\n \"slot_to_id\": \"A\",\n \"slot_distance\": 25\n },\n {\n \"slot_from_id\": \"D\",\n \"slot_to_id\": \"B\",\n \"slot_distance\": 8\n },\n {\n \"slot_from_id\": \"D\",\n \"slot_to_id\": \"C\",\n \"slot_distance\": 3\n },\n {\n \"slot_from_id\": \"D\",\n \"slot_to_id\": \"E\",\n \"slot_distance\": 40\n },\n {\n \"slot_from_id\": \"D\",\n \"slot_to_id\": \"F\",\n \"slot_distance\": 46\n },\n {\n \"slot_from_id\": \"D\",\n \"slot_to_id\": \"G\",\n \"slot_distance\": 8\n },\n {\n \"slot_from_id\": \"D\",\n \"slot_to_id\": \"H\",\n \"slot_distance\": 5\n },\n {\n \"slot_from_id\": \"D\",\n \"slot_to_id\": \"I\",\n \"slot_distance\": 19\n },\n {\n \"slot_from_id\": \"D\",\n \"slot_to_id\": \"J\",\n \"slot_distance\": 23\n },\n {\n \"slot_from_id\": \"E\",\n \"slot_to_id\": \"A\",\n \"slot_distance\": 10\n },\n {\n \"slot_from_id\": \"E\",\n \"slot_to_id\": \"B\",\n \"slot_distance\": 41\n },\n {\n \"slot_from_id\": \"E\",\n \"slot_to_id\": \"C\",\n \"slot_distance\": 13\n },\n {\n \"slot_from_id\": \"E\",\n \"slot_to_id\": \"D\",\n \"slot_distance\": 40\n },\n {\n \"slot_from_id\": \"E\",\n \"slot_to_id\": \"F\",\n \"slot_distance\": 17\n },\n {\n \"slot_from_id\": \"E\",\n \"slot_to_id\": \"G\",\n \"slot_distance\": 35\n },\n {\n \"slot_from_id\": \"E\",\n \"slot_to_id\": \"H\",\n \"slot_distance\": 44\n },\n {\n \"slot_from_id\": \"E\",\n \"slot_to_id\": \"I\",\n \"slot_distance\": 35\n },\n {\n \"slot_from_id\": \"E\",\n \"slot_to_id\": \"J\",\n \"slot_distance\": 49\n },\n {\n \"slot_from_id\": \"F\",\n \"slot_to_id\": \"A\",\n \"slot_distance\": 30\n },\n {\n \"slot_from_id\": \"F\",\n \"slot_to_id\": \"B\",\n \"slot_distance\": 21\n },\n {\n \"slot_from_id\": \"F\",\n \"slot_to_id\": \"C\",\n \"slot_distance\": 23\n },\n {\n \"slot_from_id\": \"F\",\n \"slot_to_id\": \"D\",\n \"slot_distance\": 45\n },\n {\n \"slot_from_id\": \"F\",\n \"slot_to_id\": \"E\",\n \"slot_distance\": 17\n },\n {\n \"slot_from_id\": \"F\",\n \"slot_to_id\": \"G\",\n \"slot_distance\": 33\n },\n {\n \"slot_from_id\": \"F\",\n \"slot_to_id\": \"H\",\n \"slot_distance\": 36\n },\n {\n \"slot_from_id\": \"F\",\n \"slot_to_id\": \"I\",\n \"slot_distance\": 0\n },\n {\n \"slot_from_id\": \"F\",\n \"slot_to_id\": \"J\",\n \"slot_distance\": 27\n },\n {\n \"slot_from_id\": \"G\",\n \"slot_to_id\": \"A\",\n \"slot_distance\": 27\n },\n {\n \"slot_from_id\": \"G\",\n \"slot_to_id\": \"B\",\n \"slot_distance\": 27\n },\n {\n \"slot_from_id\": \"G\",\n \"slot_to_id\": \"C\",\n \"slot_distance\": 44\n },\n {\n \"slot_from_id\": \"G\",\n \"slot_to_id\": \"D\",\n \"slot_distance\": 8\n },\n {\n \"slot_from_id\": \"G\",\n \"slot_to_id\": \"E\",\n \"slot_distance\": 35\n },\n {\n \"slot_from_id\": \"G\",\n \"slot_to_id\": \"F\",\n \"slot_distance\": 33\n },\n {\n \"slot_from_id\": \"G\",\n \"slot_to_id\": \"H\",\n \"slot_distance\": 45\n },\n {\n \"slot_from_id\": \"G\",\n \"slot_to_id\": \"I\",\n \"slot_distance\": 26\n },\n {\n \"slot_from_id\": \"G\",\n \"slot_to_id\": \"J\",\n \"slot_distance\": 6\n },\n {\n \"slot_from_id\": \"H\",\n \"slot_to_id\": \"A\",\n \"slot_distance\": 28\n },\n {\n \"slot_from_id\": \"H\",\n \"slot_to_id\": \"B\",\n \"slot_distance\": 20\n },\n {\n \"slot_from_id\": \"H\",\n \"slot_to_id\": \"C\",\n \"slot_distance\": 37\n },\n {\n \"slot_from_id\": \"H\",\n \"slot_to_id\": \"D\",\n \"slot_distance\": 6\n },\n {\n \"slot_from_id\": \"H\",\n \"slot_to_id\": \"E\",\n \"slot_distance\": 44\n },\n {\n \"slot_from_id\": \"H\",\n \"slot_to_id\": \"F\",\n \"slot_distance\": 36\n },\n {\n \"slot_from_id\": \"H\",\n \"slot_to_id\": \"G\",\n \"slot_distance\": 45\n },\n {\n \"slot_from_id\": \"H\",\n \"slot_to_id\": \"I\",\n \"slot_distance\": 12\n },\n {\n \"slot_from_id\": \"H\",\n \"slot_to_id\": \"J\",\n \"slot_distance\": 6\n },\n {\n \"slot_from_id\": \"I\",\n \"slot_to_id\": \"A\",\n \"slot_distance\": 43\n },\n {\n \"slot_from_id\": \"I\",\n \"slot_to_id\": \"B\",\n \"slot_distance\": 23\n },\n {\n \"slot_from_id\": \"I\",\n \"slot_to_id\": \"C\",\n \"slot_distance\": 15\n },\n {\n \"slot_from_id\": \"I\",\n \"slot_to_id\": \"D\",\n \"slot_distance\": 19\n },\n {\n \"slot_from_id\": \"I\",\n \"slot_to_id\": \"E\",\n \"slot_distance\": 34\n },\n {\n \"slot_from_id\": \"I\",\n \"slot_to_id\": \"F\",\n \"slot_distance\": 0\n },\n {\n \"slot_from_id\": \"I\",\n \"slot_to_id\": \"G\",\n \"slot_distance\": 25\n },\n {\n \"slot_from_id\": \"I\",\n \"slot_to_id\": \"H\",\n \"slot_distance\": 12\n },\n {\n \"slot_from_id\": \"I\",\n \"slot_to_id\": \"J\",\n \"slot_distance\": 3\n },\n {\n \"slot_from_id\": \"J\",\n \"slot_to_id\": \"A\",\n \"slot_distance\": 19\n },\n {\n \"slot_from_id\": \"J\",\n \"slot_to_id\": \"B\",\n \"slot_distance\": 9\n },\n {\n \"slot_from_id\": \"J\",\n \"slot_to_id\": \"C\",\n \"slot_distance\": 14\n },\n {\n \"slot_from_id\": \"J\",\n \"slot_to_id\": \"D\",\n \"slot_distance\": 23\n },\n {\n \"slot_from_id\": \"J\",\n \"slot_to_id\": \"E\",\n \"slot_distance\": 49\n },\n {\n \"slot_from_id\": \"J\",\n \"slot_to_id\": \"F\",\n \"slot_distance\": 25\n },\n {\n \"slot_from_id\": \"J\",\n \"slot_to_id\": \"G\",\n \"slot_distance\": 6\n },\n {\n \"slot_from_id\": \"J\",\n \"slot_to_id\": \"H\",\n \"slot_distance\": 6\n },\n {\n \"slot_from_id\": \"J\",\n \"slot_to_id\": \"I\",\n \"slot_distance\": 4\n }\n ],\n \"flow\": [\n {\n \"hub_from_id\": \"F1\",\n \"hub_to_id\": \"F2\",\n \"parcel_flow\": 30\n },\n {\n \"hub_from_id\": \"F1\",\n \"hub_to_id\": \"F3\",\n \"parcel_flow\": 22\n },\n {\n \"hub_from_id\": \"F1\",\n \"hub_to_id\": \"F4\",\n \"parcel_flow\": 26\n },\n {\n \"hub_from_id\": \"F1\",\n \"hub_to_id\": \"F5\",\n \"parcel_flow\": 34\n },\n {\n \"hub_from_id\": \"F1\",\n \"hub_to_id\": \"F6\",\n \"parcel_flow\": 24\n },\n {\n \"hub_from_id\": \"F1\",\n \"hub_to_id\": \"F7\",\n \"parcel_flow\": 26\n },\n {\n \"hub_from_id\": \"F1\",\n \"hub_to_id\": \"F8\",\n \"parcel_flow\": 25\n },\n {\n \"hub_from_id\": \"F1\",\n \"hub_to_id\": \"F9\",\n \"parcel_flow\": 13\n },\n {\n \"hub_from_id\": \"F1\",\n \"hub_to_id\": \"F10\",\n \"parcel_flow\": 29\n },\n {\n \"hub_from_id\": \"F2\",\n \"hub_to_id\": \"F1\",\n \"parcel_flow\": 30\n },\n {\n \"hub_from_id\": \"F2\",\n \"hub_to_id\": \"F3\",\n \"parcel_flow\": 27\n },\n {\n \"hub_from_id\": \"F2\",\n \"hub_to_id\": \"F4\",\n \"parcel_flow\": 35\n },\n {\n \"hub_from_id\": \"F2\",\n \"hub_to_id\": \"F5\",\n \"parcel_flow\": 16\n },\n {\n \"hub_from_id\": \"F2\",\n \"hub_to_id\": \"F6\",\n \"parcel_flow\": 28\n },\n {\n \"hub_from_id\": \"F2\",\n \"hub_to_id\": \"F7\",\n \"parcel_flow\": 26\n },\n {\n \"hub_from_id\": \"F2\",\n \"hub_to_id\": \"F8\",\n \"parcel_flow\": 29\n },\n {\n \"hub_from_id\": \"F2\",\n \"hub_to_id\": \"F9\",\n \"parcel_flow\": 27\n },\n {\n \"hub_from_id\": \"F2\",\n \"hub_to_id\": \"F10\",\n \"parcel_flow\": 35\n },\n {\n \"hub_from_id\": \"F3\",\n \"hub_to_id\": \"F1\",\n \"parcel_flow\": 22\n },\n {\n \"hub_from_id\": \"F3\",\n \"hub_to_id\": \"F2\",\n \"parcel_flow\": 27\n },\n {\n \"hub_from_id\": \"F3\",\n \"hub_to_id\": \"F4\",\n \"parcel_flow\": 41\n },\n {\n \"hub_from_id\": \"F3\",\n \"hub_to_id\": \"F5\",\n \"parcel_flow\": 33\n },\n {\n \"hub_from_id\": \"F3\",\n \"hub_to_id\": \"F6\",\n \"parcel_flow\": 27\n },\n {\n \"hub_from_id\": \"F3\",\n \"hub_to_id\": \"F7\",\n \"parcel_flow\": 13\n },\n {\n \"hub_from_id\": \"F3\",\n \"hub_to_id\": \"F8\",\n \"parcel_flow\": 19\n },\n {\n \"hub_from_id\": \"F3\",\n \"hub_to_id\": \"F9\",\n \"parcel_flow\": 31\n },\n {\n \"hub_from_id\": \"F3\",\n \"hub_to_id\": \"F10\",\n \"parcel_flow\": 32\n },\n {\n \"hub_from_id\": \"F4\",\n \"hub_to_id\": \"F1\",\n \"parcel_flow\": 26\n },\n {\n \"hub_from_id\": \"F4\",\n \"hub_to_id\": \"F2\",\n \"parcel_flow\": 35\n },\n {\n \"hub_from_id\": \"F4\",\n \"hub_to_id\": \"F3\",\n \"parcel_flow\": 41\n },\n {\n \"hub_from_id\": \"F4\",\n \"hub_to_id\": \"F5\",\n \"parcel_flow\": 17\n },\n {\n \"hub_from_id\": \"F4\",\n \"hub_to_id\": \"F6\",\n \"parcel_flow\": 11\n },\n {\n \"hub_from_id\": \"F4\",\n \"hub_to_id\": \"F7\",\n \"parcel_flow\": 35\n },\n {\n \"hub_from_id\": \"F4\",\n \"hub_to_id\": \"F8\",\n \"parcel_flow\": 38\n },\n {\n \"hub_from_id\": \"F4\",\n \"hub_to_id\": \"F9\",\n \"parcel_flow\": 29\n },\n {\n \"hub_from_id\": \"F4\",\n \"hub_to_id\": \"F10\",\n \"parcel_flow\": 27\n },\n {\n \"hub_from_id\": \"F5\",\n \"hub_to_id\": \"F1\",\n \"parcel_flow\": 34\n },\n {\n \"hub_from_id\": \"F5\",\n \"hub_to_id\": \"F2\",\n \"parcel_flow\": 16\n },\n {\n \"hub_from_id\": \"F5\",\n \"hub_to_id\": \"F3\",\n \"parcel_flow\": 33\n },\n {\n \"hub_from_id\": \"F5\",\n \"hub_to_id\": \"F4\",\n \"parcel_flow\": 17\n },\n {\n \"hub_from_id\": \"F5\",\n \"hub_to_id\": \"F6\",\n \"parcel_flow\": 30\n },\n {\n \"hub_from_id\": \"F5\",\n \"hub_to_id\": \"F7\",\n \"parcel_flow\": 21\n },\n {\n \"hub_from_id\": \"F5\",\n \"hub_to_id\": \"F8\",\n \"parcel_flow\": 13\n },\n {\n \"hub_from_id\": \"F5\",\n \"hub_to_id\": \"F9\",\n \"parcel_flow\": 21\n },\n {\n \"hub_from_id\": \"F5\",\n \"hub_to_id\": \"F10\",\n \"parcel_flow\": 5\n },\n {\n \"hub_from_id\": \"F6\",\n \"hub_to_id\": \"F1\",\n \"parcel_flow\": 24\n },\n {\n \"hub_from_id\": \"F6\",\n \"hub_to_id\": \"F2\",\n \"parcel_flow\": 28\n },\n {\n \"hub_from_id\": \"F6\",\n \"hub_to_id\": \"F3\",\n \"parcel_flow\": 27\n },\n {\n \"hub_from_id\": \"F6\",\n \"hub_to_id\": \"F4\",\n \"parcel_flow\": 11\n },\n {\n \"hub_from_id\": \"F6\",\n \"hub_to_id\": \"F5\",\n \"parcel_flow\": 30\n },\n {\n \"hub_from_id\": \"F6\",\n \"hub_to_id\": \"F7\",\n \"parcel_flow\": 22\n },\n {\n \"hub_from_id\": \"F6\",\n \"hub_to_id\": \"F8\",\n \"parcel_flow\": 20\n },\n {\n \"hub_from_id\": \"F6\",\n \"hub_to_id\": \"F9\",\n \"parcel_flow\": 47\n },\n {\n \"hub_from_id\": \"F6\",\n \"hub_to_id\": \"F10\",\n \"parcel_flow\": 26\n },\n {\n \"hub_from_id\": \"F7\",\n \"hub_to_id\": \"F1\",\n \"parcel_flow\": 26\n },\n {\n \"hub_from_id\": \"F7\",\n \"hub_to_id\": \"F2\",\n \"parcel_flow\": 26\n },\n {\n \"hub_from_id\": \"F7\",\n \"hub_to_id\": \"F3\",\n \"parcel_flow\": 13\n },\n {\n \"hub_from_id\": \"F7\",\n \"hub_to_id\": \"F4\",\n \"parcel_flow\": 35\n },\n {\n \"hub_from_id\": \"F7\",\n \"hub_to_id\": \"F5\",\n \"parcel_flow\": 21\n },\n {\n \"hub_from_id\": \"F7\",\n \"hub_to_id\": \"F6\",\n \"parcel_flow\": 22\n },\n {\n \"hub_from_id\": \"F7\",\n \"hub_to_id\": \"F8\",\n \"parcel_flow\": 11\n },\n {\n \"hub_from_id\": \"F7\",\n \"hub_to_id\": \"F9\",\n \"parcel_flow\": 26\n },\n {\n \"hub_from_id\": \"F7\",\n \"hub_to_id\": \"F10\",\n \"parcel_flow\": 37\n },\n {\n \"hub_from_id\": \"F8\",\n \"hub_to_id\": \"F1\",\n \"parcel_flow\": 25\n },\n {\n \"hub_from_id\": \"F8\",\n \"hub_to_id\": \"F2\",\n \"parcel_flow\": 29\n },\n {\n \"hub_from_id\": \"F8\",\n \"hub_to_id\": \"F3\",\n \"parcel_flow\": 19\n },\n {\n \"hub_from_id\": \"F8\",\n \"hub_to_id\": \"F4\",\n \"parcel_flow\": 38\n },\n {\n \"hub_from_id\": \"F8\",\n \"hub_to_id\": \"F5\",\n \"parcel_flow\": 13\n },\n {\n \"hub_from_id\": \"F8\",\n \"hub_to_id\": \"F6\",\n \"parcel_flow\": 20\n },\n {\n \"hub_from_id\": \"F8\",\n \"hub_to_id\": \"F7\",\n \"parcel_flow\": 11\n },\n {\n \"hub_from_id\": \"F8\",\n \"hub_to_id\": \"F9\",\n \"parcel_flow\": 33\n },\n {\n \"hub_from_id\": \"F8\",\n \"hub_to_id\": \"F10\",\n \"parcel_flow\": 37\n },\n {\n \"hub_from_id\": \"F9\",\n \"hub_to_id\": \"F1\",\n \"parcel_flow\": 13\n },\n {\n \"hub_from_id\": \"F9\",\n \"hub_to_id\": \"F2\",\n \"parcel_flow\": 27\n },\n {\n \"hub_from_id\": \"F9\",\n \"hub_to_id\": \"F3\",\n \"parcel_flow\": 31\n },\n {\n \"hub_from_id\": \"F9\",\n \"hub_to_id\": \"F4\",\n \"parcel_flow\": 29\n },\n {\n \"hub_from_id\": \"F9\",\n \"hub_to_id\": \"F5\",\n \"parcel_flow\": 21\n },\n {\n \"hub_from_id\": \"F9\",\n \"hub_to_id\": \"F6\",\n \"parcel_flow\": 47\n },\n {\n \"hub_from_id\": \"F9\",\n \"hub_to_id\": \"F7\",\n \"parcel_flow\": 26\n },\n {\n \"hub_from_id\": \"F9\",\n \"hub_to_id\": \"F8\",\n \"parcel_flow\": 33\n },\n {\n \"hub_from_id\": \"F9\",\n \"hub_to_id\": \"F10\",\n \"parcel_flow\": 40\n },\n {\n \"hub_from_id\": \"F10\",\n \"hub_to_id\": \"F1\",\n \"parcel_flow\": 29\n },\n {\n \"hub_from_id\": \"F10\",\n \"hub_to_id\": \"F2\",\n \"parcel_flow\": 35\n },\n {\n \"hub_from_id\": \"F10\",\n \"hub_to_id\": \"F3\",\n \"parcel_flow\": 32\n },\n {\n \"hub_from_id\": \"F10\",\n \"hub_to_id\": \"F4\",\n \"parcel_flow\": 27\n },\n {\n \"hub_from_id\": \"F10\",\n \"hub_to_id\": \"F5\",\n \"parcel_flow\": 5\n },\n {\n \"hub_from_id\": \"F10\",\n \"hub_to_id\": \"F6\",\n \"parcel_flow\": 26\n },\n {\n \"hub_from_id\": \"F10\",\n \"hub_to_id\": \"F7\",\n \"parcel_flow\": 37\n },\n {\n \"hub_from_id\": \"F10\",\n \"hub_to_id\": \"F8\",\n \"parcel_flow\": 37\n },\n {\n \"hub_from_id\": \"F10\",\n \"hub_to_id\": \"F9\",\n \"parcel_flow\": 40\n }\n ]\n}\n\nWhen you give me the final layout, just hand it over in a tiny JSON object like this so I can read it programmatically:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of that \"solution\" list as a simple roll call: the first entry is the slot you want the first hub to occupy, the second entry is the slot for the second hub, and so on down the line. It's just a sketch of the shape I expect, not the actual arrangement — you'll replace those placeholders with the real slot labels from the instance.\n\nPlease make sure to use the exact identifiers from the instance input, without renaming or inventing new labels. \nValid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 17, 32, 25, 11, 29, 27, 28, 44, 19 ], [ 18, 0, 23, 9, 40, 20, 26, 19, 23, 9 ], [ 33, 24, 0, 3, 12, 23, 44, 38, 15, 13 ], [ 25, 8, 3, 0, 40, 46, 8, 5, 19, 23 ], [ 10, 41, 13, 40, 0, 17, 35, 44, 35, 49 ], [ 30, 21, 23, 45, 17, 0, 33, 36, 0, 27 ], [ 27, 27, 44, 8, 35, 33, 0, 45, 26, 6 ], [ 28, 20, 37, 6, 44, 36, 45, 0, 12, 6 ], [ 43, 23, 15, 19, 34, 0, 25, 12, 0, 3 ], [ 19, 9, 14, 23, 49, 25, 6, 6, 4, 0 ] ], "flow_matrix": [ [ 0, 30, 22, 26, 34, 24, 26, 25, 13, 29 ], [ 30, 0, 27, 35, 16, 28, 26, 29, 27, 35 ], [ 22, 27, 0, 41, 33, 27, 13, 19, 31, 32 ], [ 26, 35, 41, 0, 17, 11, 35, 38, 29, 27 ], [ 34, 16, 33, 17, 0, 30, 21, 13, 21, 5 ], [ 24, 28, 27, 11, 30, 0, 22, 20, 47, 26 ], [ 26, 26, 13, 35, 21, 22, 0, 11, 26, 37 ], [ 25, 29, 19, 38, 13, 20, 11, 0, 33, 37 ], [ 13, 27, 31, 29, 21, 47, 26, 33, 0, 40 ], [ 29, 35, 32, 27, 5, 26, 37, 37, 40, 0 ] ], "objective": 46088.0 }, "solution": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "obj": 46088.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 17 }, { "from_id": "A", "to_id": "C", "distance": 32 }, { "from_id": "A", "to_id": "D", "distance": 25 }, { "from_id": "A", "to_id": "E", "distance": 11 }, { "from_id": "A", "to_id": "F", "distance": 29 }, { "from_id": "A", "to_id": "G", "distance": 27 }, { "from_id": "A", "to_id": "H", "distance": 28 }, { "from_id": "A", "to_id": "I", "distance": 44 }, { "from_id": "A", "to_id": "J", "distance": 19 }, { "from_id": "B", "to_id": "A", "distance": 18 }, { "from_id": "B", "to_id": "C", "distance": 23 }, { "from_id": "B", "to_id": "D", "distance": 9 }, { "from_id": "B", "to_id": "E", "distance": 40 }, { "from_id": "B", "to_id": "F", "distance": 20 }, { "from_id": "B", "to_id": "G", "distance": 26 }, { "from_id": "B", "to_id": "H", "distance": 19 }, { "from_id": "B", "to_id": "I", "distance": 23 }, { "from_id": "B", "to_id": "J", "distance": 9 }, { "from_id": "C", "to_id": "A", "distance": 33 }, { "from_id": "C", "to_id": "B", "distance": 24 }, { "from_id": "C", "to_id": "D", "distance": 3 }, { "from_id": "C", "to_id": "E", "distance": 12 }, { "from_id": "C", "to_id": "F", "distance": 23 }, { "from_id": "C", "to_id": "G", "distance": 44 }, { "from_id": "C", "to_id": "H", "distance": 38 }, { "from_id": "C", "to_id": "I", "distance": 15 }, { "from_id": "C", "to_id": "J", "distance": 13 }, { "from_id": "D", "to_id": "A", "distance": 25 }, { "from_id": "D", "to_id": "B", "distance": 8 }, { "from_id": "D", "to_id": "C", "distance": 3 }, { "from_id": "D", "to_id": "E", "distance": 40 }, { "from_id": "D", "to_id": "F", "distance": 46 }, { "from_id": "D", "to_id": "G", "distance": 8 }, { "from_id": "D", "to_id": "H", "distance": 5 }, { "from_id": "D", "to_id": "I", "distance": 19 }, { "from_id": "D", "to_id": "J", "distance": 23 }, { "from_id": "E", "to_id": "A", "distance": 10 }, { "from_id": "E", "to_id": "B", "distance": 41 }, { "from_id": "E", "to_id": "C", "distance": 13 }, { "from_id": "E", "to_id": "D", "distance": 40 }, { "from_id": "E", "to_id": "F", "distance": 17 }, { "from_id": "E", "to_id": "G", "distance": 35 }, { "from_id": "E", "to_id": "H", "distance": 44 }, { "from_id": "E", "to_id": "I", "distance": 35 }, { "from_id": "E", "to_id": "J", "distance": 49 }, { "from_id": "F", "to_id": "A", "distance": 30 }, { "from_id": "F", "to_id": "B", "distance": 21 }, { "from_id": "F", "to_id": "C", "distance": 23 }, { "from_id": "F", "to_id": "D", "distance": 45 }, { "from_id": "F", "to_id": "E", "distance": 17 }, { "from_id": "F", "to_id": "G", "distance": 33 }, { "from_id": "F", "to_id": "H", "distance": 36 }, { "from_id": "F", "to_id": "I", "distance": 0 }, { "from_id": "F", "to_id": "J", "distance": 27 }, { "from_id": "G", "to_id": "A", "distance": 27 }, { "from_id": "G", "to_id": "B", "distance": 27 }, { "from_id": "G", "to_id": "C", "distance": 44 }, { "from_id": "G", "to_id": "D", "distance": 8 }, { "from_id": "G", "to_id": "E", "distance": 35 }, { "from_id": "G", "to_id": "F", "distance": 33 }, { "from_id": "G", "to_id": "H", "distance": 45 }, { "from_id": "G", "to_id": "I", "distance": 26 }, { "from_id": "G", "to_id": "J", "distance": 6 }, { "from_id": "H", "to_id": "A", "distance": 28 }, { "from_id": "H", "to_id": "B", "distance": 20 }, { "from_id": "H", "to_id": "C", "distance": 37 }, { "from_id": "H", "to_id": "D", "distance": 6 }, { "from_id": "H", "to_id": "E", "distance": 44 }, { "from_id": "H", "to_id": "F", "distance": 36 }, { "from_id": "H", "to_id": "G", "distance": 45 }, { "from_id": "H", "to_id": "I", "distance": 12 }, { "from_id": "H", "to_id": "J", "distance": 6 }, { "from_id": "I", "to_id": "A", "distance": 43 }, { "from_id": "I", "to_id": "B", "distance": 23 }, { "from_id": "I", "to_id": "C", "distance": 15 }, { "from_id": "I", "to_id": "D", "distance": 19 }, { "from_id": "I", "to_id": "E", "distance": 34 }, { "from_id": "I", "to_id": "F", "distance": 0 }, { "from_id": "I", "to_id": "G", "distance": 25 }, { "from_id": "I", "to_id": "H", "distance": 12 }, { "from_id": "I", "to_id": "J", "distance": 3 }, { "from_id": "J", "to_id": "A", "distance": 19 }, { "from_id": "J", "to_id": "B", "distance": 9 }, { "from_id": "J", "to_id": "C", "distance": 14 }, { "from_id": "J", "to_id": "D", "distance": 23 }, { "from_id": "J", "to_id": "E", "distance": 49 }, { "from_id": "J", "to_id": "F", "distance": 25 }, { "from_id": "J", "to_id": "G", "distance": 6 }, { "from_id": "J", "to_id": "H", "distance": 6 }, { "from_id": "J", "to_id": "I", "distance": 4 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 30 }, { "from_id": "F1", "to_id": "F3", "flow": 22 }, { "from_id": "F1", "to_id": "F4", "flow": 26 }, { "from_id": "F1", "to_id": "F5", "flow": 34 }, { "from_id": "F1", "to_id": "F6", "flow": 24 }, { "from_id": "F1", "to_id": "F7", "flow": 26 }, { "from_id": "F1", "to_id": "F8", "flow": 25 }, { "from_id": "F1", "to_id": "F9", "flow": 13 }, { "from_id": "F1", "to_id": "F10", "flow": 29 }, { "from_id": "F2", "to_id": "F1", "flow": 30 }, { "from_id": "F2", "to_id": "F3", "flow": 27 }, { "from_id": "F2", "to_id": "F4", "flow": 35 }, { "from_id": "F2", "to_id": "F5", "flow": 16 }, { "from_id": "F2", "to_id": "F6", "flow": 28 }, { "from_id": "F2", "to_id": "F7", "flow": 26 }, { "from_id": "F2", "to_id": "F8", "flow": 29 }, { "from_id": "F2", "to_id": "F9", "flow": 27 }, { "from_id": "F2", "to_id": "F10", "flow": 35 }, { "from_id": "F3", "to_id": "F1", "flow": 22 }, { "from_id": "F3", "to_id": "F2", "flow": 27 }, { "from_id": "F3", "to_id": "F4", "flow": 41 }, { "from_id": "F3", "to_id": "F5", "flow": 33 }, { "from_id": "F3", "to_id": "F6", "flow": 27 }, { "from_id": "F3", "to_id": "F7", "flow": 13 }, { "from_id": "F3", "to_id": "F8", "flow": 19 }, { "from_id": "F3", "to_id": "F9", "flow": 31 }, { "from_id": "F3", "to_id": "F10", "flow": 32 }, { "from_id": "F4", "to_id": "F1", "flow": 26 }, { "from_id": "F4", "to_id": "F2", "flow": 35 }, { "from_id": "F4", "to_id": "F3", "flow": 41 }, { "from_id": "F4", "to_id": "F5", "flow": 17 }, { "from_id": "F4", "to_id": "F6", "flow": 11 }, { "from_id": "F4", "to_id": "F7", "flow": 35 }, { "from_id": "F4", "to_id": "F8", "flow": 38 }, { "from_id": "F4", "to_id": "F9", "flow": 29 }, { "from_id": "F4", "to_id": "F10", "flow": 27 }, { "from_id": "F5", "to_id": "F1", "flow": 34 }, { "from_id": "F5", "to_id": "F2", "flow": 16 }, { "from_id": "F5", "to_id": "F3", "flow": 33 }, { "from_id": "F5", "to_id": "F4", "flow": 17 }, { "from_id": "F5", "to_id": "F6", "flow": 30 }, { "from_id": "F5", "to_id": "F7", "flow": 21 }, { "from_id": "F5", "to_id": "F8", "flow": 13 }, { "from_id": "F5", "to_id": "F9", "flow": 21 }, { "from_id": "F5", "to_id": "F10", "flow": 5 }, { "from_id": "F6", "to_id": "F1", "flow": 24 }, { "from_id": "F6", "to_id": "F2", "flow": 28 }, { "from_id": "F6", "to_id": "F3", "flow": 27 }, { "from_id": "F6", "to_id": "F4", "flow": 11 }, { "from_id": "F6", "to_id": "F5", "flow": 30 }, { "from_id": "F6", "to_id": "F7", "flow": 22 }, { "from_id": "F6", "to_id": "F8", "flow": 20 }, { "from_id": "F6", "to_id": "F9", "flow": 47 }, { "from_id": "F6", "to_id": "F10", "flow": 26 }, { "from_id": "F7", "to_id": "F1", "flow": 26 }, { "from_id": "F7", "to_id": "F2", "flow": 26 }, { "from_id": "F7", "to_id": "F3", "flow": 13 }, { "from_id": "F7", "to_id": "F4", "flow": 35 }, { "from_id": "F7", "to_id": "F5", "flow": 21 }, { "from_id": "F7", "to_id": "F6", "flow": 22 }, { "from_id": "F7", "to_id": "F8", "flow": 11 }, { "from_id": "F7", "to_id": "F9", "flow": 26 }, { "from_id": "F7", "to_id": "F10", "flow": 37 }, { "from_id": "F8", "to_id": "F1", "flow": 25 }, { "from_id": "F8", "to_id": "F2", "flow": 29 }, { "from_id": "F8", "to_id": "F3", "flow": 19 }, { "from_id": "F8", "to_id": "F4", "flow": 38 }, { "from_id": "F8", "to_id": "F5", "flow": 13 }, { "from_id": "F8", "to_id": "F6", "flow": 20 }, { "from_id": "F8", "to_id": "F7", "flow": 11 }, { "from_id": "F8", "to_id": "F9", "flow": 33 }, { "from_id": "F8", "to_id": "F10", "flow": 37 }, { "from_id": "F9", "to_id": "F1", "flow": 13 }, { "from_id": "F9", "to_id": "F2", "flow": 27 }, { "from_id": "F9", "to_id": "F3", "flow": 31 }, { "from_id": "F9", "to_id": "F4", "flow": 29 }, { "from_id": "F9", "to_id": "F5", "flow": 21 }, { "from_id": "F9", "to_id": "F6", "flow": 47 }, { "from_id": "F9", "to_id": "F7", "flow": 26 }, { "from_id": "F9", "to_id": "F8", "flow": 33 }, { "from_id": "F9", "to_id": "F10", "flow": 40 }, { "from_id": "F10", "to_id": "F1", "flow": 29 }, { "from_id": "F10", "to_id": "F2", "flow": 35 }, { "from_id": "F10", "to_id": "F3", "flow": 32 }, { "from_id": "F10", "to_id": "F4", "flow": 27 }, { "from_id": "F10", "to_id": "F5", "flow": 5 }, { "from_id": "F10", "to_id": "F6", "flow": 26 }, { "from_id": "F10", "to_id": "F7", "flow": 37 }, { "from_id": "F10", "to_id": "F8", "flow": 37 }, { "from_id": "F10", "to_id": "F9", "flow": 40 } ] }, "solution_variant": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" ], "context_index": 35, "input_format": "json", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "We had a meeting about moving student-support teams into separate buildings and the goal was to put teams that exchange lots of students close together. Each service must be placed in one distinct building and every building will host only one service. To compare different plans, you go through every pair of services, multiply their referral frequency by the distance between their assigned buildings, and sum everything up — the plan with the lowest summed number is the one that keeps students’ travel down. The concrete numbers and locations are provided below.\n\n{\n \"number_of_services\": 12,\n \"service_ids\": [\n \"F1\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\",\n \"F10\",\n \"F11\",\n \"F12\"\n ],\n \"building_ids\": [\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\",\n \"J\",\n \"K\",\n \"L\"\n ],\n \"distance\": [\n {\n \"building_from_id\": \"A\",\n \"building_to_id\": \"B\",\n \"walking_distance\": 180\n },\n {\n \"building_from_id\": \"A\",\n \"building_to_id\": \"C\",\n \"walking_distance\": 120\n },\n {\n \"building_from_id\": \"A\",\n \"building_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"A\",\n \"building_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"A\",\n \"building_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"A\",\n \"building_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"A\",\n \"building_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"A\",\n \"building_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"A\",\n \"building_to_id\": \"J\",\n \"walking_distance\": 104\n },\n {\n \"building_from_id\": \"A\",\n \"building_to_id\": \"K\",\n \"walking_distance\": 112\n },\n {\n \"building_from_id\": \"A\",\n \"building_to_id\": \"L\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"B\",\n \"building_to_id\": \"A\",\n \"walking_distance\": 180\n },\n {\n \"building_from_id\": \"B\",\n \"building_to_id\": \"C\",\n \"walking_distance\": 96\n },\n {\n \"building_from_id\": \"B\",\n \"building_to_id\": \"D\",\n \"walking_distance\": 2445\n },\n {\n \"building_from_id\": \"B\",\n \"building_to_id\": \"E\",\n \"walking_distance\": 78\n },\n {\n \"building_from_id\": \"B\",\n \"building_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"B\",\n \"building_to_id\": \"G\",\n \"walking_distance\": 1395\n },\n {\n \"building_from_id\": \"B\",\n \"building_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"B\",\n \"building_to_id\": \"I\",\n \"walking_distance\": 120\n },\n {\n \"building_from_id\": \"B\",\n \"building_to_id\": \"J\",\n \"walking_distance\": 135\n },\n {\n \"building_from_id\": \"B\",\n \"building_to_id\": \"K\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"B\",\n \"building_to_id\": \"L\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"C\",\n \"building_to_id\": \"A\",\n \"walking_distance\": 120\n },\n {\n \"building_from_id\": \"C\",\n \"building_to_id\": \"B\",\n \"walking_distance\": 96\n },\n {\n \"building_from_id\": \"C\",\n \"building_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"C\",\n \"building_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"C\",\n \"building_to_id\": \"F\",\n \"walking_distance\": 221\n },\n {\n \"building_from_id\": \"C\",\n \"building_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"C\",\n \"building_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"C\",\n \"building_to_id\": \"I\",\n \"walking_distance\": 315\n },\n {\n \"building_from_id\": \"C\",\n \"building_to_id\": \"J\",\n \"walking_distance\": 390\n },\n {\n \"building_from_id\": \"C\",\n \"building_to_id\": \"K\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"C\",\n \"building_to_id\": \"L\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"D\",\n \"building_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"D\",\n \"building_to_id\": \"B\",\n \"walking_distance\": 2445\n },\n {\n \"building_from_id\": \"D\",\n \"building_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"D\",\n \"building_to_id\": \"E\",\n \"walking_distance\": 108\n },\n {\n \"building_from_id\": \"D\",\n \"building_to_id\": \"F\",\n \"walking_distance\": 570\n },\n {\n \"building_from_id\": \"D\",\n \"building_to_id\": \"G\",\n \"walking_distance\": 750\n },\n {\n \"building_from_id\": \"D\",\n \"building_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"D\",\n \"building_to_id\": \"I\",\n \"walking_distance\": 234\n },\n {\n \"building_from_id\": \"D\",\n \"building_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"D\",\n \"building_to_id\": \"K\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"D\",\n \"building_to_id\": \"L\",\n \"walking_distance\": 140\n },\n {\n \"building_from_id\": \"E\",\n \"building_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"E\",\n \"building_to_id\": \"B\",\n \"walking_distance\": 78\n },\n {\n \"building_from_id\": \"E\",\n \"building_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"E\",\n \"building_to_id\": \"D\",\n \"walking_distance\": 108\n },\n {\n \"building_from_id\": \"E\",\n \"building_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"E\",\n \"building_to_id\": \"G\",\n \"walking_distance\": 225\n },\n {\n \"building_from_id\": \"E\",\n \"building_to_id\": \"H\",\n \"walking_distance\": 135\n },\n {\n \"building_from_id\": \"E\",\n \"building_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"E\",\n \"building_to_id\": \"J\",\n \"walking_distance\": 156\n },\n {\n \"building_from_id\": \"E\",\n \"building_to_id\": \"K\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"E\",\n \"building_to_id\": \"L\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"F\",\n \"building_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"F\",\n \"building_to_id\": \"B\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"F\",\n \"building_to_id\": \"C\",\n \"walking_distance\": 221\n },\n {\n \"building_from_id\": \"F\",\n \"building_to_id\": \"D\",\n \"walking_distance\": 570\n },\n {\n \"building_from_id\": \"F\",\n \"building_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"F\",\n \"building_to_id\": \"G\",\n \"walking_distance\": 615\n },\n {\n \"building_from_id\": \"F\",\n \"building_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"F\",\n \"building_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"F\",\n \"building_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"F\",\n \"building_to_id\": \"K\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"F\",\n \"building_to_id\": \"L\",\n \"walking_distance\": 45\n },\n {\n \"building_from_id\": \"G\",\n \"building_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"G\",\n \"building_to_id\": \"B\",\n \"walking_distance\": 1395\n },\n {\n \"building_from_id\": \"G\",\n \"building_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"G\",\n \"building_to_id\": \"D\",\n \"walking_distance\": 750\n },\n {\n \"building_from_id\": \"G\",\n \"building_to_id\": \"E\",\n \"walking_distance\": 225\n },\n {\n \"building_from_id\": \"G\",\n \"building_to_id\": \"F\",\n \"walking_distance\": 615\n },\n {\n \"building_from_id\": \"G\",\n \"building_to_id\": \"H\",\n \"walking_distance\": 2400\n },\n {\n \"building_from_id\": \"G\",\n \"building_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"G\",\n \"building_to_id\": \"J\",\n \"walking_distance\": 187\n },\n {\n \"building_from_id\": \"G\",\n \"building_to_id\": \"K\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"G\",\n \"building_to_id\": \"L\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"H\",\n \"building_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"H\",\n \"building_to_id\": \"B\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"H\",\n \"building_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"H\",\n \"building_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"H\",\n \"building_to_id\": \"E\",\n \"walking_distance\": 135\n },\n {\n \"building_from_id\": \"H\",\n \"building_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"H\",\n \"building_to_id\": \"G\",\n \"walking_distance\": 2400\n },\n {\n \"building_from_id\": \"H\",\n \"building_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"H\",\n \"building_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"H\",\n \"building_to_id\": \"K\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"H\",\n \"building_to_id\": \"L\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"I\",\n \"building_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"I\",\n \"building_to_id\": \"B\",\n \"walking_distance\": 120\n },\n {\n \"building_from_id\": \"I\",\n \"building_to_id\": \"C\",\n \"walking_distance\": 315\n },\n {\n \"building_from_id\": \"I\",\n \"building_to_id\": \"D\",\n \"walking_distance\": 234\n },\n {\n \"building_from_id\": \"I\",\n \"building_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"I\",\n \"building_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"I\",\n \"building_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"I\",\n \"building_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"I\",\n \"building_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"I\",\n \"building_to_id\": \"K\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"I\",\n \"building_to_id\": \"L\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"J\",\n \"building_to_id\": \"A\",\n \"walking_distance\": 104\n },\n {\n \"building_from_id\": \"J\",\n \"building_to_id\": \"B\",\n \"walking_distance\": 135\n },\n {\n \"building_from_id\": \"J\",\n \"building_to_id\": \"C\",\n \"walking_distance\": 390\n },\n {\n \"building_from_id\": \"J\",\n \"building_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"J\",\n \"building_to_id\": \"E\",\n \"walking_distance\": 156\n },\n {\n \"building_from_id\": \"J\",\n \"building_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"J\",\n \"building_to_id\": \"G\",\n \"walking_distance\": 187\n },\n {\n \"building_from_id\": \"J\",\n \"building_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"J\",\n \"building_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"J\",\n \"building_to_id\": \"K\",\n \"walking_distance\": 36\n },\n {\n \"building_from_id\": \"J\",\n \"building_to_id\": \"L\",\n \"walking_distance\": 1200\n },\n {\n \"building_from_id\": \"K\",\n \"building_to_id\": \"A\",\n \"walking_distance\": 112\n },\n {\n \"building_from_id\": \"K\",\n \"building_to_id\": \"B\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"K\",\n \"building_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"K\",\n \"building_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"K\",\n \"building_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"K\",\n \"building_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"K\",\n \"building_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"K\",\n \"building_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"K\",\n \"building_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"K\",\n \"building_to_id\": \"J\",\n \"walking_distance\": 36\n },\n {\n \"building_from_id\": \"K\",\n \"building_to_id\": \"L\",\n \"walking_distance\": 225\n },\n {\n \"building_from_id\": \"L\",\n \"building_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"L\",\n \"building_to_id\": \"B\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"L\",\n \"building_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"L\",\n \"building_to_id\": \"D\",\n \"walking_distance\": 140\n },\n {\n \"building_from_id\": \"L\",\n \"building_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"L\",\n \"building_to_id\": \"F\",\n \"walking_distance\": 45\n },\n {\n \"building_from_id\": \"L\",\n \"building_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"L\",\n \"building_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"L\",\n \"building_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"building_from_id\": \"L\",\n \"building_to_id\": \"J\",\n \"walking_distance\": 1200\n },\n {\n \"building_from_id\": \"L\",\n \"building_to_id\": \"K\",\n \"walking_distance\": 225\n }\n ],\n \"flow\": [\n {\n \"service_from_id\": \"F1\",\n \"service_to_id\": \"F2\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F1\",\n \"service_to_id\": \"F3\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F1\",\n \"service_to_id\": \"F4\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F1\",\n \"service_to_id\": \"F5\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F1\",\n \"service_to_id\": \"F6\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F1\",\n \"service_to_id\": \"F7\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F1\",\n \"service_to_id\": \"F8\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F1\",\n \"service_to_id\": \"F9\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F1\",\n \"service_to_id\": \"F10\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F1\",\n \"service_to_id\": \"F11\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F1\",\n \"service_to_id\": \"F12\",\n \"referral_count\": 5\n },\n {\n \"service_from_id\": \"F2\",\n \"service_to_id\": \"F1\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F2\",\n \"service_to_id\": \"F3\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F2\",\n \"service_to_id\": \"F4\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F2\",\n \"service_to_id\": \"F5\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F2\",\n \"service_to_id\": \"F6\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F2\",\n \"service_to_id\": \"F7\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F2\",\n \"service_to_id\": \"F8\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F2\",\n \"service_to_id\": \"F9\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F2\",\n \"service_to_id\": \"F10\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F2\",\n \"service_to_id\": \"F11\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F2\",\n \"service_to_id\": \"F12\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F3\",\n \"service_to_id\": \"F1\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F3\",\n \"service_to_id\": \"F2\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F3\",\n \"service_to_id\": \"F4\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F3\",\n \"service_to_id\": \"F5\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F3\",\n \"service_to_id\": \"F6\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F3\",\n \"service_to_id\": \"F7\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F3\",\n \"service_to_id\": \"F8\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F3\",\n \"service_to_id\": \"F9\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F3\",\n \"service_to_id\": \"F10\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F3\",\n \"service_to_id\": \"F11\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F3\",\n \"service_to_id\": \"F12\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F4\",\n \"service_to_id\": \"F1\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F4\",\n \"service_to_id\": \"F2\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F4\",\n \"service_to_id\": \"F3\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F4\",\n \"service_to_id\": \"F5\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F4\",\n \"service_to_id\": \"F6\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F4\",\n \"service_to_id\": \"F7\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F4\",\n \"service_to_id\": \"F8\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F4\",\n \"service_to_id\": \"F9\",\n \"referral_count\": 5\n },\n {\n \"service_from_id\": \"F4\",\n \"service_to_id\": \"F10\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F4\",\n \"service_to_id\": \"F11\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F4\",\n \"service_to_id\": \"F12\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F5\",\n \"service_to_id\": \"F1\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F5\",\n \"service_to_id\": \"F2\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F5\",\n \"service_to_id\": \"F3\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F5\",\n \"service_to_id\": \"F4\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F5\",\n \"service_to_id\": \"F6\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F5\",\n \"service_to_id\": \"F7\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F5\",\n \"service_to_id\": \"F8\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F5\",\n \"service_to_id\": \"F9\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F5\",\n \"service_to_id\": \"F10\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F5\",\n \"service_to_id\": \"F11\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F5\",\n \"service_to_id\": \"F12\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F6\",\n \"service_to_id\": \"F1\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F6\",\n \"service_to_id\": \"F2\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F6\",\n \"service_to_id\": \"F3\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F6\",\n \"service_to_id\": \"F4\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F6\",\n \"service_to_id\": \"F5\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F6\",\n \"service_to_id\": \"F7\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F6\",\n \"service_to_id\": \"F8\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F6\",\n \"service_to_id\": \"F9\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F6\",\n \"service_to_id\": \"F10\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F6\",\n \"service_to_id\": \"F11\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F6\",\n \"service_to_id\": \"F12\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F7\",\n \"service_to_id\": \"F1\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F7\",\n \"service_to_id\": \"F2\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F7\",\n \"service_to_id\": \"F3\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F7\",\n \"service_to_id\": \"F4\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F7\",\n \"service_to_id\": \"F5\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F7\",\n \"service_to_id\": \"F6\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F7\",\n \"service_to_id\": \"F8\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F7\",\n \"service_to_id\": \"F9\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F7\",\n \"service_to_id\": \"F10\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F7\",\n \"service_to_id\": \"F11\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F7\",\n \"service_to_id\": \"F12\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F8\",\n \"service_to_id\": \"F1\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F8\",\n \"service_to_id\": \"F2\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F8\",\n \"service_to_id\": \"F3\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F8\",\n \"service_to_id\": \"F4\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F8\",\n \"service_to_id\": \"F5\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F8\",\n \"service_to_id\": \"F6\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F8\",\n \"service_to_id\": \"F7\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F8\",\n \"service_to_id\": \"F9\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F8\",\n \"service_to_id\": \"F10\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F8\",\n \"service_to_id\": \"F11\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F8\",\n \"service_to_id\": \"F12\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F9\",\n \"service_to_id\": \"F1\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F9\",\n \"service_to_id\": \"F2\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F9\",\n \"service_to_id\": \"F3\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F9\",\n \"service_to_id\": \"F4\",\n \"referral_count\": 5\n },\n {\n \"service_from_id\": \"F9\",\n \"service_to_id\": \"F5\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F9\",\n \"service_to_id\": \"F6\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F9\",\n \"service_to_id\": \"F7\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F9\",\n \"service_to_id\": \"F8\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F9\",\n \"service_to_id\": \"F10\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F9\",\n \"service_to_id\": \"F11\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F9\",\n \"service_to_id\": \"F12\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F10\",\n \"service_to_id\": \"F1\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F10\",\n \"service_to_id\": \"F2\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F10\",\n \"service_to_id\": \"F3\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F10\",\n \"service_to_id\": \"F4\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F10\",\n \"service_to_id\": \"F5\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F10\",\n \"service_to_id\": \"F6\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F10\",\n \"service_to_id\": \"F7\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F10\",\n \"service_to_id\": \"F8\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F10\",\n \"service_to_id\": \"F9\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F10\",\n \"service_to_id\": \"F11\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F10\",\n \"service_to_id\": \"F12\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F11\",\n \"service_to_id\": \"F1\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F11\",\n \"service_to_id\": \"F2\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F11\",\n \"service_to_id\": \"F3\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F11\",\n \"service_to_id\": \"F4\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F11\",\n \"service_to_id\": \"F5\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F11\",\n \"service_to_id\": \"F6\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F11\",\n \"service_to_id\": \"F7\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F11\",\n \"service_to_id\": \"F8\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F11\",\n \"service_to_id\": \"F9\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F11\",\n \"service_to_id\": \"F10\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F11\",\n \"service_to_id\": \"F12\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F12\",\n \"service_to_id\": \"F1\",\n \"referral_count\": 5\n },\n {\n \"service_from_id\": \"F12\",\n \"service_to_id\": \"F2\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F12\",\n \"service_to_id\": \"F3\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F12\",\n \"service_to_id\": \"F4\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F12\",\n \"service_to_id\": \"F5\",\n \"referral_count\": 4\n },\n {\n \"service_from_id\": \"F12\",\n \"service_to_id\": \"F6\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F12\",\n \"service_to_id\": \"F7\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F12\",\n \"service_to_id\": \"F8\",\n \"referral_count\": 1\n },\n {\n \"service_from_id\": \"F12\",\n \"service_to_id\": \"F9\",\n \"referral_count\": 3\n },\n {\n \"service_from_id\": \"F12\",\n \"service_to_id\": \"F10\",\n \"referral_count\": 2\n },\n {\n \"service_from_id\": \"F12\",\n \"service_to_id\": \"F11\",\n \"referral_count\": 1\n }\n ]\n}\n\nAlso, when you send back a plan, please use this simple JSON layout so it's easy to parse:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis just means \"solution\" is a list that, in order, says which building each service goes to — first service → first entry, second service → second entry, and so on. Think of it like filling out a form: one building label per service, in the same service order as the instance.\n\nThis is only a sketch of the expected shape, not the actual answer. Please use the exact identifiers from the instance input — do not rename them or invent new labels. \n\nValid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.", "instance": { "distance_matrix": [ [ 0, 180, 120, 0, 0, 0, 0, 0, 0, 104, 112, 0 ], [ 180, 0, 96, 2445, 78, 0, 1395, 0, 120, 135, 0, 0 ], [ 120, 96, 0, 0, 0, 221, 0, 0, 315, 390, 0, 0 ], [ 0, 2445, 0, 0, 108, 570, 750, 0, 234, 0, 0, 140 ], [ 0, 78, 0, 108, 0, 0, 225, 135, 0, 156, 0, 0 ], [ 0, 0, 221, 570, 0, 0, 615, 0, 0, 0, 0, 45 ], [ 0, 1395, 0, 750, 225, 615, 0, 2400, 0, 187, 0, 0 ], [ 0, 0, 0, 0, 135, 0, 2400, 0, 0, 0, 0, 0 ], [ 0, 120, 315, 234, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 104, 135, 390, 0, 156, 0, 187, 0, 0, 0, 36, 1200 ], [ 112, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 225 ], [ 0, 0, 0, 140, 0, 45, 0, 0, 0, 1200, 225, 0 ] ], "flow_matrix": [ [ 0, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5 ], [ 1, 0, 1, 2, 2, 1, 2, 3, 3, 2, 3, 4 ], [ 2, 1, 0, 1, 3, 2, 1, 2, 4, 3, 2, 3 ], [ 3, 2, 1, 0, 4, 3, 2, 1, 5, 4, 3, 2 ], [ 1, 2, 3, 4, 0, 1, 2, 3, 1, 2, 3, 4 ], [ 2, 1, 2, 3, 1, 0, 1, 2, 2, 1, 2, 3 ], [ 3, 2, 1, 2, 2, 1, 0, 1, 3, 2, 1, 2 ], [ 4, 3, 2, 1, 3, 2, 1, 0, 4, 3, 2, 1 ], [ 2, 3, 4, 5, 1, 2, 3, 4, 0, 1, 2, 3 ], [ 3, 2, 3, 4, 2, 1, 2, 3, 1, 0, 1, 2 ], [ 4, 3, 2, 3, 3, 2, 1, 2, 2, 1, 0, 1 ], [ 5, 4, 3, 2, 4, 3, 2, 1, 3, 2, 1, 0 ] ], "objective": 31410.0 }, "solution": [ 5, 3, 2, 8, 6, 1, 9, 11, 7, 4, 0, 10 ], "obj": 31410.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 12, "num_locations": 12, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 180 }, { "from_id": "A", "to_id": "C", "distance": 120 }, { "from_id": "A", "to_id": "D", "distance": 0 }, { "from_id": "A", "to_id": "E", "distance": 0 }, { "from_id": "A", "to_id": "F", "distance": 0 }, { "from_id": "A", "to_id": "G", "distance": 0 }, { "from_id": "A", "to_id": "H", "distance": 0 }, { "from_id": "A", "to_id": "I", "distance": 0 }, { "from_id": "A", "to_id": "J", "distance": 104 }, { "from_id": "A", "to_id": "K", "distance": 112 }, { "from_id": "A", "to_id": "L", "distance": 0 }, { "from_id": "B", "to_id": "A", "distance": 180 }, { "from_id": "B", "to_id": "C", "distance": 96 }, { "from_id": "B", "to_id": "D", "distance": 2445 }, { "from_id": "B", "to_id": "E", "distance": 78 }, { "from_id": "B", "to_id": "F", "distance": 0 }, { "from_id": "B", "to_id": "G", "distance": 1395 }, { "from_id": "B", "to_id": "H", "distance": 0 }, { "from_id": "B", "to_id": "I", "distance": 120 }, { "from_id": "B", "to_id": "J", "distance": 135 }, { "from_id": "B", "to_id": "K", "distance": 0 }, { "from_id": "B", "to_id": "L", "distance": 0 }, { "from_id": "C", "to_id": "A", "distance": 120 }, { "from_id": "C", "to_id": "B", "distance": 96 }, { "from_id": "C", "to_id": "D", "distance": 0 }, { "from_id": "C", "to_id": "E", "distance": 0 }, { "from_id": "C", "to_id": "F", "distance": 221 }, { "from_id": "C", "to_id": "G", "distance": 0 }, { "from_id": "C", "to_id": "H", "distance": 0 }, { "from_id": "C", "to_id": "I", "distance": 315 }, { "from_id": "C", "to_id": "J", "distance": 390 }, { "from_id": "C", "to_id": "K", "distance": 0 }, { "from_id": "C", "to_id": "L", "distance": 0 }, { "from_id": "D", "to_id": "A", "distance": 0 }, { "from_id": "D", "to_id": "B", "distance": 2445 }, { "from_id": "D", "to_id": "C", "distance": 0 }, { "from_id": "D", "to_id": "E", "distance": 108 }, { "from_id": "D", "to_id": "F", "distance": 570 }, { "from_id": "D", "to_id": "G", "distance": 750 }, { "from_id": "D", "to_id": "H", "distance": 0 }, { "from_id": "D", "to_id": "I", "distance": 234 }, { "from_id": "D", "to_id": "J", "distance": 0 }, { "from_id": "D", "to_id": "K", "distance": 0 }, { "from_id": "D", "to_id": "L", "distance": 140 }, { "from_id": "E", "to_id": "A", "distance": 0 }, { "from_id": "E", "to_id": "B", "distance": 78 }, { "from_id": "E", "to_id": "C", "distance": 0 }, { "from_id": "E", "to_id": "D", "distance": 108 }, { "from_id": "E", "to_id": "F", "distance": 0 }, { "from_id": "E", "to_id": "G", "distance": 225 }, { "from_id": "E", "to_id": "H", "distance": 135 }, { "from_id": "E", "to_id": "I", "distance": 0 }, { "from_id": "E", "to_id": "J", "distance": 156 }, { "from_id": "E", "to_id": "K", "distance": 0 }, { "from_id": "E", "to_id": "L", "distance": 0 }, { "from_id": "F", "to_id": "A", "distance": 0 }, { "from_id": "F", "to_id": "B", "distance": 0 }, { "from_id": "F", "to_id": "C", "distance": 221 }, { "from_id": "F", "to_id": "D", "distance": 570 }, { "from_id": "F", "to_id": "E", "distance": 0 }, { "from_id": "F", "to_id": "G", "distance": 615 }, { "from_id": "F", "to_id": "H", "distance": 0 }, { "from_id": "F", "to_id": "I", "distance": 0 }, { "from_id": "F", "to_id": "J", "distance": 0 }, { "from_id": "F", "to_id": "K", "distance": 0 }, { "from_id": "F", "to_id": "L", "distance": 45 }, { "from_id": "G", "to_id": "A", "distance": 0 }, { "from_id": "G", "to_id": "B", "distance": 1395 }, { "from_id": "G", "to_id": "C", "distance": 0 }, { "from_id": "G", "to_id": "D", "distance": 750 }, { "from_id": "G", "to_id": "E", "distance": 225 }, { "from_id": "G", "to_id": "F", "distance": 615 }, { "from_id": "G", "to_id": "H", "distance": 2400 }, { "from_id": "G", "to_id": "I", "distance": 0 }, { "from_id": "G", "to_id": "J", "distance": 187 }, { "from_id": "G", "to_id": "K", "distance": 0 }, { "from_id": "G", "to_id": "L", "distance": 0 }, { "from_id": "H", "to_id": "A", "distance": 0 }, { "from_id": "H", "to_id": "B", "distance": 0 }, { "from_id": "H", "to_id": "C", "distance": 0 }, { "from_id": "H", "to_id": "D", "distance": 0 }, { "from_id": "H", "to_id": "E", "distance": 135 }, { "from_id": "H", "to_id": "F", "distance": 0 }, { "from_id": "H", "to_id": "G", "distance": 2400 }, { "from_id": "H", "to_id": "I", "distance": 0 }, { "from_id": "H", "to_id": "J", "distance": 0 }, { "from_id": "H", "to_id": "K", "distance": 0 }, { "from_id": "H", "to_id": "L", "distance": 0 }, { "from_id": "I", "to_id": "A", "distance": 0 }, { "from_id": "I", "to_id": "B", "distance": 120 }, { "from_id": "I", "to_id": "C", "distance": 315 }, { "from_id": "I", "to_id": "D", "distance": 234 }, { "from_id": "I", "to_id": "E", "distance": 0 }, { "from_id": "I", "to_id": "F", "distance": 0 }, { "from_id": "I", "to_id": "G", "distance": 0 }, { "from_id": "I", "to_id": "H", "distance": 0 }, { "from_id": "I", "to_id": "J", "distance": 0 }, { "from_id": "I", "to_id": "K", "distance": 0 }, { "from_id": "I", "to_id": "L", "distance": 0 }, { "from_id": "J", "to_id": "A", "distance": 104 }, { "from_id": "J", "to_id": "B", "distance": 135 }, { "from_id": "J", "to_id": "C", "distance": 390 }, { "from_id": "J", "to_id": "D", "distance": 0 }, { "from_id": "J", "to_id": "E", "distance": 156 }, { "from_id": "J", "to_id": "F", "distance": 0 }, { "from_id": "J", "to_id": "G", "distance": 187 }, { "from_id": "J", "to_id": "H", "distance": 0 }, { "from_id": "J", "to_id": "I", "distance": 0 }, { "from_id": "J", "to_id": "K", "distance": 36 }, { "from_id": "J", "to_id": "L", "distance": 1200 }, { "from_id": "K", "to_id": "A", "distance": 112 }, { "from_id": "K", "to_id": "B", "distance": 0 }, { "from_id": "K", "to_id": "C", "distance": 0 }, { "from_id": "K", "to_id": "D", "distance": 0 }, { "from_id": "K", "to_id": "E", "distance": 0 }, { "from_id": "K", "to_id": "F", "distance": 0 }, { "from_id": "K", "to_id": "G", "distance": 0 }, { "from_id": "K", "to_id": "H", "distance": 0 }, { "from_id": "K", "to_id": "I", "distance": 0 }, { "from_id": "K", "to_id": "J", "distance": 36 }, { "from_id": "K", "to_id": "L", "distance": 225 }, { "from_id": "L", "to_id": "A", "distance": 0 }, { "from_id": "L", "to_id": "B", "distance": 0 }, { "from_id": "L", "to_id": "C", "distance": 0 }, { "from_id": "L", "to_id": "D", "distance": 140 }, { "from_id": "L", "to_id": "E", "distance": 0 }, { "from_id": "L", "to_id": "F", "distance": 45 }, { "from_id": "L", "to_id": "G", "distance": 0 }, { "from_id": "L", "to_id": "H", "distance": 0 }, { "from_id": "L", "to_id": "I", "distance": 0 }, { "from_id": "L", "to_id": "J", "distance": 1200 }, { "from_id": "L", "to_id": "K", "distance": 225 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 1 }, { "from_id": "F1", "to_id": "F3", "flow": 2 }, { "from_id": "F1", "to_id": "F4", "flow": 3 }, { "from_id": "F1", "to_id": "F5", "flow": 1 }, { "from_id": "F1", "to_id": "F6", "flow": 2 }, { "from_id": "F1", "to_id": "F7", "flow": 3 }, { "from_id": "F1", "to_id": "F8", "flow": 4 }, { "from_id": "F1", "to_id": "F9", "flow": 2 }, { "from_id": "F1", "to_id": "F10", "flow": 3 }, { "from_id": "F1", "to_id": "F11", "flow": 4 }, { "from_id": "F1", "to_id": "F12", "flow": 5 }, { "from_id": "F2", "to_id": "F1", "flow": 1 }, { "from_id": "F2", "to_id": "F3", "flow": 1 }, { "from_id": "F2", "to_id": "F4", "flow": 2 }, { "from_id": "F2", "to_id": "F5", "flow": 2 }, { "from_id": "F2", "to_id": "F6", "flow": 1 }, { "from_id": "F2", "to_id": "F7", "flow": 2 }, { "from_id": "F2", "to_id": "F8", "flow": 3 }, { "from_id": "F2", "to_id": "F9", "flow": 3 }, { "from_id": "F2", "to_id": "F10", "flow": 2 }, { "from_id": "F2", "to_id": "F11", "flow": 3 }, { "from_id": "F2", "to_id": "F12", "flow": 4 }, { "from_id": "F3", "to_id": "F1", "flow": 2 }, { "from_id": "F3", "to_id": "F2", "flow": 1 }, { "from_id": "F3", "to_id": "F4", "flow": 1 }, { "from_id": "F3", "to_id": "F5", "flow": 3 }, { "from_id": "F3", "to_id": "F6", "flow": 2 }, { "from_id": "F3", "to_id": "F7", "flow": 1 }, { "from_id": "F3", "to_id": "F8", "flow": 2 }, { "from_id": "F3", "to_id": "F9", "flow": 4 }, { "from_id": "F3", "to_id": "F10", "flow": 3 }, { "from_id": "F3", "to_id": "F11", "flow": 2 }, { "from_id": "F3", "to_id": "F12", "flow": 3 }, { "from_id": "F4", "to_id": "F1", "flow": 3 }, { "from_id": "F4", "to_id": "F2", "flow": 2 }, { "from_id": "F4", "to_id": "F3", "flow": 1 }, { "from_id": "F4", "to_id": "F5", "flow": 4 }, { "from_id": "F4", "to_id": "F6", "flow": 3 }, { "from_id": "F4", "to_id": "F7", "flow": 2 }, { "from_id": "F4", "to_id": "F8", "flow": 1 }, { "from_id": "F4", "to_id": "F9", "flow": 5 }, { "from_id": "F4", "to_id": "F10", "flow": 4 }, { "from_id": "F4", "to_id": "F11", "flow": 3 }, { "from_id": "F4", "to_id": "F12", "flow": 2 }, { "from_id": "F5", "to_id": "F1", "flow": 1 }, { "from_id": "F5", "to_id": "F2", "flow": 2 }, { "from_id": "F5", "to_id": "F3", "flow": 3 }, { "from_id": "F5", "to_id": "F4", "flow": 4 }, { "from_id": "F5", "to_id": "F6", "flow": 1 }, { "from_id": "F5", "to_id": "F7", "flow": 2 }, { "from_id": "F5", "to_id": "F8", "flow": 3 }, { "from_id": "F5", "to_id": "F9", "flow": 1 }, { "from_id": "F5", "to_id": "F10", "flow": 2 }, { "from_id": "F5", "to_id": "F11", "flow": 3 }, { "from_id": "F5", "to_id": "F12", "flow": 4 }, { "from_id": "F6", "to_id": "F1", "flow": 2 }, { "from_id": "F6", "to_id": "F2", "flow": 1 }, { "from_id": "F6", "to_id": "F3", "flow": 2 }, { "from_id": "F6", "to_id": "F4", "flow": 3 }, { "from_id": "F6", "to_id": "F5", "flow": 1 }, { "from_id": "F6", "to_id": "F7", "flow": 1 }, { "from_id": "F6", "to_id": "F8", "flow": 2 }, { "from_id": "F6", "to_id": "F9", "flow": 2 }, { "from_id": "F6", "to_id": "F10", "flow": 1 }, { "from_id": "F6", "to_id": "F11", "flow": 2 }, { "from_id": "F6", "to_id": "F12", "flow": 3 }, { "from_id": "F7", "to_id": "F1", "flow": 3 }, { "from_id": "F7", "to_id": "F2", "flow": 2 }, { "from_id": "F7", "to_id": "F3", "flow": 1 }, { "from_id": "F7", "to_id": "F4", "flow": 2 }, { "from_id": "F7", "to_id": "F5", "flow": 2 }, { "from_id": "F7", "to_id": "F6", "flow": 1 }, { "from_id": "F7", "to_id": "F8", "flow": 1 }, { "from_id": "F7", "to_id": "F9", "flow": 3 }, { "from_id": "F7", "to_id": "F10", "flow": 2 }, { "from_id": "F7", "to_id": "F11", "flow": 1 }, { "from_id": "F7", "to_id": "F12", "flow": 2 }, { "from_id": "F8", "to_id": "F1", "flow": 4 }, { "from_id": "F8", "to_id": "F2", "flow": 3 }, { "from_id": "F8", "to_id": "F3", "flow": 2 }, { "from_id": "F8", "to_id": "F4", "flow": 1 }, { "from_id": "F8", "to_id": "F5", "flow": 3 }, { "from_id": "F8", "to_id": "F6", "flow": 2 }, { "from_id": "F8", "to_id": "F7", "flow": 1 }, { "from_id": "F8", "to_id": "F9", "flow": 4 }, { "from_id": "F8", "to_id": "F10", "flow": 3 }, { "from_id": "F8", "to_id": "F11", "flow": 2 }, { "from_id": "F8", "to_id": "F12", "flow": 1 }, { "from_id": "F9", "to_id": "F1", "flow": 2 }, { "from_id": "F9", "to_id": "F2", "flow": 3 }, { "from_id": "F9", "to_id": "F3", "flow": 4 }, { "from_id": "F9", "to_id": "F4", "flow": 5 }, { "from_id": "F9", "to_id": "F5", "flow": 1 }, { "from_id": "F9", "to_id": "F6", "flow": 2 }, { "from_id": "F9", "to_id": "F7", "flow": 3 }, { "from_id": "F9", "to_id": "F8", "flow": 4 }, { "from_id": "F9", "to_id": "F10", "flow": 1 }, { "from_id": "F9", "to_id": "F11", "flow": 2 }, { "from_id": "F9", "to_id": "F12", "flow": 3 }, { "from_id": "F10", "to_id": "F1", "flow": 3 }, { "from_id": "F10", "to_id": "F2", "flow": 2 }, { "from_id": "F10", "to_id": "F3", "flow": 3 }, { "from_id": "F10", "to_id": "F4", "flow": 4 }, { "from_id": "F10", "to_id": "F5", "flow": 2 }, { "from_id": "F10", "to_id": "F6", "flow": 1 }, { "from_id": "F10", "to_id": "F7", "flow": 2 }, { "from_id": "F10", "to_id": "F8", "flow": 3 }, { "from_id": "F10", "to_id": "F9", "flow": 1 }, { "from_id": "F10", "to_id": "F11", "flow": 1 }, { "from_id": "F10", "to_id": "F12", "flow": 2 }, { "from_id": "F11", "to_id": "F1", "flow": 4 }, { "from_id": "F11", "to_id": "F2", "flow": 3 }, { "from_id": "F11", "to_id": "F3", "flow": 2 }, { "from_id": "F11", "to_id": "F4", "flow": 3 }, { "from_id": "F11", "to_id": "F5", "flow": 3 }, { "from_id": "F11", "to_id": "F6", "flow": 2 }, { "from_id": "F11", "to_id": "F7", "flow": 1 }, { "from_id": "F11", "to_id": "F8", "flow": 2 }, { "from_id": "F11", "to_id": "F9", "flow": 2 }, { "from_id": "F11", "to_id": "F10", "flow": 1 }, { "from_id": "F11", "to_id": "F12", "flow": 1 }, { "from_id": "F12", "to_id": "F1", "flow": 5 }, { "from_id": "F12", "to_id": "F2", "flow": 4 }, { "from_id": "F12", "to_id": "F3", "flow": 3 }, { "from_id": "F12", "to_id": "F4", "flow": 2 }, { "from_id": "F12", "to_id": "F5", "flow": 4 }, { "from_id": "F12", "to_id": "F6", "flow": 3 }, { "from_id": "F12", "to_id": "F7", "flow": 2 }, { "from_id": "F12", "to_id": "F8", "flow": 1 }, { "from_id": "F12", "to_id": "F9", "flow": 3 }, { "from_id": "F12", "to_id": "F10", "flow": 2 }, { "from_id": "F12", "to_id": "F11", "flow": 1 } ] }, "solution_variant": [ "F", "D", "C", "I", "G", "B", "J", "L", "H", "E", "A", "K" ], "context_index": 36, "input_format": "json", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Someone at the production office needs to line up departments with stages in a way that cuts down on prop hauling — put the teams that share props most often near each other. Every department must go to exactly one stage, and every stage must receive exactly one department, so everything’s matched up one-to-one. For any given matching, add up, over all pairs of departments, the product of how often they move props and how far apart their stages are; the smaller that grand total, the better the plan. The numbers and map that describe the real case are shown below.\n\nBelow are the 11 departments (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11) and the 11 stages (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10).\n\n| from_stage_id | to_stage_id | stage_distance |\n|---|---|---|\n| 0 | 1 | 12 |\n| 0 | 2 | 12 |\n| 0 | 3 | 8 |\n| 0 | 4 | 12 |\n| 0 | 5 | 9 |\n| 0 | 6 | 5 |\n| 0 | 7 | 8 |\n| 0 | 8 | 5 |\n| 0 | 9 | 6 |\n| 0 | 10 | 5055 |\n| 1 | 0 | 12 |\n| 1 | 2 | 11 |\n| 1 | 3 | 7 |\n| 1 | 4 | 9 |\n| 1 | 5 | 6 |\n| 1 | 6 | 10 |\n| 1 | 7 | 9 |\n| 1 | 8 | 11 |\n| 1 | 9 | 6 |\n| 1 | 10 | 5043 |\n| 2 | 0 | 12 |\n| 2 | 1 | 11 |\n| 2 | 3 | 6 |\n| 2 | 4 | 2 |\n| 2 | 5 | 14 |\n| 2 | 6 | 14 |\n| 2 | 7 | 4 |\n| 2 | 8 | 8 |\n| 2 | 9 | 9 |\n| 2 | 10 | 5046 |\n| 3 | 0 | 8 |\n| 3 | 1 | 7 |\n| 3 | 2 | 6 |\n| 3 | 4 | 4 |\n| 3 | 5 | 9 |\n| 3 | 6 | 9 |\n| 3 | 7 | 3 |\n| 3 | 8 | 5 |\n| 3 | 9 | 4 |\n| 3 | 10 | 5047 |\n| 4 | 0 | 12 |\n| 4 | 1 | 9 |\n| 4 | 2 | 2 |\n| 4 | 3 | 4 |\n| 4 | 5 | 13 |\n| 4 | 6 | 13 |\n| 4 | 7 | 3 |\n| 4 | 8 | 8 |\n| 4 | 9 | 8 |\n| 4 | 10 | 5045 |\n| 5 | 0 | 9 |\n| 5 | 1 | 6 |\n| 5 | 2 | 14 |\n| 5 | 3 | 9 |\n| 5 | 4 | 13 |\n| 5 | 6 | 4 |\n| 5 | 7 | 11 |\n| 5 | 8 | 11 |\n| 5 | 9 | 5 |\n| 5 | 10 | 5049 |\n| 6 | 0 | 5 |\n| 6 | 1 | 10 |\n| 6 | 2 | 14 |\n| 6 | 3 | 9 |\n| 6 | 4 | 13 |\n| 6 | 5 | 4 |\n| 6 | 7 | 10 |\n| 6 | 8 | 8 |\n| 6 | 9 | 5 |\n| 6 | 10 | 5053 |\n| 7 | 0 | 8 |\n| 7 | 1 | 9 |\n| 7 | 2 | 4 |\n| 7 | 3 | 3 |\n| 7 | 4 | 3 |\n| 7 | 5 | 11 |\n| 7 | 6 | 10 |\n| 7 | 8 | 4 |\n| 7 | 9 | 6 |\n| 7 | 10 | 5048 |\n| 8 | 0 | 5 |\n| 8 | 1 | 11 |\n| 8 | 2 | 8 |\n| 8 | 3 | 5 |\n| 8 | 4 | 8 |\n| 8 | 5 | 11 |\n| 8 | 6 | 8 |\n| 8 | 7 | 4 |\n| 8 | 9 | 6 |\n| 8 | 10 | 5052 |\n| 9 | 0 | 6 |\n| 9 | 1 | 6 |\n| 9 | 2 | 9 |\n| 9 | 3 | 4 |\n| 9 | 4 | 8 |\n| 9 | 5 | 5 |\n| 9 | 6 | 5 |\n| 9 | 7 | 6 |\n| 9 | 8 | 6 |\n| 9 | 10 | 5049 |\n| 10 | 0 | 5055 |\n| 10 | 1 | 5043 |\n| 10 | 2 | 5046 |\n| 10 | 3 | 5047 |\n| 10 | 4 | 5045 |\n| 10 | 5 | 5049 |\n| 10 | 6 | 5053 |\n| 10 | 7 | 5048 |\n| 10 | 8 | 5052 |\n| 10 | 9 | 5049 |\n\n| from_department_id | to_department_id | prop_transfer_frequency |\n|---|---|---|\n| F1 | F2 | 0 |\n| F1 | F3 | 0 |\n| F1 | F4 | 109 |\n| F1 | F5 | 11749 |\n| F1 | F6 | 103 |\n| F1 | F7 | 2 |\n| F1 | F8 | 0 |\n| F1 | F9 | 0 |\n| F1 | F10 | 28204 |\n| F1 | F11 | 0 |\n| F2 | F1 | 44 |\n| F2 | F3 | 0 |\n| F2 | F4 | 0 |\n| F2 | F5 | 2 |\n| F2 | F6 | 0 |\n| F2 | F7 | 0 |\n| F2 | F8 | 45 |\n| F2 | F9 | 55 |\n| F2 | F10 | 0 |\n| F2 | F11 | 2 |\n| F3 | F1 | 533 |\n| F3 | F2 | 0 |\n| F3 | F4 | 0 |\n| F3 | F5 | 1993 |\n| F3 | F6 | 88 |\n| F3 | F7 | 0 |\n| F3 | F8 | 0 |\n| F3 | F9 | 0 |\n| F3 | F10 | 0 |\n| F3 | F11 | 24586 |\n| F4 | F1 | 34 |\n| F4 | F2 | 0 |\n| F4 | F3 | 1160 |\n| F4 | F5 | 1 |\n| F4 | F6 | 0 |\n| F4 | F7 | 0 |\n| F4 | F8 | 5894 |\n| F4 | F9 | 13 |\n| F4 | F10 | 882 |\n| F4 | F11 | 8 |\n| F5 | F1 | 236 |\n| F5 | F2 | 4 |\n| F5 | F3 | 545 |\n| F5 | F4 | 11 |\n| F5 | F6 | 1 |\n| F5 | F7 | 397 |\n| F5 | F8 | 2249 |\n| F5 | F9 | 0 |\n| F5 | F10 | 0 |\n| F5 | F11 | 0 |\n| F6 | F1 | 6 |\n| F6 | F2 | 2 |\n| F6 | F3 | 0 |\n| F6 | F4 | 4338 |\n| F6 | F5 | 0 |\n| F6 | F7 | 0 |\n| F6 | F8 | 21168 |\n| F6 | F9 | 2892 |\n| F6 | F10 | 5848 |\n| F6 | F11 | 0 |\n| F7 | F1 | 30 |\n| F7 | F2 | 20274 |\n| F7 | F3 | 0 |\n| F7 | F4 | 0 |\n| F7 | F5 | 6741 |\n| F7 | F6 | 0 |\n| F7 | F8 | 106 |\n| F7 | F9 | 3 |\n| F7 | F10 | 0 |\n| F7 | F11 | 0 |\n| F8 | F1 | 0 |\n| F8 | F2 | 88 |\n| F8 | F3 | 0 |\n| F8 | F4 | 0 |\n| F8 | F5 | 0 |\n| F8 | F6 | 0 |\n| F8 | F7 | 0 |\n| F8 | F9 | 534 |\n| F8 | F10 | 0 |\n| F8 | F11 | 243 |\n| F9 | F1 | 810 |\n| F9 | F2 | 4403 |\n| F9 | F3 | 392 |\n| F9 | F4 | 0 |\n| F9 | F5 | 0 |\n| F9 | F6 | 0 |\n| F9 | F7 | 0 |\n| F9 | F8 | 26 |\n| F9 | F10 | 116 |\n| F9 | F11 | 372 |\n| F10 | F1 | 0 |\n| F10 | F2 | 0 |\n| F10 | F3 | 1 |\n| F10 | F4 | 1017 |\n| F10 | F5 | 0 |\n| F10 | F6 | 11003 |\n| F10 | F7 | 0 |\n| F10 | F8 | 0 |\n| F10 | F9 | 0 |\n| F10 | F11 | 1 |\n| F11 | F1 | 1851 |\n| F11 | F2 | 37 |\n| F11 | F3 | 57857 |\n| F11 | F4 | 8 |\n| F11 | F5 | 12765 |\n| F11 | F6 | 0 |\n| F11 | F7 | 0 |\n| F11 | F8 | 10454 |\n| F11 | F9 | 0 |\n| F11 | F10 | 9 |\n\nThese entries list the measurements needed to evaluate each matching's total hauling cost.\n\nAlso, when you reply with the matching plan, please use this simple JSON layout so it's easy to parse:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis little block means: \"solution\" is an ordered list where the first entry is the stage assigned to the first department, the second entry is the stage for the second department, and so on. Think of the placeholders as blanks on a form — fill them in with the actual stage identifiers from the instance.\n\nThis JSON is only a sketch of the shape I expect, not the final answer itself. Please make sure to use the exact identifiers given in the instance input — do not rename them or invent new labels. Valid identifiers look like plain numbers such as \"1\" or \"23\", single capital letters like \"A\" or \"B\", or a capital letter followed by digits like \"A1\" or \"X7\".", "instance": { "distance_matrix": [ [ 0, 12, 12, 8, 12, 9, 5, 8, 5, 6, 5055 ], [ 12, 0, 11, 7, 9, 6, 10, 9, 11, 6, 5043 ], [ 12, 11, 0, 6, 2, 14, 14, 4, 8, 9, 5046 ], [ 8, 7, 6, 0, 4, 9, 9, 3, 5, 4, 5047 ], [ 12, 9, 2, 4, 0, 13, 13, 3, 8, 8, 5045 ], [ 9, 6, 14, 9, 13, 0, 4, 11, 11, 5, 5049 ], [ 5, 10, 14, 9, 13, 4, 0, 10, 8, 5, 5053 ], [ 8, 9, 4, 3, 3, 11, 10, 0, 4, 6, 5048 ], [ 5, 11, 8, 5, 8, 11, 8, 4, 0, 6, 5052 ], [ 6, 6, 9, 4, 8, 5, 5, 6, 6, 0, 5049 ], [ 5055, 5043, 5046, 5047, 5045, 5049, 5053, 5048, 5052, 5049, 0 ] ], "flow_matrix": [ [ 0, 0, 0, 109, 11749, 103, 2, 0, 0, 28204, 0 ], [ 44, 0, 0, 0, 2, 0, 0, 45, 55, 0, 2 ], [ 533, 0, 0, 0, 1993, 88, 0, 0, 0, 0, 24586 ], [ 34, 0, 1160, 0, 1, 0, 0, 5894, 13, 882, 8 ], [ 236, 4, 545, 11, 0, 1, 397, 2249, 0, 0, 0 ], [ 6, 2, 0, 4338, 0, 0, 0, 21168, 2892, 5848, 0 ], [ 30, 20274, 0, 0, 6741, 0, 0, 106, 3, 0, 0 ], [ 0, 88, 0, 0, 0, 0, 0, 0, 534, 0, 243 ], [ 810, 4403, 392, 0, 0, 0, 0, 26, 0, 116, 372 ], [ 0, 0, 1, 1017, 0, 11003, 0, 0, 0, 0, 1 ], [ 1851, 37, 57857, 8, 12765, 0, 0, 10454, 0, 9, 0 ] ], "objective": 49631928.0 }, "solution": [ 0, 3, 4, 1, 8, 5, 7, 6, 10, 9, 2 ], "obj": 49631928.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 11, "num_locations": 11, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 12 }, { "from_id": 0, "to_id": 2, "distance": 12 }, { "from_id": 0, "to_id": 3, "distance": 8 }, { "from_id": 0, "to_id": 4, "distance": 12 }, { "from_id": 0, "to_id": 5, "distance": 9 }, { "from_id": 0, "to_id": 6, "distance": 5 }, { "from_id": 0, "to_id": 7, "distance": 8 }, { "from_id": 0, "to_id": 8, "distance": 5 }, { "from_id": 0, "to_id": 9, "distance": 6 }, { "from_id": 0, "to_id": 10, "distance": 5055 }, { "from_id": 1, "to_id": 0, "distance": 12 }, { "from_id": 1, "to_id": 2, "distance": 11 }, { "from_id": 1, "to_id": 3, "distance": 7 }, { "from_id": 1, "to_id": 4, "distance": 9 }, { "from_id": 1, "to_id": 5, "distance": 6 }, { "from_id": 1, "to_id": 6, "distance": 10 }, { "from_id": 1, "to_id": 7, "distance": 9 }, { "from_id": 1, "to_id": 8, "distance": 11 }, { "from_id": 1, "to_id": 9, "distance": 6 }, { "from_id": 1, "to_id": 10, "distance": 5043 }, { "from_id": 2, "to_id": 0, "distance": 12 }, { "from_id": 2, "to_id": 1, "distance": 11 }, { "from_id": 2, "to_id": 3, "distance": 6 }, { "from_id": 2, "to_id": 4, "distance": 2 }, { "from_id": 2, "to_id": 5, "distance": 14 }, { "from_id": 2, "to_id": 6, "distance": 14 }, { "from_id": 2, "to_id": 7, "distance": 4 }, { "from_id": 2, "to_id": 8, "distance": 8 }, { "from_id": 2, "to_id": 9, "distance": 9 }, { "from_id": 2, "to_id": 10, "distance": 5046 }, { "from_id": 3, "to_id": 0, "distance": 8 }, { "from_id": 3, "to_id": 1, "distance": 7 }, { "from_id": 3, "to_id": 2, "distance": 6 }, { "from_id": 3, "to_id": 4, "distance": 4 }, { "from_id": 3, "to_id": 5, "distance": 9 }, { "from_id": 3, "to_id": 6, "distance": 9 }, { "from_id": 3, "to_id": 7, "distance": 3 }, { "from_id": 3, "to_id": 8, "distance": 5 }, { "from_id": 3, "to_id": 9, "distance": 4 }, { "from_id": 3, "to_id": 10, "distance": 5047 }, { "from_id": 4, "to_id": 0, "distance": 12 }, { "from_id": 4, "to_id": 1, "distance": 9 }, { "from_id": 4, "to_id": 2, "distance": 2 }, { "from_id": 4, "to_id": 3, "distance": 4 }, { "from_id": 4, "to_id": 5, "distance": 13 }, { "from_id": 4, "to_id": 6, "distance": 13 }, { "from_id": 4, "to_id": 7, "distance": 3 }, { "from_id": 4, "to_id": 8, "distance": 8 }, { "from_id": 4, "to_id": 9, "distance": 8 }, { "from_id": 4, "to_id": 10, "distance": 5045 }, { "from_id": 5, "to_id": 0, "distance": 9 }, { "from_id": 5, "to_id": 1, "distance": 6 }, { "from_id": 5, "to_id": 2, "distance": 14 }, { "from_id": 5, "to_id": 3, "distance": 9 }, { "from_id": 5, "to_id": 4, "distance": 13 }, { "from_id": 5, "to_id": 6, "distance": 4 }, { "from_id": 5, "to_id": 7, "distance": 11 }, { "from_id": 5, "to_id": 8, "distance": 11 }, { "from_id": 5, "to_id": 9, "distance": 5 }, { "from_id": 5, "to_id": 10, "distance": 5049 }, { "from_id": 6, "to_id": 0, "distance": 5 }, { "from_id": 6, "to_id": 1, "distance": 10 }, { "from_id": 6, "to_id": 2, "distance": 14 }, { "from_id": 6, "to_id": 3, "distance": 9 }, { "from_id": 6, "to_id": 4, "distance": 13 }, { "from_id": 6, "to_id": 5, "distance": 4 }, { "from_id": 6, "to_id": 7, "distance": 10 }, { "from_id": 6, "to_id": 8, "distance": 8 }, { "from_id": 6, "to_id": 9, "distance": 5 }, { "from_id": 6, "to_id": 10, "distance": 5053 }, { "from_id": 7, "to_id": 0, "distance": 8 }, { "from_id": 7, "to_id": 1, "distance": 9 }, { "from_id": 7, "to_id": 2, "distance": 4 }, { "from_id": 7, "to_id": 3, "distance": 3 }, { "from_id": 7, "to_id": 4, "distance": 3 }, { "from_id": 7, "to_id": 5, "distance": 11 }, { "from_id": 7, "to_id": 6, "distance": 10 }, { "from_id": 7, "to_id": 8, "distance": 4 }, { "from_id": 7, "to_id": 9, "distance": 6 }, { "from_id": 7, "to_id": 10, "distance": 5048 }, { "from_id": 8, "to_id": 0, "distance": 5 }, { "from_id": 8, "to_id": 1, "distance": 11 }, { "from_id": 8, "to_id": 2, "distance": 8 }, { "from_id": 8, "to_id": 3, "distance": 5 }, { "from_id": 8, "to_id": 4, "distance": 8 }, { "from_id": 8, "to_id": 5, "distance": 11 }, { "from_id": 8, "to_id": 6, "distance": 8 }, { "from_id": 8, "to_id": 7, "distance": 4 }, { "from_id": 8, "to_id": 9, "distance": 6 }, { "from_id": 8, "to_id": 10, "distance": 5052 }, { "from_id": 9, "to_id": 0, "distance": 6 }, { "from_id": 9, "to_id": 1, "distance": 6 }, { "from_id": 9, "to_id": 2, "distance": 9 }, { "from_id": 9, "to_id": 3, "distance": 4 }, { "from_id": 9, "to_id": 4, "distance": 8 }, { "from_id": 9, "to_id": 5, "distance": 5 }, { "from_id": 9, "to_id": 6, "distance": 5 }, { "from_id": 9, "to_id": 7, "distance": 6 }, { "from_id": 9, "to_id": 8, "distance": 6 }, { "from_id": 9, "to_id": 10, "distance": 5049 }, { "from_id": 10, "to_id": 0, "distance": 5055 }, { "from_id": 10, "to_id": 1, "distance": 5043 }, { "from_id": 10, "to_id": 2, "distance": 5046 }, { "from_id": 10, "to_id": 3, "distance": 5047 }, { "from_id": 10, "to_id": 4, "distance": 5045 }, { "from_id": 10, "to_id": 5, "distance": 5049 }, { "from_id": 10, "to_id": 6, "distance": 5053 }, { "from_id": 10, "to_id": 7, "distance": 5048 }, { "from_id": 10, "to_id": 8, "distance": 5052 }, { "from_id": 10, "to_id": 9, "distance": 5049 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 0 }, { "from_id": "F1", "to_id": "F4", "flow": 109 }, { "from_id": "F1", "to_id": "F5", "flow": 11749 }, { "from_id": "F1", "to_id": "F6", "flow": 103 }, { "from_id": "F1", "to_id": "F7", "flow": 2 }, { "from_id": "F1", "to_id": "F8", "flow": 0 }, { "from_id": "F1", "to_id": "F9", "flow": 0 }, { "from_id": "F1", "to_id": "F10", "flow": 28204 }, { "from_id": "F1", "to_id": "F11", "flow": 0 }, { "from_id": "F2", "to_id": "F1", "flow": 44 }, { "from_id": "F2", "to_id": "F3", "flow": 0 }, { "from_id": "F2", "to_id": "F4", "flow": 0 }, { "from_id": "F2", "to_id": "F5", "flow": 2 }, { "from_id": "F2", "to_id": "F6", "flow": 0 }, { "from_id": "F2", "to_id": "F7", "flow": 0 }, { "from_id": "F2", "to_id": "F8", "flow": 45 }, { "from_id": "F2", "to_id": "F9", "flow": 55 }, { "from_id": "F2", "to_id": "F10", "flow": 0 }, { "from_id": "F2", "to_id": "F11", "flow": 2 }, { "from_id": "F3", "to_id": "F1", "flow": 533 }, { "from_id": "F3", "to_id": "F2", "flow": 0 }, { "from_id": "F3", "to_id": "F4", "flow": 0 }, { "from_id": "F3", "to_id": "F5", "flow": 1993 }, { "from_id": "F3", "to_id": "F6", "flow": 88 }, { "from_id": "F3", "to_id": "F7", "flow": 0 }, { "from_id": "F3", "to_id": "F8", "flow": 0 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F3", "to_id": "F10", "flow": 0 }, { "from_id": "F3", "to_id": "F11", "flow": 24586 }, { "from_id": "F4", "to_id": "F1", "flow": 34 }, { "from_id": "F4", "to_id": "F2", "flow": 0 }, { "from_id": "F4", "to_id": "F3", "flow": 1160 }, { "from_id": "F4", "to_id": "F5", "flow": 1 }, { "from_id": "F4", "to_id": "F6", "flow": 0 }, { "from_id": "F4", "to_id": "F7", "flow": 0 }, { "from_id": "F4", "to_id": "F8", "flow": 5894 }, { "from_id": "F4", "to_id": "F9", "flow": 13 }, { "from_id": "F4", "to_id": "F10", "flow": 882 }, { "from_id": "F4", "to_id": "F11", "flow": 8 }, { "from_id": "F5", "to_id": "F1", "flow": 236 }, { "from_id": "F5", "to_id": "F2", "flow": 4 }, { "from_id": "F5", "to_id": "F3", "flow": 545 }, { "from_id": "F5", "to_id": "F4", "flow": 11 }, { "from_id": "F5", "to_id": "F6", "flow": 1 }, { "from_id": "F5", "to_id": "F7", "flow": 397 }, { "from_id": "F5", "to_id": "F8", "flow": 2249 }, { "from_id": "F5", "to_id": "F9", "flow": 0 }, { "from_id": "F5", "to_id": "F10", "flow": 0 }, { "from_id": "F5", "to_id": "F11", "flow": 0 }, { "from_id": "F6", "to_id": "F1", "flow": 6 }, { "from_id": "F6", "to_id": "F2", "flow": 2 }, { "from_id": "F6", "to_id": "F3", "flow": 0 }, { "from_id": "F6", "to_id": "F4", "flow": 4338 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 21168 }, { "from_id": "F6", "to_id": "F9", "flow": 2892 }, { "from_id": "F6", "to_id": "F10", "flow": 5848 }, { "from_id": "F6", "to_id": "F11", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 30 }, { "from_id": "F7", "to_id": "F2", "flow": 20274 }, { "from_id": "F7", "to_id": "F3", "flow": 0 }, { "from_id": "F7", "to_id": "F4", "flow": 0 }, { "from_id": "F7", "to_id": "F5", "flow": 6741 }, { "from_id": "F7", "to_id": "F6", "flow": 0 }, { "from_id": "F7", "to_id": "F8", "flow": 106 }, { "from_id": "F7", "to_id": "F9", "flow": 3 }, { "from_id": "F7", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F11", "flow": 0 }, { "from_id": "F8", "to_id": "F1", "flow": 0 }, { "from_id": "F8", "to_id": "F2", "flow": 88 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 0 }, { "from_id": "F8", "to_id": "F6", "flow": 0 }, { "from_id": "F8", "to_id": "F7", "flow": 0 }, { "from_id": "F8", "to_id": "F9", "flow": 534 }, { "from_id": "F8", "to_id": "F10", "flow": 0 }, { "from_id": "F8", "to_id": "F11", "flow": 243 }, { "from_id": "F9", "to_id": "F1", "flow": 810 }, { "from_id": "F9", "to_id": "F2", "flow": 4403 }, { "from_id": "F9", "to_id": "F3", "flow": 392 }, { "from_id": "F9", "to_id": "F4", "flow": 0 }, { "from_id": "F9", "to_id": "F5", "flow": 0 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 0 }, { "from_id": "F9", "to_id": "F8", "flow": 26 }, { "from_id": "F9", "to_id": "F10", "flow": 116 }, { "from_id": "F9", "to_id": "F11", "flow": 372 }, { "from_id": "F10", "to_id": "F1", "flow": 0 }, { "from_id": "F10", "to_id": "F2", "flow": 0 }, { "from_id": "F10", "to_id": "F3", "flow": 1 }, { "from_id": "F10", "to_id": "F4", "flow": 1017 }, { "from_id": "F10", "to_id": "F5", "flow": 0 }, { "from_id": "F10", "to_id": "F6", "flow": 11003 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 0 }, { "from_id": "F10", "to_id": "F9", "flow": 0 }, { "from_id": "F10", "to_id": "F11", "flow": 1 }, { "from_id": "F11", "to_id": "F1", "flow": 1851 }, { "from_id": "F11", "to_id": "F2", "flow": 37 }, { "from_id": "F11", "to_id": "F3", "flow": 57857 }, { "from_id": "F11", "to_id": "F4", "flow": 8 }, { "from_id": "F11", "to_id": "F5", "flow": 12765 }, { "from_id": "F11", "to_id": "F6", "flow": 0 }, { "from_id": "F11", "to_id": "F7", "flow": 0 }, { "from_id": "F11", "to_id": "F8", "flow": 10454 }, { "from_id": "F11", "to_id": "F9", "flow": 0 }, { "from_id": "F11", "to_id": "F10", "flow": 9 } ] }, "solution_variant": [ 0, 3, 4, 1, 8, 5, 7, 6, 10, 9, 2 ], "context_index": 37, "input_format": "markdown_table", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "There's a simple warehouse puzzle on the table: put each inventory category onto one fixed pallet slot so categories that tend to be picked together end up nearby. To judge any layout, go through every pair of categories, multiply how often they move together by how far apart their assigned pallets are, add up all those pair-scores, and prefer layouts with the smallest total. No category can be left out or duplicated — one category per pallet, one pallet per category. The detailed distances and co-movement counts are shown below.\n\nThere are 10 categories to place; the inventory categories are F1, F2, F3, F4, F5, F6, F7, F8, F9, F10 and the pallet positions are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.\n\n| from_position_id | to_position_id | travel_distance |\n|---|---|---|\n| 0 | 1 | 5 |\n| 0 | 2 | 3 |\n| 0 | 3 | 4 |\n| 0 | 4 | 7 |\n| 0 | 5 | 4 |\n| 0 | 6 | 5 |\n| 0 | 7 | 4 |\n| 0 | 8 | 8 |\n| 0 | 9 | 6 |\n| 1 | 0 | 5 |\n| 1 | 2 | 6 |\n| 1 | 3 | 7 |\n| 1 | 4 | 2 |\n| 1 | 5 | 7 |\n| 1 | 6 | 8 |\n| 1 | 7 | 7 |\n| 1 | 8 | 5 |\n| 1 | 9 | 7 |\n| 2 | 0 | 3 |\n| 2 | 1 | 6 |\n| 2 | 3 | 1 |\n| 2 | 4 | 6 |\n| 2 | 5 | 1 |\n| 2 | 6 | 2 |\n| 2 | 7 | 3 |\n| 2 | 8 | 7 |\n| 2 | 9 | 5 |\n| 3 | 0 | 4 |\n| 3 | 1 | 7 |\n| 3 | 2 | 1 |\n| 3 | 4 | 7 |\n| 3 | 5 | 2 |\n| 3 | 6 | 1 |\n| 3 | 7 | 4 |\n| 3 | 8 | 8 |\n| 3 | 9 | 6 |\n| 4 | 0 | 7 |\n| 4 | 1 | 2 |\n| 4 | 2 | 6 |\n| 4 | 3 | 7 |\n| 4 | 5 | 5 |\n| 4 | 6 | 6 |\n| 4 | 7 | 5 |\n| 4 | 8 | 3 |\n| 4 | 9 | 5 |\n| 5 | 0 | 4 |\n| 5 | 1 | 7 |\n| 5 | 2 | 1 |\n| 5 | 3 | 2 |\n| 5 | 4 | 5 |\n| 5 | 6 | 1 |\n| 5 | 7 | 2 |\n| 5 | 8 | 6 |\n| 5 | 9 | 4 |\n| 6 | 0 | 5 |\n| 6 | 1 | 8 |\n| 6 | 2 | 2 |\n| 6 | 3 | 1 |\n| 6 | 4 | 6 |\n| 6 | 5 | 1 |\n| 6 | 7 | 3 |\n| 6 | 8 | 7 |\n| 6 | 9 | 5 |\n| 7 | 0 | 4 |\n| 7 | 1 | 7 |\n| 7 | 2 | 3 |\n| 7 | 3 | 4 |\n| 7 | 4 | 5 |\n| 7 | 5 | 2 |\n| 7 | 6 | 3 |\n| 7 | 8 | 4 |\n| 7 | 9 | 2 |\n| 8 | 0 | 8 |\n| 8 | 1 | 5 |\n| 8 | 2 | 7 |\n| 8 | 3 | 8 |\n| 8 | 4 | 3 |\n| 8 | 5 | 6 |\n| 8 | 6 | 7 |\n| 8 | 7 | 4 |\n| 8 | 9 | 2 |\n| 9 | 0 | 6 |\n| 9 | 1 | 7 |\n| 9 | 2 | 5 |\n| 9 | 3 | 6 |\n| 9 | 4 | 5 |\n| 9 | 5 | 4 |\n| 9 | 6 | 5 |\n| 9 | 7 | 2 |\n| 9 | 8 | 2 |\n\n| from_category_id | to_category_id | co_movement_volume |\n|---|---|---|\n| F1 | F2 | 1 |\n| F1 | F3 | 0 |\n| F1 | F4 | 2 |\n| F1 | F5 | 2 |\n| F1 | F6 | 5 |\n| F1 | F7 | 0 |\n| F1 | F8 | 2 |\n| F1 | F9 | 6 |\n| F1 | F10 | 2 |\n| F2 | F1 | 1 |\n| F2 | F3 | 0 |\n| F2 | F4 | 4 |\n| F2 | F5 | 0 |\n| F2 | F6 | 2 |\n| F2 | F7 | 2 |\n| F2 | F8 | 5 |\n| F2 | F9 | 2 |\n| F2 | F10 | 0 |\n| F3 | F1 | 0 |\n| F3 | F2 | 0 |\n| F3 | F4 | 3 |\n| F3 | F5 | 1 |\n| F3 | F6 | 10 |\n| F3 | F7 | 5 |\n| F3 | F8 | 0 |\n| F3 | F9 | 0 |\n| F3 | F10 | 0 |\n| F4 | F1 | 2 |\n| F4 | F2 | 4 |\n| F4 | F3 | 3 |\n| F4 | F5 | 0 |\n| F4 | F6 | 1 |\n| F4 | F7 | 1 |\n| F4 | F8 | 10 |\n| F4 | F9 | 5 |\n| F4 | F10 | 10 |\n| F5 | F1 | 2 |\n| F5 | F2 | 0 |\n| F5 | F3 | 1 |\n| F5 | F4 | 0 |\n| F5 | F6 | 2 |\n| F5 | F7 | 10 |\n| F5 | F8 | 4 |\n| F5 | F9 | 5 |\n| F5 | F10 | 2 |\n| F6 | F1 | 5 |\n| F6 | F2 | 2 |\n| F6 | F3 | 10 |\n| F6 | F4 | 1 |\n| F6 | F5 | 2 |\n| F6 | F7 | 2 |\n| F6 | F8 | 5 |\n| F6 | F9 | 0 |\n| F6 | F10 | 10 |\n| F7 | F1 | 0 |\n| F7 | F2 | 2 |\n| F7 | F3 | 5 |\n| F7 | F4 | 1 |\n| F7 | F5 | 10 |\n| F7 | F6 | 2 |\n| F7 | F8 | 10 |\n| F7 | F9 | 5 |\n| F7 | F10 | 1 |\n| F8 | F1 | 2 |\n| F8 | F2 | 5 |\n| F8 | F3 | 0 |\n| F8 | F4 | 10 |\n| F8 | F5 | 4 |\n| F8 | F6 | 5 |\n| F8 | F7 | 10 |\n| F8 | F9 | 0 |\n| F8 | F10 | 2 |\n| F9 | F1 | 6 |\n| F9 | F2 | 2 |\n| F9 | F3 | 0 |\n| F9 | F4 | 5 |\n| F9 | F5 | 5 |\n| F9 | F6 | 0 |\n| F9 | F7 | 5 |\n| F9 | F8 | 0 |\n| F9 | F10 | 10 |\n| F10 | F1 | 2 |\n| F10 | F2 | 0 |\n| F10 | F3 | 0 |\n| F10 | F4 | 10 |\n| F10 | F5 | 2 |\n| F10 | F6 | 10 |\n| F10 | F7 | 1 |\n| F10 | F8 | 2 |\n| F10 | F9 | 10 |\n\nEvaluate every pair as described above to compute each contribution and prefer the layout with the smallest total.\n\nWhen you're ready to send back a layout, just pop it into a tiny JSON shape like this so I can read it straight away.\n\n{\n \"solution\": [\n \"\",\n \"\",\n ...,\n \"\"\n ]\n}\n\nThis is just a sketch of the shape I expect: the \"solution\" list gives, in order, the pallet slot (location) you assign to each inventory category (first entry → first category, second → second, and so on). Keep it simple—one slot per category, one category per slot.\n\nOne important note: use the identifiers exactly as they appear in the instance input — don’t rename or invent new ones. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"\n\nThe JSON above is the format I want, not the final assignment itself.", "instance": { "distance_matrix": [ [ 0, 5, 3, 4, 7, 4, 5, 4, 8, 6 ], [ 5, 0, 6, 7, 2, 7, 8, 7, 5, 7 ], [ 3, 6, 0, 1, 6, 1, 2, 3, 7, 5 ], [ 4, 7, 1, 0, 7, 2, 1, 4, 8, 6 ], [ 7, 2, 6, 7, 0, 5, 6, 5, 3, 5 ], [ 4, 7, 1, 2, 5, 0, 1, 2, 6, 4 ], [ 5, 8, 2, 1, 6, 1, 0, 3, 7, 5 ], [ 4, 7, 3, 4, 5, 2, 3, 0, 4, 2 ], [ 8, 5, 7, 8, 3, 6, 7, 4, 0, 2 ], [ 6, 7, 5, 6, 5, 4, 5, 2, 2, 0 ] ], "flow_matrix": [ [ 0, 1, 0, 2, 2, 5, 0, 2, 6, 2 ], [ 1, 0, 0, 4, 0, 2, 2, 5, 2, 0 ], [ 0, 0, 0, 3, 1, 10, 5, 0, 0, 0 ], [ 2, 4, 3, 0, 0, 1, 1, 10, 5, 10 ], [ 2, 0, 1, 0, 0, 2, 10, 4, 5, 2 ], [ 5, 2, 10, 1, 2, 0, 2, 5, 0, 10 ], [ 0, 2, 5, 1, 10, 2, 0, 10, 5, 1 ], [ 2, 5, 0, 10, 4, 5, 10, 0, 0, 2 ], [ 6, 2, 0, 5, 5, 0, 5, 0, 0, 10 ], [ 2, 0, 0, 10, 2, 10, 1, 2, 10, 0 ] ], "objective": 1028.0 }, "solution": [ 8, 0, 1, 5, 6, 4, 3, 2, 9, 7 ], "obj": 1028.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 5 }, { "from_id": 0, "to_id": 2, "distance": 3 }, { "from_id": 0, "to_id": 3, "distance": 4 }, { "from_id": 0, "to_id": 4, "distance": 7 }, { "from_id": 0, "to_id": 5, "distance": 4 }, { "from_id": 0, "to_id": 6, "distance": 5 }, { "from_id": 0, "to_id": 7, "distance": 4 }, { "from_id": 0, "to_id": 8, "distance": 8 }, { "from_id": 0, "to_id": 9, "distance": 6 }, { "from_id": 1, "to_id": 0, "distance": 5 }, { "from_id": 1, "to_id": 2, "distance": 6 }, { "from_id": 1, "to_id": 3, "distance": 7 }, { "from_id": 1, "to_id": 4, "distance": 2 }, { "from_id": 1, "to_id": 5, "distance": 7 }, { "from_id": 1, "to_id": 6, "distance": 8 }, { "from_id": 1, "to_id": 7, "distance": 7 }, { "from_id": 1, "to_id": 8, "distance": 5 }, { "from_id": 1, "to_id": 9, "distance": 7 }, { "from_id": 2, "to_id": 0, "distance": 3 }, { "from_id": 2, "to_id": 1, "distance": 6 }, { "from_id": 2, "to_id": 3, "distance": 1 }, { "from_id": 2, "to_id": 4, "distance": 6 }, { "from_id": 2, "to_id": 5, "distance": 1 }, { "from_id": 2, "to_id": 6, "distance": 2 }, { "from_id": 2, "to_id": 7, "distance": 3 }, { "from_id": 2, "to_id": 8, "distance": 7 }, { "from_id": 2, "to_id": 9, "distance": 5 }, { "from_id": 3, "to_id": 0, "distance": 4 }, { "from_id": 3, "to_id": 1, "distance": 7 }, { "from_id": 3, "to_id": 2, "distance": 1 }, { "from_id": 3, "to_id": 4, "distance": 7 }, { "from_id": 3, "to_id": 5, "distance": 2 }, { "from_id": 3, "to_id": 6, "distance": 1 }, { "from_id": 3, "to_id": 7, "distance": 4 }, { "from_id": 3, "to_id": 8, "distance": 8 }, { "from_id": 3, "to_id": 9, "distance": 6 }, { "from_id": 4, "to_id": 0, "distance": 7 }, { "from_id": 4, "to_id": 1, "distance": 2 }, { "from_id": 4, "to_id": 2, "distance": 6 }, { "from_id": 4, "to_id": 3, "distance": 7 }, { "from_id": 4, "to_id": 5, "distance": 5 }, { "from_id": 4, "to_id": 6, "distance": 6 }, { "from_id": 4, "to_id": 7, "distance": 5 }, { "from_id": 4, "to_id": 8, "distance": 3 }, { "from_id": 4, "to_id": 9, "distance": 5 }, { "from_id": 5, "to_id": 0, "distance": 4 }, { "from_id": 5, "to_id": 1, "distance": 7 }, { "from_id": 5, "to_id": 2, "distance": 1 }, { "from_id": 5, "to_id": 3, "distance": 2 }, { "from_id": 5, "to_id": 4, "distance": 5 }, { "from_id": 5, "to_id": 6, "distance": 1 }, { "from_id": 5, "to_id": 7, "distance": 2 }, { "from_id": 5, "to_id": 8, "distance": 6 }, { "from_id": 5, "to_id": 9, "distance": 4 }, { "from_id": 6, "to_id": 0, "distance": 5 }, { "from_id": 6, "to_id": 1, "distance": 8 }, { "from_id": 6, "to_id": 2, "distance": 2 }, { "from_id": 6, "to_id": 3, "distance": 1 }, { "from_id": 6, "to_id": 4, "distance": 6 }, { "from_id": 6, "to_id": 5, "distance": 1 }, { "from_id": 6, "to_id": 7, "distance": 3 }, { "from_id": 6, "to_id": 8, "distance": 7 }, { "from_id": 6, "to_id": 9, "distance": 5 }, { "from_id": 7, "to_id": 0, "distance": 4 }, { "from_id": 7, "to_id": 1, "distance": 7 }, { "from_id": 7, "to_id": 2, "distance": 3 }, { "from_id": 7, "to_id": 3, "distance": 4 }, { "from_id": 7, "to_id": 4, "distance": 5 }, { "from_id": 7, "to_id": 5, "distance": 2 }, { "from_id": 7, "to_id": 6, "distance": 3 }, { "from_id": 7, "to_id": 8, "distance": 4 }, { "from_id": 7, "to_id": 9, "distance": 2 }, { "from_id": 8, "to_id": 0, "distance": 8 }, { "from_id": 8, "to_id": 1, "distance": 5 }, { "from_id": 8, "to_id": 2, "distance": 7 }, { "from_id": 8, "to_id": 3, "distance": 8 }, { "from_id": 8, "to_id": 4, "distance": 3 }, { "from_id": 8, "to_id": 5, "distance": 6 }, { "from_id": 8, "to_id": 6, "distance": 7 }, { "from_id": 8, "to_id": 7, "distance": 4 }, { "from_id": 8, "to_id": 9, "distance": 2 }, { "from_id": 9, "to_id": 0, "distance": 6 }, { "from_id": 9, "to_id": 1, "distance": 7 }, { "from_id": 9, "to_id": 2, "distance": 5 }, { "from_id": 9, "to_id": 3, "distance": 6 }, { "from_id": 9, "to_id": 4, "distance": 5 }, { "from_id": 9, "to_id": 5, "distance": 4 }, { "from_id": 9, "to_id": 6, "distance": 5 }, { "from_id": 9, "to_id": 7, "distance": 2 }, { "from_id": 9, "to_id": 8, "distance": 2 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 1 }, { "from_id": "F1", "to_id": "F3", "flow": 0 }, { "from_id": "F1", "to_id": "F4", "flow": 2 }, { "from_id": "F1", "to_id": "F5", "flow": 2 }, { "from_id": "F1", "to_id": "F6", "flow": 5 }, { "from_id": "F1", "to_id": "F7", "flow": 0 }, { "from_id": "F1", "to_id": "F8", "flow": 2 }, { "from_id": "F1", "to_id": "F9", "flow": 6 }, { "from_id": "F1", "to_id": "F10", "flow": 2 }, { "from_id": "F2", "to_id": "F1", "flow": 1 }, { "from_id": "F2", "to_id": "F3", "flow": 0 }, { "from_id": "F2", "to_id": "F4", "flow": 4 }, { "from_id": "F2", "to_id": "F5", "flow": 0 }, { "from_id": "F2", "to_id": "F6", "flow": 2 }, { "from_id": "F2", "to_id": "F7", "flow": 2 }, { "from_id": "F2", "to_id": "F8", "flow": 5 }, { "from_id": "F2", "to_id": "F9", "flow": 2 }, { "from_id": "F2", "to_id": "F10", "flow": 0 }, { "from_id": "F3", "to_id": "F1", "flow": 0 }, { "from_id": "F3", "to_id": "F2", "flow": 0 }, { "from_id": "F3", "to_id": "F4", "flow": 3 }, { "from_id": "F3", "to_id": "F5", "flow": 1 }, { "from_id": "F3", "to_id": "F6", "flow": 10 }, { "from_id": "F3", "to_id": "F7", "flow": 5 }, { "from_id": "F3", "to_id": "F8", "flow": 0 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F3", "to_id": "F10", "flow": 0 }, { "from_id": "F4", "to_id": "F1", "flow": 2 }, { "from_id": "F4", "to_id": "F2", "flow": 4 }, { "from_id": "F4", "to_id": "F3", "flow": 3 }, { "from_id": "F4", "to_id": "F5", "flow": 0 }, { "from_id": "F4", "to_id": "F6", "flow": 1 }, { "from_id": "F4", "to_id": "F7", "flow": 1 }, { "from_id": "F4", "to_id": "F8", "flow": 10 }, { "from_id": "F4", "to_id": "F9", "flow": 5 }, { "from_id": "F4", "to_id": "F10", "flow": 10 }, { "from_id": "F5", "to_id": "F1", "flow": 2 }, { "from_id": "F5", "to_id": "F2", "flow": 0 }, { "from_id": "F5", "to_id": "F3", "flow": 1 }, { "from_id": "F5", "to_id": "F4", "flow": 0 }, { "from_id": "F5", "to_id": "F6", "flow": 2 }, { "from_id": "F5", "to_id": "F7", "flow": 10 }, { "from_id": "F5", "to_id": "F8", "flow": 4 }, { "from_id": "F5", "to_id": "F9", "flow": 5 }, { "from_id": "F5", "to_id": "F10", "flow": 2 }, { "from_id": "F6", "to_id": "F1", "flow": 5 }, { "from_id": "F6", "to_id": "F2", "flow": 2 }, { "from_id": "F6", "to_id": "F3", "flow": 10 }, { "from_id": "F6", "to_id": "F4", "flow": 1 }, { "from_id": "F6", "to_id": "F5", "flow": 2 }, { "from_id": "F6", "to_id": "F7", "flow": 2 }, { "from_id": "F6", "to_id": "F8", "flow": 5 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F10", "flow": 10 }, { "from_id": "F7", "to_id": "F1", "flow": 0 }, { "from_id": "F7", "to_id": "F2", "flow": 2 }, { "from_id": "F7", "to_id": "F3", "flow": 5 }, { "from_id": "F7", "to_id": "F4", "flow": 1 }, { "from_id": "F7", "to_id": "F5", "flow": 10 }, { "from_id": "F7", "to_id": "F6", "flow": 2 }, { "from_id": "F7", "to_id": "F8", "flow": 10 }, { "from_id": "F7", "to_id": "F9", "flow": 5 }, { "from_id": "F7", "to_id": "F10", "flow": 1 }, { "from_id": "F8", "to_id": "F1", "flow": 2 }, { "from_id": "F8", "to_id": "F2", "flow": 5 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 10 }, { "from_id": "F8", "to_id": "F5", "flow": 4 }, { "from_id": "F8", "to_id": "F6", "flow": 5 }, { "from_id": "F8", "to_id": "F7", "flow": 10 }, { "from_id": "F8", "to_id": "F9", "flow": 0 }, { "from_id": "F8", "to_id": "F10", "flow": 2 }, { "from_id": "F9", "to_id": "F1", "flow": 6 }, { "from_id": "F9", "to_id": "F2", "flow": 2 }, { "from_id": "F9", "to_id": "F3", "flow": 0 }, { "from_id": "F9", "to_id": "F4", "flow": 5 }, { "from_id": "F9", "to_id": "F5", "flow": 5 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 5 }, { "from_id": "F9", "to_id": "F8", "flow": 0 }, { "from_id": "F9", "to_id": "F10", "flow": 10 }, { "from_id": "F10", "to_id": "F1", "flow": 2 }, { "from_id": "F10", "to_id": "F2", "flow": 0 }, { "from_id": "F10", "to_id": "F3", "flow": 0 }, { "from_id": "F10", "to_id": "F4", "flow": 10 }, { "from_id": "F10", "to_id": "F5", "flow": 2 }, { "from_id": "F10", "to_id": "F6", "flow": 10 }, { "from_id": "F10", "to_id": "F7", "flow": 1 }, { "from_id": "F10", "to_id": "F8", "flow": 2 }, { "from_id": "F10", "to_id": "F9", "flow": 10 } ] }, "solution_variant": [ 8, 0, 1, 5, 6, 4, 3, 2, 9, 7 ], "context_index": 38, "input_format": "markdown_table", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Many people are involved in deciding which team goes where, but the rule is clear: each department gets its own office and every office gets one department. To judge any arrangement, take every pair of departments, multiply their interaction level by the distance between their offices, add up all those products, and favor the arrangement with the lowest total. The exact layout and interaction data are provided below.\n\nThere are 12 departments and offices; the departments are F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12 and the offices are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.\nDistance between offices 0 and 1: 4.\nDistance between offices 0 and 2: 5.\nDistance between offices 0 and 3: 6.\nDistance between offices 0 and 4: 8.\nDistance between offices 0 and 5: 9.\nDistance between offices 0 and 6: 1.\nDistance between offices 0 and 7: 2.\nDistance between offices 0 and 8: 3.\nDistance between offices 0 and 9: 7.\nDistance between offices 0 and 10: 9.\nDistance between offices 0 and 11: 10.\nDistance between offices 1 and 0: 4.\nDistance between offices 1 and 2: 1.\nDistance between offices 1 and 3: 2.\nDistance between offices 1 and 4: 4.\nDistance between offices 1 and 5: 5.\nDistance between offices 1 and 6: 5.\nDistance between offices 1 and 7: 4.\nDistance between offices 1 and 8: 3.\nDistance between offices 1 and 9: 3.\nDistance between offices 1 and 10: 5.\nDistance between offices 1 and 11: 6.\nDistance between offices 2 and 0: 5.\nDistance between offices 2 and 1: 1.\nDistance between offices 2 and 3: 1.\nDistance between offices 2 and 4: 3.\nDistance between offices 2 and 5: 4.\nDistance between offices 2 and 6: 6.\nDistance between offices 2 and 7: 5.\nDistance between offices 2 and 8: 4.\nDistance between offices 2 and 9: 2.\nDistance between offices 2 and 10: 4.\nDistance between offices 2 and 11: 5.\nDistance between offices 3 and 0: 6.\nDistance between offices 3 and 1: 2.\nDistance between offices 3 and 2: 1.\nDistance between offices 3 and 4: 2.\nDistance between offices 3 and 5: 3.\nDistance between offices 3 and 6: 7.\nDistance between offices 3 and 7: 6.\nDistance between offices 3 and 8: 5.\nDistance between offices 3 and 9: 1.\nDistance between offices 3 and 10: 3.\nDistance between offices 3 and 11: 4.\nDistance between offices 4 and 0: 8.\nDistance between offices 4 and 1: 4.\nDistance between offices 4 and 2: 3.\nDistance between offices 4 and 3: 2.\nDistance between offices 4 and 5: 1.\nDistance between offices 4 and 6: 9.\nDistance between offices 4 and 7: 8.\nDistance between offices 4 and 8: 7.\nDistance between offices 4 and 9: 3.\nDistance between offices 4 and 10: 1.\nDistance between offices 4 and 11: 2.\nDistance between offices 5 and 0: 9.\nDistance between offices 5 and 1: 5.\nDistance between offices 5 and 2: 4.\nDistance between offices 5 and 3: 3.\nDistance between offices 5 and 4: 1.\nDistance between offices 5 and 6: 10.\nDistance between offices 5 and 7: 9.\nDistance between offices 5 and 8: 8.\nDistance between offices 5 and 9: 4.\nDistance between offices 5 and 10: 2.\nDistance between offices 5 and 11: 1.\nDistance between offices 6 and 0: 1.\nDistance between offices 6 and 1: 5.\nDistance between offices 6 and 2: 6.\nDistance between offices 6 and 3: 7.\nDistance between offices 6 and 4: 9.\nDistance between offices 6 and 5: 10.\nDistance between offices 6 and 7: 1.\nDistance between offices 6 and 8: 2.\nDistance between offices 6 and 9: 6.\nDistance between offices 6 and 10: 8.\nDistance between offices 6 and 11: 9.\nDistance between offices 7 and 0: 2.\nDistance between offices 7 and 1: 4.\nDistance between offices 7 and 2: 5.\nDistance between offices 7 and 3: 6.\nDistance between offices 7 and 4: 8.\nDistance between offices 7 and 5: 9.\nDistance between offices 7 and 6: 1.\nDistance between offices 7 and 8: 1.\nDistance between offices 7 and 9: 5.\nDistance between offices 7 and 10: 7.\nDistance between offices 7 and 11: 8.\nDistance between offices 8 and 0: 3.\nDistance between offices 8 and 1: 3.\nDistance between offices 8 and 2: 4.\nDistance between offices 8 and 3: 5.\nDistance between offices 8 and 4: 7.\nDistance between offices 8 and 5: 8.\nDistance between offices 8 and 6: 2.\nDistance between offices 8 and 7: 1.\nDistance between offices 8 and 9: 4.\nDistance between offices 8 and 10: 6.\nDistance between offices 8 and 11: 7.\nDistance between offices 9 and 0: 7.\nDistance between offices 9 and 1: 3.\nDistance between offices 9 and 2: 2.\nDistance between offices 9 and 3: 1.\nDistance between offices 9 and 4: 3.\nDistance between offices 9 and 5: 4.\nDistance between offices 9 and 6: 6.\nDistance between offices 9 and 7: 5.\nDistance between offices 9 and 8: 4.\nDistance between offices 9 and 10: 2.\nDistance between offices 9 and 11: 3.\nDistance between offices 10 and 0: 9.\nDistance between offices 10 and 1: 5.\nDistance between offices 10 and 2: 4.\nDistance between offices 10 and 3: 3.\nDistance between offices 10 and 4: 1.\nDistance between offices 10 and 5: 2.\nDistance between offices 10 and 6: 8.\nDistance between offices 10 and 7: 7.\nDistance between offices 10 and 8: 6.\nDistance between offices 10 and 9: 2.\nDistance between offices 10 and 11: 1.\nDistance between offices 11 and 0: 10.\nDistance between offices 11 and 1: 6.\nDistance between offices 11 and 2: 5.\nDistance between offices 11 and 3: 4.\nDistance between offices 11 and 4: 2.\nDistance between offices 11 and 5: 1.\nDistance between offices 11 and 6: 9.\nDistance between offices 11 and 7: 8.\nDistance between offices 11 and 8: 7.\nDistance between offices 11 and 9: 3.\nDistance between offices 11 and 10: 1.\nInteraction from department F1 to department F2: 0.\nInteraction from department F1 to department F3: 2.\nInteraction from department F1 to department F4: 10.\nInteraction from department F1 to department F5: 0.\nInteraction from department F1 to department F6: 5.\nInteraction from department F1 to department F7: 5.\nInteraction from department F1 to department F8: 0.\nInteraction from department F1 to department F9: 0.\nInteraction from department F1 to department F10: 6.\nInteraction from department F1 to department F11: 0.\nInteraction from department F1 to department F12: 1.\nInteraction from department F2 to department F1: 0.\nInteraction from department F2 to department F3: 5.\nInteraction from department F2 to department F4: 2.\nInteraction from department F2 to department F5: 0.\nInteraction from department F2 to department F6: 0.\nInteraction from department F2 to department F7: 2.\nInteraction from department F2 to department F8: 0.\nInteraction from department F2 to department F9: 0.\nInteraction from department F2 to department F10: 1.\nInteraction from department F2 to department F11: 0.\nInteraction from department F2 to department F12: 2.\nInteraction from department F3 to department F1: 2.\nInteraction from department F3 to department F2: 5.\nInteraction from department F3 to department F4: 1.\nInteraction from department F3 to department F5: 2.\nInteraction from department F3 to department F6: 1.\nInteraction from department F3 to department F7: 10.\nInteraction from department F3 to department F8: 10.\nInteraction from department F3 to department F9: 2.\nInteraction from department F3 to department F10: 5.\nInteraction from department F3 to department F11: 0.\nInteraction from department F3 to department F12: 0.\nInteraction from department F4 to department F1: 10.\nInteraction from department F4 to department F2: 2.\nInteraction from department F4 to department F3: 1.\nInteraction from department F4 to department F5: 10.\nInteraction from department F4 to department F6: 5.\nInteraction from department F4 to department F7: 10.\nInteraction from department F4 to department F8: 6.\nInteraction from department F4 to department F9: 0.\nInteraction from department F4 to department F10: 1.\nInteraction from department F4 to department F11: 1.\nInteraction from department F4 to department F12: 5.\nInteraction from department F5 to department F1: 0.\nInteraction from department F5 to department F2: 0.\nInteraction from department F5 to department F3: 2.\nInteraction from department F5 to department F4: 10.\nInteraction from department F5 to department F6: 10.\nInteraction from department F5 to department F7: 1.\nInteraction from department F5 to department F8: 5.\nInteraction from department F5 to department F9: 2.\nInteraction from department F5 to department F10: 2.\nInteraction from department F5 to department F11: 0.\nInteraction from department F5 to department F12: 4.\nInteraction from department F6 to department F1: 5.\nInteraction from department F6 to department F2: 0.\nInteraction from department F6 to department F3: 1.\nInteraction from department F6 to department F4: 5.\nInteraction from department F6 to department F5: 10.\nInteraction from department F6 to department F7: 5.\nInteraction from department F6 to department F8: 6.\nInteraction from department F6 to department F9: 0.\nInteraction from department F6 to department F10: 0.\nInteraction from department F6 to department F11: 2.\nInteraction from department F6 to department F12: 3.\nInteraction from department F7 to department F1: 5.\nInteraction from department F7 to department F2: 2.\nInteraction from department F7 to department F3: 10.\nInteraction from department F7 to department F4: 10.\nInteraction from department F7 to department F5: 1.\nInteraction from department F7 to department F6: 5.\nInteraction from department F7 to department F8: 5.\nInteraction from department F7 to department F9: 5.\nInteraction from department F7 to department F10: 0.\nInteraction from department F7 to department F11: 2.\nInteraction from department F7 to department F12: 0.\nInteraction from department F8 to department F1: 0.\nInteraction from department F8 to department F2: 0.\nInteraction from department F8 to department F3: 10.\nInteraction from department F8 to department F4: 6.\nInteraction from department F8 to department F5: 5.\nInteraction from department F8 to department F6: 6.\nInteraction from department F8 to department F7: 5.\nInteraction from department F8 to department F9: 2.\nInteraction from department F8 to department F10: 2.\nInteraction from department F8 to department F11: 0.\nInteraction from department F8 to department F12: 6.\nInteraction from department F9 to department F1: 0.\nInteraction from department F9 to department F2: 0.\nInteraction from department F9 to department F3: 2.\nInteraction from department F9 to department F4: 0.\nInteraction from department F9 to department F5: 2.\nInteraction from department F9 to department F6: 0.\nInteraction from department F9 to department F7: 5.\nInteraction from department F9 to department F8: 2.\nInteraction from department F9 to department F10: 5.\nInteraction from department F9 to department F11: 10.\nInteraction from department F9 to department F12: 0.\nInteraction from department F10 to department F1: 6.\nInteraction from department F10 to department F2: 1.\nInteraction from department F10 to department F3: 5.\nInteraction from department F10 to department F4: 1.\nInteraction from department F10 to department F5: 2.\nInteraction from department F10 to department F6: 0.\nInteraction from department F10 to department F7: 0.\nInteraction from department F10 to department F8: 2.\nInteraction from department F10 to department F9: 5.\nInteraction from department F10 to department F11: 1.\nInteraction from department F10 to department F12: 2.\nInteraction from department F11 to department F1: 0.\nInteraction from department F11 to department F2: 0.\nInteraction from department F11 to department F3: 0.\nInteraction from department F11 to department F4: 1.\nInteraction from department F11 to department F5: 0.\nInteraction from department F11 to department F6: 2.\nInteraction from department F11 to department F7: 2.\nInteraction from department F11 to department F8: 0.\nInteraction from department F11 to department F9: 10.\nInteraction from department F11 to department F10: 1.\nInteraction from department F11 to department F12: 5.\nInteraction from department F12 to department F1: 1.\nInteraction from department F12 to department F2: 2.\nInteraction from department F12 to department F3: 0.\nInteraction from department F12 to department F4: 5.\nInteraction from department F12 to department F5: 4.\nInteraction from department F12 to department F6: 3.\nInteraction from department F12 to department F7: 0.\nInteraction from department F12 to department F8: 6.\nInteraction from department F12 to department F9: 0.\nInteraction from department F12 to department F10: 2.\nInteraction from department F12 to department F11: 5.\nUse these measurements to compute each arrangement's total and favor the assignment with the lowest total.\n\nOh, and when you reply, please use this simple JSON layout so it's easy for everyone to read:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of \"solution\" as a list form where the first entry is the office/location you give to the first department, the second entry is the office for the second department, and so on. It's just a plain list — nothing fancy — and it helps keep the assignment neat.\n\nThis JSON is just a sketch of the shape I expect, not the actual assignment. Please make sure to use the exact identifiers from the instance input — don't rename them or invent new labels.\n\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 4, 5, 6, 8, 9, 1, 2, 3, 7, 9, 10 ], [ 4, 0, 1, 2, 4, 5, 5, 4, 3, 3, 5, 6 ], [ 5, 1, 0, 1, 3, 4, 6, 5, 4, 2, 4, 5 ], [ 6, 2, 1, 0, 2, 3, 7, 6, 5, 1, 3, 4 ], [ 8, 4, 3, 2, 0, 1, 9, 8, 7, 3, 1, 2 ], [ 9, 5, 4, 3, 1, 0, 10, 9, 8, 4, 2, 1 ], [ 1, 5, 6, 7, 9, 10, 0, 1, 2, 6, 8, 9 ], [ 2, 4, 5, 6, 8, 9, 1, 0, 1, 5, 7, 8 ], [ 3, 3, 4, 5, 7, 8, 2, 1, 0, 4, 6, 7 ], [ 7, 3, 2, 1, 3, 4, 6, 5, 4, 0, 2, 3 ], [ 9, 5, 4, 3, 1, 2, 8, 7, 6, 2, 0, 1 ], [ 10, 6, 5, 4, 2, 1, 9, 8, 7, 3, 1, 0 ] ], "flow_matrix": [ [ 0, 0, 2, 10, 0, 5, 5, 0, 0, 6, 0, 1 ], [ 0, 0, 5, 2, 0, 0, 2, 0, 0, 1, 0, 2 ], [ 2, 5, 0, 1, 2, 1, 10, 10, 2, 5, 0, 0 ], [ 10, 2, 1, 0, 10, 5, 10, 6, 0, 1, 1, 5 ], [ 0, 0, 2, 10, 0, 10, 1, 5, 2, 2, 0, 4 ], [ 5, 0, 1, 5, 10, 0, 5, 6, 0, 0, 2, 3 ], [ 5, 2, 10, 10, 1, 5, 0, 5, 5, 0, 2, 0 ], [ 0, 0, 10, 6, 5, 6, 5, 0, 2, 2, 0, 6 ], [ 0, 0, 2, 0, 2, 0, 5, 2, 0, 5, 10, 0 ], [ 6, 1, 5, 1, 2, 0, 0, 2, 5, 0, 1, 2 ], [ 0, 0, 0, 1, 0, 2, 2, 0, 10, 1, 0, 5 ], [ 1, 2, 0, 5, 4, 3, 0, 6, 0, 2, 5, 0 ] ], "objective": 1186.0 }, "solution": [ 11, 0, 2, 10, 4, 5, 9, 3, 7, 8, 6, 1 ], "obj": 1186.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 12, "num_locations": 12, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 4 }, { "from_id": 0, "to_id": 2, "distance": 5 }, { "from_id": 0, "to_id": 3, "distance": 6 }, { "from_id": 0, "to_id": 4, "distance": 8 }, { "from_id": 0, "to_id": 5, "distance": 9 }, { "from_id": 0, "to_id": 6, "distance": 1 }, { "from_id": 0, "to_id": 7, "distance": 2 }, { "from_id": 0, "to_id": 8, "distance": 3 }, { "from_id": 0, "to_id": 9, "distance": 7 }, { "from_id": 0, "to_id": 10, "distance": 9 }, { "from_id": 0, "to_id": 11, "distance": 10 }, { "from_id": 1, "to_id": 0, "distance": 4 }, { "from_id": 1, "to_id": 2, "distance": 1 }, { "from_id": 1, "to_id": 3, "distance": 2 }, { "from_id": 1, "to_id": 4, "distance": 4 }, { "from_id": 1, "to_id": 5, "distance": 5 }, { "from_id": 1, "to_id": 6, "distance": 5 }, { "from_id": 1, "to_id": 7, "distance": 4 }, { "from_id": 1, "to_id": 8, "distance": 3 }, { "from_id": 1, "to_id": 9, "distance": 3 }, { "from_id": 1, "to_id": 10, "distance": 5 }, { "from_id": 1, "to_id": 11, "distance": 6 }, { "from_id": 2, "to_id": 0, "distance": 5 }, { "from_id": 2, "to_id": 1, "distance": 1 }, { "from_id": 2, "to_id": 3, "distance": 1 }, { "from_id": 2, "to_id": 4, "distance": 3 }, { "from_id": 2, "to_id": 5, "distance": 4 }, { "from_id": 2, "to_id": 6, "distance": 6 }, { "from_id": 2, "to_id": 7, "distance": 5 }, { "from_id": 2, "to_id": 8, "distance": 4 }, { "from_id": 2, "to_id": 9, "distance": 2 }, { "from_id": 2, "to_id": 10, "distance": 4 }, { "from_id": 2, "to_id": 11, "distance": 5 }, { "from_id": 3, "to_id": 0, "distance": 6 }, { "from_id": 3, "to_id": 1, "distance": 2 }, { "from_id": 3, "to_id": 2, "distance": 1 }, { "from_id": 3, "to_id": 4, "distance": 2 }, { "from_id": 3, "to_id": 5, "distance": 3 }, { "from_id": 3, "to_id": 6, "distance": 7 }, { "from_id": 3, "to_id": 7, "distance": 6 }, { "from_id": 3, "to_id": 8, "distance": 5 }, { "from_id": 3, "to_id": 9, "distance": 1 }, { "from_id": 3, "to_id": 10, "distance": 3 }, { "from_id": 3, "to_id": 11, "distance": 4 }, { "from_id": 4, "to_id": 0, "distance": 8 }, { "from_id": 4, "to_id": 1, "distance": 4 }, { "from_id": 4, "to_id": 2, "distance": 3 }, { "from_id": 4, "to_id": 3, "distance": 2 }, { "from_id": 4, "to_id": 5, "distance": 1 }, { "from_id": 4, "to_id": 6, "distance": 9 }, { "from_id": 4, "to_id": 7, "distance": 8 }, { "from_id": 4, "to_id": 8, "distance": 7 }, { "from_id": 4, "to_id": 9, "distance": 3 }, { "from_id": 4, "to_id": 10, "distance": 1 }, { "from_id": 4, "to_id": 11, "distance": 2 }, { "from_id": 5, "to_id": 0, "distance": 9 }, { "from_id": 5, "to_id": 1, "distance": 5 }, { "from_id": 5, "to_id": 2, "distance": 4 }, { "from_id": 5, "to_id": 3, "distance": 3 }, { "from_id": 5, "to_id": 4, "distance": 1 }, { "from_id": 5, "to_id": 6, "distance": 10 }, { "from_id": 5, "to_id": 7, "distance": 9 }, { "from_id": 5, "to_id": 8, "distance": 8 }, { "from_id": 5, "to_id": 9, "distance": 4 }, { "from_id": 5, "to_id": 10, "distance": 2 }, { "from_id": 5, "to_id": 11, "distance": 1 }, { "from_id": 6, "to_id": 0, "distance": 1 }, { "from_id": 6, "to_id": 1, "distance": 5 }, { "from_id": 6, "to_id": 2, "distance": 6 }, { "from_id": 6, "to_id": 3, "distance": 7 }, { "from_id": 6, "to_id": 4, "distance": 9 }, { "from_id": 6, "to_id": 5, "distance": 10 }, { "from_id": 6, "to_id": 7, "distance": 1 }, { "from_id": 6, "to_id": 8, "distance": 2 }, { "from_id": 6, "to_id": 9, "distance": 6 }, { "from_id": 6, "to_id": 10, "distance": 8 }, { "from_id": 6, "to_id": 11, "distance": 9 }, { "from_id": 7, "to_id": 0, "distance": 2 }, { "from_id": 7, "to_id": 1, "distance": 4 }, { "from_id": 7, "to_id": 2, "distance": 5 }, { "from_id": 7, "to_id": 3, "distance": 6 }, { "from_id": 7, "to_id": 4, "distance": 8 }, { "from_id": 7, "to_id": 5, "distance": 9 }, { "from_id": 7, "to_id": 6, "distance": 1 }, { "from_id": 7, "to_id": 8, "distance": 1 }, { "from_id": 7, "to_id": 9, "distance": 5 }, { "from_id": 7, "to_id": 10, "distance": 7 }, { "from_id": 7, "to_id": 11, "distance": 8 }, { "from_id": 8, "to_id": 0, "distance": 3 }, { "from_id": 8, "to_id": 1, "distance": 3 }, { "from_id": 8, "to_id": 2, "distance": 4 }, { "from_id": 8, "to_id": 3, "distance": 5 }, { "from_id": 8, "to_id": 4, "distance": 7 }, { "from_id": 8, "to_id": 5, "distance": 8 }, { "from_id": 8, "to_id": 6, "distance": 2 }, { "from_id": 8, "to_id": 7, "distance": 1 }, { "from_id": 8, "to_id": 9, "distance": 4 }, { "from_id": 8, "to_id": 10, "distance": 6 }, { "from_id": 8, "to_id": 11, "distance": 7 }, { "from_id": 9, "to_id": 0, "distance": 7 }, { "from_id": 9, "to_id": 1, "distance": 3 }, { "from_id": 9, "to_id": 2, "distance": 2 }, { "from_id": 9, "to_id": 3, "distance": 1 }, { "from_id": 9, "to_id": 4, "distance": 3 }, { "from_id": 9, "to_id": 5, "distance": 4 }, { "from_id": 9, "to_id": 6, "distance": 6 }, { "from_id": 9, "to_id": 7, "distance": 5 }, { "from_id": 9, "to_id": 8, "distance": 4 }, { "from_id": 9, "to_id": 10, "distance": 2 }, { "from_id": 9, "to_id": 11, "distance": 3 }, { "from_id": 10, "to_id": 0, "distance": 9 }, { "from_id": 10, "to_id": 1, "distance": 5 }, { "from_id": 10, "to_id": 2, "distance": 4 }, { "from_id": 10, "to_id": 3, "distance": 3 }, { "from_id": 10, "to_id": 4, "distance": 1 }, { "from_id": 10, "to_id": 5, "distance": 2 }, { "from_id": 10, "to_id": 6, "distance": 8 }, { "from_id": 10, "to_id": 7, "distance": 7 }, { "from_id": 10, "to_id": 8, "distance": 6 }, { "from_id": 10, "to_id": 9, "distance": 2 }, { "from_id": 10, "to_id": 11, "distance": 1 }, { "from_id": 11, "to_id": 0, "distance": 10 }, { "from_id": 11, "to_id": 1, "distance": 6 }, { "from_id": 11, "to_id": 2, "distance": 5 }, { "from_id": 11, "to_id": 3, "distance": 4 }, { "from_id": 11, "to_id": 4, "distance": 2 }, { "from_id": 11, "to_id": 5, "distance": 1 }, { "from_id": 11, "to_id": 6, "distance": 9 }, { "from_id": 11, "to_id": 7, "distance": 8 }, { "from_id": 11, "to_id": 8, "distance": 7 }, { "from_id": 11, "to_id": 9, "distance": 3 }, { "from_id": 11, "to_id": 10, "distance": 1 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 2 }, { "from_id": "F1", "to_id": "F4", "flow": 10 }, { "from_id": "F1", "to_id": "F5", "flow": 0 }, { "from_id": "F1", "to_id": "F6", "flow": 5 }, { "from_id": "F1", "to_id": "F7", "flow": 5 }, { "from_id": "F1", "to_id": "F8", "flow": 0 }, { "from_id": "F1", "to_id": "F9", "flow": 0 }, { "from_id": "F1", "to_id": "F10", "flow": 6 }, { "from_id": "F1", "to_id": "F11", "flow": 0 }, { "from_id": "F1", "to_id": "F12", "flow": 1 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 5 }, { "from_id": "F2", "to_id": "F4", "flow": 2 }, { "from_id": "F2", "to_id": "F5", "flow": 0 }, { "from_id": "F2", "to_id": "F6", "flow": 0 }, { "from_id": "F2", "to_id": "F7", "flow": 2 }, { "from_id": "F2", "to_id": "F8", "flow": 0 }, { "from_id": "F2", "to_id": "F9", "flow": 0 }, { "from_id": "F2", "to_id": "F10", "flow": 1 }, { "from_id": "F2", "to_id": "F11", "flow": 0 }, { "from_id": "F2", "to_id": "F12", "flow": 2 }, { "from_id": "F3", "to_id": "F1", "flow": 2 }, { "from_id": "F3", "to_id": "F2", "flow": 5 }, { "from_id": "F3", "to_id": "F4", "flow": 1 }, { "from_id": "F3", "to_id": "F5", "flow": 2 }, { "from_id": "F3", "to_id": "F6", "flow": 1 }, { "from_id": "F3", "to_id": "F7", "flow": 10 }, { "from_id": "F3", "to_id": "F8", "flow": 10 }, { "from_id": "F3", "to_id": "F9", "flow": 2 }, { "from_id": "F3", "to_id": "F10", "flow": 5 }, { "from_id": "F3", "to_id": "F11", "flow": 0 }, { "from_id": "F3", "to_id": "F12", "flow": 0 }, { "from_id": "F4", "to_id": "F1", "flow": 10 }, { "from_id": "F4", "to_id": "F2", "flow": 2 }, { "from_id": "F4", "to_id": "F3", "flow": 1 }, { "from_id": "F4", "to_id": "F5", "flow": 10 }, { "from_id": "F4", "to_id": "F6", "flow": 5 }, { "from_id": "F4", "to_id": "F7", "flow": 10 }, { "from_id": "F4", "to_id": "F8", "flow": 6 }, { "from_id": "F4", "to_id": "F9", "flow": 0 }, { "from_id": "F4", "to_id": "F10", "flow": 1 }, { "from_id": "F4", "to_id": "F11", "flow": 1 }, { "from_id": "F4", "to_id": "F12", "flow": 5 }, { "from_id": "F5", "to_id": "F1", "flow": 0 }, { "from_id": "F5", "to_id": "F2", "flow": 0 }, { "from_id": "F5", "to_id": "F3", "flow": 2 }, { "from_id": "F5", "to_id": "F4", "flow": 10 }, { "from_id": "F5", "to_id": "F6", "flow": 10 }, { "from_id": "F5", "to_id": "F7", "flow": 1 }, { "from_id": "F5", "to_id": "F8", "flow": 5 }, { "from_id": "F5", "to_id": "F9", "flow": 2 }, { "from_id": "F5", "to_id": "F10", "flow": 2 }, { "from_id": "F5", "to_id": "F11", "flow": 0 }, { "from_id": "F5", "to_id": "F12", "flow": 4 }, { "from_id": "F6", "to_id": "F1", "flow": 5 }, { "from_id": "F6", "to_id": "F2", "flow": 0 }, { "from_id": "F6", "to_id": "F3", "flow": 1 }, { "from_id": "F6", "to_id": "F4", "flow": 5 }, { "from_id": "F6", "to_id": "F5", "flow": 10 }, { "from_id": "F6", "to_id": "F7", "flow": 5 }, { "from_id": "F6", "to_id": "F8", "flow": 6 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F10", "flow": 0 }, { "from_id": "F6", "to_id": "F11", "flow": 2 }, { "from_id": "F6", "to_id": "F12", "flow": 3 }, { "from_id": "F7", "to_id": "F1", "flow": 5 }, { "from_id": "F7", "to_id": "F2", "flow": 2 }, { "from_id": "F7", "to_id": "F3", "flow": 10 }, { "from_id": "F7", "to_id": "F4", "flow": 10 }, { "from_id": "F7", "to_id": "F5", "flow": 1 }, { "from_id": "F7", "to_id": "F6", "flow": 5 }, { "from_id": "F7", "to_id": "F8", "flow": 5 }, { "from_id": "F7", "to_id": "F9", "flow": 5 }, { "from_id": "F7", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F11", "flow": 2 }, { "from_id": "F7", "to_id": "F12", "flow": 0 }, { "from_id": "F8", "to_id": "F1", "flow": 0 }, { "from_id": "F8", "to_id": "F2", "flow": 0 }, { "from_id": "F8", "to_id": "F3", "flow": 10 }, { "from_id": "F8", "to_id": "F4", "flow": 6 }, { "from_id": "F8", "to_id": "F5", "flow": 5 }, { "from_id": "F8", "to_id": "F6", "flow": 6 }, { "from_id": "F8", "to_id": "F7", "flow": 5 }, { "from_id": "F8", "to_id": "F9", "flow": 2 }, { "from_id": "F8", "to_id": "F10", "flow": 2 }, { "from_id": "F8", "to_id": "F11", "flow": 0 }, { "from_id": "F8", "to_id": "F12", "flow": 6 }, { "from_id": "F9", "to_id": "F1", "flow": 0 }, { "from_id": "F9", "to_id": "F2", "flow": 0 }, { "from_id": "F9", "to_id": "F3", "flow": 2 }, { "from_id": "F9", "to_id": "F4", "flow": 0 }, { "from_id": "F9", "to_id": "F5", "flow": 2 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 5 }, { "from_id": "F9", "to_id": "F8", "flow": 2 }, { "from_id": "F9", "to_id": "F10", "flow": 5 }, { "from_id": "F9", "to_id": "F11", "flow": 10 }, { "from_id": "F9", "to_id": "F12", "flow": 0 }, { "from_id": "F10", "to_id": "F1", "flow": 6 }, { "from_id": "F10", "to_id": "F2", "flow": 1 }, { "from_id": "F10", "to_id": "F3", "flow": 5 }, { "from_id": "F10", "to_id": "F4", "flow": 1 }, { "from_id": "F10", "to_id": "F5", "flow": 2 }, { "from_id": "F10", "to_id": "F6", "flow": 0 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 2 }, { "from_id": "F10", "to_id": "F9", "flow": 5 }, { "from_id": "F10", "to_id": "F11", "flow": 1 }, { "from_id": "F10", "to_id": "F12", "flow": 2 }, { "from_id": "F11", "to_id": "F1", "flow": 0 }, { "from_id": "F11", "to_id": "F2", "flow": 0 }, { "from_id": "F11", "to_id": "F3", "flow": 0 }, { "from_id": "F11", "to_id": "F4", "flow": 1 }, { "from_id": "F11", "to_id": "F5", "flow": 0 }, { "from_id": "F11", "to_id": "F6", "flow": 2 }, { "from_id": "F11", "to_id": "F7", "flow": 2 }, { "from_id": "F11", "to_id": "F8", "flow": 0 }, { "from_id": "F11", "to_id": "F9", "flow": 10 }, { "from_id": "F11", "to_id": "F10", "flow": 1 }, { "from_id": "F11", "to_id": "F12", "flow": 5 }, { "from_id": "F12", "to_id": "F1", "flow": 1 }, { "from_id": "F12", "to_id": "F2", "flow": 2 }, { "from_id": "F12", "to_id": "F3", "flow": 0 }, { "from_id": "F12", "to_id": "F4", "flow": 5 }, { "from_id": "F12", "to_id": "F5", "flow": 4 }, { "from_id": "F12", "to_id": "F6", "flow": 3 }, { "from_id": "F12", "to_id": "F7", "flow": 0 }, { "from_id": "F12", "to_id": "F8", "flow": 6 }, { "from_id": "F12", "to_id": "F9", "flow": 0 }, { "from_id": "F12", "to_id": "F10", "flow": 2 }, { "from_id": "F12", "to_id": "F11", "flow": 5 } ] }, "solution_variant": [ 11, 0, 2, 10, 4, 5, 9, 3, 7, 8, 6, 1 ], "context_index": 39, "input_format": "nl", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Late one afternoon the curator sketched a plan: assign every painting to its own panel and use every panel once — no repeats, no omissions. Knowing which pairs of artworks draw visitors together and how far apart panels sit, the curator evaluates a layout by taking each pair’s togetherness count, multiplying it by the distance between their panels, and summing those results for all pairs; the goal is to keep that total visitor circulation cost as low as possible. The exact artwork roster, panel map, viewing-pair numbers and distances are shown below.\n\nThere are 10 artworks and panels — the artworks are F1, F2, F3, F4, F5, F6, F7, F8, F9, F10 and the panels are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10.\n\n| panel_source_id | panel_target_id | walking_distance_between_panels |\n|---|---|---|\n| 1 | 2 | 10 |\n| 1 | 3 | 56 |\n| 1 | 4 | 70 |\n| 1 | 5 | 99 |\n| 1 | 6 | 60 |\n| 1 | 7 | 4 |\n| 1 | 8 | 56 |\n| 1 | 9 | 2 |\n| 1 | 10 | 60 |\n| 2 | 1 | 10 |\n| 2 | 3 | 13 |\n| 2 | 4 | 59 |\n| 2 | 5 | 49 |\n| 2 | 6 | 85 |\n| 2 | 7 | 84 |\n| 2 | 8 | 8 |\n| 2 | 9 | 38 |\n| 2 | 10 | 41 |\n| 3 | 1 | 56 |\n| 3 | 2 | 13 |\n| 3 | 4 | 19 |\n| 3 | 5 | 85 |\n| 3 | 6 | 52 |\n| 3 | 7 | 34 |\n| 3 | 8 | 53 |\n| 3 | 9 | 40 |\n| 3 | 10 | 69 |\n| 4 | 1 | 70 |\n| 4 | 2 | 59 |\n| 4 | 3 | 19 |\n| 4 | 5 | 12 |\n| 4 | 6 | 85 |\n| 4 | 7 | 72 |\n| 4 | 8 | 7 |\n| 4 | 9 | 49 |\n| 4 | 10 | 46 |\n| 5 | 1 | 99 |\n| 5 | 2 | 49 |\n| 5 | 3 | 85 |\n| 5 | 4 | 12 |\n| 5 | 6 | 87 |\n| 5 | 7 | 58 |\n| 5 | 8 | 17 |\n| 5 | 9 | 68 |\n| 5 | 10 | 27 |\n| 6 | 1 | 60 |\n| 6 | 2 | 85 |\n| 6 | 3 | 52 |\n| 6 | 4 | 85 |\n| 6 | 5 | 87 |\n| 6 | 7 | 21 |\n| 6 | 8 | 6 |\n| 6 | 9 | 67 |\n| 6 | 10 | 26 |\n| 7 | 1 | 4 |\n| 7 | 2 | 84 |\n| 7 | 3 | 34 |\n| 7 | 4 | 72 |\n| 7 | 5 | 58 |\n| 7 | 6 | 21 |\n| 7 | 8 | 82 |\n| 7 | 9 | 44 |\n| 7 | 10 | 35 |\n| 8 | 1 | 56 |\n| 8 | 2 | 8 |\n| 8 | 3 | 53 |\n| 8 | 4 | 7 |\n| 8 | 5 | 17 |\n| 8 | 6 | 6 |\n| 8 | 7 | 82 |\n| 8 | 9 | 3 |\n| 8 | 10 | 62 |\n| 9 | 1 | 2 |\n| 9 | 2 | 38 |\n| 9 | 3 | 40 |\n| 9 | 4 | 49 |\n| 9 | 5 | 68 |\n| 9 | 6 | 67 |\n| 9 | 7 | 44 |\n| 9 | 8 | 3 |\n| 9 | 10 | 8 |\n| 10 | 1 | 60 |\n| 10 | 2 | 41 |\n| 10 | 3 | 69 |\n| 10 | 4 | 46 |\n| 10 | 5 | 27 |\n| 10 | 6 | 26 |\n| 10 | 7 | 35 |\n| 10 | 8 | 62 |\n| 10 | 9 | 8 |\n\n| artwork_source_id | artwork_target_id | co_view_count |\n|---|---|---|\n| F1 | F2 | 35 |\n| F1 | F3 | 1 |\n| F1 | F4 | 85 |\n| F1 | F5 | 84 |\n| F1 | F6 | 12 |\n| F1 | F7 | 0 |\n| F1 | F8 | 26 |\n| F1 | F9 | 91 |\n| F1 | F10 | 11 |\n| F2 | F1 | 35 |\n| F2 | F3 | 56 |\n| F2 | F4 | 1 |\n| F2 | F5 | 50 |\n| F2 | F6 | 4 |\n| F2 | F7 | 36 |\n| F2 | F8 | 27 |\n| F2 | F9 | 85 |\n| F2 | F10 | 2 |\n| F3 | F1 | 1 |\n| F3 | F2 | 56 |\n| F3 | F4 | 80 |\n| F3 | F5 | 58 |\n| F3 | F6 | 21 |\n| F3 | F7 | 76 |\n| F3 | F8 | 72 |\n| F3 | F9 | 44 |\n| F3 | F10 | 85 |\n| F4 | F1 | 85 |\n| F4 | F2 | 1 |\n| F4 | F3 | 80 |\n| F4 | F5 | 94 |\n| F4 | F6 | 90 |\n| F4 | F7 | 51 |\n| F4 | F8 | 3 |\n| F4 | F9 | 48 |\n| F4 | F10 | 29 |\n| F5 | F1 | 84 |\n| F5 | F2 | 50 |\n| F5 | F3 | 58 |\n| F5 | F4 | 94 |\n| F5 | F6 | 90 |\n| F5 | F7 | 66 |\n| F5 | F8 | 41 |\n| F5 | F9 | 15 |\n| F5 | F10 | 83 |\n| F6 | F1 | 12 |\n| F6 | F2 | 4 |\n| F6 | F3 | 21 |\n| F6 | F4 | 90 |\n| F6 | F5 | 90 |\n| F6 | F7 | 96 |\n| F6 | F8 | 74 |\n| F6 | F9 | 45 |\n| F6 | F10 | 65 |\n| F7 | F1 | 0 |\n| F7 | F2 | 36 |\n| F7 | F3 | 76 |\n| F7 | F4 | 51 |\n| F7 | F5 | 66 |\n| F7 | F6 | 96 |\n| F7 | F8 | 40 |\n| F7 | F9 | 54 |\n| F7 | F10 | 83 |\n| F8 | F1 | 26 |\n| F8 | F2 | 27 |\n| F8 | F3 | 72 |\n| F8 | F4 | 3 |\n| F8 | F5 | 41 |\n| F8 | F6 | 74 |\n| F8 | F7 | 40 |\n| F8 | F9 | 14 |\n| F8 | F10 | 71 |\n| F9 | F1 | 91 |\n| F9 | F2 | 85 |\n| F9 | F3 | 44 |\n| F9 | F4 | 48 |\n| F9 | F5 | 15 |\n| F9 | F6 | 45 |\n| F9 | F7 | 54 |\n| F9 | F8 | 14 |\n| F9 | F10 | 77 |\n| F10 | F1 | 11 |\n| F10 | F2 | 2 |\n| F10 | F3 | 85 |\n| F10 | F4 | 29 |\n| F10 | F5 | 83 |\n| F10 | F6 | 65 |\n| F10 | F7 | 83 |\n| F10 | F8 | 71 |\n| F10 | F9 | 77 |\n\nThe curator will use these entries to compute the layout’s total visitor circulation cost.\n\nIf you want to hand me a proposed layout, just drop it in a little JSON snippet like this — nothing fancy, just the list of which panel each painting gets:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of that as a simple form: the array under \"solution\" lists panels in order — the first entry is where the first painting goes, the second entry for the second painting, and so on. This sketch just shows the shape I expect; it's not the actual answer.\n\nPlease be sure to use the exact identifiers given in the instance input — don't rename them or invent new ones. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 10, 56, 70, 99, 60, 4, 56, 2, 60 ], [ 10, 0, 13, 59, 49, 85, 84, 8, 38, 41 ], [ 56, 13, 0, 19, 85, 52, 34, 53, 40, 69 ], [ 70, 59, 19, 0, 12, 85, 72, 7, 49, 46 ], [ 99, 49, 85, 12, 0, 87, 58, 17, 68, 27 ], [ 60, 85, 52, 85, 87, 0, 21, 6, 67, 26 ], [ 4, 84, 34, 72, 58, 21, 0, 82, 44, 35 ], [ 56, 8, 53, 7, 17, 6, 82, 0, 3, 62 ], [ 2, 38, 40, 49, 68, 67, 44, 3, 0, 8 ], [ 60, 41, 69, 46, 27, 26, 35, 62, 8, 0 ] ], "flow_matrix": [ [ 0, 35, 1, 85, 84, 12, 0, 26, 91, 11 ], [ 35, 0, 56, 1, 50, 4, 36, 27, 85, 2 ], [ 1, 56, 0, 80, 58, 21, 76, 72, 44, 85 ], [ 85, 1, 80, 0, 94, 90, 51, 3, 48, 29 ], [ 84, 50, 58, 94, 0, 90, 66, 41, 15, 83 ], [ 12, 4, 21, 90, 90, 0, 96, 74, 45, 65 ], [ 0, 36, 76, 51, 66, 96, 0, 40, 54, 83 ], [ 26, 27, 72, 3, 41, 74, 40, 0, 14, 71 ], [ 91, 85, 44, 48, 15, 45, 54, 14, 0, 77 ], [ 11, 2, 85, 29, 83, 65, 83, 71, 77, 0 ] ], "objective": 153238.0 }, "solution": [ 4, 5, 0, 3, 7, 2, 1, 6, 9, 8 ], "obj": 153238.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 10 }, { "from_id": 1, "to_id": 3, "distance": 56 }, { "from_id": 1, "to_id": 4, "distance": 70 }, { "from_id": 1, "to_id": 5, "distance": 99 }, { "from_id": 1, "to_id": 6, "distance": 60 }, { "from_id": 1, "to_id": 7, "distance": 4 }, { "from_id": 1, "to_id": 8, "distance": 56 }, { "from_id": 1, "to_id": 9, "distance": 2 }, { "from_id": 1, "to_id": 10, "distance": 60 }, { "from_id": 2, "to_id": 1, "distance": 10 }, { "from_id": 2, "to_id": 3, "distance": 13 }, { "from_id": 2, "to_id": 4, "distance": 59 }, { "from_id": 2, "to_id": 5, "distance": 49 }, { "from_id": 2, "to_id": 6, "distance": 85 }, { "from_id": 2, "to_id": 7, "distance": 84 }, { "from_id": 2, "to_id": 8, "distance": 8 }, { "from_id": 2, "to_id": 9, "distance": 38 }, { "from_id": 2, "to_id": 10, "distance": 41 }, { "from_id": 3, "to_id": 1, "distance": 56 }, { "from_id": 3, "to_id": 2, "distance": 13 }, { "from_id": 3, "to_id": 4, "distance": 19 }, { "from_id": 3, "to_id": 5, "distance": 85 }, { "from_id": 3, "to_id": 6, "distance": 52 }, { "from_id": 3, "to_id": 7, "distance": 34 }, { "from_id": 3, "to_id": 8, "distance": 53 }, { "from_id": 3, "to_id": 9, "distance": 40 }, { "from_id": 3, "to_id": 10, "distance": 69 }, { "from_id": 4, "to_id": 1, "distance": 70 }, { "from_id": 4, "to_id": 2, "distance": 59 }, { "from_id": 4, "to_id": 3, "distance": 19 }, { "from_id": 4, "to_id": 5, "distance": 12 }, { "from_id": 4, "to_id": 6, "distance": 85 }, { "from_id": 4, "to_id": 7, "distance": 72 }, { "from_id": 4, "to_id": 8, "distance": 7 }, { "from_id": 4, "to_id": 9, "distance": 49 }, { "from_id": 4, "to_id": 10, "distance": 46 }, { "from_id": 5, "to_id": 1, "distance": 99 }, { "from_id": 5, "to_id": 2, "distance": 49 }, { "from_id": 5, "to_id": 3, "distance": 85 }, { "from_id": 5, "to_id": 4, "distance": 12 }, { "from_id": 5, "to_id": 6, "distance": 87 }, { "from_id": 5, "to_id": 7, "distance": 58 }, { "from_id": 5, "to_id": 8, "distance": 17 }, { "from_id": 5, "to_id": 9, "distance": 68 }, { "from_id": 5, "to_id": 10, "distance": 27 }, { "from_id": 6, "to_id": 1, "distance": 60 }, { "from_id": 6, "to_id": 2, "distance": 85 }, { "from_id": 6, "to_id": 3, "distance": 52 }, { "from_id": 6, "to_id": 4, "distance": 85 }, { "from_id": 6, "to_id": 5, "distance": 87 }, { "from_id": 6, "to_id": 7, "distance": 21 }, { "from_id": 6, "to_id": 8, "distance": 6 }, { "from_id": 6, "to_id": 9, "distance": 67 }, { "from_id": 6, "to_id": 10, "distance": 26 }, { "from_id": 7, "to_id": 1, "distance": 4 }, { "from_id": 7, "to_id": 2, "distance": 84 }, { "from_id": 7, "to_id": 3, "distance": 34 }, { "from_id": 7, "to_id": 4, "distance": 72 }, { "from_id": 7, "to_id": 5, "distance": 58 }, { "from_id": 7, "to_id": 6, "distance": 21 }, { "from_id": 7, "to_id": 8, "distance": 82 }, { "from_id": 7, "to_id": 9, "distance": 44 }, { "from_id": 7, "to_id": 10, "distance": 35 }, { "from_id": 8, "to_id": 1, "distance": 56 }, { "from_id": 8, "to_id": 2, "distance": 8 }, { "from_id": 8, "to_id": 3, "distance": 53 }, { "from_id": 8, "to_id": 4, "distance": 7 }, { "from_id": 8, "to_id": 5, "distance": 17 }, { "from_id": 8, "to_id": 6, "distance": 6 }, { "from_id": 8, "to_id": 7, "distance": 82 }, { "from_id": 8, "to_id": 9, "distance": 3 }, { "from_id": 8, "to_id": 10, "distance": 62 }, { "from_id": 9, "to_id": 1, "distance": 2 }, { "from_id": 9, "to_id": 2, "distance": 38 }, { "from_id": 9, "to_id": 3, "distance": 40 }, { "from_id": 9, "to_id": 4, "distance": 49 }, { "from_id": 9, "to_id": 5, "distance": 68 }, { "from_id": 9, "to_id": 6, "distance": 67 }, { "from_id": 9, "to_id": 7, "distance": 44 }, { "from_id": 9, "to_id": 8, "distance": 3 }, { "from_id": 9, "to_id": 10, "distance": 8 }, { "from_id": 10, "to_id": 1, "distance": 60 }, { "from_id": 10, "to_id": 2, "distance": 41 }, { "from_id": 10, "to_id": 3, "distance": 69 }, { "from_id": 10, "to_id": 4, "distance": 46 }, { "from_id": 10, "to_id": 5, "distance": 27 }, { "from_id": 10, "to_id": 6, "distance": 26 }, { "from_id": 10, "to_id": 7, "distance": 35 }, { "from_id": 10, "to_id": 8, "distance": 62 }, { "from_id": 10, "to_id": 9, "distance": 8 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 35 }, { "from_id": "F1", "to_id": "F3", "flow": 1 }, { "from_id": "F1", "to_id": "F4", "flow": 85 }, { "from_id": "F1", "to_id": "F5", "flow": 84 }, { "from_id": "F1", "to_id": "F6", "flow": 12 }, { "from_id": "F1", "to_id": "F7", "flow": 0 }, { "from_id": "F1", "to_id": "F8", "flow": 26 }, { "from_id": "F1", "to_id": "F9", "flow": 91 }, { "from_id": "F1", "to_id": "F10", "flow": 11 }, { "from_id": "F2", "to_id": "F1", "flow": 35 }, { "from_id": "F2", "to_id": "F3", "flow": 56 }, { "from_id": "F2", "to_id": "F4", "flow": 1 }, { "from_id": "F2", "to_id": "F5", "flow": 50 }, { "from_id": "F2", "to_id": "F6", "flow": 4 }, { "from_id": "F2", "to_id": "F7", "flow": 36 }, { "from_id": "F2", "to_id": "F8", "flow": 27 }, { "from_id": "F2", "to_id": "F9", "flow": 85 }, { "from_id": "F2", "to_id": "F10", "flow": 2 }, { "from_id": "F3", "to_id": "F1", "flow": 1 }, { "from_id": "F3", "to_id": "F2", "flow": 56 }, { "from_id": "F3", "to_id": "F4", "flow": 80 }, { "from_id": "F3", "to_id": "F5", "flow": 58 }, { "from_id": "F3", "to_id": "F6", "flow": 21 }, { "from_id": "F3", "to_id": "F7", "flow": 76 }, { "from_id": "F3", "to_id": "F8", "flow": 72 }, { "from_id": "F3", "to_id": "F9", "flow": 44 }, { "from_id": "F3", "to_id": "F10", "flow": 85 }, { "from_id": "F4", "to_id": "F1", "flow": 85 }, { "from_id": "F4", "to_id": "F2", "flow": 1 }, { "from_id": "F4", "to_id": "F3", "flow": 80 }, { "from_id": "F4", "to_id": "F5", "flow": 94 }, { "from_id": "F4", "to_id": "F6", "flow": 90 }, { "from_id": "F4", "to_id": "F7", "flow": 51 }, { "from_id": "F4", "to_id": "F8", "flow": 3 }, { "from_id": "F4", "to_id": "F9", "flow": 48 }, { "from_id": "F4", "to_id": "F10", "flow": 29 }, { "from_id": "F5", "to_id": "F1", "flow": 84 }, { "from_id": "F5", "to_id": "F2", "flow": 50 }, { "from_id": "F5", "to_id": "F3", "flow": 58 }, { "from_id": "F5", "to_id": "F4", "flow": 94 }, { "from_id": "F5", "to_id": "F6", "flow": 90 }, { "from_id": "F5", "to_id": "F7", "flow": 66 }, { "from_id": "F5", "to_id": "F8", "flow": 41 }, { "from_id": "F5", "to_id": "F9", "flow": 15 }, { "from_id": "F5", "to_id": "F10", "flow": 83 }, { "from_id": "F6", "to_id": "F1", "flow": 12 }, { "from_id": "F6", "to_id": "F2", "flow": 4 }, { "from_id": "F6", "to_id": "F3", "flow": 21 }, { "from_id": "F6", "to_id": "F4", "flow": 90 }, { "from_id": "F6", "to_id": "F5", "flow": 90 }, { "from_id": "F6", "to_id": "F7", "flow": 96 }, { "from_id": "F6", "to_id": "F8", "flow": 74 }, { "from_id": "F6", "to_id": "F9", "flow": 45 }, { "from_id": "F6", "to_id": "F10", "flow": 65 }, { "from_id": "F7", "to_id": "F1", "flow": 0 }, { "from_id": "F7", "to_id": "F2", "flow": 36 }, { "from_id": "F7", "to_id": "F3", "flow": 76 }, { "from_id": "F7", "to_id": "F4", "flow": 51 }, { "from_id": "F7", "to_id": "F5", "flow": 66 }, { "from_id": "F7", "to_id": "F6", "flow": 96 }, { "from_id": "F7", "to_id": "F8", "flow": 40 }, { "from_id": "F7", "to_id": "F9", "flow": 54 }, { "from_id": "F7", "to_id": "F10", "flow": 83 }, { "from_id": "F8", "to_id": "F1", "flow": 26 }, { "from_id": "F8", "to_id": "F2", "flow": 27 }, { "from_id": "F8", "to_id": "F3", "flow": 72 }, { "from_id": "F8", "to_id": "F4", "flow": 3 }, { "from_id": "F8", "to_id": "F5", "flow": 41 }, { "from_id": "F8", "to_id": "F6", "flow": 74 }, { "from_id": "F8", "to_id": "F7", "flow": 40 }, { "from_id": "F8", "to_id": "F9", "flow": 14 }, { "from_id": "F8", "to_id": "F10", "flow": 71 }, { "from_id": "F9", "to_id": "F1", "flow": 91 }, { "from_id": "F9", "to_id": "F2", "flow": 85 }, { "from_id": "F9", "to_id": "F3", "flow": 44 }, { "from_id": "F9", "to_id": "F4", "flow": 48 }, { "from_id": "F9", "to_id": "F5", "flow": 15 }, { "from_id": "F9", "to_id": "F6", "flow": 45 }, { "from_id": "F9", "to_id": "F7", "flow": 54 }, { "from_id": "F9", "to_id": "F8", "flow": 14 }, { "from_id": "F9", "to_id": "F10", "flow": 77 }, { "from_id": "F10", "to_id": "F1", "flow": 11 }, { "from_id": "F10", "to_id": "F2", "flow": 2 }, { "from_id": "F10", "to_id": "F3", "flow": 85 }, { "from_id": "F10", "to_id": "F4", "flow": 29 }, { "from_id": "F10", "to_id": "F5", "flow": 83 }, { "from_id": "F10", "to_id": "F6", "flow": 65 }, { "from_id": "F10", "to_id": "F7", "flow": 83 }, { "from_id": "F10", "to_id": "F8", "flow": 71 }, { "from_id": "F10", "to_id": "F9", "flow": 77 } ] }, "solution_variant": [ 5, 6, 1, 4, 8, 3, 2, 7, 10, 9 ], "context_index": 40, "input_format": "markdown_table", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Many people on the floor depend on quick handoffs, so the seating plan must put each team into one cluster and make sure no cluster gets two teams or is left empty. A good seating is one that reduces overall interteam lag, measured by going through every two-team pairing, multiplying how often they interact by how far apart their seats would be, and adding all those products together. The full list of call volumes and desk distances follows below.\n\nThere are 12 teams and clusters; F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12 are the team identifiers and 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 are the cluster identifiers, listed below.\nFrom cluster 1 to cluster 2, the separation distance is 1.\nFrom cluster 1 to cluster 3, the separation distance is 2.\nFrom cluster 1 to cluster 4, the separation distance is 3.\nFrom cluster 1 to cluster 5, the separation distance is 4.\nFrom cluster 1 to cluster 6, the separation distance is 4.\nFrom cluster 1 to cluster 7, the separation distance is 5.\nFrom cluster 1 to cluster 8, the separation distance is 3.\nFrom cluster 1 to cluster 9, the separation distance is 5.\nFrom cluster 1 to cluster 10, the separation distance is 6.\nFrom cluster 1 to cluster 11, the separation distance is 8.\nFrom cluster 1 to cluster 12, the separation distance is 9.\nFrom cluster 2 to cluster 1, the separation distance is 1.\nFrom cluster 2 to cluster 3, the separation distance is 1.\nFrom cluster 2 to cluster 4, the separation distance is 2.\nFrom cluster 2 to cluster 5, the separation distance is 3.\nFrom cluster 2 to cluster 6, the separation distance is 3.\nFrom cluster 2 to cluster 7, the separation distance is 4.\nFrom cluster 2 to cluster 8, the separation distance is 2.\nFrom cluster 2 to cluster 9, the separation distance is 4.\nFrom cluster 2 to cluster 10, the separation distance is 5.\nFrom cluster 2 to cluster 11, the separation distance is 7.\nFrom cluster 2 to cluster 12, the separation distance is 8.\nFrom cluster 3 to cluster 1, the separation distance is 2.\nFrom cluster 3 to cluster 2, the separation distance is 1.\nFrom cluster 3 to cluster 4, the separation distance is 1.\nFrom cluster 3 to cluster 5, the separation distance is 2.\nFrom cluster 3 to cluster 6, the separation distance is 2.\nFrom cluster 3 to cluster 7, the separation distance is 3.\nFrom cluster 3 to cluster 8, the separation distance is 1.\nFrom cluster 3 to cluster 9, the separation distance is 3.\nFrom cluster 3 to cluster 10, the separation distance is 4.\nFrom cluster 3 to cluster 11, the separation distance is 6.\nFrom cluster 3 to cluster 12, the separation distance is 7.\nFrom cluster 4 to cluster 1, the separation distance is 3.\nFrom cluster 4 to cluster 2, the separation distance is 2.\nFrom cluster 4 to cluster 3, the separation distance is 1.\nFrom cluster 4 to cluster 5, the separation distance is 1.\nFrom cluster 4 to cluster 6, the separation distance is 1.\nFrom cluster 4 to cluster 7, the separation distance is 2.\nFrom cluster 4 to cluster 8, the separation distance is 2.\nFrom cluster 4 to cluster 9, the separation distance is 2.\nFrom cluster 4 to cluster 10, the separation distance is 3.\nFrom cluster 4 to cluster 11, the separation distance is 5.\nFrom cluster 4 to cluster 12, the separation distance is 6.\nFrom cluster 5 to cluster 1, the separation distance is 4.\nFrom cluster 5 to cluster 2, the separation distance is 3.\nFrom cluster 5 to cluster 3, the separation distance is 2.\nFrom cluster 5 to cluster 4, the separation distance is 1.\nFrom cluster 5 to cluster 6, the separation distance is 2.\nFrom cluster 5 to cluster 7, the separation distance is 3.\nFrom cluster 5 to cluster 8, the separation distance is 3.\nFrom cluster 5 to cluster 9, the separation distance is 1.\nFrom cluster 5 to cluster 10, the separation distance is 2.\nFrom cluster 5 to cluster 11, the separation distance is 4.\nFrom cluster 5 to cluster 12, the separation distance is 5.\nFrom cluster 6 to cluster 1, the separation distance is 4.\nFrom cluster 6 to cluster 2, the separation distance is 3.\nFrom cluster 6 to cluster 3, the separation distance is 2.\nFrom cluster 6 to cluster 4, the separation distance is 1.\nFrom cluster 6 to cluster 5, the separation distance is 2.\nFrom cluster 6 to cluster 7, the separation distance is 1.\nFrom cluster 6 to cluster 8, the separation distance is 3.\nFrom cluster 6 to cluster 9, the separation distance is 1.\nFrom cluster 6 to cluster 10, the separation distance is 2.\nFrom cluster 6 to cluster 11, the separation distance is 4.\nFrom cluster 6 to cluster 12, the separation distance is 5.\nFrom cluster 7 to cluster 1, the separation distance is 5.\nFrom cluster 7 to cluster 2, the separation distance is 4.\nFrom cluster 7 to cluster 3, the separation distance is 3.\nFrom cluster 7 to cluster 4, the separation distance is 2.\nFrom cluster 7 to cluster 5, the separation distance is 3.\nFrom cluster 7 to cluster 6, the separation distance is 1.\nFrom cluster 7 to cluster 8, the separation distance is 4.\nFrom cluster 7 to cluster 9, the separation distance is 2.\nFrom cluster 7 to cluster 10, the separation distance is 1.\nFrom cluster 7 to cluster 11, the separation distance is 3.\nFrom cluster 7 to cluster 12, the separation distance is 4.\nFrom cluster 8 to cluster 1, the separation distance is 3.\nFrom cluster 8 to cluster 2, the separation distance is 2.\nFrom cluster 8 to cluster 3, the separation distance is 1.\nFrom cluster 8 to cluster 4, the separation distance is 2.\nFrom cluster 8 to cluster 5, the separation distance is 3.\nFrom cluster 8 to cluster 6, the separation distance is 3.\nFrom cluster 8 to cluster 7, the separation distance is 4.\nFrom cluster 8 to cluster 9, the separation distance is 4.\nFrom cluster 8 to cluster 10, the separation distance is 5.\nFrom cluster 8 to cluster 11, the separation distance is 7.\nFrom cluster 8 to cluster 12, the separation distance is 8.\nFrom cluster 9 to cluster 1, the separation distance is 5.\nFrom cluster 9 to cluster 2, the separation distance is 4.\nFrom cluster 9 to cluster 3, the separation distance is 3.\nFrom cluster 9 to cluster 4, the separation distance is 2.\nFrom cluster 9 to cluster 5, the separation distance is 1.\nFrom cluster 9 to cluster 6, the separation distance is 1.\nFrom cluster 9 to cluster 7, the separation distance is 2.\nFrom cluster 9 to cluster 8, the separation distance is 4.\nFrom cluster 9 to cluster 10, the separation distance is 1.\nFrom cluster 9 to cluster 11, the separation distance is 3.\nFrom cluster 9 to cluster 12, the separation distance is 4.\nFrom cluster 10 to cluster 1, the separation distance is 6.\nFrom cluster 10 to cluster 2, the separation distance is 5.\nFrom cluster 10 to cluster 3, the separation distance is 4.\nFrom cluster 10 to cluster 4, the separation distance is 3.\nFrom cluster 10 to cluster 5, the separation distance is 2.\nFrom cluster 10 to cluster 6, the separation distance is 2.\nFrom cluster 10 to cluster 7, the separation distance is 1.\nFrom cluster 10 to cluster 8, the separation distance is 5.\nFrom cluster 10 to cluster 9, the separation distance is 1.\nFrom cluster 10 to cluster 11, the separation distance is 2.\nFrom cluster 10 to cluster 12, the separation distance is 3.\nFrom cluster 11 to cluster 1, the separation distance is 8.\nFrom cluster 11 to cluster 2, the separation distance is 7.\nFrom cluster 11 to cluster 3, the separation distance is 6.\nFrom cluster 11 to cluster 4, the separation distance is 5.\nFrom cluster 11 to cluster 5, the separation distance is 4.\nFrom cluster 11 to cluster 6, the separation distance is 4.\nFrom cluster 11 to cluster 7, the separation distance is 3.\nFrom cluster 11 to cluster 8, the separation distance is 7.\nFrom cluster 11 to cluster 9, the separation distance is 3.\nFrom cluster 11 to cluster 10, the separation distance is 2.\nFrom cluster 11 to cluster 12, the separation distance is 1.\nFrom cluster 12 to cluster 1, the separation distance is 9.\nFrom cluster 12 to cluster 2, the separation distance is 8.\nFrom cluster 12 to cluster 3, the separation distance is 7.\nFrom cluster 12 to cluster 4, the separation distance is 6.\nFrom cluster 12 to cluster 5, the separation distance is 5.\nFrom cluster 12 to cluster 6, the separation distance is 5.\nFrom cluster 12 to cluster 7, the separation distance is 4.\nFrom cluster 12 to cluster 8, the separation distance is 8.\nFrom cluster 12 to cluster 9, the separation distance is 4.\nFrom cluster 12 to cluster 10, the separation distance is 3.\nFrom cluster 12 to cluster 11, the separation distance is 1.\nFrom team F1 to team F2, the call volume is 3.\nFrom team F1 to team F3, the call volume is 4.\nFrom team F1 to team F4, the call volume is 8.\nFrom team F1 to team F5, the call volume is 5.\nFrom team F1 to team F6, the call volume is 6.\nFrom team F1 to team F7, the call volume is 6.\nFrom team F1 to team F8, the call volume is 5.\nFrom team F1 to team F9, the call volume is 1.\nFrom team F1 to team F10, the call volume is 4.\nFrom team F1 to team F11, the call volume is 1.\nFrom team F1 to team F12, the call volume is 5.\nFrom team F2 to team F1, the call volume is 3.\nFrom team F2 to team F3, the call volume is 6.\nFrom team F2 to team F4, the call volume is 7.\nFrom team F2 to team F5, the call volume is 9.\nFrom team F2 to team F6, the call volume is 9.\nFrom team F2 to team F7, the call volume is 2.\nFrom team F2 to team F8, the call volume is 2.\nFrom team F2 to team F9, the call volume is 7.\nFrom team F2 to team F10, the call volume is 4.\nFrom team F2 to team F11, the call volume is 9.\nFrom team F2 to team F12, the call volume is 6.\nFrom team F3 to team F1, the call volume is 4.\nFrom team F3 to team F2, the call volume is 6.\nFrom team F3 to team F4, the call volume is 6.\nFrom team F3 to team F5, the call volume is 4.\nFrom team F3 to team F6, the call volume is 4.\nFrom team F3 to team F7, the call volume is 4.\nFrom team F3 to team F8, the call volume is 2.\nFrom team F3 to team F9, the call volume is 6.\nFrom team F3 to team F10, the call volume is 3.\nFrom team F3 to team F11, the call volume is 5.\nFrom team F3 to team F12, the call volume is 6.\nFrom team F4 to team F1, the call volume is 8.\nFrom team F4 to team F2, the call volume is 7.\nFrom team F4 to team F3, the call volume is 6.\nFrom team F4 to team F5, the call volume is 4.\nFrom team F4 to team F6, the call volume is 3.\nFrom team F4 to team F7, the call volume is 4.\nFrom team F4 to team F8, the call volume is 5.\nFrom team F4 to team F9, the call volume is 7.\nFrom team F4 to team F10, the call volume is 6.\nFrom team F4 to team F11, the call volume is 7.\nFrom team F4 to team F12, the call volume is 3.\nFrom team F5 to team F1, the call volume is 5.\nFrom team F5 to team F2, the call volume is 9.\nFrom team F5 to team F3, the call volume is 4.\nFrom team F5 to team F4, the call volume is 4.\nFrom team F5 to team F6, the call volume is 8.\nFrom team F5 to team F7, the call volume is 5.\nFrom team F5 to team F8, the call volume is 5.\nFrom team F5 to team F9, the call volume is 5.\nFrom team F5 to team F10, the call volume is 7.\nFrom team F5 to team F11, the call volume is 1.\nFrom team F5 to team F12, the call volume is 8.\nFrom team F6 to team F1, the call volume is 6.\nFrom team F6 to team F2, the call volume is 9.\nFrom team F6 to team F3, the call volume is 4.\nFrom team F6 to team F4, the call volume is 3.\nFrom team F6 to team F5, the call volume is 8.\nFrom team F6 to team F7, the call volume is 6.\nFrom team F6 to team F8, the call volume is 8.\nFrom team F6 to team F9, the call volume is 4.\nFrom team F6 to team F10, the call volume is 6.\nFrom team F6 to team F11, the call volume is 1.\nFrom team F6 to team F12, the call volume is 8.\nFrom team F7 to team F1, the call volume is 6.\nFrom team F7 to team F2, the call volume is 2.\nFrom team F7 to team F3, the call volume is 4.\nFrom team F7 to team F4, the call volume is 4.\nFrom team F7 to team F5, the call volume is 5.\nFrom team F7 to team F6, the call volume is 6.\nFrom team F7 to team F8, the call volume is 1.\nFrom team F7 to team F9, the call volume is 5.\nFrom team F7 to team F10, the call volume is 5.\nFrom team F7 to team F11, the call volume is 7.\nFrom team F7 to team F12, the call volume is 5.\nFrom team F8 to team F1, the call volume is 5.\nFrom team F8 to team F2, the call volume is 2.\nFrom team F8 to team F3, the call volume is 2.\nFrom team F8 to team F4, the call volume is 5.\nFrom team F8 to team F5, the call volume is 5.\nFrom team F8 to team F6, the call volume is 8.\nFrom team F8 to team F7, the call volume is 1.\nFrom team F8 to team F9, the call volume is 4.\nFrom team F8 to team F10, the call volume is 5.\nFrom team F8 to team F11, the call volume is 4.\nFrom team F8 to team F12, the call volume is 5.\nFrom team F9 to team F1, the call volume is 1.\nFrom team F9 to team F2, the call volume is 7.\nFrom team F9 to team F3, the call volume is 6.\nFrom team F9 to team F4, the call volume is 7.\nFrom team F9 to team F5, the call volume is 5.\nFrom team F9 to team F6, the call volume is 4.\nFrom team F9 to team F7, the call volume is 5.\nFrom team F9 to team F8, the call volume is 4.\nFrom team F9 to team F10, the call volume is 7.\nFrom team F9 to team F11, the call volume is 5.\nFrom team F9 to team F12, the call volume is 6.\nFrom team F10 to team F1, the call volume is 4.\nFrom team F10 to team F2, the call volume is 4.\nFrom team F10 to team F3, the call volume is 3.\nFrom team F10 to team F4, the call volume is 6.\nFrom team F10 to team F5, the call volume is 7.\nFrom team F10 to team F6, the call volume is 6.\nFrom team F10 to team F7, the call volume is 5.\nFrom team F10 to team F8, the call volume is 5.\nFrom team F10 to team F9, the call volume is 7.\nFrom team F10 to team F11, the call volume is 6.\nFrom team F10 to team F12, the call volume is 5.\nFrom team F11 to team F1, the call volume is 1.\nFrom team F11 to team F2, the call volume is 9.\nFrom team F11 to team F3, the call volume is 5.\nFrom team F11 to team F4, the call volume is 7.\nFrom team F11 to team F5, the call volume is 1.\nFrom team F11 to team F6, the call volume is 1.\nFrom team F11 to team F7, the call volume is 7.\nFrom team F11 to team F8, the call volume is 4.\nFrom team F11 to team F9, the call volume is 5.\nFrom team F11 to team F10, the call volume is 6.\nFrom team F11 to team F12, the call volume is 5.\nFrom team F12 to team F1, the call volume is 5.\nFrom team F12 to team F2, the call volume is 6.\nFrom team F12 to team F3, the call volume is 6.\nFrom team F12 to team F4, the call volume is 3.\nFrom team F12 to team F5, the call volume is 8.\nFrom team F12 to team F6, the call volume is 8.\nFrom team F12 to team F7, the call volume is 5.\nFrom team F12 to team F8, the call volume is 5.\nFrom team F12 to team F9, the call volume is 6.\nFrom team F12 to team F10, the call volume is 5.\nFrom team F12 to team F11, the call volume is 5.\nAssign each team to a unique cluster and compute the total interteam lag from these records.\n\nAlso, when you send your seating pick back, just put it in a tiny JSON snippet like this so it's easy to read and plug in:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis \"solution\" array is just the order of seats: the first entry is the seat assigned to the first team, the second entry is the seat for the second team, and so on. Consider it a simple form — a sketch of the shape I need, not the final seating plan itself.\n\nPlease use the exact identifiers shown in the instance input — no renaming, no new labels. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 1, 2, 3, 4, 4, 5, 3, 5, 6, 8, 9 ], [ 1, 0, 1, 2, 3, 3, 4, 2, 4, 5, 7, 8 ], [ 2, 1, 0, 1, 2, 2, 3, 1, 3, 4, 6, 7 ], [ 3, 2, 1, 0, 1, 1, 2, 2, 2, 3, 5, 6 ], [ 4, 3, 2, 1, 0, 2, 3, 3, 1, 2, 4, 5 ], [ 4, 3, 2, 1, 2, 0, 1, 3, 1, 2, 4, 5 ], [ 5, 4, 3, 2, 3, 1, 0, 4, 2, 1, 3, 4 ], [ 3, 2, 1, 2, 3, 3, 4, 0, 4, 5, 7, 8 ], [ 5, 4, 3, 2, 1, 1, 2, 4, 0, 1, 3, 4 ], [ 6, 5, 4, 3, 2, 2, 1, 5, 1, 0, 2, 3 ], [ 8, 7, 6, 5, 4, 4, 3, 7, 3, 2, 0, 1 ], [ 9, 8, 7, 6, 5, 5, 4, 8, 4, 3, 1, 0 ] ], "flow_matrix": [ [ 0, 3, 4, 8, 5, 6, 6, 5, 1, 4, 1, 5 ], [ 3, 0, 6, 7, 9, 9, 2, 2, 7, 4, 9, 6 ], [ 4, 6, 0, 6, 4, 4, 4, 2, 6, 3, 5, 6 ], [ 8, 7, 6, 0, 4, 3, 4, 5, 7, 6, 7, 3 ], [ 5, 9, 4, 4, 0, 8, 5, 5, 5, 7, 1, 8 ], [ 6, 9, 4, 3, 8, 0, 6, 8, 4, 6, 1, 8 ], [ 6, 2, 4, 4, 5, 6, 0, 1, 5, 5, 7, 5 ], [ 5, 2, 2, 5, 5, 8, 1, 0, 4, 5, 4, 5 ], [ 1, 7, 6, 7, 5, 4, 5, 4, 0, 7, 5, 6 ], [ 4, 4, 3, 6, 7, 6, 5, 5, 7, 0, 6, 5 ], [ 1, 9, 5, 7, 1, 1, 7, 4, 5, 6, 0, 5 ], [ 5, 6, 6, 3, 8, 8, 5, 5, 6, 5, 5, 0 ] ], "objective": 2038.0 }, "solution": [ 7, 4, 11, 8, 2, 1, 6, 0, 9, 5, 10, 3 ], "obj": 2038.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 12, "num_locations": 12, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 1 }, { "from_id": 1, "to_id": 3, "distance": 2 }, { "from_id": 1, "to_id": 4, "distance": 3 }, { "from_id": 1, "to_id": 5, "distance": 4 }, { "from_id": 1, "to_id": 6, "distance": 4 }, { "from_id": 1, "to_id": 7, "distance": 5 }, { "from_id": 1, "to_id": 8, "distance": 3 }, { "from_id": 1, "to_id": 9, "distance": 5 }, { "from_id": 1, "to_id": 10, "distance": 6 }, { "from_id": 1, "to_id": 11, "distance": 8 }, { "from_id": 1, "to_id": 12, "distance": 9 }, { "from_id": 2, "to_id": 1, "distance": 1 }, { "from_id": 2, "to_id": 3, "distance": 1 }, { "from_id": 2, "to_id": 4, "distance": 2 }, { "from_id": 2, "to_id": 5, "distance": 3 }, { "from_id": 2, "to_id": 6, "distance": 3 }, { "from_id": 2, "to_id": 7, "distance": 4 }, { "from_id": 2, "to_id": 8, "distance": 2 }, { "from_id": 2, "to_id": 9, "distance": 4 }, { "from_id": 2, "to_id": 10, "distance": 5 }, { "from_id": 2, "to_id": 11, "distance": 7 }, { "from_id": 2, "to_id": 12, "distance": 8 }, { "from_id": 3, "to_id": 1, "distance": 2 }, { "from_id": 3, "to_id": 2, "distance": 1 }, { "from_id": 3, "to_id": 4, "distance": 1 }, { "from_id": 3, "to_id": 5, "distance": 2 }, { "from_id": 3, "to_id": 6, "distance": 2 }, { "from_id": 3, "to_id": 7, "distance": 3 }, { "from_id": 3, "to_id": 8, "distance": 1 }, { "from_id": 3, "to_id": 9, "distance": 3 }, { "from_id": 3, "to_id": 10, "distance": 4 }, { "from_id": 3, "to_id": 11, "distance": 6 }, { "from_id": 3, "to_id": 12, "distance": 7 }, { "from_id": 4, "to_id": 1, "distance": 3 }, { "from_id": 4, "to_id": 2, "distance": 2 }, { "from_id": 4, "to_id": 3, "distance": 1 }, { "from_id": 4, "to_id": 5, "distance": 1 }, { "from_id": 4, "to_id": 6, "distance": 1 }, { "from_id": 4, "to_id": 7, "distance": 2 }, { "from_id": 4, "to_id": 8, "distance": 2 }, { "from_id": 4, "to_id": 9, "distance": 2 }, { "from_id": 4, "to_id": 10, "distance": 3 }, { "from_id": 4, "to_id": 11, "distance": 5 }, { "from_id": 4, "to_id": 12, "distance": 6 }, { "from_id": 5, "to_id": 1, "distance": 4 }, { "from_id": 5, "to_id": 2, "distance": 3 }, { "from_id": 5, "to_id": 3, "distance": 2 }, { "from_id": 5, "to_id": 4, "distance": 1 }, { "from_id": 5, "to_id": 6, "distance": 2 }, { "from_id": 5, "to_id": 7, "distance": 3 }, { "from_id": 5, "to_id": 8, "distance": 3 }, { "from_id": 5, "to_id": 9, "distance": 1 }, { "from_id": 5, "to_id": 10, "distance": 2 }, { "from_id": 5, "to_id": 11, "distance": 4 }, { "from_id": 5, "to_id": 12, "distance": 5 }, { "from_id": 6, "to_id": 1, "distance": 4 }, { "from_id": 6, "to_id": 2, "distance": 3 }, { "from_id": 6, "to_id": 3, "distance": 2 }, { "from_id": 6, "to_id": 4, "distance": 1 }, { "from_id": 6, "to_id": 5, "distance": 2 }, { "from_id": 6, "to_id": 7, "distance": 1 }, { "from_id": 6, "to_id": 8, "distance": 3 }, { "from_id": 6, "to_id": 9, "distance": 1 }, { "from_id": 6, "to_id": 10, "distance": 2 }, { "from_id": 6, "to_id": 11, "distance": 4 }, { "from_id": 6, "to_id": 12, "distance": 5 }, { "from_id": 7, "to_id": 1, "distance": 5 }, { "from_id": 7, "to_id": 2, "distance": 4 }, { "from_id": 7, "to_id": 3, "distance": 3 }, { "from_id": 7, "to_id": 4, "distance": 2 }, { "from_id": 7, "to_id": 5, "distance": 3 }, { "from_id": 7, "to_id": 6, "distance": 1 }, { "from_id": 7, "to_id": 8, "distance": 4 }, { "from_id": 7, "to_id": 9, "distance": 2 }, { "from_id": 7, "to_id": 10, "distance": 1 }, { "from_id": 7, "to_id": 11, "distance": 3 }, { "from_id": 7, "to_id": 12, "distance": 4 }, { "from_id": 8, "to_id": 1, "distance": 3 }, { "from_id": 8, "to_id": 2, "distance": 2 }, { "from_id": 8, "to_id": 3, "distance": 1 }, { "from_id": 8, "to_id": 4, "distance": 2 }, { "from_id": 8, "to_id": 5, "distance": 3 }, { "from_id": 8, "to_id": 6, "distance": 3 }, { "from_id": 8, "to_id": 7, "distance": 4 }, { "from_id": 8, "to_id": 9, "distance": 4 }, { "from_id": 8, "to_id": 10, "distance": 5 }, { "from_id": 8, "to_id": 11, "distance": 7 }, { "from_id": 8, "to_id": 12, "distance": 8 }, { "from_id": 9, "to_id": 1, "distance": 5 }, { "from_id": 9, "to_id": 2, "distance": 4 }, { "from_id": 9, "to_id": 3, "distance": 3 }, { "from_id": 9, "to_id": 4, "distance": 2 }, { "from_id": 9, "to_id": 5, "distance": 1 }, { "from_id": 9, "to_id": 6, "distance": 1 }, { "from_id": 9, "to_id": 7, "distance": 2 }, { "from_id": 9, "to_id": 8, "distance": 4 }, { "from_id": 9, "to_id": 10, "distance": 1 }, { "from_id": 9, "to_id": 11, "distance": 3 }, { "from_id": 9, "to_id": 12, "distance": 4 }, { "from_id": 10, "to_id": 1, "distance": 6 }, { "from_id": 10, "to_id": 2, "distance": 5 }, { "from_id": 10, "to_id": 3, "distance": 4 }, { "from_id": 10, "to_id": 4, "distance": 3 }, { "from_id": 10, "to_id": 5, "distance": 2 }, { "from_id": 10, "to_id": 6, "distance": 2 }, { "from_id": 10, "to_id": 7, "distance": 1 }, { "from_id": 10, "to_id": 8, "distance": 5 }, { "from_id": 10, "to_id": 9, "distance": 1 }, { "from_id": 10, "to_id": 11, "distance": 2 }, { "from_id": 10, "to_id": 12, "distance": 3 }, { "from_id": 11, "to_id": 1, "distance": 8 }, { "from_id": 11, "to_id": 2, "distance": 7 }, { "from_id": 11, "to_id": 3, "distance": 6 }, { "from_id": 11, "to_id": 4, "distance": 5 }, { "from_id": 11, "to_id": 5, "distance": 4 }, { "from_id": 11, "to_id": 6, "distance": 4 }, { "from_id": 11, "to_id": 7, "distance": 3 }, { "from_id": 11, "to_id": 8, "distance": 7 }, { "from_id": 11, "to_id": 9, "distance": 3 }, { "from_id": 11, "to_id": 10, "distance": 2 }, { "from_id": 11, "to_id": 12, "distance": 1 }, { "from_id": 12, "to_id": 1, "distance": 9 }, { "from_id": 12, "to_id": 2, "distance": 8 }, { "from_id": 12, "to_id": 3, "distance": 7 }, { "from_id": 12, "to_id": 4, "distance": 6 }, { "from_id": 12, "to_id": 5, "distance": 5 }, { "from_id": 12, "to_id": 6, "distance": 5 }, { "from_id": 12, "to_id": 7, "distance": 4 }, { "from_id": 12, "to_id": 8, "distance": 8 }, { "from_id": 12, "to_id": 9, "distance": 4 }, { "from_id": 12, "to_id": 10, "distance": 3 }, { "from_id": 12, "to_id": 11, "distance": 1 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 3 }, { "from_id": "F1", "to_id": "F3", "flow": 4 }, { "from_id": "F1", "to_id": "F4", "flow": 8 }, { "from_id": "F1", "to_id": "F5", "flow": 5 }, { "from_id": "F1", "to_id": "F6", "flow": 6 }, { "from_id": "F1", "to_id": "F7", "flow": 6 }, { "from_id": "F1", "to_id": "F8", "flow": 5 }, { "from_id": "F1", "to_id": "F9", "flow": 1 }, { "from_id": "F1", "to_id": "F10", "flow": 4 }, { "from_id": "F1", "to_id": "F11", "flow": 1 }, { "from_id": "F1", "to_id": "F12", "flow": 5 }, { "from_id": "F2", "to_id": "F1", "flow": 3 }, { "from_id": "F2", "to_id": "F3", "flow": 6 }, { "from_id": "F2", "to_id": "F4", "flow": 7 }, { "from_id": "F2", "to_id": "F5", "flow": 9 }, { "from_id": "F2", "to_id": "F6", "flow": 9 }, { "from_id": "F2", "to_id": "F7", "flow": 2 }, { "from_id": "F2", "to_id": "F8", "flow": 2 }, { "from_id": "F2", "to_id": "F9", "flow": 7 }, { "from_id": "F2", "to_id": "F10", "flow": 4 }, { "from_id": "F2", "to_id": "F11", "flow": 9 }, { "from_id": "F2", "to_id": "F12", "flow": 6 }, { "from_id": "F3", "to_id": "F1", "flow": 4 }, { "from_id": "F3", "to_id": "F2", "flow": 6 }, { "from_id": "F3", "to_id": "F4", "flow": 6 }, { "from_id": "F3", "to_id": "F5", "flow": 4 }, { "from_id": "F3", "to_id": "F6", "flow": 4 }, { "from_id": "F3", "to_id": "F7", "flow": 4 }, { "from_id": "F3", "to_id": "F8", "flow": 2 }, { "from_id": "F3", "to_id": "F9", "flow": 6 }, { "from_id": "F3", "to_id": "F10", "flow": 3 }, { "from_id": "F3", "to_id": "F11", "flow": 5 }, { "from_id": "F3", "to_id": "F12", "flow": 6 }, { "from_id": "F4", "to_id": "F1", "flow": 8 }, { "from_id": "F4", "to_id": "F2", "flow": 7 }, { "from_id": "F4", "to_id": "F3", "flow": 6 }, { "from_id": "F4", "to_id": "F5", "flow": 4 }, { "from_id": "F4", "to_id": "F6", "flow": 3 }, { "from_id": "F4", "to_id": "F7", "flow": 4 }, { "from_id": "F4", "to_id": "F8", "flow": 5 }, { "from_id": "F4", "to_id": "F9", "flow": 7 }, { "from_id": "F4", "to_id": "F10", "flow": 6 }, { "from_id": "F4", "to_id": "F11", "flow": 7 }, { "from_id": "F4", "to_id": "F12", "flow": 3 }, { "from_id": "F5", "to_id": "F1", "flow": 5 }, { "from_id": "F5", "to_id": "F2", "flow": 9 }, { "from_id": "F5", "to_id": "F3", "flow": 4 }, { "from_id": "F5", "to_id": "F4", "flow": 4 }, { "from_id": "F5", "to_id": "F6", "flow": 8 }, { "from_id": "F5", "to_id": "F7", "flow": 5 }, { "from_id": "F5", "to_id": "F8", "flow": 5 }, { "from_id": "F5", "to_id": "F9", "flow": 5 }, { "from_id": "F5", "to_id": "F10", "flow": 7 }, { "from_id": "F5", "to_id": "F11", "flow": 1 }, { "from_id": "F5", "to_id": "F12", "flow": 8 }, { "from_id": "F6", "to_id": "F1", "flow": 6 }, { "from_id": "F6", "to_id": "F2", "flow": 9 }, { "from_id": "F6", "to_id": "F3", "flow": 4 }, { "from_id": "F6", "to_id": "F4", "flow": 3 }, { "from_id": "F6", "to_id": "F5", "flow": 8 }, { "from_id": "F6", "to_id": "F7", "flow": 6 }, { "from_id": "F6", "to_id": "F8", "flow": 8 }, { "from_id": "F6", "to_id": "F9", "flow": 4 }, { "from_id": "F6", "to_id": "F10", "flow": 6 }, { "from_id": "F6", "to_id": "F11", "flow": 1 }, { "from_id": "F6", "to_id": "F12", "flow": 8 }, { "from_id": "F7", "to_id": "F1", "flow": 6 }, { "from_id": "F7", "to_id": "F2", "flow": 2 }, { "from_id": "F7", "to_id": "F3", "flow": 4 }, { "from_id": "F7", "to_id": "F4", "flow": 4 }, { "from_id": "F7", "to_id": "F5", "flow": 5 }, { "from_id": "F7", "to_id": "F6", "flow": 6 }, { "from_id": "F7", "to_id": "F8", "flow": 1 }, { "from_id": "F7", "to_id": "F9", "flow": 5 }, { "from_id": "F7", "to_id": "F10", "flow": 5 }, { "from_id": "F7", "to_id": "F11", "flow": 7 }, { "from_id": "F7", "to_id": "F12", "flow": 5 }, { "from_id": "F8", "to_id": "F1", "flow": 5 }, { "from_id": "F8", "to_id": "F2", "flow": 2 }, { "from_id": "F8", "to_id": "F3", "flow": 2 }, { "from_id": "F8", "to_id": "F4", "flow": 5 }, { "from_id": "F8", "to_id": "F5", "flow": 5 }, { "from_id": "F8", "to_id": "F6", "flow": 8 }, { "from_id": "F8", "to_id": "F7", "flow": 1 }, { "from_id": "F8", "to_id": "F9", "flow": 4 }, { "from_id": "F8", "to_id": "F10", "flow": 5 }, { "from_id": "F8", "to_id": "F11", "flow": 4 }, { "from_id": "F8", "to_id": "F12", "flow": 5 }, { "from_id": "F9", "to_id": "F1", "flow": 1 }, { "from_id": "F9", "to_id": "F2", "flow": 7 }, { "from_id": "F9", "to_id": "F3", "flow": 6 }, { "from_id": "F9", "to_id": "F4", "flow": 7 }, { "from_id": "F9", "to_id": "F5", "flow": 5 }, { "from_id": "F9", "to_id": "F6", "flow": 4 }, { "from_id": "F9", "to_id": "F7", "flow": 5 }, { "from_id": "F9", "to_id": "F8", "flow": 4 }, { "from_id": "F9", "to_id": "F10", "flow": 7 }, { "from_id": "F9", "to_id": "F11", "flow": 5 }, { "from_id": "F9", "to_id": "F12", "flow": 6 }, { "from_id": "F10", "to_id": "F1", "flow": 4 }, { "from_id": "F10", "to_id": "F2", "flow": 4 }, { "from_id": "F10", "to_id": "F3", "flow": 3 }, { "from_id": "F10", "to_id": "F4", "flow": 6 }, { "from_id": "F10", "to_id": "F5", "flow": 7 }, { "from_id": "F10", "to_id": "F6", "flow": 6 }, { "from_id": "F10", "to_id": "F7", "flow": 5 }, { "from_id": "F10", "to_id": "F8", "flow": 5 }, { "from_id": "F10", "to_id": "F9", "flow": 7 }, { "from_id": "F10", "to_id": "F11", "flow": 6 }, { "from_id": "F10", "to_id": "F12", "flow": 5 }, { "from_id": "F11", "to_id": "F1", "flow": 1 }, { "from_id": "F11", "to_id": "F2", "flow": 9 }, { "from_id": "F11", "to_id": "F3", "flow": 5 }, { "from_id": "F11", "to_id": "F4", "flow": 7 }, { "from_id": "F11", "to_id": "F5", "flow": 1 }, { "from_id": "F11", "to_id": "F6", "flow": 1 }, { "from_id": "F11", "to_id": "F7", "flow": 7 }, { "from_id": "F11", "to_id": "F8", "flow": 4 }, { "from_id": "F11", "to_id": "F9", "flow": 5 }, { "from_id": "F11", "to_id": "F10", "flow": 6 }, { "from_id": "F11", "to_id": "F12", "flow": 5 }, { "from_id": "F12", "to_id": "F1", "flow": 5 }, { "from_id": "F12", "to_id": "F2", "flow": 6 }, { "from_id": "F12", "to_id": "F3", "flow": 6 }, { "from_id": "F12", "to_id": "F4", "flow": 3 }, { "from_id": "F12", "to_id": "F5", "flow": 8 }, { "from_id": "F12", "to_id": "F6", "flow": 8 }, { "from_id": "F12", "to_id": "F7", "flow": 5 }, { "from_id": "F12", "to_id": "F8", "flow": 5 }, { "from_id": "F12", "to_id": "F9", "flow": 6 }, { "from_id": "F12", "to_id": "F10", "flow": 5 }, { "from_id": "F12", "to_id": "F11", "flow": 5 } ] }, "solution_variant": [ 8, 5, 12, 9, 3, 2, 7, 1, 10, 6, 11, 4 ], "context_index": 41, "input_format": "nl", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "There’s a scheduling puzzle on campus: place each research group into a different building, with no group sharing and no building empty. Each pair of groups has a measure of how often they need to meet, and each pair of buildings has a distance — for any placement, take each group pair’s meeting frequency times the distance between their buildings to get that pair’s travel burden, then add those numbers for every pair to get the total travel burden. A better placement is one that keeps that total burden small, and the full set of collaboration numbers and building distances appears below.\n\nThere are 10 research groups (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10) and the same number of buildings (A, B, C, D, E, F, G, H, I, J).\nDistance from building A to building B is 66.\nDistance from building A to building C is 53.\nDistance from building A to building D is 53.\nDistance from building A to building E is 53.\nDistance from building A to building F is 53.\nDistance from building A to building G is 66.\nDistance from building A to building H is 53.\nDistance from building A to building I is 53.\nDistance from building A to building J is 73.\nDistance from building B to building A is 66.\nDistance from building B to building C is 53.\nDistance from building B to building D is 53.\nDistance from building B to building E is 73.\nDistance from building B to building F is 53.\nDistance from building B to building G is 66.\nDistance from building B to building H is 53.\nDistance from building B to building I is 53.\nDistance from building B to building J is 73.\nDistance from building C to building A is 53.\nDistance from building C to building B is 53.\nDistance from building C to building D is 66.\nDistance from building C to building E is 53.\nDistance from building C to building F is 53.\nDistance from building C to building G is 53.\nDistance from building C to building H is 73.\nDistance from building C to building I is 53.\nDistance from building C to building J is 53.\nDistance from building D to building A is 53.\nDistance from building D to building B is 53.\nDistance from building D to building C is 66.\nDistance from building D to building E is 53.\nDistance from building D to building F is 53.\nDistance from building D to building G is 53.\nDistance from building D to building H is 66.\nDistance from building D to building I is 53.\nDistance from building D to building J is 53.\nDistance from building E to building A is 66.\nDistance from building E to building B is 66.\nDistance from building E to building C is 53.\nDistance from building E to building D is 53.\nDistance from building E to building F is 53.\nDistance from building E to building G is 66.\nDistance from building E to building H is 53.\nDistance from building E to building I is 53.\nDistance from building E to building J is 73.\nDistance from building F to building A is 66.\nDistance from building F to building B is 66.\nDistance from building F to building C is 53.\nDistance from building F to building D is 53.\nDistance from building F to building E is 53.\nDistance from building F to building G is 66.\nDistance from building F to building H is 53.\nDistance from building F to building I is 53.\nDistance from building F to building J is 73.\nDistance from building G to building A is 66.\nDistance from building G to building B is 66.\nDistance from building G to building C is 53.\nDistance from building G to building D is 53.\nDistance from building G to building E is 53.\nDistance from building G to building F is 66.\nDistance from building G to building H is 53.\nDistance from building G to building I is 53.\nDistance from building G to building J is 73.\nDistance from building H to building A is 53.\nDistance from building H to building B is 53.\nDistance from building H to building C is 66.\nDistance from building H to building D is 66.\nDistance from building H to building E is 53.\nDistance from building H to building F is 53.\nDistance from building H to building G is 53.\nDistance from building H to building I is 53.\nDistance from building H to building J is 53.\nDistance from building I to building A is 53.\nDistance from building I to building B is 53.\nDistance from building I to building C is 66.\nDistance from building I to building D is 66.\nDistance from building I to building E is 53.\nDistance from building I to building F is 53.\nDistance from building I to building G is 53.\nDistance from building I to building H is 66.\nDistance from building I to building J is 53.\nDistance from building J to building A is 66.\nDistance from building J to building B is 66.\nDistance from building J to building C is 53.\nDistance from building J to building D is 53.\nDistance from building J to building E is 53.\nDistance from building J to building F is 53.\nDistance from building J to building G is 66.\nDistance from building J to building H is 53.\nDistance from building J to building I is 53.\nCollaboration from group F1 to group F2 has intensity 0.\nCollaboration from group F1 to group F3 has intensity 0.\nCollaboration from group F1 to group F4 has intensity 0.\nCollaboration from group F1 to group F5 has intensity 0.\nCollaboration from group F1 to group F6 has intensity 2.\nCollaboration from group F1 to group F7 has intensity 313.\nCollaboration from group F1 to group F8 has intensity 0.\nCollaboration from group F1 to group F9 has intensity 5.\nCollaboration from group F1 to group F10 has intensity 10.\nCollaboration from group F2 to group F1 has intensity 3.\nCollaboration from group F2 to group F3 has intensity 0.\nCollaboration from group F2 to group F4 has intensity 2151.\nCollaboration from group F2 to group F5 has intensity 2.\nCollaboration from group F2 to group F6 has intensity 2.\nCollaboration from group F2 to group F7 has intensity 470.\nCollaboration from group F2 to group F8 has intensity 3.\nCollaboration from group F2 to group F9 has intensity 5.\nCollaboration from group F2 to group F10 has intensity 200.\nCollaboration from group F3 to group F1 has intensity 17.\nCollaboration from group F3 to group F2 has intensity 5.\nCollaboration from group F3 to group F4 has intensity 61.\nCollaboration from group F3 to group F5 has intensity 21.\nCollaboration from group F3 to group F6 has intensity 20.\nCollaboration from group F3 to group F7 has intensity 134.\nCollaboration from group F3 to group F8 has intensity 3.\nCollaboration from group F3 to group F9 has intensity 234.\nCollaboration from group F3 to group F10 has intensity 127.\nCollaboration from group F4 to group F1 has intensity 3.\nCollaboration from group F4 to group F2 has intensity 0.\nCollaboration from group F4 to group F3 has intensity 0.\nCollaboration from group F4 to group F5 has intensity 8.\nCollaboration from group F4 to group F6 has intensity 18.\nCollaboration from group F4 to group F7 has intensity 623.\nCollaboration from group F4 to group F8 has intensity 0.\nCollaboration from group F4 to group F9 has intensity 1.\nCollaboration from group F4 to group F10 has intensity 789.\nCollaboration from group F5 to group F1 has intensity 55.\nCollaboration from group F5 to group F2 has intensity 1.\nCollaboration from group F5 to group F3 has intensity 17.\nCollaboration from group F5 to group F4 has intensity 6.\nCollaboration from group F5 to group F6 has intensity 7.\nCollaboration from group F5 to group F7 has intensity 481.\nCollaboration from group F5 to group F8 has intensity 93.\nCollaboration from group F5 to group F9 has intensity 140.\nCollaboration from group F5 to group F10 has intensity 69.\nCollaboration from group F6 to group F1 has intensity 116.\nCollaboration from group F6 to group F2 has intensity 146.\nCollaboration from group F6 to group F3 has intensity 1949.\nCollaboration from group F6 to group F4 has intensity 107.\nCollaboration from group F6 to group F5 has intensity 64.\nCollaboration from group F6 to group F7 has intensity 533.\nCollaboration from group F6 to group F8 has intensity 20.\nCollaboration from group F6 to group F9 has intensity 1009.\nCollaboration from group F6 to group F10 has intensity 918.\nCollaboration from group F7 to group F1 has intensity 62.\nCollaboration from group F7 to group F2 has intensity 242.\nCollaboration from group F7 to group F3 has intensity 528.\nCollaboration from group F7 to group F4 has intensity 8.\nCollaboration from group F7 to group F5 has intensity 856.\nCollaboration from group F7 to group F6 has intensity 1867.\nCollaboration from group F7 to group F8 has intensity 955.\nCollaboration from group F7 to group F9 has intensity 237.\nCollaboration from group F7 to group F10 has intensity 615.\nCollaboration from group F8 to group F1 has intensity 13.\nCollaboration from group F8 to group F2 has intensity 4.\nCollaboration from group F8 to group F3 has intensity 55.\nCollaboration from group F8 to group F4 has intensity 33.\nCollaboration from group F8 to group F5 has intensity 13.\nCollaboration from group F8 to group F6 has intensity 19.\nCollaboration from group F8 to group F7 has intensity 334.\nCollaboration from group F8 to group F9 has intensity 56.\nCollaboration from group F8 to group F10 has intensity 80.\nCollaboration from group F9 to group F1 has intensity 70.\nCollaboration from group F9 to group F2 has intensity 1005.\nCollaboration from group F9 to group F3 has intensity 26.\nCollaboration from group F9 to group F4 has intensity 51.\nCollaboration from group F9 to group F5 has intensity 89.\nCollaboration from group F9 to group F6 has intensity 31.\nCollaboration from group F9 to group F7 has intensity 232.\nCollaboration from group F9 to group F8 has intensity 339.\nCollaboration from group F9 to group F10 has intensity 2633.\nCollaboration from group F10 to group F1 has intensity 48.\nCollaboration from group F10 to group F2 has intensity 12.\nCollaboration from group F10 to group F3 has intensity 139.\nCollaboration from group F10 to group F4 has intensity 160.\nCollaboration from group F10 to group F5 has intensity 34.\nCollaboration from group F10 to group F6 has intensity 5.\nCollaboration from group F10 to group F7 has intensity 811.\nCollaboration from group F10 to group F8 has intensity 12.\nCollaboration from group F10 to group F9 has intensity 595.\nUse these records to compute the total travel burden for any placement; a better placement minimizes that burden.\n\nIf you want to send back a placement, just use this simple JSON shape — think of it like a little form that lists which building goes with which group:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis \"solution\" array should be read in order: the first entry is the building assigned to the first research group, the second entry is the building for the second group, and so on. It's just a sketch of the shape I need — replace those placeholders with the actual building identifiers from the instance when you submit the real answer.\n\nPlease use the identifiers exactly as they appear in the instance input — do not rename them or invent new labels. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 53, 66, 53, 53, 53, 53, 66, 53, 53, 73 ], [ 66, 53, 53, 53, 73, 53, 66, 53, 53, 73 ], [ 53, 53, 53, 66, 53, 53, 53, 73, 53, 53 ], [ 53, 53, 66, 53, 53, 53, 53, 66, 53, 53 ], [ 66, 66, 53, 53, 53, 53, 66, 53, 53, 73 ], [ 66, 66, 53, 53, 53, 53, 66, 53, 53, 73 ], [ 66, 66, 53, 53, 53, 66, 53, 53, 53, 73 ], [ 53, 53, 66, 66, 53, 53, 53, 53, 53, 53 ], [ 53, 53, 66, 66, 53, 53, 53, 66, 53, 53 ], [ 66, 66, 53, 53, 53, 53, 66, 53, 53, 53 ] ], "flow_matrix": [ [ 128, 0, 0, 0, 0, 2, 313, 0, 5, 10 ], [ 3, 9, 0, 2151, 2, 2, 470, 3, 5, 200 ], [ 17, 5, 96, 61, 21, 20, 134, 3, 234, 127 ], [ 3, 0, 0, 0, 8, 18, 623, 0, 1, 789 ], [ 55, 1, 17, 6, 224, 7, 481, 93, 140, 69 ], [ 116, 146, 1949, 107, 64, 342, 533, 20, 1009, 918 ], [ 62, 242, 528, 8, 856, 1867, 1969, 955, 237, 615 ], [ 13, 4, 55, 33, 13, 19, 334, 117, 56, 80 ], [ 70, 1005, 26, 51, 89, 31, 232, 339, 400, 2633 ], [ 48, 12, 139, 160, 34, 5, 811, 12, 595, 297 ] ], "objective": 1434303.0 }, "solution": [ 2, 1, 4, 7, 6, 9, 8, 0, 3, 5 ], "obj": 1434303.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 66 }, { "from_id": "A", "to_id": "C", "distance": 53 }, { "from_id": "A", "to_id": "D", "distance": 53 }, { "from_id": "A", "to_id": "E", "distance": 53 }, { "from_id": "A", "to_id": "F", "distance": 53 }, { "from_id": "A", "to_id": "G", "distance": 66 }, { "from_id": "A", "to_id": "H", "distance": 53 }, { "from_id": "A", "to_id": "I", "distance": 53 }, { "from_id": "A", "to_id": "J", "distance": 73 }, { "from_id": "B", "to_id": "A", "distance": 66 }, { "from_id": "B", "to_id": "C", "distance": 53 }, { "from_id": "B", "to_id": "D", "distance": 53 }, { "from_id": "B", "to_id": "E", "distance": 73 }, { "from_id": "B", "to_id": "F", "distance": 53 }, { "from_id": "B", "to_id": "G", "distance": 66 }, { "from_id": "B", "to_id": "H", "distance": 53 }, { "from_id": "B", "to_id": "I", "distance": 53 }, { "from_id": "B", "to_id": "J", "distance": 73 }, { "from_id": "C", "to_id": "A", "distance": 53 }, { "from_id": "C", "to_id": "B", "distance": 53 }, { "from_id": "C", "to_id": "D", "distance": 66 }, { "from_id": "C", "to_id": "E", "distance": 53 }, { "from_id": "C", "to_id": "F", "distance": 53 }, { "from_id": "C", "to_id": "G", "distance": 53 }, { "from_id": "C", "to_id": "H", "distance": 73 }, { "from_id": "C", "to_id": "I", "distance": 53 }, { "from_id": "C", "to_id": "J", "distance": 53 }, { "from_id": "D", "to_id": "A", "distance": 53 }, { "from_id": "D", "to_id": "B", "distance": 53 }, { "from_id": "D", "to_id": "C", "distance": 66 }, { "from_id": "D", "to_id": "E", "distance": 53 }, { "from_id": "D", "to_id": "F", "distance": 53 }, { "from_id": "D", "to_id": "G", "distance": 53 }, { "from_id": "D", "to_id": "H", "distance": 66 }, { "from_id": "D", "to_id": "I", "distance": 53 }, { "from_id": "D", "to_id": "J", "distance": 53 }, { "from_id": "E", "to_id": "A", "distance": 66 }, { "from_id": "E", "to_id": "B", "distance": 66 }, { "from_id": "E", "to_id": "C", "distance": 53 }, { "from_id": "E", "to_id": "D", "distance": 53 }, { "from_id": "E", "to_id": "F", "distance": 53 }, { "from_id": "E", "to_id": "G", "distance": 66 }, { "from_id": "E", "to_id": "H", "distance": 53 }, { "from_id": "E", "to_id": "I", "distance": 53 }, { "from_id": "E", "to_id": "J", "distance": 73 }, { "from_id": "F", "to_id": "A", "distance": 66 }, { "from_id": "F", "to_id": "B", "distance": 66 }, { "from_id": "F", "to_id": "C", "distance": 53 }, { "from_id": "F", "to_id": "D", "distance": 53 }, { "from_id": "F", "to_id": "E", "distance": 53 }, { "from_id": "F", "to_id": "G", "distance": 66 }, { "from_id": "F", "to_id": "H", "distance": 53 }, { "from_id": "F", "to_id": "I", "distance": 53 }, { "from_id": "F", "to_id": "J", "distance": 73 }, { "from_id": "G", "to_id": "A", "distance": 66 }, { "from_id": "G", "to_id": "B", "distance": 66 }, { "from_id": "G", "to_id": "C", "distance": 53 }, { "from_id": "G", "to_id": "D", "distance": 53 }, { "from_id": "G", "to_id": "E", "distance": 53 }, { "from_id": "G", "to_id": "F", "distance": 66 }, { "from_id": "G", "to_id": "H", "distance": 53 }, { "from_id": "G", "to_id": "I", "distance": 53 }, { "from_id": "G", "to_id": "J", "distance": 73 }, { "from_id": "H", "to_id": "A", "distance": 53 }, { "from_id": "H", "to_id": "B", "distance": 53 }, { "from_id": "H", "to_id": "C", "distance": 66 }, { "from_id": "H", "to_id": "D", "distance": 66 }, { "from_id": "H", "to_id": "E", "distance": 53 }, { "from_id": "H", "to_id": "F", "distance": 53 }, { "from_id": "H", "to_id": "G", "distance": 53 }, { "from_id": "H", "to_id": "I", "distance": 53 }, { "from_id": "H", "to_id": "J", "distance": 53 }, { "from_id": "I", "to_id": "A", "distance": 53 }, { "from_id": "I", "to_id": "B", "distance": 53 }, { "from_id": "I", "to_id": "C", "distance": 66 }, { "from_id": "I", "to_id": "D", "distance": 66 }, { "from_id": "I", "to_id": "E", "distance": 53 }, { "from_id": "I", "to_id": "F", "distance": 53 }, { "from_id": "I", "to_id": "G", "distance": 53 }, { "from_id": "I", "to_id": "H", "distance": 66 }, { "from_id": "I", "to_id": "J", "distance": 53 }, { "from_id": "J", "to_id": "A", "distance": 66 }, { "from_id": "J", "to_id": "B", "distance": 66 }, { "from_id": "J", "to_id": "C", "distance": 53 }, { "from_id": "J", "to_id": "D", "distance": 53 }, { "from_id": "J", "to_id": "E", "distance": 53 }, { "from_id": "J", "to_id": "F", "distance": 53 }, { "from_id": "J", "to_id": "G", "distance": 66 }, { "from_id": "J", "to_id": "H", "distance": 53 }, { "from_id": "J", "to_id": "I", "distance": 53 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 0 }, { "from_id": "F1", "to_id": "F4", "flow": 0 }, { "from_id": "F1", "to_id": "F5", "flow": 0 }, { "from_id": "F1", "to_id": "F6", "flow": 2 }, { "from_id": "F1", "to_id": "F7", "flow": 313 }, { "from_id": "F1", "to_id": "F8", "flow": 0 }, { "from_id": "F1", "to_id": "F9", "flow": 5 }, { "from_id": "F1", "to_id": "F10", "flow": 10 }, { "from_id": "F2", "to_id": "F1", "flow": 3 }, { "from_id": "F2", "to_id": "F3", "flow": 0 }, { "from_id": "F2", "to_id": "F4", "flow": 2151 }, { "from_id": "F2", "to_id": "F5", "flow": 2 }, { "from_id": "F2", "to_id": "F6", "flow": 2 }, { "from_id": "F2", "to_id": "F7", "flow": 470 }, { "from_id": "F2", "to_id": "F8", "flow": 3 }, { "from_id": "F2", "to_id": "F9", "flow": 5 }, { "from_id": "F2", "to_id": "F10", "flow": 200 }, { "from_id": "F3", "to_id": "F1", "flow": 17 }, { "from_id": "F3", "to_id": "F2", "flow": 5 }, { "from_id": "F3", "to_id": "F4", "flow": 61 }, { "from_id": "F3", "to_id": "F5", "flow": 21 }, { "from_id": "F3", "to_id": "F6", "flow": 20 }, { "from_id": "F3", "to_id": "F7", "flow": 134 }, { "from_id": "F3", "to_id": "F8", "flow": 3 }, { "from_id": "F3", "to_id": "F9", "flow": 234 }, { "from_id": "F3", "to_id": "F10", "flow": 127 }, { "from_id": "F4", "to_id": "F1", "flow": 3 }, { "from_id": "F4", "to_id": "F2", "flow": 0 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 8 }, { "from_id": "F4", "to_id": "F6", "flow": 18 }, { "from_id": "F4", "to_id": "F7", "flow": 623 }, { "from_id": "F4", "to_id": "F8", "flow": 0 }, { "from_id": "F4", "to_id": "F9", "flow": 1 }, { "from_id": "F4", "to_id": "F10", "flow": 789 }, { "from_id": "F5", "to_id": "F1", "flow": 55 }, { "from_id": "F5", "to_id": "F2", "flow": 1 }, { "from_id": "F5", "to_id": "F3", "flow": 17 }, { "from_id": "F5", "to_id": "F4", "flow": 6 }, { "from_id": "F5", "to_id": "F6", "flow": 7 }, { "from_id": "F5", "to_id": "F7", "flow": 481 }, { "from_id": "F5", "to_id": "F8", "flow": 93 }, { "from_id": "F5", "to_id": "F9", "flow": 140 }, { "from_id": "F5", "to_id": "F10", "flow": 69 }, { "from_id": "F6", "to_id": "F1", "flow": 116 }, { "from_id": "F6", "to_id": "F2", "flow": 146 }, { "from_id": "F6", "to_id": "F3", "flow": 1949 }, { "from_id": "F6", "to_id": "F4", "flow": 107 }, { "from_id": "F6", "to_id": "F5", "flow": 64 }, { "from_id": "F6", "to_id": "F7", "flow": 533 }, { "from_id": "F6", "to_id": "F8", "flow": 20 }, { "from_id": "F6", "to_id": "F9", "flow": 1009 }, { "from_id": "F6", "to_id": "F10", "flow": 918 }, { "from_id": "F7", "to_id": "F1", "flow": 62 }, { "from_id": "F7", "to_id": "F2", "flow": 242 }, { "from_id": "F7", "to_id": "F3", "flow": 528 }, { "from_id": "F7", "to_id": "F4", "flow": 8 }, { "from_id": "F7", "to_id": "F5", "flow": 856 }, { "from_id": "F7", "to_id": "F6", "flow": 1867 }, { "from_id": "F7", "to_id": "F8", "flow": 955 }, { "from_id": "F7", "to_id": "F9", "flow": 237 }, { "from_id": "F7", "to_id": "F10", "flow": 615 }, { "from_id": "F8", "to_id": "F1", "flow": 13 }, { "from_id": "F8", "to_id": "F2", "flow": 4 }, { "from_id": "F8", "to_id": "F3", "flow": 55 }, { "from_id": "F8", "to_id": "F4", "flow": 33 }, { "from_id": "F8", "to_id": "F5", "flow": 13 }, { "from_id": "F8", "to_id": "F6", "flow": 19 }, { "from_id": "F8", "to_id": "F7", "flow": 334 }, { "from_id": "F8", "to_id": "F9", "flow": 56 }, { "from_id": "F8", "to_id": "F10", "flow": 80 }, { "from_id": "F9", "to_id": "F1", "flow": 70 }, { "from_id": "F9", "to_id": "F2", "flow": 1005 }, { "from_id": "F9", "to_id": "F3", "flow": 26 }, { "from_id": "F9", "to_id": "F4", "flow": 51 }, { "from_id": "F9", "to_id": "F5", "flow": 89 }, { "from_id": "F9", "to_id": "F6", "flow": 31 }, { "from_id": "F9", "to_id": "F7", "flow": 232 }, { "from_id": "F9", "to_id": "F8", "flow": 339 }, { "from_id": "F9", "to_id": "F10", "flow": 2633 }, { "from_id": "F10", "to_id": "F1", "flow": 48 }, { "from_id": "F10", "to_id": "F2", "flow": 12 }, { "from_id": "F10", "to_id": "F3", "flow": 139 }, { "from_id": "F10", "to_id": "F4", "flow": 160 }, { "from_id": "F10", "to_id": "F5", "flow": 34 }, { "from_id": "F10", "to_id": "F6", "flow": 5 }, { "from_id": "F10", "to_id": "F7", "flow": 811 }, { "from_id": "F10", "to_id": "F8", "flow": 12 }, { "from_id": "F10", "to_id": "F9", "flow": 595 } ] }, "solution_variant": [ "C", "B", "E", "H", "G", "J", "I", "A", "D", "F" ], "context_index": 42, "input_format": "nl", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "There’s a bit of a puzzle at the airport: assign every check-in team to a unique terminal, with each terminal getting exactly one team, while keeping passenger connections smooth. You can think of the inconvenience as built up from every pair of teams — multiply the count of connecting passengers between that pair by the distance between their assigned terminals, then total all those results to see how much cumulative hassle you’ve caused. The aim is to arrange the teams so that total hassle is as low as possible, and the concrete flow and distance numbers are listed below.\n\nThere are 12 check-in teams (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12) and 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 terminals to assign them to.\n\n| terminal_id_from | terminal_id_to | terminal_distance |\n|---|---|---|\n| 1 | 2 | 1000 |\n| 1 | 3 | 5000 |\n| 1 | 4 | 6000 |\n| 1 | 5 | 7000 |\n| 1 | 6 | 1000 |\n| 1 | 7 | 5099 |\n| 1 | 8 | 6082 |\n| 1 | 9 | 7071 |\n| 1 | 10 | 4472 |\n| 1 | 11 | 7280 |\n| 1 | 12 | 3000 |\n| 2 | 1 | 1000 |\n| 2 | 3 | 4000 |\n| 2 | 4 | 5000 |\n| 2 | 5 | 6000 |\n| 2 | 6 | 1414 |\n| 2 | 7 | 4123 |\n| 2 | 8 | 5099 |\n| 2 | 9 | 6082 |\n| 2 | 10 | 3605 |\n| 2 | 11 | 6324 |\n| 2 | 12 | 3162 |\n| 3 | 1 | 5000 |\n| 3 | 2 | 4000 |\n| 3 | 4 | 1000 |\n| 3 | 5 | 2000 |\n| 3 | 6 | 5099 |\n| 3 | 7 | 1000 |\n| 3 | 8 | 1414 |\n| 3 | 9 | 2236 |\n| 3 | 10 | 2236 |\n| 3 | 11 | 2828 |\n| 3 | 12 | 5830 |\n| 4 | 1 | 6000 |\n| 4 | 2 | 5000 |\n| 4 | 3 | 1000 |\n| 4 | 5 | 1000 |\n| 4 | 6 | 6082 |\n| 4 | 7 | 1414 |\n| 4 | 8 | 1000 |\n| 4 | 9 | 1414 |\n| 4 | 10 | 2828 |\n| 4 | 11 | 2236 |\n| 4 | 12 | 6708 |\n| 5 | 1 | 7000 |\n| 5 | 2 | 6000 |\n| 5 | 3 | 2000 |\n| 5 | 4 | 1000 |\n| 5 | 6 | 7071 |\n| 5 | 7 | 2236 |\n| 5 | 8 | 1414 |\n| 5 | 9 | 1000 |\n| 5 | 10 | 3605 |\n| 5 | 11 | 2000 |\n| 5 | 12 | 7615 |\n| 6 | 1 | 1000 |\n| 6 | 2 | 1414 |\n| 6 | 3 | 5099 |\n| 6 | 4 | 6082 |\n| 6 | 5 | 7071 |\n| 6 | 7 | 5000 |\n| 6 | 8 | 6000 |\n| 6 | 9 | 7000 |\n| 6 | 10 | 4123 |\n| 6 | 11 | 7071 |\n| 6 | 12 | 2000 |\n| 7 | 1 | 5099 |\n| 7 | 2 | 4123 |\n| 7 | 3 | 1000 |\n| 7 | 4 | 1414 |\n| 7 | 5 | 2236 |\n| 7 | 6 | 5000 |\n| 7 | 8 | 1000 |\n| 7 | 9 | 2000 |\n| 7 | 10 | 1414 |\n| 7 | 11 | 2236 |\n| 7 | 12 | 5385 |\n| 8 | 1 | 6082 |\n| 8 | 2 | 5099 |\n| 8 | 3 | 1414 |\n| 8 | 4 | 1000 |\n| 8 | 5 | 1414 |\n| 8 | 6 | 6000 |\n| 8 | 7 | 1000 |\n| 8 | 9 | 1000 |\n| 8 | 10 | 2236 |\n| 8 | 11 | 1414 |\n| 8 | 12 | 6324 |\n| 9 | 1 | 7071 |\n| 9 | 2 | 6082 |\n| 9 | 3 | 2236 |\n| 9 | 4 | 1414 |\n| 9 | 5 | 1000 |\n| 9 | 6 | 7000 |\n| 9 | 7 | 2000 |\n| 9 | 8 | 1000 |\n| 9 | 10 | 3162 |\n| 9 | 11 | 1000 |\n| 9 | 12 | 7280 |\n| 10 | 1 | 4472 |\n| 10 | 2 | 3605 |\n| 10 | 3 | 2236 |\n| 10 | 4 | 2828 |\n| 10 | 5 | 3605 |\n| 10 | 6 | 4123 |\n| 10 | 7 | 1414 |\n| 10 | 8 | 2236 |\n| 10 | 9 | 3162 |\n| 10 | 11 | 3000 |\n| 10 | 12 | 4123 |\n| 11 | 1 | 7280 |\n| 11 | 2 | 6324 |\n| 11 | 3 | 2828 |\n| 11 | 4 | 2236 |\n| 11 | 5 | 2000 |\n| 11 | 6 | 7071 |\n| 11 | 7 | 2236 |\n| 11 | 8 | 1414 |\n| 11 | 9 | 1000 |\n| 11 | 10 | 3000 |\n| 11 | 12 | 7071 |\n| 12 | 1 | 3000 |\n| 12 | 2 | 3162 |\n| 12 | 3 | 5830 |\n| 12 | 4 | 6708 |\n| 12 | 5 | 7615 |\n| 12 | 6 | 2000 |\n| 12 | 7 | 5385 |\n| 12 | 8 | 6324 |\n| 12 | 9 | 7280 |\n| 12 | 10 | 4123 |\n| 12 | 11 | 7071 |\n\n| team_id_from | team_id_to | connecting_passengers |\n|---|---|---|\n| F1 | F2 | 0 |\n| F1 | F3 | 7 |\n| F1 | F4 | 9 |\n| F1 | F5 | 0 |\n| F1 | F6 | 75 |\n| F1 | F7 | 1 |\n| F1 | F8 | 0 |\n| F1 | F9 | 0 |\n| F1 | F10 | 0 |\n| F1 | F11 | 0 |\n| F1 | F12 | 0 |\n| F2 | F1 | 0 |\n| F2 | F3 | 0 |\n| F2 | F4 | 4 |\n| F2 | F5 | 16 |\n| F2 | F6 | 8 |\n| F2 | F7 | 0 |\n| F2 | F8 | 0 |\n| F2 | F9 | 0 |\n| F2 | F10 | 0 |\n| F2 | F11 | 0 |\n| F2 | F12 | 0 |\n| F3 | F1 | 7 |\n| F3 | F2 | 0 |\n| F3 | F4 | 4 |\n| F3 | F5 | 2 |\n| F3 | F6 | 1 |\n| F3 | F7 | 0 |\n| F3 | F8 | 0 |\n| F3 | F9 | 0 |\n| F3 | F10 | 0 |\n| F3 | F11 | 0 |\n| F3 | F12 | 0 |\n| F4 | F1 | 9 |\n| F4 | F2 | 4 |\n| F4 | F3 | 4 |\n| F4 | F5 | 0 |\n| F4 | F6 | 72 |\n| F4 | F7 | 40 |\n| F4 | F8 | 8 |\n| F4 | F9 | 0 |\n| F4 | F10 | 0 |\n| F4 | F11 | 0 |\n| F4 | F12 | 28 |\n| F5 | F1 | 0 |\n| F5 | F2 | 16 |\n| F5 | F3 | 2 |\n| F5 | F4 | 0 |\n| F5 | F6 | 71 |\n| F5 | F7 | 0 |\n| F5 | F8 | 0 |\n| F5 | F9 | 0 |\n| F5 | F10 | 0 |\n| F5 | F11 | 0 |\n| F5 | F12 | 8 |\n| F6 | F1 | 75 |\n| F6 | F2 | 8 |\n| F6 | F3 | 1 |\n| F6 | F4 | 72 |\n| F6 | F5 | 71 |\n| F6 | F7 | 1 |\n| F6 | F8 | 0 |\n| F6 | F9 | 0 |\n| F6 | F10 | 0 |\n| F6 | F11 | 0 |\n| F6 | F12 | 0 |\n| F7 | F1 | 1 |\n| F7 | F2 | 0 |\n| F7 | F3 | 0 |\n| F7 | F4 | 40 |\n| F7 | F5 | 0 |\n| F7 | F6 | 1 |\n| F7 | F8 | 19 |\n| F7 | F9 | 0 |\n| F7 | F10 | 0 |\n| F7 | F11 | 0 |\n| F7 | F12 | 7 |\n| F8 | F1 | 0 |\n| F8 | F2 | 0 |\n| F8 | F3 | 0 |\n| F8 | F4 | 8 |\n| F8 | F5 | 0 |\n| F8 | F6 | 0 |\n| F8 | F7 | 19 |\n| F8 | F9 | 0 |\n| F8 | F10 | 0 |\n| F8 | F11 | 0 |\n| F8 | F12 | 0 |\n| F9 | F1 | 0 |\n| F9 | F2 | 0 |\n| F9 | F3 | 0 |\n| F9 | F4 | 0 |\n| F9 | F5 | 0 |\n| F9 | F6 | 0 |\n| F9 | F7 | 0 |\n| F9 | F8 | 0 |\n| F9 | F10 | 0 |\n| F9 | F11 | 0 |\n| F9 | F12 | 0 |\n| F10 | F1 | 0 |\n| F10 | F2 | 0 |\n| F10 | F3 | 0 |\n| F10 | F4 | 0 |\n| F10 | F5 | 0 |\n| F10 | F6 | 0 |\n| F10 | F7 | 0 |\n| F10 | F8 | 0 |\n| F10 | F9 | 0 |\n| F10 | F11 | 12 |\n| F10 | F12 | 0 |\n| F11 | F1 | 0 |\n| F11 | F2 | 0 |\n| F11 | F3 | 0 |\n| F11 | F4 | 0 |\n| F11 | F5 | 0 |\n| F11 | F6 | 0 |\n| F11 | F7 | 0 |\n| F11 | F8 | 0 |\n| F11 | F9 | 0 |\n| F11 | F10 | 12 |\n| F11 | F12 | 0 |\n| F12 | F1 | 0 |\n| F12 | F2 | 0 |\n| F12 | F3 | 0 |\n| F12 | F4 | 28 |\n| F12 | F5 | 8 |\n| F12 | F6 | 0 |\n| F12 | F7 | 7 |\n| F12 | F8 | 0 |\n| F12 | F9 | 0 |\n| F12 | F10 | 0 |\n| F12 | F11 | 0 |\n\nUse the lists below to compute total hassle and pick the assignment that minimizes it.\n\nOh, and when you send back your choice, just stick to a simple JSON layout like this — a single \"solution\" array that lists, in order, which terminal each check-in team should go to.\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis is just a quick sketch of the shape we want: the \"solution\" array holds one identifier per team, in team order (first team, second team, etc.), and each identifier names the terminal assigned to that team. It’s a template, not the actual assignment.\n\nPlease make sure you use the exact identifiers from the instance input — don’t rename them or invent new labels.\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 1000, 5000, 6000, 7000, 1000, 5099, 6082, 7071, 4472, 7280, 3000 ], [ 1000, 0, 4000, 5000, 6000, 1414, 4123, 5099, 6082, 3605, 6324, 3162 ], [ 5000, 4000, 0, 1000, 2000, 5099, 1000, 1414, 2236, 2236, 2828, 5830 ], [ 6000, 5000, 1000, 0, 1000, 6082, 1414, 1000, 1414, 2828, 2236, 6708 ], [ 7000, 6000, 2000, 1000, 0, 7071, 2236, 1414, 1000, 3605, 2000, 7615 ], [ 1000, 1414, 5099, 6082, 7071, 0, 5000, 6000, 7000, 4123, 7071, 2000 ], [ 5099, 4123, 1000, 1414, 2236, 5000, 0, 1000, 2000, 1414, 2236, 5385 ], [ 6082, 5099, 1414, 1000, 1414, 6000, 1000, 0, 1000, 2236, 1414, 6324 ], [ 7071, 6082, 2236, 1414, 1000, 7000, 2000, 1000, 0, 3162, 1000, 7280 ], [ 4472, 3605, 2236, 2828, 3605, 4123, 1414, 2236, 3162, 0, 3000, 4123 ], [ 7280, 6324, 2828, 2236, 2000, 7071, 2236, 1414, 1000, 3000, 0, 7071 ], [ 3000, 3162, 5830, 6708, 7615, 2000, 5385, 6324, 7280, 4123, 7071, 0 ] ], "flow_matrix": [ [ 0, 0, 7, 9, 0, 75, 1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 4, 16, 8, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0, 4, 2, 1, 0, 0, 0, 0, 0, 0 ], [ 9, 4, 4, 0, 0, 72, 40, 8, 0, 0, 0, 28 ], [ 0, 16, 2, 0, 0, 71, 0, 0, 0, 0, 0, 8 ], [ 75, 8, 1, 72, 71, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 0, 0, 40, 0, 1, 0, 19, 0, 0, 0, 7 ], [ 0, 0, 0, 8, 0, 0, 19, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0 ], [ 0, 0, 0, 28, 8, 0, 7, 0, 0, 0, 0, 0 ] ], "objective": 995692.0 }, "solution": [ 2, 8, 1, 7, 4, 3, 6, 9, 11, 0, 5, 10 ], "obj": 995692.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 12, "num_locations": 12, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 1000 }, { "from_id": 1, "to_id": 3, "distance": 5000 }, { "from_id": 1, "to_id": 4, "distance": 6000 }, { "from_id": 1, "to_id": 5, "distance": 7000 }, { "from_id": 1, "to_id": 6, "distance": 1000 }, { "from_id": 1, "to_id": 7, "distance": 5099 }, { "from_id": 1, "to_id": 8, "distance": 6082 }, { "from_id": 1, "to_id": 9, "distance": 7071 }, { "from_id": 1, "to_id": 10, "distance": 4472 }, { "from_id": 1, "to_id": 11, "distance": 7280 }, { "from_id": 1, "to_id": 12, "distance": 3000 }, { "from_id": 2, "to_id": 1, "distance": 1000 }, { "from_id": 2, "to_id": 3, "distance": 4000 }, { "from_id": 2, "to_id": 4, "distance": 5000 }, { "from_id": 2, "to_id": 5, "distance": 6000 }, { "from_id": 2, "to_id": 6, "distance": 1414 }, { "from_id": 2, "to_id": 7, "distance": 4123 }, { "from_id": 2, "to_id": 8, "distance": 5099 }, { "from_id": 2, "to_id": 9, "distance": 6082 }, { "from_id": 2, "to_id": 10, "distance": 3605 }, { "from_id": 2, "to_id": 11, "distance": 6324 }, { "from_id": 2, "to_id": 12, "distance": 3162 }, { "from_id": 3, "to_id": 1, "distance": 5000 }, { "from_id": 3, "to_id": 2, "distance": 4000 }, { "from_id": 3, "to_id": 4, "distance": 1000 }, { "from_id": 3, "to_id": 5, "distance": 2000 }, { "from_id": 3, "to_id": 6, "distance": 5099 }, { "from_id": 3, "to_id": 7, "distance": 1000 }, { "from_id": 3, "to_id": 8, "distance": 1414 }, { "from_id": 3, "to_id": 9, "distance": 2236 }, { "from_id": 3, "to_id": 10, "distance": 2236 }, { "from_id": 3, "to_id": 11, "distance": 2828 }, { "from_id": 3, "to_id": 12, "distance": 5830 }, { "from_id": 4, "to_id": 1, "distance": 6000 }, { "from_id": 4, "to_id": 2, "distance": 5000 }, { "from_id": 4, "to_id": 3, "distance": 1000 }, { "from_id": 4, "to_id": 5, "distance": 1000 }, { "from_id": 4, "to_id": 6, "distance": 6082 }, { "from_id": 4, "to_id": 7, "distance": 1414 }, { "from_id": 4, "to_id": 8, "distance": 1000 }, { "from_id": 4, "to_id": 9, "distance": 1414 }, { "from_id": 4, "to_id": 10, "distance": 2828 }, { "from_id": 4, "to_id": 11, "distance": 2236 }, { "from_id": 4, "to_id": 12, "distance": 6708 }, { "from_id": 5, "to_id": 1, "distance": 7000 }, { "from_id": 5, "to_id": 2, "distance": 6000 }, { "from_id": 5, "to_id": 3, "distance": 2000 }, { "from_id": 5, "to_id": 4, "distance": 1000 }, { "from_id": 5, "to_id": 6, "distance": 7071 }, { "from_id": 5, "to_id": 7, "distance": 2236 }, { "from_id": 5, "to_id": 8, "distance": 1414 }, { "from_id": 5, "to_id": 9, "distance": 1000 }, { "from_id": 5, "to_id": 10, "distance": 3605 }, { "from_id": 5, "to_id": 11, "distance": 2000 }, { "from_id": 5, "to_id": 12, "distance": 7615 }, { "from_id": 6, "to_id": 1, "distance": 1000 }, { "from_id": 6, "to_id": 2, "distance": 1414 }, { "from_id": 6, "to_id": 3, "distance": 5099 }, { "from_id": 6, "to_id": 4, "distance": 6082 }, { "from_id": 6, "to_id": 5, "distance": 7071 }, { "from_id": 6, "to_id": 7, "distance": 5000 }, { "from_id": 6, "to_id": 8, "distance": 6000 }, { "from_id": 6, "to_id": 9, "distance": 7000 }, { "from_id": 6, "to_id": 10, "distance": 4123 }, { "from_id": 6, "to_id": 11, "distance": 7071 }, { "from_id": 6, "to_id": 12, "distance": 2000 }, { "from_id": 7, "to_id": 1, "distance": 5099 }, { "from_id": 7, "to_id": 2, "distance": 4123 }, { "from_id": 7, "to_id": 3, "distance": 1000 }, { "from_id": 7, "to_id": 4, "distance": 1414 }, { "from_id": 7, "to_id": 5, "distance": 2236 }, { "from_id": 7, "to_id": 6, "distance": 5000 }, { "from_id": 7, "to_id": 8, "distance": 1000 }, { "from_id": 7, "to_id": 9, "distance": 2000 }, { "from_id": 7, "to_id": 10, "distance": 1414 }, { "from_id": 7, "to_id": 11, "distance": 2236 }, { "from_id": 7, "to_id": 12, "distance": 5385 }, { "from_id": 8, "to_id": 1, "distance": 6082 }, { "from_id": 8, "to_id": 2, "distance": 5099 }, { "from_id": 8, "to_id": 3, "distance": 1414 }, { "from_id": 8, "to_id": 4, "distance": 1000 }, { "from_id": 8, "to_id": 5, "distance": 1414 }, { "from_id": 8, "to_id": 6, "distance": 6000 }, { "from_id": 8, "to_id": 7, "distance": 1000 }, { "from_id": 8, "to_id": 9, "distance": 1000 }, { "from_id": 8, "to_id": 10, "distance": 2236 }, { "from_id": 8, "to_id": 11, "distance": 1414 }, { "from_id": 8, "to_id": 12, "distance": 6324 }, { "from_id": 9, "to_id": 1, "distance": 7071 }, { "from_id": 9, "to_id": 2, "distance": 6082 }, { "from_id": 9, "to_id": 3, "distance": 2236 }, { "from_id": 9, "to_id": 4, "distance": 1414 }, { "from_id": 9, "to_id": 5, "distance": 1000 }, { "from_id": 9, "to_id": 6, "distance": 7000 }, { "from_id": 9, "to_id": 7, "distance": 2000 }, { "from_id": 9, "to_id": 8, "distance": 1000 }, { "from_id": 9, "to_id": 10, "distance": 3162 }, { "from_id": 9, "to_id": 11, "distance": 1000 }, { "from_id": 9, "to_id": 12, "distance": 7280 }, { "from_id": 10, "to_id": 1, "distance": 4472 }, { "from_id": 10, "to_id": 2, "distance": 3605 }, { "from_id": 10, "to_id": 3, "distance": 2236 }, { "from_id": 10, "to_id": 4, "distance": 2828 }, { "from_id": 10, "to_id": 5, "distance": 3605 }, { "from_id": 10, "to_id": 6, "distance": 4123 }, { "from_id": 10, "to_id": 7, "distance": 1414 }, { "from_id": 10, "to_id": 8, "distance": 2236 }, { "from_id": 10, "to_id": 9, "distance": 3162 }, { "from_id": 10, "to_id": 11, "distance": 3000 }, { "from_id": 10, "to_id": 12, "distance": 4123 }, { "from_id": 11, "to_id": 1, "distance": 7280 }, { "from_id": 11, "to_id": 2, "distance": 6324 }, { "from_id": 11, "to_id": 3, "distance": 2828 }, { "from_id": 11, "to_id": 4, "distance": 2236 }, { "from_id": 11, "to_id": 5, "distance": 2000 }, { "from_id": 11, "to_id": 6, "distance": 7071 }, { "from_id": 11, "to_id": 7, "distance": 2236 }, { "from_id": 11, "to_id": 8, "distance": 1414 }, { "from_id": 11, "to_id": 9, "distance": 1000 }, { "from_id": 11, "to_id": 10, "distance": 3000 }, { "from_id": 11, "to_id": 12, "distance": 7071 }, { "from_id": 12, "to_id": 1, "distance": 3000 }, { "from_id": 12, "to_id": 2, "distance": 3162 }, { "from_id": 12, "to_id": 3, "distance": 5830 }, { "from_id": 12, "to_id": 4, "distance": 6708 }, { "from_id": 12, "to_id": 5, "distance": 7615 }, { "from_id": 12, "to_id": 6, "distance": 2000 }, { "from_id": 12, "to_id": 7, "distance": 5385 }, { "from_id": 12, "to_id": 8, "distance": 6324 }, { "from_id": 12, "to_id": 9, "distance": 7280 }, { "from_id": 12, "to_id": 10, "distance": 4123 }, { "from_id": 12, "to_id": 11, "distance": 7071 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 7 }, { "from_id": "F1", "to_id": "F4", "flow": 9 }, { "from_id": "F1", "to_id": "F5", "flow": 0 }, { "from_id": "F1", "to_id": "F6", "flow": 75 }, { "from_id": "F1", "to_id": "F7", "flow": 1 }, { "from_id": "F1", "to_id": "F8", "flow": 0 }, { "from_id": "F1", "to_id": "F9", "flow": 0 }, { "from_id": "F1", "to_id": "F10", "flow": 0 }, { "from_id": "F1", "to_id": "F11", "flow": 0 }, { "from_id": "F1", "to_id": "F12", "flow": 0 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 0 }, { "from_id": "F2", "to_id": "F4", "flow": 4 }, { "from_id": "F2", "to_id": "F5", "flow": 16 }, { "from_id": "F2", "to_id": "F6", "flow": 8 }, { "from_id": "F2", "to_id": "F7", "flow": 0 }, { "from_id": "F2", "to_id": "F8", "flow": 0 }, { "from_id": "F2", "to_id": "F9", "flow": 0 }, { "from_id": "F2", "to_id": "F10", "flow": 0 }, { "from_id": "F2", "to_id": "F11", "flow": 0 }, { "from_id": "F2", "to_id": "F12", "flow": 0 }, { "from_id": "F3", "to_id": "F1", "flow": 7 }, { "from_id": "F3", "to_id": "F2", "flow": 0 }, { "from_id": "F3", "to_id": "F4", "flow": 4 }, { "from_id": "F3", "to_id": "F5", "flow": 2 }, { "from_id": "F3", "to_id": "F6", "flow": 1 }, { "from_id": "F3", "to_id": "F7", "flow": 0 }, { "from_id": "F3", "to_id": "F8", "flow": 0 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F3", "to_id": "F10", "flow": 0 }, { "from_id": "F3", "to_id": "F11", "flow": 0 }, { "from_id": "F3", "to_id": "F12", "flow": 0 }, { "from_id": "F4", "to_id": "F1", "flow": 9 }, { "from_id": "F4", "to_id": "F2", "flow": 4 }, { "from_id": "F4", "to_id": "F3", "flow": 4 }, { "from_id": "F4", "to_id": "F5", "flow": 0 }, { "from_id": "F4", "to_id": "F6", "flow": 72 }, { "from_id": "F4", "to_id": "F7", "flow": 40 }, { "from_id": "F4", "to_id": "F8", "flow": 8 }, { "from_id": "F4", "to_id": "F9", "flow": 0 }, { "from_id": "F4", "to_id": "F10", "flow": 0 }, { "from_id": "F4", "to_id": "F11", "flow": 0 }, { "from_id": "F4", "to_id": "F12", "flow": 28 }, { "from_id": "F5", "to_id": "F1", "flow": 0 }, { "from_id": "F5", "to_id": "F2", "flow": 16 }, { "from_id": "F5", "to_id": "F3", "flow": 2 }, { "from_id": "F5", "to_id": "F4", "flow": 0 }, { "from_id": "F5", "to_id": "F6", "flow": 71 }, { "from_id": "F5", "to_id": "F7", "flow": 0 }, { "from_id": "F5", "to_id": "F8", "flow": 0 }, { "from_id": "F5", "to_id": "F9", "flow": 0 }, { "from_id": "F5", "to_id": "F10", "flow": 0 }, { "from_id": "F5", "to_id": "F11", "flow": 0 }, { "from_id": "F5", "to_id": "F12", "flow": 8 }, { "from_id": "F6", "to_id": "F1", "flow": 75 }, { "from_id": "F6", "to_id": "F2", "flow": 8 }, { "from_id": "F6", "to_id": "F3", "flow": 1 }, { "from_id": "F6", "to_id": "F4", "flow": 72 }, { "from_id": "F6", "to_id": "F5", "flow": 71 }, { "from_id": "F6", "to_id": "F7", "flow": 1 }, { "from_id": "F6", "to_id": "F8", "flow": 0 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F10", "flow": 0 }, { "from_id": "F6", "to_id": "F11", "flow": 0 }, { "from_id": "F6", "to_id": "F12", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 1 }, { "from_id": "F7", "to_id": "F2", "flow": 0 }, { "from_id": "F7", "to_id": "F3", "flow": 0 }, { "from_id": "F7", "to_id": "F4", "flow": 40 }, { "from_id": "F7", "to_id": "F5", "flow": 0 }, { "from_id": "F7", "to_id": "F6", "flow": 1 }, { "from_id": "F7", "to_id": "F8", "flow": 19 }, { "from_id": "F7", "to_id": "F9", "flow": 0 }, { "from_id": "F7", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F11", "flow": 0 }, { "from_id": "F7", "to_id": "F12", "flow": 7 }, { "from_id": "F8", "to_id": "F1", "flow": 0 }, { "from_id": "F8", "to_id": "F2", "flow": 0 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 8 }, { "from_id": "F8", "to_id": "F5", "flow": 0 }, { "from_id": "F8", "to_id": "F6", "flow": 0 }, { "from_id": "F8", "to_id": "F7", "flow": 19 }, { "from_id": "F8", "to_id": "F9", "flow": 0 }, { "from_id": "F8", "to_id": "F10", "flow": 0 }, { "from_id": "F8", "to_id": "F11", "flow": 0 }, { "from_id": "F8", "to_id": "F12", "flow": 0 }, { "from_id": "F9", "to_id": "F1", "flow": 0 }, { "from_id": "F9", "to_id": "F2", "flow": 0 }, { "from_id": "F9", "to_id": "F3", "flow": 0 }, { "from_id": "F9", "to_id": "F4", "flow": 0 }, { "from_id": "F9", "to_id": "F5", "flow": 0 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 0 }, { "from_id": "F9", "to_id": "F8", "flow": 0 }, { "from_id": "F9", "to_id": "F10", "flow": 0 }, { "from_id": "F9", "to_id": "F11", "flow": 0 }, { "from_id": "F9", "to_id": "F12", "flow": 0 }, { "from_id": "F10", "to_id": "F1", "flow": 0 }, { "from_id": "F10", "to_id": "F2", "flow": 0 }, { "from_id": "F10", "to_id": "F3", "flow": 0 }, { "from_id": "F10", "to_id": "F4", "flow": 0 }, { "from_id": "F10", "to_id": "F5", "flow": 0 }, { "from_id": "F10", "to_id": "F6", "flow": 0 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 0 }, { "from_id": "F10", "to_id": "F9", "flow": 0 }, { "from_id": "F10", "to_id": "F11", "flow": 12 }, { "from_id": "F10", "to_id": "F12", "flow": 0 }, { "from_id": "F11", "to_id": "F1", "flow": 0 }, { "from_id": "F11", "to_id": "F2", "flow": 0 }, { "from_id": "F11", "to_id": "F3", "flow": 0 }, { "from_id": "F11", "to_id": "F4", "flow": 0 }, { "from_id": "F11", "to_id": "F5", "flow": 0 }, { "from_id": "F11", "to_id": "F6", "flow": 0 }, { "from_id": "F11", "to_id": "F7", "flow": 0 }, { "from_id": "F11", "to_id": "F8", "flow": 0 }, { "from_id": "F11", "to_id": "F9", "flow": 0 }, { "from_id": "F11", "to_id": "F10", "flow": 12 }, { "from_id": "F11", "to_id": "F12", "flow": 0 }, { "from_id": "F12", "to_id": "F1", "flow": 0 }, { "from_id": "F12", "to_id": "F2", "flow": 0 }, { "from_id": "F12", "to_id": "F3", "flow": 0 }, { "from_id": "F12", "to_id": "F4", "flow": 28 }, { "from_id": "F12", "to_id": "F5", "flow": 8 }, { "from_id": "F12", "to_id": "F6", "flow": 0 }, { "from_id": "F12", "to_id": "F7", "flow": 7 }, { "from_id": "F12", "to_id": "F8", "flow": 0 }, { "from_id": "F12", "to_id": "F9", "flow": 0 }, { "from_id": "F12", "to_id": "F10", "flow": 0 }, { "from_id": "F12", "to_id": "F11", "flow": 0 } ] }, "solution_variant": [ 3, 9, 2, 8, 5, 4, 7, 10, 12, 1, 6, 11 ], "context_index": 43, "input_format": "markdown_table", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Many people forget that where things live affects how often they have to run back and forth, so the task was set: assign each type of frequently used tool to a single unique bin, and make sure no two tools share a bin. To see which arrangement is best, for every pair of tool types multiply how often those two are used together by the distance between their assigned bins, then add up all those products — smaller sums mean fewer wasted steps. The detailed instance — which tools, their co-usage counts, and bin distances — is given below.\n\n{\n \"num_tool_types\": 10,\n \"tool_ids\": [\n \"F1\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\",\n \"F10\"\n ],\n \"bin_ids\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10\n ],\n \"distance\": [\n {\n \"from_bin_id\": 1,\n \"to_bin_id\": 2,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 1,\n \"to_bin_id\": 3,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 1,\n \"to_bin_id\": 4,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 1,\n \"to_bin_id\": 5,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 1,\n \"to_bin_id\": 6,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 1,\n \"to_bin_id\": 7,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 1,\n \"to_bin_id\": 8,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 1,\n \"to_bin_id\": 9,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 1,\n \"to_bin_id\": 10,\n \"bin_distance\": 0\n },\n {\n \"from_bin_id\": 2,\n \"to_bin_id\": 1,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 2,\n \"to_bin_id\": 3,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 2,\n \"to_bin_id\": 4,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 2,\n \"to_bin_id\": 5,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 2,\n \"to_bin_id\": 6,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 2,\n \"to_bin_id\": 7,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 2,\n \"to_bin_id\": 8,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 2,\n \"to_bin_id\": 9,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 2,\n \"to_bin_id\": 10,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 3,\n \"to_bin_id\": 1,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 3,\n \"to_bin_id\": 2,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 3,\n \"to_bin_id\": 4,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 3,\n \"to_bin_id\": 5,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 3,\n \"to_bin_id\": 6,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 3,\n \"to_bin_id\": 7,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 3,\n \"to_bin_id\": 8,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 3,\n \"to_bin_id\": 9,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 3,\n \"to_bin_id\": 10,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 4,\n \"to_bin_id\": 1,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 4,\n \"to_bin_id\": 2,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 4,\n \"to_bin_id\": 3,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 4,\n \"to_bin_id\": 5,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 4,\n \"to_bin_id\": 6,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 4,\n \"to_bin_id\": 7,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 4,\n \"to_bin_id\": 8,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 4,\n \"to_bin_id\": 9,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 4,\n \"to_bin_id\": 10,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 5,\n \"to_bin_id\": 1,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 5,\n \"to_bin_id\": 2,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 5,\n \"to_bin_id\": 3,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 5,\n \"to_bin_id\": 4,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 5,\n \"to_bin_id\": 6,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 5,\n \"to_bin_id\": 7,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 5,\n \"to_bin_id\": 8,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 5,\n \"to_bin_id\": 9,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 5,\n \"to_bin_id\": 10,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 6,\n \"to_bin_id\": 1,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 6,\n \"to_bin_id\": 2,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 6,\n \"to_bin_id\": 3,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 6,\n \"to_bin_id\": 4,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 6,\n \"to_bin_id\": 5,\n \"bin_distance\": 21\n },\n {\n \"from_bin_id\": 6,\n \"to_bin_id\": 7,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 6,\n \"to_bin_id\": 8,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 6,\n \"to_bin_id\": 9,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 6,\n \"to_bin_id\": 10,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 7,\n \"to_bin_id\": 1,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 7,\n \"to_bin_id\": 2,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 7,\n \"to_bin_id\": 3,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 7,\n \"to_bin_id\": 4,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 7,\n \"to_bin_id\": 5,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 7,\n \"to_bin_id\": 6,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 7,\n \"to_bin_id\": 8,\n \"bin_distance\": 6\n },\n {\n \"from_bin_id\": 7,\n \"to_bin_id\": 9,\n \"bin_distance\": 6\n },\n {\n \"from_bin_id\": 7,\n \"to_bin_id\": 10,\n \"bin_distance\": 4\n },\n {\n \"from_bin_id\": 8,\n \"to_bin_id\": 1,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 8,\n \"to_bin_id\": 2,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 8,\n \"to_bin_id\": 3,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 8,\n \"to_bin_id\": 4,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 8,\n \"to_bin_id\": 5,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 8,\n \"to_bin_id\": 6,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 8,\n \"to_bin_id\": 7,\n \"bin_distance\": 6\n },\n {\n \"from_bin_id\": 8,\n \"to_bin_id\": 9,\n \"bin_distance\": 6\n },\n {\n \"from_bin_id\": 8,\n \"to_bin_id\": 10,\n \"bin_distance\": 4\n },\n {\n \"from_bin_id\": 9,\n \"to_bin_id\": 1,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 9,\n \"to_bin_id\": 2,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 9,\n \"to_bin_id\": 3,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 9,\n \"to_bin_id\": 4,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 9,\n \"to_bin_id\": 5,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 9,\n \"to_bin_id\": 6,\n \"bin_distance\": 2\n },\n {\n \"from_bin_id\": 9,\n \"to_bin_id\": 7,\n \"bin_distance\": 6\n },\n {\n \"from_bin_id\": 9,\n \"to_bin_id\": 8,\n \"bin_distance\": 6\n },\n {\n \"from_bin_id\": 9,\n \"to_bin_id\": 10,\n \"bin_distance\": 4\n },\n {\n \"from_bin_id\": 10,\n \"to_bin_id\": 1,\n \"bin_distance\": 0\n },\n {\n \"from_bin_id\": 10,\n \"to_bin_id\": 2,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 10,\n \"to_bin_id\": 3,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 10,\n \"to_bin_id\": 4,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 10,\n \"to_bin_id\": 5,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 10,\n \"to_bin_id\": 6,\n \"bin_distance\": 1\n },\n {\n \"from_bin_id\": 10,\n \"to_bin_id\": 7,\n \"bin_distance\": 4\n },\n {\n \"from_bin_id\": 10,\n \"to_bin_id\": 8,\n \"bin_distance\": 4\n },\n {\n \"from_bin_id\": 10,\n \"to_bin_id\": 9,\n \"bin_distance\": 4\n }\n ],\n \"flow\": [\n {\n \"from_tool_id\": \"F1\",\n \"to_tool_id\": \"F2\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F1\",\n \"to_tool_id\": \"F3\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F1\",\n \"to_tool_id\": \"F4\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F1\",\n \"to_tool_id\": \"F5\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F1\",\n \"to_tool_id\": \"F6\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F1\",\n \"to_tool_id\": \"F7\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F1\",\n \"to_tool_id\": \"F8\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F1\",\n \"to_tool_id\": \"F9\",\n \"co_usage_frequency\": 3\n },\n {\n \"from_tool_id\": \"F1\",\n \"to_tool_id\": \"F10\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F2\",\n \"to_tool_id\": \"F1\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F2\",\n \"to_tool_id\": \"F3\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F2\",\n \"to_tool_id\": \"F4\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F2\",\n \"to_tool_id\": \"F5\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F2\",\n \"to_tool_id\": \"F6\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F2\",\n \"to_tool_id\": \"F7\",\n \"co_usage_frequency\": 3\n },\n {\n \"from_tool_id\": \"F2\",\n \"to_tool_id\": \"F8\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F2\",\n \"to_tool_id\": \"F9\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F2\",\n \"to_tool_id\": \"F10\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F3\",\n \"to_tool_id\": \"F1\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F3\",\n \"to_tool_id\": \"F2\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F3\",\n \"to_tool_id\": \"F4\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F3\",\n \"to_tool_id\": \"F5\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F3\",\n \"to_tool_id\": \"F6\",\n \"co_usage_frequency\": 3\n },\n {\n \"from_tool_id\": \"F3\",\n \"to_tool_id\": \"F7\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F3\",\n \"to_tool_id\": \"F8\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F3\",\n \"to_tool_id\": \"F9\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F3\",\n \"to_tool_id\": \"F10\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F4\",\n \"to_tool_id\": \"F1\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F4\",\n \"to_tool_id\": \"F2\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F4\",\n \"to_tool_id\": \"F3\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F4\",\n \"to_tool_id\": \"F5\",\n \"co_usage_frequency\": 3\n },\n {\n \"from_tool_id\": \"F4\",\n \"to_tool_id\": \"F6\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F4\",\n \"to_tool_id\": \"F7\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F4\",\n \"to_tool_id\": \"F8\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F4\",\n \"to_tool_id\": \"F9\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F4\",\n \"to_tool_id\": \"F10\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F5\",\n \"to_tool_id\": \"F1\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F5\",\n \"to_tool_id\": \"F2\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F5\",\n \"to_tool_id\": \"F3\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F5\",\n \"to_tool_id\": \"F4\",\n \"co_usage_frequency\": 3\n },\n {\n \"from_tool_id\": \"F5\",\n \"to_tool_id\": \"F6\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F5\",\n \"to_tool_id\": \"F7\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F5\",\n \"to_tool_id\": \"F8\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F5\",\n \"to_tool_id\": \"F9\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F5\",\n \"to_tool_id\": \"F10\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F6\",\n \"to_tool_id\": \"F1\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F6\",\n \"to_tool_id\": \"F2\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F6\",\n \"to_tool_id\": \"F3\",\n \"co_usage_frequency\": 3\n },\n {\n \"from_tool_id\": \"F6\",\n \"to_tool_id\": \"F4\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F6\",\n \"to_tool_id\": \"F5\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F6\",\n \"to_tool_id\": \"F7\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F6\",\n \"to_tool_id\": \"F8\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F6\",\n \"to_tool_id\": \"F9\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F6\",\n \"to_tool_id\": \"F10\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F7\",\n \"to_tool_id\": \"F1\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F7\",\n \"to_tool_id\": \"F2\",\n \"co_usage_frequency\": 3\n },\n {\n \"from_tool_id\": \"F7\",\n \"to_tool_id\": \"F3\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F7\",\n \"to_tool_id\": \"F4\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F7\",\n \"to_tool_id\": \"F5\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F7\",\n \"to_tool_id\": \"F6\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F7\",\n \"to_tool_id\": \"F8\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F7\",\n \"to_tool_id\": \"F9\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F7\",\n \"to_tool_id\": \"F10\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F8\",\n \"to_tool_id\": \"F1\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F8\",\n \"to_tool_id\": \"F2\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F8\",\n \"to_tool_id\": \"F3\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F8\",\n \"to_tool_id\": \"F4\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F8\",\n \"to_tool_id\": \"F5\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F8\",\n \"to_tool_id\": \"F6\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F8\",\n \"to_tool_id\": \"F7\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F8\",\n \"to_tool_id\": \"F9\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F8\",\n \"to_tool_id\": \"F10\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F9\",\n \"to_tool_id\": \"F1\",\n \"co_usage_frequency\": 3\n },\n {\n \"from_tool_id\": \"F9\",\n \"to_tool_id\": \"F2\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F9\",\n \"to_tool_id\": \"F3\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F9\",\n \"to_tool_id\": \"F4\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F9\",\n \"to_tool_id\": \"F5\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F9\",\n \"to_tool_id\": \"F6\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F9\",\n \"to_tool_id\": \"F7\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F9\",\n \"to_tool_id\": \"F8\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F9\",\n \"to_tool_id\": \"F10\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F10\",\n \"to_tool_id\": \"F1\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F10\",\n \"to_tool_id\": \"F2\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F10\",\n \"to_tool_id\": \"F3\",\n \"co_usage_frequency\": 2\n },\n {\n \"from_tool_id\": \"F10\",\n \"to_tool_id\": \"F4\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F10\",\n \"to_tool_id\": \"F5\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F10\",\n \"to_tool_id\": \"F6\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F10\",\n \"to_tool_id\": \"F7\",\n \"co_usage_frequency\": 1\n },\n {\n \"from_tool_id\": \"F10\",\n \"to_tool_id\": \"F8\",\n \"co_usage_frequency\": 0\n },\n {\n \"from_tool_id\": \"F10\",\n \"to_tool_id\": \"F9\",\n \"co_usage_frequency\": 1\n }\n ]\n}\n\nAlso, when you send back the final arrangement, please use a simple JSON layout like this so it’s easy to read and parse:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of the \"solution\" array as an ordered list: the first entry is the bin (location) assigned to the first tool (facility), the second entry is the bin for the second tool, and so on. It’s just the shape I’m expecting here — a sketch, not the filled-in answer.\n\nPlease make sure you use the exact identifiers from the instance input — don’t rename them or make up new labels. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 ], [ 1, 0, 21, 21, 21, 21, 2, 2, 2, 1 ], [ 1, 21, 0, 21, 21, 21, 2, 2, 2, 1 ], [ 1, 21, 21, 0, 21, 21, 2, 2, 2, 1 ], [ 1, 21, 21, 21, 0, 21, 2, 2, 2, 1 ], [ 1, 21, 21, 21, 21, 0, 2, 2, 2, 1 ], [ 1, 2, 2, 2, 2, 2, 0, 6, 6, 4 ], [ 1, 2, 2, 2, 2, 2, 6, 0, 6, 4 ], [ 1, 2, 2, 2, 2, 2, 6, 6, 0, 4 ], [ 0, 1, 1, 1, 1, 1, 4, 4, 4, 0 ] ], "flow_matrix": [ [ 0, 1, 2, 1, 1, 0, 1, 2, 3, 1 ], [ 1, 0, 0, 1, 1, 2, 3, 0, 1, 1 ], [ 2, 0, 0, 0, 2, 3, 2, 1, 0, 2 ], [ 1, 1, 0, 0, 3, 2, 1, 2, 1, 1 ], [ 1, 1, 2, 3, 0, 0, 1, 0, 1, 1 ], [ 0, 2, 3, 2, 0, 0, 0, 1, 2, 0 ], [ 1, 3, 2, 1, 1, 0, 0, 2, 1, 1 ], [ 2, 0, 1, 2, 0, 1, 2, 0, 0, 0 ], [ 3, 1, 0, 1, 1, 2, 1, 0, 0, 1 ], [ 1, 1, 2, 1, 1, 0, 1, 0, 1, 0 ] ], "objective": 402.0 }, "solution": [ 3, 7, 9, 0, 4, 5, 1, 6, 8, 2 ], "obj": 402.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 1 }, { "from_id": 1, "to_id": 3, "distance": 1 }, { "from_id": 1, "to_id": 4, "distance": 1 }, { "from_id": 1, "to_id": 5, "distance": 1 }, { "from_id": 1, "to_id": 6, "distance": 1 }, { "from_id": 1, "to_id": 7, "distance": 1 }, { "from_id": 1, "to_id": 8, "distance": 1 }, { "from_id": 1, "to_id": 9, "distance": 1 }, { "from_id": 1, "to_id": 10, "distance": 0 }, { "from_id": 2, "to_id": 1, "distance": 1 }, { "from_id": 2, "to_id": 3, "distance": 21 }, { "from_id": 2, "to_id": 4, "distance": 21 }, { "from_id": 2, "to_id": 5, "distance": 21 }, { "from_id": 2, "to_id": 6, "distance": 21 }, { "from_id": 2, "to_id": 7, "distance": 2 }, { "from_id": 2, "to_id": 8, "distance": 2 }, { "from_id": 2, "to_id": 9, "distance": 2 }, { "from_id": 2, "to_id": 10, "distance": 1 }, { "from_id": 3, "to_id": 1, "distance": 1 }, { "from_id": 3, "to_id": 2, "distance": 21 }, { "from_id": 3, "to_id": 4, "distance": 21 }, { "from_id": 3, "to_id": 5, "distance": 21 }, { "from_id": 3, "to_id": 6, "distance": 21 }, { "from_id": 3, "to_id": 7, "distance": 2 }, { "from_id": 3, "to_id": 8, "distance": 2 }, { "from_id": 3, "to_id": 9, "distance": 2 }, { "from_id": 3, "to_id": 10, "distance": 1 }, { "from_id": 4, "to_id": 1, "distance": 1 }, { "from_id": 4, "to_id": 2, "distance": 21 }, { "from_id": 4, "to_id": 3, "distance": 21 }, { "from_id": 4, "to_id": 5, "distance": 21 }, { "from_id": 4, "to_id": 6, "distance": 21 }, { "from_id": 4, "to_id": 7, "distance": 2 }, { "from_id": 4, "to_id": 8, "distance": 2 }, { "from_id": 4, "to_id": 9, "distance": 2 }, { "from_id": 4, "to_id": 10, "distance": 1 }, { "from_id": 5, "to_id": 1, "distance": 1 }, { "from_id": 5, "to_id": 2, "distance": 21 }, { "from_id": 5, "to_id": 3, "distance": 21 }, { "from_id": 5, "to_id": 4, "distance": 21 }, { "from_id": 5, "to_id": 6, "distance": 21 }, { "from_id": 5, "to_id": 7, "distance": 2 }, { "from_id": 5, "to_id": 8, "distance": 2 }, { "from_id": 5, "to_id": 9, "distance": 2 }, { "from_id": 5, "to_id": 10, "distance": 1 }, { "from_id": 6, "to_id": 1, "distance": 1 }, { "from_id": 6, "to_id": 2, "distance": 21 }, { "from_id": 6, "to_id": 3, "distance": 21 }, { "from_id": 6, "to_id": 4, "distance": 21 }, { "from_id": 6, "to_id": 5, "distance": 21 }, { "from_id": 6, "to_id": 7, "distance": 2 }, { "from_id": 6, "to_id": 8, "distance": 2 }, { "from_id": 6, "to_id": 9, "distance": 2 }, { "from_id": 6, "to_id": 10, "distance": 1 }, { "from_id": 7, "to_id": 1, "distance": 1 }, { "from_id": 7, "to_id": 2, "distance": 2 }, { "from_id": 7, "to_id": 3, "distance": 2 }, { "from_id": 7, "to_id": 4, "distance": 2 }, { "from_id": 7, "to_id": 5, "distance": 2 }, { "from_id": 7, "to_id": 6, "distance": 2 }, { "from_id": 7, "to_id": 8, "distance": 6 }, { "from_id": 7, "to_id": 9, "distance": 6 }, { "from_id": 7, "to_id": 10, "distance": 4 }, { "from_id": 8, "to_id": 1, "distance": 1 }, { "from_id": 8, "to_id": 2, "distance": 2 }, { "from_id": 8, "to_id": 3, "distance": 2 }, { "from_id": 8, "to_id": 4, "distance": 2 }, { "from_id": 8, "to_id": 5, "distance": 2 }, { "from_id": 8, "to_id": 6, "distance": 2 }, { "from_id": 8, "to_id": 7, "distance": 6 }, { "from_id": 8, "to_id": 9, "distance": 6 }, { "from_id": 8, "to_id": 10, "distance": 4 }, { "from_id": 9, "to_id": 1, "distance": 1 }, { "from_id": 9, "to_id": 2, "distance": 2 }, { "from_id": 9, "to_id": 3, "distance": 2 }, { "from_id": 9, "to_id": 4, "distance": 2 }, { "from_id": 9, "to_id": 5, "distance": 2 }, { "from_id": 9, "to_id": 6, "distance": 2 }, { "from_id": 9, "to_id": 7, "distance": 6 }, { "from_id": 9, "to_id": 8, "distance": 6 }, { "from_id": 9, "to_id": 10, "distance": 4 }, { "from_id": 10, "to_id": 1, "distance": 0 }, { "from_id": 10, "to_id": 2, "distance": 1 }, { "from_id": 10, "to_id": 3, "distance": 1 }, { "from_id": 10, "to_id": 4, "distance": 1 }, { "from_id": 10, "to_id": 5, "distance": 1 }, { "from_id": 10, "to_id": 6, "distance": 1 }, { "from_id": 10, "to_id": 7, "distance": 4 }, { "from_id": 10, "to_id": 8, "distance": 4 }, { "from_id": 10, "to_id": 9, "distance": 4 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 1 }, { "from_id": "F1", "to_id": "F3", "flow": 2 }, { "from_id": "F1", "to_id": "F4", "flow": 1 }, { "from_id": "F1", "to_id": "F5", "flow": 1 }, { "from_id": "F1", "to_id": "F6", "flow": 0 }, { "from_id": "F1", "to_id": "F7", "flow": 1 }, { "from_id": "F1", "to_id": "F8", "flow": 2 }, { "from_id": "F1", "to_id": "F9", "flow": 3 }, { "from_id": "F1", "to_id": "F10", "flow": 1 }, { "from_id": "F2", "to_id": "F1", "flow": 1 }, { "from_id": "F2", "to_id": "F3", "flow": 0 }, { "from_id": "F2", "to_id": "F4", "flow": 1 }, { "from_id": "F2", "to_id": "F5", "flow": 1 }, { "from_id": "F2", "to_id": "F6", "flow": 2 }, { "from_id": "F2", "to_id": "F7", "flow": 3 }, { "from_id": "F2", "to_id": "F8", "flow": 0 }, { "from_id": "F2", "to_id": "F9", "flow": 1 }, { "from_id": "F2", "to_id": "F10", "flow": 1 }, { "from_id": "F3", "to_id": "F1", "flow": 2 }, { "from_id": "F3", "to_id": "F2", "flow": 0 }, { "from_id": "F3", "to_id": "F4", "flow": 0 }, { "from_id": "F3", "to_id": "F5", "flow": 2 }, { "from_id": "F3", "to_id": "F6", "flow": 3 }, { "from_id": "F3", "to_id": "F7", "flow": 2 }, { "from_id": "F3", "to_id": "F8", "flow": 1 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F3", "to_id": "F10", "flow": 2 }, { "from_id": "F4", "to_id": "F1", "flow": 1 }, { "from_id": "F4", "to_id": "F2", "flow": 1 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 3 }, { "from_id": "F4", "to_id": "F6", "flow": 2 }, { "from_id": "F4", "to_id": "F7", "flow": 1 }, { "from_id": "F4", "to_id": "F8", "flow": 2 }, { "from_id": "F4", "to_id": "F9", "flow": 1 }, { "from_id": "F4", "to_id": "F10", "flow": 1 }, { "from_id": "F5", "to_id": "F1", "flow": 1 }, { "from_id": "F5", "to_id": "F2", "flow": 1 }, { "from_id": "F5", "to_id": "F3", "flow": 2 }, { "from_id": "F5", "to_id": "F4", "flow": 3 }, { "from_id": "F5", "to_id": "F6", "flow": 0 }, { "from_id": "F5", "to_id": "F7", "flow": 1 }, { "from_id": "F5", "to_id": "F8", "flow": 0 }, { "from_id": "F5", "to_id": "F9", "flow": 1 }, { "from_id": "F5", "to_id": "F10", "flow": 1 }, { "from_id": "F6", "to_id": "F1", "flow": 0 }, { "from_id": "F6", "to_id": "F2", "flow": 2 }, { "from_id": "F6", "to_id": "F3", "flow": 3 }, { "from_id": "F6", "to_id": "F4", "flow": 2 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 1 }, { "from_id": "F6", "to_id": "F9", "flow": 2 }, { "from_id": "F6", "to_id": "F10", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 1 }, { "from_id": "F7", "to_id": "F2", "flow": 3 }, { "from_id": "F7", "to_id": "F3", "flow": 2 }, { "from_id": "F7", "to_id": "F4", "flow": 1 }, { "from_id": "F7", "to_id": "F5", "flow": 1 }, { "from_id": "F7", "to_id": "F6", "flow": 0 }, { "from_id": "F7", "to_id": "F8", "flow": 2 }, { "from_id": "F7", "to_id": "F9", "flow": 1 }, { "from_id": "F7", "to_id": "F10", "flow": 1 }, { "from_id": "F8", "to_id": "F1", "flow": 2 }, { "from_id": "F8", "to_id": "F2", "flow": 0 }, { "from_id": "F8", "to_id": "F3", "flow": 1 }, { "from_id": "F8", "to_id": "F4", "flow": 2 }, { "from_id": "F8", "to_id": "F5", "flow": 0 }, { "from_id": "F8", "to_id": "F6", "flow": 1 }, { "from_id": "F8", "to_id": "F7", "flow": 2 }, { "from_id": "F8", "to_id": "F9", "flow": 0 }, { "from_id": "F8", "to_id": "F10", "flow": 0 }, { "from_id": "F9", "to_id": "F1", "flow": 3 }, { "from_id": "F9", "to_id": "F2", "flow": 1 }, { "from_id": "F9", "to_id": "F3", "flow": 0 }, { "from_id": "F9", "to_id": "F4", "flow": 1 }, { "from_id": "F9", "to_id": "F5", "flow": 1 }, { "from_id": "F9", "to_id": "F6", "flow": 2 }, { "from_id": "F9", "to_id": "F7", "flow": 1 }, { "from_id": "F9", "to_id": "F8", "flow": 0 }, { "from_id": "F9", "to_id": "F10", "flow": 1 }, { "from_id": "F10", "to_id": "F1", "flow": 1 }, { "from_id": "F10", "to_id": "F2", "flow": 1 }, { "from_id": "F10", "to_id": "F3", "flow": 2 }, { "from_id": "F10", "to_id": "F4", "flow": 1 }, { "from_id": "F10", "to_id": "F5", "flow": 1 }, { "from_id": "F10", "to_id": "F6", "flow": 0 }, { "from_id": "F10", "to_id": "F7", "flow": 1 }, { "from_id": "F10", "to_id": "F8", "flow": 0 }, { "from_id": "F10", "to_id": "F9", "flow": 1 } ] }, "solution_variant": [ 4, 8, 10, 1, 5, 6, 2, 7, 9, 3 ], "context_index": 44, "input_format": "json", "input_index_base": 1 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "There’s a props master juggling dozens of set pieces, trying to pin each kit to one unique storage room and make sure no room stores two kits. What counts as “better” is simply how little overall schlepping the stagehands have to do: look at every pair of kits, note how often they get moved between scenes and how far apart their assigned rooms are, multiply those two for each pair and add everything together — the smaller that total, the nicer the setup. The specific room distances and pair-move counts are shown below.\n\n# num_prop_sets=12\n# prop_set_ids=F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12\n# room_ids=0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11\n\nroom_id_from,room_id_to,room_distance\n0,1,10\n0,2,17\n0,3,9\n0,4,34\n0,5,32\n0,6,23\n0,7,44\n0,8,35\n0,9,19\n0,10,750\n0,11,787\n1,0,10\n1,2,8\n1,3,19\n1,4,30\n1,5,26\n1,6,24\n1,7,54\n1,8,39\n1,9,26\n1,10,749\n1,11,787\n2,0,17\n2,1,8\n2,3,25\n2,4,23\n2,5,19\n2,6,22\n2,7,60\n2,8,38\n2,9,34\n2,10,743\n2,11,781\n3,0,9\n3,1,19\n3,2,25\n3,4,39\n3,5,38\n3,6,25\n3,7,35\n3,8,33\n3,9,17\n3,10,750\n3,11,786\n4,0,34\n4,1,30\n4,2,23\n4,3,39\n4,5,7\n4,6,17\n4,7,71\n4,8,29\n4,9,53\n4,10,719\n4,11,758\n5,0,32\n5,1,26\n5,2,19\n5,3,38\n5,4,7\n5,6,20\n5,7,72\n5,8,34\n5,9,51\n5,10,725\n5,11,764\n6,0,23\n6,1,24\n6,2,22\n6,3,25\n6,4,17\n6,5,20\n6,7,54\n6,8,17\n6,9,41\n6,10,727\n6,11,764\n7,0,44\n7,1,54\n7,2,60\n7,3,35\n7,4,71\n7,5,72\n7,6,54\n7,8,52\n7,9,35\n7,10,762\n7,11,795\n8,0,35\n8,1,39\n8,2,38\n8,3,33\n8,4,29\n8,5,34\n8,6,17\n8,7,52\n8,9,50\n8,10,718\n8,11,753\n9,0,19\n9,1,26\n9,2,34\n9,3,17\n9,4,53\n9,5,51\n9,6,41\n9,7,35\n9,8,50\n9,10,767\n9,11,803\n10,0,750\n10,1,749\n10,2,743\n10,3,750\n10,4,719\n10,5,725\n10,6,727\n10,7,762\n10,8,718\n10,9,767\n10,11,86\n11,0,787\n11,1,787\n11,2,781\n11,3,786\n11,4,758\n11,5,764\n11,6,764\n11,7,795\n11,8,753\n11,9,803\n11,10,86\n\nprop_set_id_from,prop_set_id_to,move_frequency\nF1,F2,2\nF1,F3,41453\nF1,F4,6590\nF1,F5,16724\nF1,F6,0\nF1,F7,0\nF1,F8,0\nF1,F9,2474\nF1,F10,1868\nF1,F11,43487\nF1,F12,0\nF2,F1,35\nF2,F3,18\nF2,F4,2447\nF2,F5,0\nF2,F6,168\nF2,F7,0\nF2,F8,0\nF2,F9,22946\nF2,F10,0\nF2,F11,1\nF2,F12,0\nF3,F1,635\nF3,F2,14785\nF3,F4,52\nF3,F5,0\nF3,F6,743\nF3,F7,0\nF3,F8,1\nF3,F9,0\nF3,F10,0\nF3,F11,2\nF3,F12,1\nF4,F1,11\nF4,F2,0\nF4,F3,31\nF4,F5,8407\nF4,F6,0\nF4,F7,0\nF4,F8,0\nF4,F9,0\nF4,F10,2142\nF4,F11,61\nF4,F12,37\nF5,F1,0\nF5,F2,0\nF5,F3,0\nF5,F4,0\nF5,F6,5\nF5,F7,9610\nF5,F8,1608\nF5,F9,3021\nF5,F10,397\nF5,F11,10\nF5,F12,0\nF6,F1,53507\nF6,F2,0\nF6,F3,1\nF6,F4,0\nF6,F5,0\nF6,F7,0\nF6,F8,0\nF6,F9,268\nF6,F10,276\nF6,F11,0\nF6,F12,0\nF7,F1,0\nF7,F2,4845\nF7,F3,297\nF7,F4,16251\nF7,F5,0\nF7,F6,122\nF7,F8,0\nF7,F9,151\nF7,F10,3854\nF7,F11,57\nF7,F12,117\nF8,F1,82\nF8,F2,0\nF8,F3,0\nF8,F4,0\nF8,F5,18299\nF8,F6,72\nF8,F7,1919\nF8,F9,4\nF8,F10,0\nF8,F11,0\nF8,F12,750\nF9,F1,0\nF9,F2,324\nF9,F3,3918\nF9,F4,398\nF9,F5,0\nF9,F6,4597\nF9,F7,0\nF9,F8,55597\nF9,F10,88\nF9,F11,0\nF9,F12,0\nF10,F1,60\nF10,F2,0\nF10,F3,0\nF10,F4,0\nF10,F5,31854\nF10,F6,0\nF10,F7,0\nF10,F8,51089\nF10,F9,0\nF10,F11,32\nF10,F12,2785\nF11,F1,30671\nF11,F2,32\nF11,F3,1\nF11,F4,0\nF11,F5,2\nF11,F6,10\nF11,F7,92\nF11,F8,1149\nF11,F9,0\nF11,F10,0\nF11,F12,427\nF12,F1,2547\nF12,F2,0\nF12,F3,48114\nF12,F4,0\nF12,F5,16916\nF12,F6,0\nF12,F7,2\nF12,F8,5583\nF12,F9,0\nF12,F10,106\nF12,F11,40778\n\nIf you want to hand me an assignment, just drop it in this simple JSON shape so it's easy to read by humans and machines alike:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of \"solution\" as a list that says which room goes with each kit in order — first entry = where the first kit lives, second = where the second kit lives, and so on. This is just the form I expect, not the actual assignment.\n\nPlease use the exact identifiers from the instance — don't rename them or invent new ones. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 10, 17, 9, 34, 32, 23, 44, 35, 19, 750, 787 ], [ 10, 0, 8, 19, 30, 26, 24, 54, 39, 26, 749, 787 ], [ 17, 8, 0, 25, 23, 19, 22, 60, 38, 34, 743, 781 ], [ 9, 19, 25, 0, 39, 38, 25, 35, 33, 17, 750, 786 ], [ 34, 30, 23, 39, 0, 7, 17, 71, 29, 53, 719, 758 ], [ 32, 26, 19, 38, 7, 0, 20, 72, 34, 51, 725, 764 ], [ 23, 24, 22, 25, 17, 20, 0, 54, 17, 41, 727, 764 ], [ 44, 54, 60, 35, 71, 72, 54, 0, 52, 35, 762, 795 ], [ 35, 39, 38, 33, 29, 34, 17, 52, 0, 50, 718, 753 ], [ 19, 26, 34, 17, 53, 51, 41, 35, 50, 0, 767, 803 ], [ 750, 749, 743, 750, 719, 725, 727, 762, 718, 767, 0, 86 ], [ 787, 787, 781, 786, 758, 764, 764, 795, 753, 803, 86, 0 ] ], "flow_matrix": [ [ 0, 2, 41453, 6590, 16724, 0, 0, 0, 2474, 1868, 43487, 0 ], [ 35, 0, 18, 2447, 0, 168, 0, 0, 22946, 0, 1, 0 ], [ 635, 14785, 0, 52, 0, 743, 0, 1, 0, 0, 2, 1 ], [ 11, 0, 31, 0, 8407, 0, 0, 0, 0, 2142, 61, 37 ], [ 0, 0, 0, 0, 0, 5, 9610, 1608, 3021, 397, 10, 0 ], [ 53507, 0, 1, 0, 0, 0, 0, 0, 268, 276, 0, 0 ], [ 0, 4845, 297, 16251, 0, 122, 0, 0, 151, 3854, 57, 117 ], [ 82, 0, 0, 0, 18299, 72, 1919, 0, 4, 0, 0, 750 ], [ 0, 324, 3918, 398, 0, 4597, 0, 55597, 0, 88, 0, 0 ], [ 60, 0, 0, 0, 31854, 0, 0, 51089, 0, 0, 32, 2785 ], [ 30671, 32, 1, 0, 2, 10, 92, 1149, 0, 0, 0, 427 ], [ 2547, 0, 48114, 0, 16916, 0, 2, 5583, 0, 106, 40778, 0 ] ], "objective": 42118180.0 }, "solution": [ 0, 7, 3, 11, 5, 9, 10, 6, 8, 4, 1, 2 ], "obj": 42118180.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 12, "num_locations": 12, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 10 }, { "from_id": 0, "to_id": 2, "distance": 17 }, { "from_id": 0, "to_id": 3, "distance": 9 }, { "from_id": 0, "to_id": 4, "distance": 34 }, { "from_id": 0, "to_id": 5, "distance": 32 }, { "from_id": 0, "to_id": 6, "distance": 23 }, { "from_id": 0, "to_id": 7, "distance": 44 }, { "from_id": 0, "to_id": 8, "distance": 35 }, { "from_id": 0, "to_id": 9, "distance": 19 }, { "from_id": 0, "to_id": 10, "distance": 750 }, { "from_id": 0, "to_id": 11, "distance": 787 }, { "from_id": 1, "to_id": 0, "distance": 10 }, { "from_id": 1, "to_id": 2, "distance": 8 }, { "from_id": 1, "to_id": 3, "distance": 19 }, { "from_id": 1, "to_id": 4, "distance": 30 }, { "from_id": 1, "to_id": 5, "distance": 26 }, { "from_id": 1, "to_id": 6, "distance": 24 }, { "from_id": 1, "to_id": 7, "distance": 54 }, { "from_id": 1, "to_id": 8, "distance": 39 }, { "from_id": 1, "to_id": 9, "distance": 26 }, { "from_id": 1, "to_id": 10, "distance": 749 }, { "from_id": 1, "to_id": 11, "distance": 787 }, { "from_id": 2, "to_id": 0, "distance": 17 }, { "from_id": 2, "to_id": 1, "distance": 8 }, { "from_id": 2, "to_id": 3, "distance": 25 }, { "from_id": 2, "to_id": 4, "distance": 23 }, { "from_id": 2, "to_id": 5, "distance": 19 }, { "from_id": 2, "to_id": 6, "distance": 22 }, { "from_id": 2, "to_id": 7, "distance": 60 }, { "from_id": 2, "to_id": 8, "distance": 38 }, { "from_id": 2, "to_id": 9, "distance": 34 }, { "from_id": 2, "to_id": 10, "distance": 743 }, { "from_id": 2, "to_id": 11, "distance": 781 }, { "from_id": 3, "to_id": 0, "distance": 9 }, { "from_id": 3, "to_id": 1, "distance": 19 }, { "from_id": 3, "to_id": 2, "distance": 25 }, { "from_id": 3, "to_id": 4, "distance": 39 }, { "from_id": 3, "to_id": 5, "distance": 38 }, { "from_id": 3, "to_id": 6, "distance": 25 }, { "from_id": 3, "to_id": 7, "distance": 35 }, { "from_id": 3, "to_id": 8, "distance": 33 }, { "from_id": 3, "to_id": 9, "distance": 17 }, { "from_id": 3, "to_id": 10, "distance": 750 }, { "from_id": 3, "to_id": 11, "distance": 786 }, { "from_id": 4, "to_id": 0, "distance": 34 }, { "from_id": 4, "to_id": 1, "distance": 30 }, { "from_id": 4, "to_id": 2, "distance": 23 }, { "from_id": 4, "to_id": 3, "distance": 39 }, { "from_id": 4, "to_id": 5, "distance": 7 }, { "from_id": 4, "to_id": 6, "distance": 17 }, { "from_id": 4, "to_id": 7, "distance": 71 }, { "from_id": 4, "to_id": 8, "distance": 29 }, { "from_id": 4, "to_id": 9, "distance": 53 }, { "from_id": 4, "to_id": 10, "distance": 719 }, { "from_id": 4, "to_id": 11, "distance": 758 }, { "from_id": 5, "to_id": 0, "distance": 32 }, { "from_id": 5, "to_id": 1, "distance": 26 }, { "from_id": 5, "to_id": 2, "distance": 19 }, { "from_id": 5, "to_id": 3, "distance": 38 }, { "from_id": 5, "to_id": 4, "distance": 7 }, { "from_id": 5, "to_id": 6, "distance": 20 }, { "from_id": 5, "to_id": 7, "distance": 72 }, { "from_id": 5, "to_id": 8, "distance": 34 }, { "from_id": 5, "to_id": 9, "distance": 51 }, { "from_id": 5, "to_id": 10, "distance": 725 }, { "from_id": 5, "to_id": 11, "distance": 764 }, { "from_id": 6, "to_id": 0, "distance": 23 }, { "from_id": 6, "to_id": 1, "distance": 24 }, { "from_id": 6, "to_id": 2, "distance": 22 }, { "from_id": 6, "to_id": 3, "distance": 25 }, { "from_id": 6, "to_id": 4, "distance": 17 }, { "from_id": 6, "to_id": 5, "distance": 20 }, { "from_id": 6, "to_id": 7, "distance": 54 }, { "from_id": 6, "to_id": 8, "distance": 17 }, { "from_id": 6, "to_id": 9, "distance": 41 }, { "from_id": 6, "to_id": 10, "distance": 727 }, { "from_id": 6, "to_id": 11, "distance": 764 }, { "from_id": 7, "to_id": 0, "distance": 44 }, { "from_id": 7, "to_id": 1, "distance": 54 }, { "from_id": 7, "to_id": 2, "distance": 60 }, { "from_id": 7, "to_id": 3, "distance": 35 }, { "from_id": 7, "to_id": 4, "distance": 71 }, { "from_id": 7, "to_id": 5, "distance": 72 }, { "from_id": 7, "to_id": 6, "distance": 54 }, { "from_id": 7, "to_id": 8, "distance": 52 }, { "from_id": 7, "to_id": 9, "distance": 35 }, { "from_id": 7, "to_id": 10, "distance": 762 }, { "from_id": 7, "to_id": 11, "distance": 795 }, { "from_id": 8, "to_id": 0, "distance": 35 }, { "from_id": 8, "to_id": 1, "distance": 39 }, { "from_id": 8, "to_id": 2, "distance": 38 }, { "from_id": 8, "to_id": 3, "distance": 33 }, { "from_id": 8, "to_id": 4, "distance": 29 }, { "from_id": 8, "to_id": 5, "distance": 34 }, { "from_id": 8, "to_id": 6, "distance": 17 }, { "from_id": 8, "to_id": 7, "distance": 52 }, { "from_id": 8, "to_id": 9, "distance": 50 }, { "from_id": 8, "to_id": 10, "distance": 718 }, { "from_id": 8, "to_id": 11, "distance": 753 }, { "from_id": 9, "to_id": 0, "distance": 19 }, { "from_id": 9, "to_id": 1, "distance": 26 }, { "from_id": 9, "to_id": 2, "distance": 34 }, { "from_id": 9, "to_id": 3, "distance": 17 }, { "from_id": 9, "to_id": 4, "distance": 53 }, { "from_id": 9, "to_id": 5, "distance": 51 }, { "from_id": 9, "to_id": 6, "distance": 41 }, { "from_id": 9, "to_id": 7, "distance": 35 }, { "from_id": 9, "to_id": 8, "distance": 50 }, { "from_id": 9, "to_id": 10, "distance": 767 }, { "from_id": 9, "to_id": 11, "distance": 803 }, { "from_id": 10, "to_id": 0, "distance": 750 }, { "from_id": 10, "to_id": 1, "distance": 749 }, { "from_id": 10, "to_id": 2, "distance": 743 }, { "from_id": 10, "to_id": 3, "distance": 750 }, { "from_id": 10, "to_id": 4, "distance": 719 }, { "from_id": 10, "to_id": 5, "distance": 725 }, { "from_id": 10, "to_id": 6, "distance": 727 }, { "from_id": 10, "to_id": 7, "distance": 762 }, { "from_id": 10, "to_id": 8, "distance": 718 }, { "from_id": 10, "to_id": 9, "distance": 767 }, { "from_id": 10, "to_id": 11, "distance": 86 }, { "from_id": 11, "to_id": 0, "distance": 787 }, { "from_id": 11, "to_id": 1, "distance": 787 }, { "from_id": 11, "to_id": 2, "distance": 781 }, { "from_id": 11, "to_id": 3, "distance": 786 }, { "from_id": 11, "to_id": 4, "distance": 758 }, { "from_id": 11, "to_id": 5, "distance": 764 }, { "from_id": 11, "to_id": 6, "distance": 764 }, { "from_id": 11, "to_id": 7, "distance": 795 }, { "from_id": 11, "to_id": 8, "distance": 753 }, { "from_id": 11, "to_id": 9, "distance": 803 }, { "from_id": 11, "to_id": 10, "distance": 86 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 2 }, { "from_id": "F1", "to_id": "F3", "flow": 41453 }, { "from_id": "F1", "to_id": "F4", "flow": 6590 }, { "from_id": "F1", "to_id": "F5", "flow": 16724 }, { "from_id": "F1", "to_id": "F6", "flow": 0 }, { "from_id": "F1", "to_id": "F7", "flow": 0 }, { "from_id": "F1", "to_id": "F8", "flow": 0 }, { "from_id": "F1", "to_id": "F9", "flow": 2474 }, { "from_id": "F1", "to_id": "F10", "flow": 1868 }, { "from_id": "F1", "to_id": "F11", "flow": 43487 }, { "from_id": "F1", "to_id": "F12", "flow": 0 }, { "from_id": "F2", "to_id": "F1", "flow": 35 }, { "from_id": "F2", "to_id": "F3", "flow": 18 }, { "from_id": "F2", "to_id": "F4", "flow": 2447 }, { "from_id": "F2", "to_id": "F5", "flow": 0 }, { "from_id": "F2", "to_id": "F6", "flow": 168 }, { "from_id": "F2", "to_id": "F7", "flow": 0 }, { "from_id": "F2", "to_id": "F8", "flow": 0 }, { "from_id": "F2", "to_id": "F9", "flow": 22946 }, { "from_id": "F2", "to_id": "F10", "flow": 0 }, { "from_id": "F2", "to_id": "F11", "flow": 1 }, { "from_id": "F2", "to_id": "F12", "flow": 0 }, { "from_id": "F3", "to_id": "F1", "flow": 635 }, { "from_id": "F3", "to_id": "F2", "flow": 14785 }, { "from_id": "F3", "to_id": "F4", "flow": 52 }, { "from_id": "F3", "to_id": "F5", "flow": 0 }, { "from_id": "F3", "to_id": "F6", "flow": 743 }, { "from_id": "F3", "to_id": "F7", "flow": 0 }, { "from_id": "F3", "to_id": "F8", "flow": 1 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F3", "to_id": "F10", "flow": 0 }, { "from_id": "F3", "to_id": "F11", "flow": 2 }, { "from_id": "F3", "to_id": "F12", "flow": 1 }, { "from_id": "F4", "to_id": "F1", "flow": 11 }, { "from_id": "F4", "to_id": "F2", "flow": 0 }, { "from_id": "F4", "to_id": "F3", "flow": 31 }, { "from_id": "F4", "to_id": "F5", "flow": 8407 }, { "from_id": "F4", "to_id": "F6", "flow": 0 }, { "from_id": "F4", "to_id": "F7", "flow": 0 }, { "from_id": "F4", "to_id": "F8", "flow": 0 }, { "from_id": "F4", "to_id": "F9", "flow": 0 }, { "from_id": "F4", "to_id": "F10", "flow": 2142 }, { "from_id": "F4", "to_id": "F11", "flow": 61 }, { "from_id": "F4", "to_id": "F12", "flow": 37 }, { "from_id": "F5", "to_id": "F1", "flow": 0 }, { "from_id": "F5", "to_id": "F2", "flow": 0 }, { "from_id": "F5", "to_id": "F3", "flow": 0 }, { "from_id": "F5", "to_id": "F4", "flow": 0 }, { "from_id": "F5", "to_id": "F6", "flow": 5 }, { "from_id": "F5", "to_id": "F7", "flow": 9610 }, { "from_id": "F5", "to_id": "F8", "flow": 1608 }, { "from_id": "F5", "to_id": "F9", "flow": 3021 }, { "from_id": "F5", "to_id": "F10", "flow": 397 }, { "from_id": "F5", "to_id": "F11", "flow": 10 }, { "from_id": "F5", "to_id": "F12", "flow": 0 }, { "from_id": "F6", "to_id": "F1", "flow": 53507 }, { "from_id": "F6", "to_id": "F2", "flow": 0 }, { "from_id": "F6", "to_id": "F3", "flow": 1 }, { "from_id": "F6", "to_id": "F4", "flow": 0 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 0 }, { "from_id": "F6", "to_id": "F9", "flow": 268 }, { "from_id": "F6", "to_id": "F10", "flow": 276 }, { "from_id": "F6", "to_id": "F11", "flow": 0 }, { "from_id": "F6", "to_id": "F12", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 0 }, { "from_id": "F7", "to_id": "F2", "flow": 4845 }, { "from_id": "F7", "to_id": "F3", "flow": 297 }, { "from_id": "F7", "to_id": "F4", "flow": 16251 }, { "from_id": "F7", "to_id": "F5", "flow": 0 }, { "from_id": "F7", "to_id": "F6", "flow": 122 }, { "from_id": "F7", "to_id": "F8", "flow": 0 }, { "from_id": "F7", "to_id": "F9", "flow": 151 }, { "from_id": "F7", "to_id": "F10", "flow": 3854 }, { "from_id": "F7", "to_id": "F11", "flow": 57 }, { "from_id": "F7", "to_id": "F12", "flow": 117 }, { "from_id": "F8", "to_id": "F1", "flow": 82 }, { "from_id": "F8", "to_id": "F2", "flow": 0 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 18299 }, { "from_id": "F8", "to_id": "F6", "flow": 72 }, { "from_id": "F8", "to_id": "F7", "flow": 1919 }, { "from_id": "F8", "to_id": "F9", "flow": 4 }, { "from_id": "F8", "to_id": "F10", "flow": 0 }, { "from_id": "F8", "to_id": "F11", "flow": 0 }, { "from_id": "F8", "to_id": "F12", "flow": 750 }, { "from_id": "F9", "to_id": "F1", "flow": 0 }, { "from_id": "F9", "to_id": "F2", "flow": 324 }, { "from_id": "F9", "to_id": "F3", "flow": 3918 }, { "from_id": "F9", "to_id": "F4", "flow": 398 }, { "from_id": "F9", "to_id": "F5", "flow": 0 }, { "from_id": "F9", "to_id": "F6", "flow": 4597 }, { "from_id": "F9", "to_id": "F7", "flow": 0 }, { "from_id": "F9", "to_id": "F8", "flow": 55597 }, { "from_id": "F9", "to_id": "F10", "flow": 88 }, { "from_id": "F9", "to_id": "F11", "flow": 0 }, { "from_id": "F9", "to_id": "F12", "flow": 0 }, { "from_id": "F10", "to_id": "F1", "flow": 60 }, { "from_id": "F10", "to_id": "F2", "flow": 0 }, { "from_id": "F10", "to_id": "F3", "flow": 0 }, { "from_id": "F10", "to_id": "F4", "flow": 0 }, { "from_id": "F10", "to_id": "F5", "flow": 31854 }, { "from_id": "F10", "to_id": "F6", "flow": 0 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 51089 }, { "from_id": "F10", "to_id": "F9", "flow": 0 }, { "from_id": "F10", "to_id": "F11", "flow": 32 }, { "from_id": "F10", "to_id": "F12", "flow": 2785 }, { "from_id": "F11", "to_id": "F1", "flow": 30671 }, { "from_id": "F11", "to_id": "F2", "flow": 32 }, { "from_id": "F11", "to_id": "F3", "flow": 1 }, { "from_id": "F11", "to_id": "F4", "flow": 0 }, { "from_id": "F11", "to_id": "F5", "flow": 2 }, { "from_id": "F11", "to_id": "F6", "flow": 10 }, { "from_id": "F11", "to_id": "F7", "flow": 92 }, { "from_id": "F11", "to_id": "F8", "flow": 1149 }, { "from_id": "F11", "to_id": "F9", "flow": 0 }, { "from_id": "F11", "to_id": "F10", "flow": 0 }, { "from_id": "F11", "to_id": "F12", "flow": 427 }, { "from_id": "F12", "to_id": "F1", "flow": 2547 }, { "from_id": "F12", "to_id": "F2", "flow": 0 }, { "from_id": "F12", "to_id": "F3", "flow": 48114 }, { "from_id": "F12", "to_id": "F4", "flow": 0 }, { "from_id": "F12", "to_id": "F5", "flow": 16916 }, { "from_id": "F12", "to_id": "F6", "flow": 0 }, { "from_id": "F12", "to_id": "F7", "flow": 2 }, { "from_id": "F12", "to_id": "F8", "flow": 5583 }, { "from_id": "F12", "to_id": "F9", "flow": 0 }, { "from_id": "F12", "to_id": "F10", "flow": 106 }, { "from_id": "F12", "to_id": "F11", "flow": 40778 } ] }, "solution_variant": [ 0, 7, 3, 11, 5, 9, 10, 6, 8, 4, 1, 2 ], "context_index": 45, "input_format": "csv", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Many folks on the crew were comparing layouts: one variety per field, one field per variety, no repeats and no empty spots. The clever layouts are those that minimize hauling and coordination — put varieties that share lots of operations nearer to each other so there’s less back-and-forth. To measure it, for every pair of varieties multiply how often they share operations by the distance between their assigned fields, and then total those products; the layout with the lowest total is preferred. The concrete instance details (distances, shared-operation numbers, field names) are given below.\n\n# num_fields_and_varieties=12\n# crop_variety_ids=F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12\n# field_ids=0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11\n\nfield_from_id,field_to_id,distance_between_fields\n0,1,0\n0,2,0\n0,3,0\n0,4,2\n0,5,7\n0,6,0\n0,7,0\n0,8,0\n0,9,0\n0,10,0\n0,11,0\n1,0,0\n1,2,0\n1,3,0\n1,4,0\n1,5,0\n1,6,0\n1,7,0\n1,8,0\n1,9,0\n1,10,0\n1,11,0\n2,0,0\n2,1,0\n2,3,0\n2,4,0\n2,5,0\n2,6,4\n2,7,9\n2,8,0\n2,9,0\n2,10,0\n2,11,0\n3,0,0\n3,1,0\n3,2,0\n3,4,0\n3,5,0\n3,6,0\n3,7,0\n3,8,0\n3,9,0\n3,10,0\n3,11,0\n4,0,2\n4,1,0\n4,2,0\n4,3,0\n4,5,0\n4,6,0\n4,7,0\n4,8,0\n4,9,0\n4,10,0\n4,11,0\n5,0,7\n5,1,0\n5,2,0\n5,3,0\n5,4,0\n5,6,0\n5,7,0\n5,8,0\n5,9,0\n5,10,0\n5,11,0\n6,0,0\n6,1,0\n6,2,4\n6,3,0\n6,4,0\n6,5,0\n6,7,0\n6,8,0\n6,9,13\n6,10,7\n6,11,0\n7,0,0\n7,1,0\n7,2,9\n7,3,0\n7,4,0\n7,5,0\n7,6,0\n7,8,0\n7,9,0\n7,10,0\n7,11,0\n8,0,0\n8,1,0\n8,2,0\n8,3,0\n8,4,0\n8,5,0\n8,6,0\n8,7,0\n8,9,0\n8,10,0\n8,11,0\n9,0,0\n9,1,0\n9,2,0\n9,3,0\n9,4,0\n9,5,0\n9,6,13\n9,7,0\n9,8,0\n9,10,0\n9,11,0\n10,0,0\n10,1,0\n10,2,0\n10,3,0\n10,4,0\n10,5,0\n10,6,7\n10,7,0\n10,8,0\n10,9,0\n10,11,0\n11,0,0\n11,1,0\n11,2,0\n11,3,0\n11,4,0\n11,5,0\n11,6,0\n11,7,0\n11,8,0\n11,9,0\n11,10,0\n\nvariety_from_id,variety_to_id,shared_operations_frequency\nF1,F2,13\nF1,F3,20\nF1,F4,14\nF1,F5,21\nF1,F6,37\nF1,F7,12\nF1,F8,19\nF1,F9,22\nF1,F10,39\nF1,F11,12\nF1,F12,50\nF2,F1,13\nF2,F3,19\nF2,F4,24\nF2,F5,36\nF2,F6,39\nF2,F7,17\nF2,F8,34\nF2,F9,10\nF2,F10,37\nF2,F11,13\nF2,F12,63\nF3,F1,20\nF3,F2,19\nF3,F4,25\nF3,F5,37\nF3,F6,22\nF3,F7,16\nF3,F8,12\nF3,F9,27\nF3,F10,25\nF3,F11,14\nF3,F12,12\nF4,F1,14\nF4,F2,24\nF4,F3,25\nF4,F5,37\nF4,F6,12\nF4,F7,44\nF4,F8,10\nF4,F9,50\nF4,F10,40\nF4,F11,13\nF4,F12,24\nF5,F1,21\nF5,F2,36\nF5,F3,37\nF5,F4,37\nF5,F6,14\nF5,F7,22\nF5,F8,17\nF5,F9,29\nF5,F10,10\nF5,F11,22\nF5,F12,31\nF6,F1,37\nF6,F2,39\nF6,F3,22\nF6,F4,12\nF6,F5,14\nF6,F7,25\nF6,F8,10\nF6,F9,14\nF6,F10,31\nF6,F11,52\nF6,F12,14\nF7,F1,12\nF7,F2,17\nF7,F3,16\nF7,F4,44\nF7,F5,22\nF7,F6,25\nF7,F8,40\nF7,F9,29\nF7,F10,15\nF7,F11,33\nF7,F12,16\nF8,F1,19\nF8,F2,34\nF8,F3,12\nF8,F4,10\nF8,F5,17\nF8,F6,10\nF8,F7,40\nF8,F9,30\nF8,F10,19\nF8,F11,26\nF8,F12,14\nF9,F1,22\nF9,F2,10\nF9,F3,27\nF9,F4,50\nF9,F5,29\nF9,F6,14\nF9,F7,29\nF9,F8,30\nF9,F10,64\nF9,F11,27\nF9,F12,19\nF10,F1,39\nF10,F2,37\nF10,F3,25\nF10,F4,40\nF10,F5,10\nF10,F6,31\nF10,F7,15\nF10,F8,19\nF10,F9,64\nF10,F11,22\nF10,F12,27\nF11,F1,12\nF11,F2,13\nF11,F3,14\nF11,F4,13\nF11,F5,22\nF11,F6,52\nF11,F7,33\nF11,F8,26\nF11,F9,27\nF11,F10,22\nF11,F12,39\nF12,F1,50\nF12,F2,63\nF12,F3,12\nF12,F4,24\nF12,F5,31\nF12,F6,14\nF12,F7,16\nF12,F8,14\nF12,F9,19\nF12,F10,27\nF12,F11,39\n\nIf you want to send me a candidate layout, just drop it in a tiny JSON snippet like this — neat and predictable so I can read it straight away.\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis \"solution\" list is just the lineup of which field each variety gets, in order: the first item is the field assigned to the first variety, the second item to the second variety, and so on. Think of it as filling out a simple form — one field choice per variety.\n\nThis is just the expected shape, not the actual answer — replace those placeholders with the real identifiers from the instance. Please use the identifiers exactly as they appear in the input — no renaming and no invented labels.\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 0, 0, 0, 2, 7, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 4, 0, 0, 0, 0, 0, 0, 13, 7, 0 ], [ 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 13, 20, 14, 21, 37, 12, 19, 22, 39, 12, 50 ], [ 13, 0, 19, 24, 36, 39, 17, 34, 10, 37, 13, 63 ], [ 20, 19, 0, 25, 37, 22, 16, 12, 27, 25, 14, 12 ], [ 14, 24, 25, 0, 37, 12, 44, 10, 50, 40, 13, 24 ], [ 21, 36, 37, 37, 0, 14, 22, 17, 29, 10, 22, 31 ], [ 37, 39, 22, 12, 14, 0, 25, 10, 14, 31, 52, 14 ], [ 12, 17, 16, 44, 22, 25, 0, 40, 29, 15, 33, 16 ], [ 19, 34, 12, 10, 17, 10, 40, 0, 30, 19, 26, 14 ], [ 22, 10, 27, 50, 29, 14, 29, 30, 0, 64, 27, 19 ], [ 39, 37, 25, 40, 10, 31, 15, 19, 64, 0, 22, 27 ], [ 12, 13, 14, 13, 22, 52, 33, 26, 27, 22, 0, 39 ], [ 50, 63, 12, 24, 31, 14, 16, 14, 19, 27, 39, 0 ] ], "objective": 912.0 }, "solution": [ 3, 11, 2, 10, 5, 9, 4, 6, 1, 0, 8, 7 ], "obj": 912.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 12, "num_locations": 12, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 0 }, { "from_id": 0, "to_id": 2, "distance": 0 }, { "from_id": 0, "to_id": 3, "distance": 0 }, { "from_id": 0, "to_id": 4, "distance": 2 }, { "from_id": 0, "to_id": 5, "distance": 7 }, { "from_id": 0, "to_id": 6, "distance": 0 }, { "from_id": 0, "to_id": 7, "distance": 0 }, { "from_id": 0, "to_id": 8, "distance": 0 }, { "from_id": 0, "to_id": 9, "distance": 0 }, { "from_id": 0, "to_id": 10, "distance": 0 }, { "from_id": 0, "to_id": 11, "distance": 0 }, { "from_id": 1, "to_id": 0, "distance": 0 }, { "from_id": 1, "to_id": 2, "distance": 0 }, { "from_id": 1, "to_id": 3, "distance": 0 }, { "from_id": 1, "to_id": 4, "distance": 0 }, { "from_id": 1, "to_id": 5, "distance": 0 }, { "from_id": 1, "to_id": 6, "distance": 0 }, { "from_id": 1, "to_id": 7, "distance": 0 }, { "from_id": 1, "to_id": 8, "distance": 0 }, { "from_id": 1, "to_id": 9, "distance": 0 }, { "from_id": 1, "to_id": 10, "distance": 0 }, { "from_id": 1, "to_id": 11, "distance": 0 }, { "from_id": 2, "to_id": 0, "distance": 0 }, { "from_id": 2, "to_id": 1, "distance": 0 }, { "from_id": 2, "to_id": 3, "distance": 0 }, { "from_id": 2, "to_id": 4, "distance": 0 }, { "from_id": 2, "to_id": 5, "distance": 0 }, { "from_id": 2, "to_id": 6, "distance": 4 }, { "from_id": 2, "to_id": 7, "distance": 9 }, { "from_id": 2, "to_id": 8, "distance": 0 }, { "from_id": 2, "to_id": 9, "distance": 0 }, { "from_id": 2, "to_id": 10, "distance": 0 }, { "from_id": 2, "to_id": 11, "distance": 0 }, { "from_id": 3, "to_id": 0, "distance": 0 }, { "from_id": 3, "to_id": 1, "distance": 0 }, { "from_id": 3, "to_id": 2, "distance": 0 }, { "from_id": 3, "to_id": 4, "distance": 0 }, { "from_id": 3, "to_id": 5, "distance": 0 }, { "from_id": 3, "to_id": 6, "distance": 0 }, { "from_id": 3, "to_id": 7, "distance": 0 }, { "from_id": 3, "to_id": 8, "distance": 0 }, { "from_id": 3, "to_id": 9, "distance": 0 }, { "from_id": 3, "to_id": 10, "distance": 0 }, { "from_id": 3, "to_id": 11, "distance": 0 }, { "from_id": 4, "to_id": 0, "distance": 2 }, { "from_id": 4, "to_id": 1, "distance": 0 }, { "from_id": 4, "to_id": 2, "distance": 0 }, { "from_id": 4, "to_id": 3, "distance": 0 }, { "from_id": 4, "to_id": 5, "distance": 0 }, { "from_id": 4, "to_id": 6, "distance": 0 }, { "from_id": 4, "to_id": 7, "distance": 0 }, { "from_id": 4, "to_id": 8, "distance": 0 }, { "from_id": 4, "to_id": 9, "distance": 0 }, { "from_id": 4, "to_id": 10, "distance": 0 }, { "from_id": 4, "to_id": 11, "distance": 0 }, { "from_id": 5, "to_id": 0, "distance": 7 }, { "from_id": 5, "to_id": 1, "distance": 0 }, { "from_id": 5, "to_id": 2, "distance": 0 }, { "from_id": 5, "to_id": 3, "distance": 0 }, { "from_id": 5, "to_id": 4, "distance": 0 }, { "from_id": 5, "to_id": 6, "distance": 0 }, { "from_id": 5, "to_id": 7, "distance": 0 }, { "from_id": 5, "to_id": 8, "distance": 0 }, { "from_id": 5, "to_id": 9, "distance": 0 }, { "from_id": 5, "to_id": 10, "distance": 0 }, { "from_id": 5, "to_id": 11, "distance": 0 }, { "from_id": 6, "to_id": 0, "distance": 0 }, { "from_id": 6, "to_id": 1, "distance": 0 }, { "from_id": 6, "to_id": 2, "distance": 4 }, { "from_id": 6, "to_id": 3, "distance": 0 }, { "from_id": 6, "to_id": 4, "distance": 0 }, { "from_id": 6, "to_id": 5, "distance": 0 }, { "from_id": 6, "to_id": 7, "distance": 0 }, { "from_id": 6, "to_id": 8, "distance": 0 }, { "from_id": 6, "to_id": 9, "distance": 13 }, { "from_id": 6, "to_id": 10, "distance": 7 }, { "from_id": 6, "to_id": 11, "distance": 0 }, { "from_id": 7, "to_id": 0, "distance": 0 }, { "from_id": 7, "to_id": 1, "distance": 0 }, { "from_id": 7, "to_id": 2, "distance": 9 }, { "from_id": 7, "to_id": 3, "distance": 0 }, { "from_id": 7, "to_id": 4, "distance": 0 }, { "from_id": 7, "to_id": 5, "distance": 0 }, { "from_id": 7, "to_id": 6, "distance": 0 }, { "from_id": 7, "to_id": 8, "distance": 0 }, { "from_id": 7, "to_id": 9, "distance": 0 }, { "from_id": 7, "to_id": 10, "distance": 0 }, { "from_id": 7, "to_id": 11, "distance": 0 }, { "from_id": 8, "to_id": 0, "distance": 0 }, { "from_id": 8, "to_id": 1, "distance": 0 }, { "from_id": 8, "to_id": 2, "distance": 0 }, { "from_id": 8, "to_id": 3, "distance": 0 }, { "from_id": 8, "to_id": 4, "distance": 0 }, { "from_id": 8, "to_id": 5, "distance": 0 }, { "from_id": 8, "to_id": 6, "distance": 0 }, { "from_id": 8, "to_id": 7, "distance": 0 }, { "from_id": 8, "to_id": 9, "distance": 0 }, { "from_id": 8, "to_id": 10, "distance": 0 }, { "from_id": 8, "to_id": 11, "distance": 0 }, { "from_id": 9, "to_id": 0, "distance": 0 }, { "from_id": 9, "to_id": 1, "distance": 0 }, { "from_id": 9, "to_id": 2, "distance": 0 }, { "from_id": 9, "to_id": 3, "distance": 0 }, { "from_id": 9, "to_id": 4, "distance": 0 }, { "from_id": 9, "to_id": 5, "distance": 0 }, { "from_id": 9, "to_id": 6, "distance": 13 }, { "from_id": 9, "to_id": 7, "distance": 0 }, { "from_id": 9, "to_id": 8, "distance": 0 }, { "from_id": 9, "to_id": 10, "distance": 0 }, { "from_id": 9, "to_id": 11, "distance": 0 }, { "from_id": 10, "to_id": 0, "distance": 0 }, { "from_id": 10, "to_id": 1, "distance": 0 }, { "from_id": 10, "to_id": 2, "distance": 0 }, { "from_id": 10, "to_id": 3, "distance": 0 }, { "from_id": 10, "to_id": 4, "distance": 0 }, { "from_id": 10, "to_id": 5, "distance": 0 }, { "from_id": 10, "to_id": 6, "distance": 7 }, { "from_id": 10, "to_id": 7, "distance": 0 }, { "from_id": 10, "to_id": 8, "distance": 0 }, { "from_id": 10, "to_id": 9, "distance": 0 }, { "from_id": 10, "to_id": 11, "distance": 0 }, { "from_id": 11, "to_id": 0, "distance": 0 }, { "from_id": 11, "to_id": 1, "distance": 0 }, { "from_id": 11, "to_id": 2, "distance": 0 }, { "from_id": 11, "to_id": 3, "distance": 0 }, { "from_id": 11, "to_id": 4, "distance": 0 }, { "from_id": 11, "to_id": 5, "distance": 0 }, { "from_id": 11, "to_id": 6, "distance": 0 }, { "from_id": 11, "to_id": 7, "distance": 0 }, { "from_id": 11, "to_id": 8, "distance": 0 }, { "from_id": 11, "to_id": 9, "distance": 0 }, { "from_id": 11, "to_id": 10, "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 13 }, { "from_id": "F1", "to_id": "F3", "flow": 20 }, { "from_id": "F1", "to_id": "F4", "flow": 14 }, { "from_id": "F1", "to_id": "F5", "flow": 21 }, { "from_id": "F1", "to_id": "F6", "flow": 37 }, { "from_id": "F1", "to_id": "F7", "flow": 12 }, { "from_id": "F1", "to_id": "F8", "flow": 19 }, { "from_id": "F1", "to_id": "F9", "flow": 22 }, { "from_id": "F1", "to_id": "F10", "flow": 39 }, { "from_id": "F1", "to_id": "F11", "flow": 12 }, { "from_id": "F1", "to_id": "F12", "flow": 50 }, { "from_id": "F2", "to_id": "F1", "flow": 13 }, { "from_id": "F2", "to_id": "F3", "flow": 19 }, { "from_id": "F2", "to_id": "F4", "flow": 24 }, { "from_id": "F2", "to_id": "F5", "flow": 36 }, { "from_id": "F2", "to_id": "F6", "flow": 39 }, { "from_id": "F2", "to_id": "F7", "flow": 17 }, { "from_id": "F2", "to_id": "F8", "flow": 34 }, { "from_id": "F2", "to_id": "F9", "flow": 10 }, { "from_id": "F2", "to_id": "F10", "flow": 37 }, { "from_id": "F2", "to_id": "F11", "flow": 13 }, { "from_id": "F2", "to_id": "F12", "flow": 63 }, { "from_id": "F3", "to_id": "F1", "flow": 20 }, { "from_id": "F3", "to_id": "F2", "flow": 19 }, { "from_id": "F3", "to_id": "F4", "flow": 25 }, { "from_id": "F3", "to_id": "F5", "flow": 37 }, { "from_id": "F3", "to_id": "F6", "flow": 22 }, { "from_id": "F3", "to_id": "F7", "flow": 16 }, { "from_id": "F3", "to_id": "F8", "flow": 12 }, { "from_id": "F3", "to_id": "F9", "flow": 27 }, { "from_id": "F3", "to_id": "F10", "flow": 25 }, { "from_id": "F3", "to_id": "F11", "flow": 14 }, { "from_id": "F3", "to_id": "F12", "flow": 12 }, { "from_id": "F4", "to_id": "F1", "flow": 14 }, { "from_id": "F4", "to_id": "F2", "flow": 24 }, { "from_id": "F4", "to_id": "F3", "flow": 25 }, { "from_id": "F4", "to_id": "F5", "flow": 37 }, { "from_id": "F4", "to_id": "F6", "flow": 12 }, { "from_id": "F4", "to_id": "F7", "flow": 44 }, { "from_id": "F4", "to_id": "F8", "flow": 10 }, { "from_id": "F4", "to_id": "F9", "flow": 50 }, { "from_id": "F4", "to_id": "F10", "flow": 40 }, { "from_id": "F4", "to_id": "F11", "flow": 13 }, { "from_id": "F4", "to_id": "F12", "flow": 24 }, { "from_id": "F5", "to_id": "F1", "flow": 21 }, { "from_id": "F5", "to_id": "F2", "flow": 36 }, { "from_id": "F5", "to_id": "F3", "flow": 37 }, { "from_id": "F5", "to_id": "F4", "flow": 37 }, { "from_id": "F5", "to_id": "F6", "flow": 14 }, { "from_id": "F5", "to_id": "F7", "flow": 22 }, { "from_id": "F5", "to_id": "F8", "flow": 17 }, { "from_id": "F5", "to_id": "F9", "flow": 29 }, { "from_id": "F5", "to_id": "F10", "flow": 10 }, { "from_id": "F5", "to_id": "F11", "flow": 22 }, { "from_id": "F5", "to_id": "F12", "flow": 31 }, { "from_id": "F6", "to_id": "F1", "flow": 37 }, { "from_id": "F6", "to_id": "F2", "flow": 39 }, { "from_id": "F6", "to_id": "F3", "flow": 22 }, { "from_id": "F6", "to_id": "F4", "flow": 12 }, { "from_id": "F6", "to_id": "F5", "flow": 14 }, { "from_id": "F6", "to_id": "F7", "flow": 25 }, { "from_id": "F6", "to_id": "F8", "flow": 10 }, { "from_id": "F6", "to_id": "F9", "flow": 14 }, { "from_id": "F6", "to_id": "F10", "flow": 31 }, { "from_id": "F6", "to_id": "F11", "flow": 52 }, { "from_id": "F6", "to_id": "F12", "flow": 14 }, { "from_id": "F7", "to_id": "F1", "flow": 12 }, { "from_id": "F7", "to_id": "F2", "flow": 17 }, { "from_id": "F7", "to_id": "F3", "flow": 16 }, { "from_id": "F7", "to_id": "F4", "flow": 44 }, { "from_id": "F7", "to_id": "F5", "flow": 22 }, { "from_id": "F7", "to_id": "F6", "flow": 25 }, { "from_id": "F7", "to_id": "F8", "flow": 40 }, { "from_id": "F7", "to_id": "F9", "flow": 29 }, { "from_id": "F7", "to_id": "F10", "flow": 15 }, { "from_id": "F7", "to_id": "F11", "flow": 33 }, { "from_id": "F7", "to_id": "F12", "flow": 16 }, { "from_id": "F8", "to_id": "F1", "flow": 19 }, { "from_id": "F8", "to_id": "F2", "flow": 34 }, { "from_id": "F8", "to_id": "F3", "flow": 12 }, { "from_id": "F8", "to_id": "F4", "flow": 10 }, { "from_id": "F8", "to_id": "F5", "flow": 17 }, { "from_id": "F8", "to_id": "F6", "flow": 10 }, { "from_id": "F8", "to_id": "F7", "flow": 40 }, { "from_id": "F8", "to_id": "F9", "flow": 30 }, { "from_id": "F8", "to_id": "F10", "flow": 19 }, { "from_id": "F8", "to_id": "F11", "flow": 26 }, { "from_id": "F8", "to_id": "F12", "flow": 14 }, { "from_id": "F9", "to_id": "F1", "flow": 22 }, { "from_id": "F9", "to_id": "F2", "flow": 10 }, { "from_id": "F9", "to_id": "F3", "flow": 27 }, { "from_id": "F9", "to_id": "F4", "flow": 50 }, { "from_id": "F9", "to_id": "F5", "flow": 29 }, { "from_id": "F9", "to_id": "F6", "flow": 14 }, { "from_id": "F9", "to_id": "F7", "flow": 29 }, { "from_id": "F9", "to_id": "F8", "flow": 30 }, { "from_id": "F9", "to_id": "F10", "flow": 64 }, { "from_id": "F9", "to_id": "F11", "flow": 27 }, { "from_id": "F9", "to_id": "F12", "flow": 19 }, { "from_id": "F10", "to_id": "F1", "flow": 39 }, { "from_id": "F10", "to_id": "F2", "flow": 37 }, { "from_id": "F10", "to_id": "F3", "flow": 25 }, { "from_id": "F10", "to_id": "F4", "flow": 40 }, { "from_id": "F10", "to_id": "F5", "flow": 10 }, { "from_id": "F10", "to_id": "F6", "flow": 31 }, { "from_id": "F10", "to_id": "F7", "flow": 15 }, { "from_id": "F10", "to_id": "F8", "flow": 19 }, { "from_id": "F10", "to_id": "F9", "flow": 64 }, { "from_id": "F10", "to_id": "F11", "flow": 22 }, { "from_id": "F10", "to_id": "F12", "flow": 27 }, { "from_id": "F11", "to_id": "F1", "flow": 12 }, { "from_id": "F11", "to_id": "F2", "flow": 13 }, { "from_id": "F11", "to_id": "F3", "flow": 14 }, { "from_id": "F11", "to_id": "F4", "flow": 13 }, { "from_id": "F11", "to_id": "F5", "flow": 22 }, { "from_id": "F11", "to_id": "F6", "flow": 52 }, { "from_id": "F11", "to_id": "F7", "flow": 33 }, { "from_id": "F11", "to_id": "F8", "flow": 26 }, { "from_id": "F11", "to_id": "F9", "flow": 27 }, { "from_id": "F11", "to_id": "F10", "flow": 22 }, { "from_id": "F11", "to_id": "F12", "flow": 39 }, { "from_id": "F12", "to_id": "F1", "flow": 50 }, { "from_id": "F12", "to_id": "F2", "flow": 63 }, { "from_id": "F12", "to_id": "F3", "flow": 12 }, { "from_id": "F12", "to_id": "F4", "flow": 24 }, { "from_id": "F12", "to_id": "F5", "flow": 31 }, { "from_id": "F12", "to_id": "F6", "flow": 14 }, { "from_id": "F12", "to_id": "F7", "flow": 16 }, { "from_id": "F12", "to_id": "F8", "flow": 14 }, { "from_id": "F12", "to_id": "F9", "flow": 19 }, { "from_id": "F12", "to_id": "F10", "flow": 27 }, { "from_id": "F12", "to_id": "F11", "flow": 39 } ] }, "solution_variant": [ 3, 11, 2, 10, 5, 9, 4, 6, 1, 0, 8, 7 ], "context_index": 46, "input_format": "csv", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "I’m the exhibit designer laying out a new interactive floor. The job is to put each display on its own floor spot so every spot has exactly one display and no display is doubled up. The trick is that some pairs of displays draw lots of back-and-forth traffic, and others hardly do — so a “good” layout is the one that keeps visitors’ walking down by putting high-traffic pairs closer together. To figure that out, add up, for every pair of displays, how often people travel between them multiplied by how far apart the two chosen spots are — that total is what the layout should try to keep low. The specific map of spots and the pairwise visitor flows are shown below.\n\n{\n \"num_displays\": 10,\n \"display_ids\": [\n \"F1\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\",\n \"F10\"\n ],\n \"spot_ids\": [\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\",\n \"J\"\n ],\n \"distance\": [\n {\n \"spot_from_id\": \"A\",\n \"spot_to_id\": \"B\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"A\",\n \"spot_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"A\",\n \"spot_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"A\",\n \"spot_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"A\",\n \"spot_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"A\",\n \"spot_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"A\",\n \"spot_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"A\",\n \"spot_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"A\",\n \"spot_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"B\",\n \"spot_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"B\",\n \"spot_to_id\": \"C\",\n \"walking_distance\": 19\n },\n {\n \"spot_from_id\": \"B\",\n \"spot_to_id\": \"D\",\n \"walking_distance\": 47\n },\n {\n \"spot_from_id\": \"B\",\n \"spot_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"B\",\n \"spot_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"B\",\n \"spot_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"B\",\n \"spot_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"B\",\n \"spot_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"B\",\n \"spot_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"C\",\n \"spot_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"C\",\n \"spot_to_id\": \"B\",\n \"walking_distance\": 19\n },\n {\n \"spot_from_id\": \"C\",\n \"spot_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"C\",\n \"spot_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"C\",\n \"spot_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"C\",\n \"spot_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"C\",\n \"spot_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"C\",\n \"spot_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"C\",\n \"spot_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"D\",\n \"spot_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"D\",\n \"spot_to_id\": \"B\",\n \"walking_distance\": 47\n },\n {\n \"spot_from_id\": \"D\",\n \"spot_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"D\",\n \"spot_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"D\",\n \"spot_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"D\",\n \"spot_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"D\",\n \"spot_to_id\": \"H\",\n \"walking_distance\": 73\n },\n {\n \"spot_from_id\": \"D\",\n \"spot_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"D\",\n \"spot_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"E\",\n \"spot_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"E\",\n \"spot_to_id\": \"B\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"E\",\n \"spot_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"E\",\n \"spot_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"E\",\n \"spot_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"E\",\n \"spot_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"E\",\n \"spot_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"E\",\n \"spot_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"E\",\n \"spot_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"F\",\n \"spot_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"F\",\n \"spot_to_id\": \"B\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"F\",\n \"spot_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"F\",\n \"spot_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"F\",\n \"spot_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"F\",\n \"spot_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"F\",\n \"spot_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"F\",\n \"spot_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"F\",\n \"spot_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"G\",\n \"spot_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"G\",\n \"spot_to_id\": \"B\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"G\",\n \"spot_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"G\",\n \"spot_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"G\",\n \"spot_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"G\",\n \"spot_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"G\",\n \"spot_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"G\",\n \"spot_to_id\": \"I\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"G\",\n \"spot_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"H\",\n \"spot_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"H\",\n \"spot_to_id\": \"B\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"H\",\n \"spot_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"H\",\n \"spot_to_id\": \"D\",\n \"walking_distance\": 73\n },\n {\n \"spot_from_id\": \"H\",\n \"spot_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"H\",\n \"spot_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"H\",\n \"spot_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"H\",\n \"spot_to_id\": \"I\",\n \"walking_distance\": 84\n },\n {\n \"spot_from_id\": \"H\",\n \"spot_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"I\",\n \"spot_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"I\",\n \"spot_to_id\": \"B\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"I\",\n \"spot_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"I\",\n \"spot_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"I\",\n \"spot_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"I\",\n \"spot_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"I\",\n \"spot_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"I\",\n \"spot_to_id\": \"H\",\n \"walking_distance\": 84\n },\n {\n \"spot_from_id\": \"I\",\n \"spot_to_id\": \"J\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"J\",\n \"spot_to_id\": \"A\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"J\",\n \"spot_to_id\": \"B\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"J\",\n \"spot_to_id\": \"C\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"J\",\n \"spot_to_id\": \"D\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"J\",\n \"spot_to_id\": \"E\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"J\",\n \"spot_to_id\": \"F\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"J\",\n \"spot_to_id\": \"G\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"J\",\n \"spot_to_id\": \"H\",\n \"walking_distance\": 0\n },\n {\n \"spot_from_id\": \"J\",\n \"spot_to_id\": \"I\",\n \"walking_distance\": 0\n }\n ],\n \"flow\": [\n {\n \"display_from_id\": \"F1\",\n \"display_to_id\": \"F2\",\n \"visitor_flow\": 7\n },\n {\n \"display_from_id\": \"F1\",\n \"display_to_id\": \"F3\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F1\",\n \"display_to_id\": \"F4\",\n \"visitor_flow\": 7\n },\n {\n \"display_from_id\": \"F1\",\n \"display_to_id\": \"F5\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F1\",\n \"display_to_id\": \"F6\",\n \"visitor_flow\": 2\n },\n {\n \"display_from_id\": \"F1\",\n \"display_to_id\": \"F7\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F1\",\n \"display_to_id\": \"F8\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F1\",\n \"display_to_id\": \"F9\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F1\",\n \"display_to_id\": \"F10\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F2\",\n \"display_to_id\": \"F1\",\n \"visitor_flow\": 7\n },\n {\n \"display_from_id\": \"F2\",\n \"display_to_id\": \"F3\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F2\",\n \"display_to_id\": \"F4\",\n \"visitor_flow\": 1\n },\n {\n \"display_from_id\": \"F2\",\n \"display_to_id\": \"F5\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F2\",\n \"display_to_id\": \"F6\",\n \"visitor_flow\": 1\n },\n {\n \"display_from_id\": \"F2\",\n \"display_to_id\": \"F7\",\n \"visitor_flow\": 1\n },\n {\n \"display_from_id\": \"F2\",\n \"display_to_id\": \"F8\",\n \"visitor_flow\": 2\n },\n {\n \"display_from_id\": \"F2\",\n \"display_to_id\": \"F9\",\n \"visitor_flow\": 7\n },\n {\n \"display_from_id\": \"F2\",\n \"display_to_id\": \"F10\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F3\",\n \"display_to_id\": \"F1\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F3\",\n \"display_to_id\": \"F2\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F3\",\n \"display_to_id\": \"F4\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F3\",\n \"display_to_id\": \"F5\",\n \"visitor_flow\": 5\n },\n {\n \"display_from_id\": \"F3\",\n \"display_to_id\": \"F6\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F3\",\n \"display_to_id\": \"F7\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F3\",\n \"display_to_id\": \"F8\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F3\",\n \"display_to_id\": \"F9\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F3\",\n \"display_to_id\": \"F10\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F4\",\n \"display_to_id\": \"F1\",\n \"visitor_flow\": 7\n },\n {\n \"display_from_id\": \"F4\",\n \"display_to_id\": \"F2\",\n \"visitor_flow\": 1\n },\n {\n \"display_from_id\": \"F4\",\n \"display_to_id\": \"F3\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F4\",\n \"display_to_id\": \"F5\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F4\",\n \"display_to_id\": \"F6\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F4\",\n \"display_to_id\": \"F7\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F4\",\n \"display_to_id\": \"F8\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F4\",\n \"display_to_id\": \"F9\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F4\",\n \"display_to_id\": \"F10\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F5\",\n \"display_to_id\": \"F1\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F5\",\n \"display_to_id\": \"F2\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F5\",\n \"display_to_id\": \"F3\",\n \"visitor_flow\": 5\n },\n {\n \"display_from_id\": \"F5\",\n \"display_to_id\": \"F4\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F5\",\n \"display_to_id\": \"F6\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F5\",\n \"display_to_id\": \"F7\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F5\",\n \"display_to_id\": \"F8\",\n \"visitor_flow\": 2\n },\n {\n \"display_from_id\": \"F5\",\n \"display_to_id\": \"F9\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F5\",\n \"display_to_id\": \"F10\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F6\",\n \"display_to_id\": \"F1\",\n \"visitor_flow\": 2\n },\n {\n \"display_from_id\": \"F6\",\n \"display_to_id\": \"F2\",\n \"visitor_flow\": 1\n },\n {\n \"display_from_id\": \"F6\",\n \"display_to_id\": \"F3\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F6\",\n \"display_to_id\": \"F4\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F6\",\n \"display_to_id\": \"F5\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F6\",\n \"display_to_id\": \"F7\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F6\",\n \"display_to_id\": \"F8\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F6\",\n \"display_to_id\": \"F9\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F6\",\n \"display_to_id\": \"F10\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F7\",\n \"display_to_id\": \"F1\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F7\",\n \"display_to_id\": \"F2\",\n \"visitor_flow\": 1\n },\n {\n \"display_from_id\": \"F7\",\n \"display_to_id\": \"F3\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F7\",\n \"display_to_id\": \"F4\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F7\",\n \"display_to_id\": \"F5\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F7\",\n \"display_to_id\": \"F6\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F7\",\n \"display_to_id\": \"F8\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F7\",\n \"display_to_id\": \"F9\",\n \"visitor_flow\": 2\n },\n {\n \"display_from_id\": \"F7\",\n \"display_to_id\": \"F10\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F8\",\n \"display_to_id\": \"F1\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F8\",\n \"display_to_id\": \"F2\",\n \"visitor_flow\": 2\n },\n {\n \"display_from_id\": \"F8\",\n \"display_to_id\": \"F3\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F8\",\n \"display_to_id\": \"F4\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F8\",\n \"display_to_id\": \"F5\",\n \"visitor_flow\": 2\n },\n {\n \"display_from_id\": \"F8\",\n \"display_to_id\": \"F6\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F8\",\n \"display_to_id\": \"F7\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F8\",\n \"display_to_id\": \"F9\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F8\",\n \"display_to_id\": \"F10\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F9\",\n \"display_to_id\": \"F1\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F9\",\n \"display_to_id\": \"F2\",\n \"visitor_flow\": 7\n },\n {\n \"display_from_id\": \"F9\",\n \"display_to_id\": \"F3\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F9\",\n \"display_to_id\": \"F4\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F9\",\n \"display_to_id\": \"F5\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F9\",\n \"display_to_id\": \"F6\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F9\",\n \"display_to_id\": \"F7\",\n \"visitor_flow\": 2\n },\n {\n \"display_from_id\": \"F9\",\n \"display_to_id\": \"F8\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F9\",\n \"display_to_id\": \"F10\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F10\",\n \"display_to_id\": \"F1\",\n \"visitor_flow\": 3\n },\n {\n \"display_from_id\": \"F10\",\n \"display_to_id\": \"F2\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F10\",\n \"display_to_id\": \"F3\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F10\",\n \"display_to_id\": \"F4\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F10\",\n \"display_to_id\": \"F5\",\n \"visitor_flow\": 6\n },\n {\n \"display_from_id\": \"F10\",\n \"display_to_id\": \"F6\",\n \"visitor_flow\": 9\n },\n {\n \"display_from_id\": \"F10\",\n \"display_to_id\": \"F7\",\n \"visitor_flow\": 8\n },\n {\n \"display_from_id\": \"F10\",\n \"display_to_id\": \"F8\",\n \"visitor_flow\": 4\n },\n {\n \"display_from_id\": \"F10\",\n \"display_to_id\": \"F9\",\n \"visitor_flow\": 4\n }\n ]\n}\n\nWhen you send back a layout, just use this simple JSON shape so I can easily read which spot goes with which display:\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of the \"solution\" list like a form: each entry is the spot id for the corresponding display in the same order the displays were listed in the instance. So the first value is the spot for the first display, the second is for the second display, and so on. This is just a sketch of the shape I expect — not the actual assignment.\n\nPlease use the identifiers exactly as they appear in the instance input — do not rename them or invent new labels.\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 19, 47, 0, 0, 0, 0, 0, 0 ], [ 0, 19, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 47, 0, 0, 0, 0, 0, 73, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 73, 0, 0, 0, 0, 84, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 84, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "flow_matrix": [ [ 0, 7, 3, 7, 8, 2, 9, 8, 4, 3 ], [ 7, 0, 9, 1, 6, 1, 1, 2, 7, 8 ], [ 3, 9, 0, 3, 5, 9, 4, 6, 9, 6 ], [ 7, 1, 3, 0, 6, 9, 3, 3, 8, 6 ], [ 8, 6, 5, 6, 0, 3, 8, 2, 9, 6 ], [ 2, 1, 9, 9, 3, 0, 4, 4, 4, 9 ], [ 9, 1, 4, 3, 8, 4, 0, 3, 2, 8 ], [ 8, 2, 6, 3, 2, 4, 3, 0, 8, 4 ], [ 4, 7, 9, 8, 9, 4, 2, 8, 0, 4 ], [ 3, 8, 6, 6, 6, 9, 8, 4, 4, 0 ] ], "objective": 616.0 }, "solution": [ 1, 7, 6, 8, 4, 3, 5, 0, 9, 2 ], "obj": 616.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 10, "num_locations": 10, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 0 }, { "from_id": "A", "to_id": "C", "distance": 0 }, { "from_id": "A", "to_id": "D", "distance": 0 }, { "from_id": "A", "to_id": "E", "distance": 0 }, { "from_id": "A", "to_id": "F", "distance": 0 }, { "from_id": "A", "to_id": "G", "distance": 0 }, { "from_id": "A", "to_id": "H", "distance": 0 }, { "from_id": "A", "to_id": "I", "distance": 0 }, { "from_id": "A", "to_id": "J", "distance": 0 }, { "from_id": "B", "to_id": "A", "distance": 0 }, { "from_id": "B", "to_id": "C", "distance": 19 }, { "from_id": "B", "to_id": "D", "distance": 47 }, { "from_id": "B", "to_id": "E", "distance": 0 }, { "from_id": "B", "to_id": "F", "distance": 0 }, { "from_id": "B", "to_id": "G", "distance": 0 }, { "from_id": "B", "to_id": "H", "distance": 0 }, { "from_id": "B", "to_id": "I", "distance": 0 }, { "from_id": "B", "to_id": "J", "distance": 0 }, { "from_id": "C", "to_id": "A", "distance": 0 }, { "from_id": "C", "to_id": "B", "distance": 19 }, { "from_id": "C", "to_id": "D", "distance": 0 }, { "from_id": "C", "to_id": "E", "distance": 0 }, { "from_id": "C", "to_id": "F", "distance": 0 }, { "from_id": "C", "to_id": "G", "distance": 0 }, { "from_id": "C", "to_id": "H", "distance": 0 }, { "from_id": "C", "to_id": "I", "distance": 0 }, { "from_id": "C", "to_id": "J", "distance": 0 }, { "from_id": "D", "to_id": "A", "distance": 0 }, { "from_id": "D", "to_id": "B", "distance": 47 }, { "from_id": "D", "to_id": "C", "distance": 0 }, { "from_id": "D", "to_id": "E", "distance": 0 }, { "from_id": "D", "to_id": "F", "distance": 0 }, { "from_id": "D", "to_id": "G", "distance": 0 }, { "from_id": "D", "to_id": "H", "distance": 73 }, { "from_id": "D", "to_id": "I", "distance": 0 }, { "from_id": "D", "to_id": "J", "distance": 0 }, { "from_id": "E", "to_id": "A", "distance": 0 }, { "from_id": "E", "to_id": "B", "distance": 0 }, { "from_id": "E", "to_id": "C", "distance": 0 }, { "from_id": "E", "to_id": "D", "distance": 0 }, { "from_id": "E", "to_id": "F", "distance": 0 }, { "from_id": "E", "to_id": "G", "distance": 0 }, { "from_id": "E", "to_id": "H", "distance": 0 }, { "from_id": "E", "to_id": "I", "distance": 0 }, { "from_id": "E", "to_id": "J", "distance": 0 }, { "from_id": "F", "to_id": "A", "distance": 0 }, { "from_id": "F", "to_id": "B", "distance": 0 }, { "from_id": "F", "to_id": "C", "distance": 0 }, { "from_id": "F", "to_id": "D", "distance": 0 }, { "from_id": "F", "to_id": "E", "distance": 0 }, { "from_id": "F", "to_id": "G", "distance": 0 }, { "from_id": "F", "to_id": "H", "distance": 0 }, { "from_id": "F", "to_id": "I", "distance": 0 }, { "from_id": "F", "to_id": "J", "distance": 0 }, { "from_id": "G", "to_id": "A", "distance": 0 }, { "from_id": "G", "to_id": "B", "distance": 0 }, { "from_id": "G", "to_id": "C", "distance": 0 }, { "from_id": "G", "to_id": "D", "distance": 0 }, { "from_id": "G", "to_id": "E", "distance": 0 }, { "from_id": "G", "to_id": "F", "distance": 0 }, { "from_id": "G", "to_id": "H", "distance": 0 }, { "from_id": "G", "to_id": "I", "distance": 0 }, { "from_id": "G", "to_id": "J", "distance": 0 }, { "from_id": "H", "to_id": "A", "distance": 0 }, { "from_id": "H", "to_id": "B", "distance": 0 }, { "from_id": "H", "to_id": "C", "distance": 0 }, { "from_id": "H", "to_id": "D", "distance": 73 }, { "from_id": "H", "to_id": "E", "distance": 0 }, { "from_id": "H", "to_id": "F", "distance": 0 }, { "from_id": "H", "to_id": "G", "distance": 0 }, { "from_id": "H", "to_id": "I", "distance": 84 }, { "from_id": "H", "to_id": "J", "distance": 0 }, { "from_id": "I", "to_id": "A", "distance": 0 }, { "from_id": "I", "to_id": "B", "distance": 0 }, { "from_id": "I", "to_id": "C", "distance": 0 }, { "from_id": "I", "to_id": "D", "distance": 0 }, { "from_id": "I", "to_id": "E", "distance": 0 }, { "from_id": "I", "to_id": "F", "distance": 0 }, { "from_id": "I", "to_id": "G", "distance": 0 }, { "from_id": "I", "to_id": "H", "distance": 84 }, { "from_id": "I", "to_id": "J", "distance": 0 }, { "from_id": "J", "to_id": "A", "distance": 0 }, { "from_id": "J", "to_id": "B", "distance": 0 }, { "from_id": "J", "to_id": "C", "distance": 0 }, { "from_id": "J", "to_id": "D", "distance": 0 }, { "from_id": "J", "to_id": "E", "distance": 0 }, { "from_id": "J", "to_id": "F", "distance": 0 }, { "from_id": "J", "to_id": "G", "distance": 0 }, { "from_id": "J", "to_id": "H", "distance": 0 }, { "from_id": "J", "to_id": "I", "distance": 0 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 7 }, { "from_id": "F1", "to_id": "F3", "flow": 3 }, { "from_id": "F1", "to_id": "F4", "flow": 7 }, { "from_id": "F1", "to_id": "F5", "flow": 8 }, { "from_id": "F1", "to_id": "F6", "flow": 2 }, { "from_id": "F1", "to_id": "F7", "flow": 9 }, { "from_id": "F1", "to_id": "F8", "flow": 8 }, { "from_id": "F1", "to_id": "F9", "flow": 4 }, { "from_id": "F1", "to_id": "F10", "flow": 3 }, { "from_id": "F2", "to_id": "F1", "flow": 7 }, { "from_id": "F2", "to_id": "F3", "flow": 9 }, { "from_id": "F2", "to_id": "F4", "flow": 1 }, { "from_id": "F2", "to_id": "F5", "flow": 6 }, { "from_id": "F2", "to_id": "F6", "flow": 1 }, { "from_id": "F2", "to_id": "F7", "flow": 1 }, { "from_id": "F2", "to_id": "F8", "flow": 2 }, { "from_id": "F2", "to_id": "F9", "flow": 7 }, { "from_id": "F2", "to_id": "F10", "flow": 8 }, { "from_id": "F3", "to_id": "F1", "flow": 3 }, { "from_id": "F3", "to_id": "F2", "flow": 9 }, { "from_id": "F3", "to_id": "F4", "flow": 3 }, { "from_id": "F3", "to_id": "F5", "flow": 5 }, { "from_id": "F3", "to_id": "F6", "flow": 9 }, { "from_id": "F3", "to_id": "F7", "flow": 4 }, { "from_id": "F3", "to_id": "F8", "flow": 6 }, { "from_id": "F3", "to_id": "F9", "flow": 9 }, { "from_id": "F3", "to_id": "F10", "flow": 6 }, { "from_id": "F4", "to_id": "F1", "flow": 7 }, { "from_id": "F4", "to_id": "F2", "flow": 1 }, { "from_id": "F4", "to_id": "F3", "flow": 3 }, { "from_id": "F4", "to_id": "F5", "flow": 6 }, { "from_id": "F4", "to_id": "F6", "flow": 9 }, { "from_id": "F4", "to_id": "F7", "flow": 3 }, { "from_id": "F4", "to_id": "F8", "flow": 3 }, { "from_id": "F4", "to_id": "F9", "flow": 8 }, { "from_id": "F4", "to_id": "F10", "flow": 6 }, { "from_id": "F5", "to_id": "F1", "flow": 8 }, { "from_id": "F5", "to_id": "F2", "flow": 6 }, { "from_id": "F5", "to_id": "F3", "flow": 5 }, { "from_id": "F5", "to_id": "F4", "flow": 6 }, { "from_id": "F5", "to_id": "F6", "flow": 3 }, { "from_id": "F5", "to_id": "F7", "flow": 8 }, { "from_id": "F5", "to_id": "F8", "flow": 2 }, { "from_id": "F5", "to_id": "F9", "flow": 9 }, { "from_id": "F5", "to_id": "F10", "flow": 6 }, { "from_id": "F6", "to_id": "F1", "flow": 2 }, { "from_id": "F6", "to_id": "F2", "flow": 1 }, { "from_id": "F6", "to_id": "F3", "flow": 9 }, { "from_id": "F6", "to_id": "F4", "flow": 9 }, { "from_id": "F6", "to_id": "F5", "flow": 3 }, { "from_id": "F6", "to_id": "F7", "flow": 4 }, { "from_id": "F6", "to_id": "F8", "flow": 4 }, { "from_id": "F6", "to_id": "F9", "flow": 4 }, { "from_id": "F6", "to_id": "F10", "flow": 9 }, { "from_id": "F7", "to_id": "F1", "flow": 9 }, { "from_id": "F7", "to_id": "F2", "flow": 1 }, { "from_id": "F7", "to_id": "F3", "flow": 4 }, { "from_id": "F7", "to_id": "F4", "flow": 3 }, { "from_id": "F7", "to_id": "F5", "flow": 8 }, { "from_id": "F7", "to_id": "F6", "flow": 4 }, { "from_id": "F7", "to_id": "F8", "flow": 3 }, { "from_id": "F7", "to_id": "F9", "flow": 2 }, { "from_id": "F7", "to_id": "F10", "flow": 8 }, { "from_id": "F8", "to_id": "F1", "flow": 8 }, { "from_id": "F8", "to_id": "F2", "flow": 2 }, { "from_id": "F8", "to_id": "F3", "flow": 6 }, { "from_id": "F8", "to_id": "F4", "flow": 3 }, { "from_id": "F8", "to_id": "F5", "flow": 2 }, { "from_id": "F8", "to_id": "F6", "flow": 4 }, { "from_id": "F8", "to_id": "F7", "flow": 3 }, { "from_id": "F8", "to_id": "F9", "flow": 8 }, { "from_id": "F8", "to_id": "F10", "flow": 4 }, { "from_id": "F9", "to_id": "F1", "flow": 4 }, { "from_id": "F9", "to_id": "F2", "flow": 7 }, { "from_id": "F9", "to_id": "F3", "flow": 9 }, { "from_id": "F9", "to_id": "F4", "flow": 8 }, { "from_id": "F9", "to_id": "F5", "flow": 9 }, { "from_id": "F9", "to_id": "F6", "flow": 4 }, { "from_id": "F9", "to_id": "F7", "flow": 2 }, { "from_id": "F9", "to_id": "F8", "flow": 8 }, { "from_id": "F9", "to_id": "F10", "flow": 4 }, { "from_id": "F10", "to_id": "F1", "flow": 3 }, { "from_id": "F10", "to_id": "F2", "flow": 8 }, { "from_id": "F10", "to_id": "F3", "flow": 6 }, { "from_id": "F10", "to_id": "F4", "flow": 6 }, { "from_id": "F10", "to_id": "F5", "flow": 6 }, { "from_id": "F10", "to_id": "F6", "flow": 9 }, { "from_id": "F10", "to_id": "F7", "flow": 8 }, { "from_id": "F10", "to_id": "F8", "flow": 4 }, { "from_id": "F10", "to_id": "F9", "flow": 4 } ] }, "solution_variant": [ "B", "H", "G", "I", "E", "D", "F", "A", "J", "C" ], "context_index": 47, "input_format": "json", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Imagine trying to place food vendors across a row of booths so that no stall sits empty and no vendor claims two spots — each vendor gets one stall, each stall gets one vendor. The whole point is to cut down on unnecessary back-and-forth: if two stands tend to be visited in the same trip, put them close. To evaluate a setup, for every pair multiply how often people go between them by the distance between their assigned booths, then add everything together; the lower that overall number, the less walking for festival-goers. The specific distances and visit-pattern numbers follow below.\n\n{\n \"num_vendors_and_stalls\": 9,\n \"vendor_ids\": [\n \"F1\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\"\n ],\n \"stall_ids\": [\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\"\n ],\n \"distance\": [\n {\n \"stall_from_id\": \"A\",\n \"stall_to_id\": \"B\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"A\",\n \"stall_to_id\": \"C\",\n \"stall_distance\": 6\n },\n {\n \"stall_from_id\": \"A\",\n \"stall_to_id\": \"D\",\n \"stall_distance\": 5\n },\n {\n \"stall_from_id\": \"A\",\n \"stall_to_id\": \"E\",\n \"stall_distance\": 9\n },\n {\n \"stall_from_id\": \"A\",\n \"stall_to_id\": \"F\",\n \"stall_distance\": 13\n },\n {\n \"stall_from_id\": \"A\",\n \"stall_to_id\": \"G\",\n \"stall_distance\": 13\n },\n {\n \"stall_from_id\": \"A\",\n \"stall_to_id\": \"H\",\n \"stall_distance\": 14\n },\n {\n \"stall_from_id\": \"A\",\n \"stall_to_id\": \"I\",\n \"stall_distance\": 9\n },\n {\n \"stall_from_id\": \"B\",\n \"stall_to_id\": \"A\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"B\",\n \"stall_to_id\": \"C\",\n \"stall_distance\": 2\n },\n {\n \"stall_from_id\": \"B\",\n \"stall_to_id\": \"D\",\n \"stall_distance\": 3\n },\n {\n \"stall_from_id\": \"B\",\n \"stall_to_id\": \"E\",\n \"stall_distance\": 5\n },\n {\n \"stall_from_id\": \"B\",\n \"stall_to_id\": \"F\",\n \"stall_distance\": 9\n },\n {\n \"stall_from_id\": \"B\",\n \"stall_to_id\": \"G\",\n \"stall_distance\": 9\n },\n {\n \"stall_from_id\": \"B\",\n \"stall_to_id\": \"H\",\n \"stall_distance\": 10\n },\n {\n \"stall_from_id\": \"B\",\n \"stall_to_id\": \"I\",\n \"stall_distance\": 5\n },\n {\n \"stall_from_id\": \"C\",\n \"stall_to_id\": \"A\",\n \"stall_distance\": 6\n },\n {\n \"stall_from_id\": \"C\",\n \"stall_to_id\": \"B\",\n \"stall_distance\": 2\n },\n {\n \"stall_from_id\": \"C\",\n \"stall_to_id\": \"D\",\n \"stall_distance\": 3\n },\n {\n \"stall_from_id\": \"C\",\n \"stall_to_id\": \"E\",\n \"stall_distance\": 3\n },\n {\n \"stall_from_id\": \"C\",\n \"stall_to_id\": \"F\",\n \"stall_distance\": 7\n },\n {\n \"stall_from_id\": \"C\",\n \"stall_to_id\": \"G\",\n \"stall_distance\": 7\n },\n {\n \"stall_from_id\": \"C\",\n \"stall_to_id\": \"H\",\n \"stall_distance\": 8\n },\n {\n \"stall_from_id\": \"C\",\n \"stall_to_id\": \"I\",\n \"stall_distance\": 3\n },\n {\n \"stall_from_id\": \"D\",\n \"stall_to_id\": \"A\",\n \"stall_distance\": 5\n },\n {\n \"stall_from_id\": \"D\",\n \"stall_to_id\": \"B\",\n \"stall_distance\": 3\n },\n {\n \"stall_from_id\": \"D\",\n \"stall_to_id\": \"C\",\n \"stall_distance\": 3\n },\n {\n \"stall_from_id\": \"D\",\n \"stall_to_id\": \"E\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"D\",\n \"stall_to_id\": \"F\",\n \"stall_distance\": 8\n },\n {\n \"stall_from_id\": \"D\",\n \"stall_to_id\": \"G\",\n \"stall_distance\": 8\n },\n {\n \"stall_from_id\": \"D\",\n \"stall_to_id\": \"H\",\n \"stall_distance\": 9\n },\n {\n \"stall_from_id\": \"D\",\n \"stall_to_id\": \"I\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"E\",\n \"stall_to_id\": \"A\",\n \"stall_distance\": 9\n },\n {\n \"stall_from_id\": \"E\",\n \"stall_to_id\": \"B\",\n \"stall_distance\": 5\n },\n {\n \"stall_from_id\": \"E\",\n \"stall_to_id\": \"C\",\n \"stall_distance\": 3\n },\n {\n \"stall_from_id\": \"E\",\n \"stall_to_id\": \"D\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"E\",\n \"stall_to_id\": \"F\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"E\",\n \"stall_to_id\": \"G\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"E\",\n \"stall_to_id\": \"H\",\n \"stall_distance\": 5\n },\n {\n \"stall_from_id\": \"E\",\n \"stall_to_id\": \"I\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"F\",\n \"stall_to_id\": \"A\",\n \"stall_distance\": 13\n },\n {\n \"stall_from_id\": \"F\",\n \"stall_to_id\": \"B\",\n \"stall_distance\": 9\n },\n {\n \"stall_from_id\": \"F\",\n \"stall_to_id\": \"C\",\n \"stall_distance\": 7\n },\n {\n \"stall_from_id\": \"F\",\n \"stall_to_id\": \"D\",\n \"stall_distance\": 8\n },\n {\n \"stall_from_id\": \"F\",\n \"stall_to_id\": \"E\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"F\",\n \"stall_to_id\": \"G\",\n \"stall_distance\": 2\n },\n {\n \"stall_from_id\": \"F\",\n \"stall_to_id\": \"H\",\n \"stall_distance\": 1\n },\n {\n \"stall_from_id\": \"F\",\n \"stall_to_id\": \"I\",\n \"stall_distance\": 8\n },\n {\n \"stall_from_id\": \"G\",\n \"stall_to_id\": \"A\",\n \"stall_distance\": 13\n },\n {\n \"stall_from_id\": \"G\",\n \"stall_to_id\": \"B\",\n \"stall_distance\": 9\n },\n {\n \"stall_from_id\": \"G\",\n \"stall_to_id\": \"C\",\n \"stall_distance\": 7\n },\n {\n \"stall_from_id\": \"G\",\n \"stall_to_id\": \"D\",\n \"stall_distance\": 8\n },\n {\n \"stall_from_id\": \"G\",\n \"stall_to_id\": \"E\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"G\",\n \"stall_to_id\": \"F\",\n \"stall_distance\": 2\n },\n {\n \"stall_from_id\": \"G\",\n \"stall_to_id\": \"H\",\n \"stall_distance\": 1\n },\n {\n \"stall_from_id\": \"G\",\n \"stall_to_id\": \"I\",\n \"stall_distance\": 6\n },\n {\n \"stall_from_id\": \"H\",\n \"stall_to_id\": \"A\",\n \"stall_distance\": 14\n },\n {\n \"stall_from_id\": \"H\",\n \"stall_to_id\": \"B\",\n \"stall_distance\": 10\n },\n {\n \"stall_from_id\": \"H\",\n \"stall_to_id\": \"C\",\n \"stall_distance\": 8\n },\n {\n \"stall_from_id\": \"H\",\n \"stall_to_id\": \"D\",\n \"stall_distance\": 9\n },\n {\n \"stall_from_id\": \"H\",\n \"stall_to_id\": \"E\",\n \"stall_distance\": 5\n },\n {\n \"stall_from_id\": \"H\",\n \"stall_to_id\": \"F\",\n \"stall_distance\": 1\n },\n {\n \"stall_from_id\": \"H\",\n \"stall_to_id\": \"G\",\n \"stall_distance\": 1\n },\n {\n \"stall_from_id\": \"H\",\n \"stall_to_id\": \"I\",\n \"stall_distance\": 7\n },\n {\n \"stall_from_id\": \"I\",\n \"stall_to_id\": \"A\",\n \"stall_distance\": 9\n },\n {\n \"stall_from_id\": \"I\",\n \"stall_to_id\": \"B\",\n \"stall_distance\": 5\n },\n {\n \"stall_from_id\": \"I\",\n \"stall_to_id\": \"C\",\n \"stall_distance\": 3\n },\n {\n \"stall_from_id\": \"I\",\n \"stall_to_id\": \"D\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"I\",\n \"stall_to_id\": \"E\",\n \"stall_distance\": 4\n },\n {\n \"stall_from_id\": \"I\",\n \"stall_to_id\": \"F\",\n \"stall_distance\": 8\n },\n {\n \"stall_from_id\": \"I\",\n \"stall_to_id\": \"G\",\n \"stall_distance\": 6\n },\n {\n \"stall_from_id\": \"I\",\n \"stall_to_id\": \"H\",\n \"stall_distance\": 7\n }\n ],\n \"flow\": [\n {\n \"vendor_from_id\": \"F1\",\n \"vendor_to_id\": \"F2\",\n \"visit_flow\": 10\n },\n {\n \"vendor_from_id\": \"F1\",\n \"vendor_to_id\": \"F3\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F1\",\n \"vendor_to_id\": \"F4\",\n \"visit_flow\": 1\n },\n {\n \"vendor_from_id\": \"F1\",\n \"vendor_to_id\": \"F5\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F1\",\n \"vendor_to_id\": \"F6\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F1\",\n \"vendor_to_id\": \"F7\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F1\",\n \"vendor_to_id\": \"F8\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F1\",\n \"vendor_to_id\": \"F9\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F2\",\n \"vendor_to_id\": \"F1\",\n \"visit_flow\": 10\n },\n {\n \"vendor_from_id\": \"F2\",\n \"vendor_to_id\": \"F3\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F2\",\n \"vendor_to_id\": \"F4\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F2\",\n \"vendor_to_id\": \"F5\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F2\",\n \"vendor_to_id\": \"F6\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F2\",\n \"vendor_to_id\": \"F7\",\n \"visit_flow\": 1\n },\n {\n \"vendor_from_id\": \"F2\",\n \"vendor_to_id\": \"F8\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F2\",\n \"vendor_to_id\": \"F9\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F3\",\n \"vendor_to_id\": \"F1\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F3\",\n \"vendor_to_id\": \"F2\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F3\",\n \"vendor_to_id\": \"F4\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F3\",\n \"vendor_to_id\": \"F5\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F3\",\n \"vendor_to_id\": \"F6\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F3\",\n \"vendor_to_id\": \"F7\",\n \"visit_flow\": 1\n },\n {\n \"vendor_from_id\": \"F3\",\n \"vendor_to_id\": \"F8\",\n \"visit_flow\": 10\n },\n {\n \"vendor_from_id\": \"F3\",\n \"vendor_to_id\": \"F9\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F4\",\n \"vendor_to_id\": \"F1\",\n \"visit_flow\": 1\n },\n {\n \"vendor_from_id\": \"F4\",\n \"vendor_to_id\": \"F2\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F4\",\n \"vendor_to_id\": \"F3\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F4\",\n \"vendor_to_id\": \"F5\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F4\",\n \"vendor_to_id\": \"F6\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F4\",\n \"vendor_to_id\": \"F7\",\n \"visit_flow\": 10\n },\n {\n \"vendor_from_id\": \"F4\",\n \"vendor_to_id\": \"F8\",\n \"visit_flow\": 4\n },\n {\n \"vendor_from_id\": \"F4\",\n \"vendor_to_id\": \"F9\",\n \"visit_flow\": 3\n },\n {\n \"vendor_from_id\": \"F5\",\n \"vendor_to_id\": \"F1\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F5\",\n \"vendor_to_id\": \"F2\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F5\",\n \"vendor_to_id\": \"F3\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F5\",\n \"vendor_to_id\": \"F4\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F5\",\n \"vendor_to_id\": \"F6\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F5\",\n \"vendor_to_id\": \"F7\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F5\",\n \"vendor_to_id\": \"F8\",\n \"visit_flow\": 10\n },\n {\n \"vendor_from_id\": \"F5\",\n \"vendor_to_id\": \"F9\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F6\",\n \"vendor_to_id\": \"F1\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F6\",\n \"vendor_to_id\": \"F2\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F6\",\n \"vendor_to_id\": \"F3\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F6\",\n \"vendor_to_id\": \"F4\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F6\",\n \"vendor_to_id\": \"F5\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F6\",\n \"vendor_to_id\": \"F7\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F6\",\n \"vendor_to_id\": \"F8\",\n \"visit_flow\": 1\n },\n {\n \"vendor_from_id\": \"F6\",\n \"vendor_to_id\": \"F9\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F7\",\n \"vendor_to_id\": \"F1\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F7\",\n \"vendor_to_id\": \"F2\",\n \"visit_flow\": 1\n },\n {\n \"vendor_from_id\": \"F7\",\n \"vendor_to_id\": \"F3\",\n \"visit_flow\": 1\n },\n {\n \"vendor_from_id\": \"F7\",\n \"vendor_to_id\": \"F4\",\n \"visit_flow\": 10\n },\n {\n \"vendor_from_id\": \"F7\",\n \"vendor_to_id\": \"F5\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F7\",\n \"vendor_to_id\": \"F6\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F7\",\n \"vendor_to_id\": \"F8\",\n \"visit_flow\": 10\n },\n {\n \"vendor_from_id\": \"F7\",\n \"vendor_to_id\": \"F9\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F8\",\n \"vendor_to_id\": \"F1\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F8\",\n \"vendor_to_id\": \"F2\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F8\",\n \"vendor_to_id\": \"F3\",\n \"visit_flow\": 10\n },\n {\n \"vendor_from_id\": \"F8\",\n \"vendor_to_id\": \"F4\",\n \"visit_flow\": 4\n },\n {\n \"vendor_from_id\": \"F8\",\n \"vendor_to_id\": \"F5\",\n \"visit_flow\": 10\n },\n {\n \"vendor_from_id\": \"F8\",\n \"vendor_to_id\": \"F6\",\n \"visit_flow\": 1\n },\n {\n \"vendor_from_id\": \"F8\",\n \"vendor_to_id\": \"F7\",\n \"visit_flow\": 10\n },\n {\n \"vendor_from_id\": \"F8\",\n \"vendor_to_id\": \"F9\",\n \"visit_flow\": 0\n },\n {\n \"vendor_from_id\": \"F9\",\n \"vendor_to_id\": \"F1\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F9\",\n \"vendor_to_id\": \"F2\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F9\",\n \"vendor_to_id\": \"F3\",\n \"visit_flow\": 2\n },\n {\n \"vendor_from_id\": \"F9\",\n \"vendor_to_id\": \"F4\",\n \"visit_flow\": 3\n },\n {\n \"vendor_from_id\": \"F9\",\n \"vendor_to_id\": \"F5\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F9\",\n \"vendor_to_id\": \"F6\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F9\",\n \"vendor_to_id\": \"F7\",\n \"visit_flow\": 5\n },\n {\n \"vendor_from_id\": \"F9\",\n \"vendor_to_id\": \"F8\",\n \"visit_flow\": 0\n }\n ]\n}\n\nAlso, when you send back your setup, it's easiest for me to read if you use a tiny JSON snippet like this.\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThis just means the \"solution\" list is read in vendor order: the first slot is the stall identifier you want for the first vendor, the second slot is the stall for the second vendor, and so on — just a simple one-line-per-vendor mapping, like filling out a short form. It's only a sketch of the shape I need, not the actual answer.\n\nPlease make sure to use the exact identifiers given in the instance input — don't rename them or invent new labels.\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 4, 6, 5, 9, 13, 13, 14, 9 ], [ 4, 0, 2, 3, 5, 9, 9, 10, 5 ], [ 6, 2, 0, 3, 3, 7, 7, 8, 3 ], [ 5, 3, 3, 0, 4, 8, 8, 9, 4 ], [ 9, 5, 3, 4, 0, 4, 4, 5, 4 ], [ 13, 9, 7, 8, 4, 0, 2, 1, 8 ], [ 13, 9, 7, 8, 4, 2, 0, 1, 6 ], [ 14, 10, 8, 9, 5, 1, 1, 0, 7 ], [ 9, 5, 3, 4, 4, 8, 6, 7, 0 ] ], "flow_matrix": [ [ 0, 10, 0, 1, 0, 0, 0, 2, 5 ], [ 10, 0, 0, 5, 2, 2, 1, 2, 5 ], [ 0, 0, 0, 0, 0, 5, 1, 10, 2 ], [ 1, 5, 0, 0, 5, 5, 10, 4, 3 ], [ 0, 2, 0, 5, 0, 0, 2, 10, 5 ], [ 0, 2, 5, 5, 0, 0, 5, 1, 5 ], [ 0, 1, 1, 10, 2, 5, 0, 10, 5 ], [ 2, 2, 10, 4, 10, 1, 10, 0, 0 ], [ 5, 5, 2, 3, 5, 5, 5, 0, 0 ] ], "objective": 1050.0 }, "solution": [ 7, 5, 0, 4, 8, 3, 2, 1, 6 ], "obj": 1050.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ "A", "B", "C", "D", "E", "F", "G", "H", "I" ], "distance_pairs": [ { "from_id": "A", "to_id": "B", "distance": 4 }, { "from_id": "A", "to_id": "C", "distance": 6 }, { "from_id": "A", "to_id": "D", "distance": 5 }, { "from_id": "A", "to_id": "E", "distance": 9 }, { "from_id": "A", "to_id": "F", "distance": 13 }, { "from_id": "A", "to_id": "G", "distance": 13 }, { "from_id": "A", "to_id": "H", "distance": 14 }, { "from_id": "A", "to_id": "I", "distance": 9 }, { "from_id": "B", "to_id": "A", "distance": 4 }, { "from_id": "B", "to_id": "C", "distance": 2 }, { "from_id": "B", "to_id": "D", "distance": 3 }, { "from_id": "B", "to_id": "E", "distance": 5 }, { "from_id": "B", "to_id": "F", "distance": 9 }, { "from_id": "B", "to_id": "G", "distance": 9 }, { "from_id": "B", "to_id": "H", "distance": 10 }, { "from_id": "B", "to_id": "I", "distance": 5 }, { "from_id": "C", "to_id": "A", "distance": 6 }, { "from_id": "C", "to_id": "B", "distance": 2 }, { "from_id": "C", "to_id": "D", "distance": 3 }, { "from_id": "C", "to_id": "E", "distance": 3 }, { "from_id": "C", "to_id": "F", "distance": 7 }, { "from_id": "C", "to_id": "G", "distance": 7 }, { "from_id": "C", "to_id": "H", "distance": 8 }, { "from_id": "C", "to_id": "I", "distance": 3 }, { "from_id": "D", "to_id": "A", "distance": 5 }, { "from_id": "D", "to_id": "B", "distance": 3 }, { "from_id": "D", "to_id": "C", "distance": 3 }, { "from_id": "D", "to_id": "E", "distance": 4 }, { "from_id": "D", "to_id": "F", "distance": 8 }, { "from_id": "D", "to_id": "G", "distance": 8 }, { "from_id": "D", "to_id": "H", "distance": 9 }, { "from_id": "D", "to_id": "I", "distance": 4 }, { "from_id": "E", "to_id": "A", "distance": 9 }, { "from_id": "E", "to_id": "B", "distance": 5 }, { "from_id": "E", "to_id": "C", "distance": 3 }, { "from_id": "E", "to_id": "D", "distance": 4 }, { "from_id": "E", "to_id": "F", "distance": 4 }, { "from_id": "E", "to_id": "G", "distance": 4 }, { "from_id": "E", "to_id": "H", "distance": 5 }, { "from_id": "E", "to_id": "I", "distance": 4 }, { "from_id": "F", "to_id": "A", "distance": 13 }, { "from_id": "F", "to_id": "B", "distance": 9 }, { "from_id": "F", "to_id": "C", "distance": 7 }, { "from_id": "F", "to_id": "D", "distance": 8 }, { "from_id": "F", "to_id": "E", "distance": 4 }, { "from_id": "F", "to_id": "G", "distance": 2 }, { "from_id": "F", "to_id": "H", "distance": 1 }, { "from_id": "F", "to_id": "I", "distance": 8 }, { "from_id": "G", "to_id": "A", "distance": 13 }, { "from_id": "G", "to_id": "B", "distance": 9 }, { "from_id": "G", "to_id": "C", "distance": 7 }, { "from_id": "G", "to_id": "D", "distance": 8 }, { "from_id": "G", "to_id": "E", "distance": 4 }, { "from_id": "G", "to_id": "F", "distance": 2 }, { "from_id": "G", "to_id": "H", "distance": 1 }, { "from_id": "G", "to_id": "I", "distance": 6 }, { "from_id": "H", "to_id": "A", "distance": 14 }, { "from_id": "H", "to_id": "B", "distance": 10 }, { "from_id": "H", "to_id": "C", "distance": 8 }, { "from_id": "H", "to_id": "D", "distance": 9 }, { "from_id": "H", "to_id": "E", "distance": 5 }, { "from_id": "H", "to_id": "F", "distance": 1 }, { "from_id": "H", "to_id": "G", "distance": 1 }, { "from_id": "H", "to_id": "I", "distance": 7 }, { "from_id": "I", "to_id": "A", "distance": 9 }, { "from_id": "I", "to_id": "B", "distance": 5 }, { "from_id": "I", "to_id": "C", "distance": 3 }, { "from_id": "I", "to_id": "D", "distance": 4 }, { "from_id": "I", "to_id": "E", "distance": 4 }, { "from_id": "I", "to_id": "F", "distance": 8 }, { "from_id": "I", "to_id": "G", "distance": 6 }, { "from_id": "I", "to_id": "H", "distance": 7 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 10 }, { "from_id": "F1", "to_id": "F3", "flow": 0 }, { "from_id": "F1", "to_id": "F4", "flow": 1 }, { "from_id": "F1", "to_id": "F5", "flow": 0 }, { "from_id": "F1", "to_id": "F6", "flow": 0 }, { "from_id": "F1", "to_id": "F7", "flow": 0 }, { "from_id": "F1", "to_id": "F8", "flow": 2 }, { "from_id": "F1", "to_id": "F9", "flow": 5 }, { "from_id": "F2", "to_id": "F1", "flow": 10 }, { "from_id": "F2", "to_id": "F3", "flow": 0 }, { "from_id": "F2", "to_id": "F4", "flow": 5 }, { "from_id": "F2", "to_id": "F5", "flow": 2 }, { "from_id": "F2", "to_id": "F6", "flow": 2 }, { "from_id": "F2", "to_id": "F7", "flow": 1 }, { "from_id": "F2", "to_id": "F8", "flow": 2 }, { "from_id": "F2", "to_id": "F9", "flow": 5 }, { "from_id": "F3", "to_id": "F1", "flow": 0 }, { "from_id": "F3", "to_id": "F2", "flow": 0 }, { "from_id": "F3", "to_id": "F4", "flow": 0 }, { "from_id": "F3", "to_id": "F5", "flow": 0 }, { "from_id": "F3", "to_id": "F6", "flow": 5 }, { "from_id": "F3", "to_id": "F7", "flow": 1 }, { "from_id": "F3", "to_id": "F8", "flow": 10 }, { "from_id": "F3", "to_id": "F9", "flow": 2 }, { "from_id": "F4", "to_id": "F1", "flow": 1 }, { "from_id": "F4", "to_id": "F2", "flow": 5 }, { "from_id": "F4", "to_id": "F3", "flow": 0 }, { "from_id": "F4", "to_id": "F5", "flow": 5 }, { "from_id": "F4", "to_id": "F6", "flow": 5 }, { "from_id": "F4", "to_id": "F7", "flow": 10 }, { "from_id": "F4", "to_id": "F8", "flow": 4 }, { "from_id": "F4", "to_id": "F9", "flow": 3 }, { "from_id": "F5", "to_id": "F1", "flow": 0 }, { "from_id": "F5", "to_id": "F2", "flow": 2 }, { "from_id": "F5", "to_id": "F3", "flow": 0 }, { "from_id": "F5", "to_id": "F4", "flow": 5 }, { "from_id": "F5", "to_id": "F6", "flow": 0 }, { "from_id": "F5", "to_id": "F7", "flow": 2 }, { "from_id": "F5", "to_id": "F8", "flow": 10 }, { "from_id": "F5", "to_id": "F9", "flow": 5 }, { "from_id": "F6", "to_id": "F1", "flow": 0 }, { "from_id": "F6", "to_id": "F2", "flow": 2 }, { "from_id": "F6", "to_id": "F3", "flow": 5 }, { "from_id": "F6", "to_id": "F4", "flow": 5 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 5 }, { "from_id": "F6", "to_id": "F8", "flow": 1 }, { "from_id": "F6", "to_id": "F9", "flow": 5 }, { "from_id": "F7", "to_id": "F1", "flow": 0 }, { "from_id": "F7", "to_id": "F2", "flow": 1 }, { "from_id": "F7", "to_id": "F3", "flow": 1 }, { "from_id": "F7", "to_id": "F4", "flow": 10 }, { "from_id": "F7", "to_id": "F5", "flow": 2 }, { "from_id": "F7", "to_id": "F6", "flow": 5 }, { "from_id": "F7", "to_id": "F8", "flow": 10 }, { "from_id": "F7", "to_id": "F9", "flow": 5 }, { "from_id": "F8", "to_id": "F1", "flow": 2 }, { "from_id": "F8", "to_id": "F2", "flow": 2 }, { "from_id": "F8", "to_id": "F3", "flow": 10 }, { "from_id": "F8", "to_id": "F4", "flow": 4 }, { "from_id": "F8", "to_id": "F5", "flow": 10 }, { "from_id": "F8", "to_id": "F6", "flow": 1 }, { "from_id": "F8", "to_id": "F7", "flow": 10 }, { "from_id": "F8", "to_id": "F9", "flow": 0 }, { "from_id": "F9", "to_id": "F1", "flow": 5 }, { "from_id": "F9", "to_id": "F2", "flow": 5 }, { "from_id": "F9", "to_id": "F3", "flow": 2 }, { "from_id": "F9", "to_id": "F4", "flow": 3 }, { "from_id": "F9", "to_id": "F5", "flow": 5 }, { "from_id": "F9", "to_id": "F6", "flow": 5 }, { "from_id": "F9", "to_id": "F7", "flow": 5 }, { "from_id": "F9", "to_id": "F8", "flow": 0 } ] }, "solution_variant": [ "H", "F", "A", "E", "I", "D", "C", "B", "G" ], "context_index": 48, "input_format": "json", "input_index_base": "names" }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Many people think of it like seating guests at a dinner: transformers are guests, substations are seats, and each guest gets a distinct seat with no empty chairs. The “comfort” measure here is replaced by transmission loss — for each pair of transformers take their power exchange and scale it by how far apart their seats are, then sum all those pairwise amounts to get the grand total; lower totals mean a better seating plan. The particular distances and flows for this problem are listed below.\n\nThere are 11 transformer units (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11) to place across the 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 substation sites.\n\n| site_id_from | site_id_to | distance_between_sites |\n|---|---|---|\n| 0 | 1 | 12 |\n| 0 | 2 | 12 |\n| 0 | 3 | 8 |\n| 0 | 4 | 12 |\n| 0 | 5 | 9 |\n| 0 | 6 | 5 |\n| 0 | 7 | 6 |\n| 0 | 8 | 2 |\n| 0 | 9 | 8 |\n| 0 | 10 | 5055 |\n| 1 | 0 | 12 |\n| 1 | 2 | 10 |\n| 1 | 3 | 7 |\n| 1 | 4 | 9 |\n| 1 | 5 | 6 |\n| 1 | 6 | 10 |\n| 1 | 7 | 6 |\n| 1 | 8 | 14 |\n| 1 | 9 | 4 |\n| 1 | 10 | 5043 |\n| 2 | 0 | 12 |\n| 2 | 1 | 10 |\n| 2 | 3 | 5 |\n| 2 | 4 | 1 |\n| 2 | 5 | 13 |\n| 2 | 6 | 14 |\n| 2 | 7 | 9 |\n| 2 | 8 | 14 |\n| 2 | 9 | 8 |\n| 2 | 10 | 5045 |\n| 3 | 0 | 8 |\n| 3 | 1 | 7 |\n| 3 | 2 | 5 |\n| 3 | 4 | 4 |\n| 3 | 5 | 9 |\n| 3 | 6 | 9 |\n| 3 | 7 | 4 |\n| 3 | 8 | 10 |\n| 3 | 9 | 4 |\n| 3 | 10 | 5047 |\n| 4 | 0 | 12 |\n| 4 | 1 | 9 |\n| 4 | 2 | 1 |\n| 4 | 3 | 4 |\n| 4 | 5 | 13 |\n| 4 | 6 | 13 |\n| 4 | 7 | 8 |\n| 4 | 8 | 13 |\n| 4 | 9 | 8 |\n| 4 | 10 | 5045 |\n| 5 | 0 | 9 |\n| 5 | 1 | 6 |\n| 5 | 2 | 13 |\n| 5 | 3 | 9 |\n| 5 | 4 | 13 |\n| 5 | 6 | 4 |\n| 5 | 7 | 5 |\n| 5 | 8 | 10 |\n| 5 | 9 | 5 |\n| 5 | 10 | 5049 |\n| 6 | 0 | 5 |\n| 6 | 1 | 10 |\n| 6 | 2 | 14 |\n| 6 | 3 | 9 |\n| 6 | 4 | 13 |\n| 6 | 5 | 4 |\n| 6 | 7 | 5 |\n| 6 | 8 | 6 |\n| 6 | 9 | 6 |\n| 6 | 10 | 5053 |\n| 7 | 0 | 6 |\n| 7 | 1 | 6 |\n| 7 | 2 | 9 |\n| 7 | 3 | 4 |\n| 7 | 4 | 8 |\n| 7 | 5 | 5 |\n| 7 | 6 | 5 |\n| 7 | 8 | 8 |\n| 7 | 9 | 2 |\n| 7 | 10 | 5049 |\n| 8 | 0 | 2 |\n| 8 | 1 | 14 |\n| 8 | 2 | 14 |\n| 8 | 3 | 10 |\n| 8 | 4 | 13 |\n| 8 | 5 | 10 |\n| 8 | 6 | 6 |\n| 8 | 7 | 8 |\n| 8 | 9 | 10 |\n| 8 | 10 | 5057 |\n| 9 | 0 | 8 |\n| 9 | 1 | 4 |\n| 9 | 2 | 8 |\n| 9 | 3 | 4 |\n| 9 | 4 | 8 |\n| 9 | 5 | 5 |\n| 9 | 6 | 6 |\n| 9 | 7 | 2 |\n| 9 | 8 | 10 |\n| 9 | 10 | 5047 |\n| 10 | 0 | 5055 |\n| 10 | 1 | 5043 |\n| 10 | 2 | 5045 |\n| 10 | 3 | 5047 |\n| 10 | 4 | 5045 |\n| 10 | 5 | 5049 |\n| 10 | 6 | 5053 |\n| 10 | 7 | 5049 |\n| 10 | 8 | 5057 |\n| 10 | 9 | 5047 |\n\n| transformer_id_from | transformer_id_to | power_exchange_between_transformers |\n|---|---|---|\n| F1 | F2 | 0 |\n| F1 | F3 | 11 |\n| F1 | F4 | 109 |\n| F1 | F5 | 11749 |\n| F1 | F6 | 103 |\n| F1 | F7 | 2 |\n| F1 | F8 | 28204 |\n| F1 | F9 | 4 |\n| F1 | F10 | 0 |\n| F1 | F11 | 0 |\n| F2 | F1 | 44 |\n| F2 | F3 | 8941 |\n| F2 | F4 | 0 |\n| F2 | F5 | 2 |\n| F2 | F6 | 0 |\n| F2 | F7 | 0 |\n| F2 | F8 | 0 |\n| F2 | F9 | 4721 |\n| F2 | F10 | 34798 |\n| F2 | F11 | 2 |\n| F3 | F1 | 0 |\n| F3 | F2 | 390 |\n| F3 | F4 | 38976 |\n| F3 | F5 | 0 |\n| F3 | F6 | 0 |\n| F3 | F7 | 0 |\n| F3 | F8 | 14696 |\n| F3 | F9 | 1170 |\n| F3 | F10 | 69 |\n| F3 | F11 | 248 |\n| F4 | F1 | 34 |\n| F4 | F2 | 0 |\n| F4 | F3 | 1446 |\n| F4 | F5 | 1 |\n| F4 | F6 | 0 |\n| F4 | F7 | 0 |\n| F4 | F8 | 882 |\n| F4 | F9 | 0 |\n| F4 | F10 | 0 |\n| F4 | F11 | 8 |\n| F5 | F1 | 236 |\n| F5 | F2 | 4 |\n| F5 | F3 | 785 |\n| F5 | F4 | 11 |\n| F5 | F6 | 1 |\n| F5 | F7 | 397 |\n| F5 | F8 | 0 |\n| F5 | F9 | 15215 |\n| F5 | F10 | 6 |\n| F5 | F11 | 0 |\n| F6 | F1 | 6 |\n| F6 | F2 | 2 |\n| F6 | F3 | 0 |\n| F6 | F4 | 4338 |\n| F6 | F5 | 0 |\n| F6 | F7 | 0 |\n| F6 | F8 | 5848 |\n| F6 | F9 | 0 |\n| F6 | F10 | 124 |\n| F6 | F11 | 0 |\n| F7 | F1 | 30 |\n| F7 | F2 | 20274 |\n| F7 | F3 | 0 |\n| F7 | F4 | 0 |\n| F7 | F5 | 6741 |\n| F7 | F6 | 0 |\n| F7 | F8 | 0 |\n| F7 | F9 | 0 |\n| F7 | F10 | 3321 |\n| F7 | F11 | 0 |\n| F8 | F1 | 0 |\n| F8 | F2 | 0 |\n| F8 | F3 | 0 |\n| F8 | F4 | 1017 |\n| F8 | F5 | 0 |\n| F8 | F6 | 11003 |\n| F8 | F7 | 0 |\n| F8 | F9 | 0 |\n| F8 | F10 | 91 |\n| F8 | F11 | 1 |\n| F9 | F1 | 2541 |\n| F9 | F2 | 0 |\n| F9 | F3 | 28037 |\n| F9 | F4 | 2 |\n| F9 | F5 | 0 |\n| F9 | F6 | 0 |\n| F9 | F7 | 53851 |\n| F9 | F8 | 0 |\n| F9 | F10 | 13598 |\n| F9 | F11 | 2 |\n| F10 | F1 | 1 |\n| F10 | F2 | 174 |\n| F10 | F3 | 0 |\n| F10 | F4 | 0 |\n| F10 | F5 | 0 |\n| F10 | F6 | 0 |\n| F10 | F7 | 0 |\n| F10 | F8 | 10 |\n| F10 | F9 | 0 |\n| F10 | F11 | 1732 |\n| F11 | F1 | 1851 |\n| F11 | F2 | 37 |\n| F11 | F3 | 26412 |\n| F11 | F4 | 8 |\n| F11 | F5 | 12765 |\n| F11 | F6 | 0 |\n| F11 | F7 | 0 |\n| F11 | F8 | 9 |\n| F11 | F9 | 1524 |\n| F11 | F10 | 0 |\n\nThese directed site separations and transformer power exchanges are listed below for computing total transmission loss; lower totals indicate better seating plans.\n\nIf you want to send back a seating plan, just slip it into this little JSON shape — keeps things neat and machine-friendly without making it feel formal.\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nThink of that \"solution\" array like a roster: the first entry is the seat ID for the first transformer, the second entry is the seat ID for the second transformer, and so on down the line. It's just a sketch of the shape I need, not the actual answer.\n\nPlease make sure you use the exact identifiers shown in the instance input — do not rename them or invent new labels. \n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”.\"", "instance": { "distance_matrix": [ [ 0, 12, 12, 8, 12, 9, 5, 6, 2, 8, 5055 ], [ 12, 0, 10, 7, 9, 6, 10, 6, 14, 4, 5043 ], [ 12, 10, 0, 5, 1, 13, 14, 9, 14, 8, 5045 ], [ 8, 7, 5, 0, 4, 9, 9, 4, 10, 4, 5047 ], [ 12, 9, 1, 4, 0, 13, 13, 8, 13, 8, 5045 ], [ 9, 6, 13, 9, 13, 0, 4, 5, 10, 5, 5049 ], [ 5, 10, 14, 9, 13, 4, 0, 5, 6, 6, 5053 ], [ 6, 6, 9, 4, 8, 5, 5, 0, 8, 2, 5049 ], [ 2, 14, 14, 10, 13, 10, 6, 8, 0, 10, 5057 ], [ 8, 4, 8, 4, 8, 5, 6, 2, 10, 0, 5047 ], [ 5055, 5043, 5045, 5047, 5045, 5049, 5053, 5049, 5057, 5047, 0 ] ], "flow_matrix": [ [ 0, 0, 11, 109, 11749, 103, 2, 28204, 4, 0, 0 ], [ 44, 0, 8941, 0, 2, 0, 0, 0, 4721, 34798, 2 ], [ 0, 390, 0, 38976, 0, 0, 0, 14696, 1170, 69, 248 ], [ 34, 0, 1446, 0, 1, 0, 0, 882, 0, 0, 8 ], [ 236, 4, 785, 11, 0, 1, 397, 0, 15215, 6, 0 ], [ 6, 2, 0, 4338, 0, 0, 0, 5848, 0, 124, 0 ], [ 30, 20274, 0, 0, 6741, 0, 0, 0, 0, 3321, 0 ], [ 0, 0, 0, 1017, 0, 11003, 0, 0, 0, 91, 1 ], [ 2541, 0, 28037, 2, 0, 0, 53851, 0, 0, 13598, 2 ], [ 1, 174, 0, 0, 0, 0, 0, 10, 0, 0, 1732 ], [ 1851, 37, 26412, 8, 12765, 0, 0, 9, 1524, 0, 0 ] ], "objective": 109968243.0 }, "solution": [ 4, 5, 3, 1, 6, 10, 8, 2, 0, 7, 9 ], "obj": 109968243.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 11, "num_locations": 11, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11" ], "locations": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "distance_pairs": [ { "from_id": 0, "to_id": 1, "distance": 12 }, { "from_id": 0, "to_id": 2, "distance": 12 }, { "from_id": 0, "to_id": 3, "distance": 8 }, { "from_id": 0, "to_id": 4, "distance": 12 }, { "from_id": 0, "to_id": 5, "distance": 9 }, { "from_id": 0, "to_id": 6, "distance": 5 }, { "from_id": 0, "to_id": 7, "distance": 6 }, { "from_id": 0, "to_id": 8, "distance": 2 }, { "from_id": 0, "to_id": 9, "distance": 8 }, { "from_id": 0, "to_id": 10, "distance": 5055 }, { "from_id": 1, "to_id": 0, "distance": 12 }, { "from_id": 1, "to_id": 2, "distance": 10 }, { "from_id": 1, "to_id": 3, "distance": 7 }, { "from_id": 1, "to_id": 4, "distance": 9 }, { "from_id": 1, "to_id": 5, "distance": 6 }, { "from_id": 1, "to_id": 6, "distance": 10 }, { "from_id": 1, "to_id": 7, "distance": 6 }, { "from_id": 1, "to_id": 8, "distance": 14 }, { "from_id": 1, "to_id": 9, "distance": 4 }, { "from_id": 1, "to_id": 10, "distance": 5043 }, { "from_id": 2, "to_id": 0, "distance": 12 }, { "from_id": 2, "to_id": 1, "distance": 10 }, { "from_id": 2, "to_id": 3, "distance": 5 }, { "from_id": 2, "to_id": 4, "distance": 1 }, { "from_id": 2, "to_id": 5, "distance": 13 }, { "from_id": 2, "to_id": 6, "distance": 14 }, { "from_id": 2, "to_id": 7, "distance": 9 }, { "from_id": 2, "to_id": 8, "distance": 14 }, { "from_id": 2, "to_id": 9, "distance": 8 }, { "from_id": 2, "to_id": 10, "distance": 5045 }, { "from_id": 3, "to_id": 0, "distance": 8 }, { "from_id": 3, "to_id": 1, "distance": 7 }, { "from_id": 3, "to_id": 2, "distance": 5 }, { "from_id": 3, "to_id": 4, "distance": 4 }, { "from_id": 3, "to_id": 5, "distance": 9 }, { "from_id": 3, "to_id": 6, "distance": 9 }, { "from_id": 3, "to_id": 7, "distance": 4 }, { "from_id": 3, "to_id": 8, "distance": 10 }, { "from_id": 3, "to_id": 9, "distance": 4 }, { "from_id": 3, "to_id": 10, "distance": 5047 }, { "from_id": 4, "to_id": 0, "distance": 12 }, { "from_id": 4, "to_id": 1, "distance": 9 }, { "from_id": 4, "to_id": 2, "distance": 1 }, { "from_id": 4, "to_id": 3, "distance": 4 }, { "from_id": 4, "to_id": 5, "distance": 13 }, { "from_id": 4, "to_id": 6, "distance": 13 }, { "from_id": 4, "to_id": 7, "distance": 8 }, { "from_id": 4, "to_id": 8, "distance": 13 }, { "from_id": 4, "to_id": 9, "distance": 8 }, { "from_id": 4, "to_id": 10, "distance": 5045 }, { "from_id": 5, "to_id": 0, "distance": 9 }, { "from_id": 5, "to_id": 1, "distance": 6 }, { "from_id": 5, "to_id": 2, "distance": 13 }, { "from_id": 5, "to_id": 3, "distance": 9 }, { "from_id": 5, "to_id": 4, "distance": 13 }, { "from_id": 5, "to_id": 6, "distance": 4 }, { "from_id": 5, "to_id": 7, "distance": 5 }, { "from_id": 5, "to_id": 8, "distance": 10 }, { "from_id": 5, "to_id": 9, "distance": 5 }, { "from_id": 5, "to_id": 10, "distance": 5049 }, { "from_id": 6, "to_id": 0, "distance": 5 }, { "from_id": 6, "to_id": 1, "distance": 10 }, { "from_id": 6, "to_id": 2, "distance": 14 }, { "from_id": 6, "to_id": 3, "distance": 9 }, { "from_id": 6, "to_id": 4, "distance": 13 }, { "from_id": 6, "to_id": 5, "distance": 4 }, { "from_id": 6, "to_id": 7, "distance": 5 }, { "from_id": 6, "to_id": 8, "distance": 6 }, { "from_id": 6, "to_id": 9, "distance": 6 }, { "from_id": 6, "to_id": 10, "distance": 5053 }, { "from_id": 7, "to_id": 0, "distance": 6 }, { "from_id": 7, "to_id": 1, "distance": 6 }, { "from_id": 7, "to_id": 2, "distance": 9 }, { "from_id": 7, "to_id": 3, "distance": 4 }, { "from_id": 7, "to_id": 4, "distance": 8 }, { "from_id": 7, "to_id": 5, "distance": 5 }, { "from_id": 7, "to_id": 6, "distance": 5 }, { "from_id": 7, "to_id": 8, "distance": 8 }, { "from_id": 7, "to_id": 9, "distance": 2 }, { "from_id": 7, "to_id": 10, "distance": 5049 }, { "from_id": 8, "to_id": 0, "distance": 2 }, { "from_id": 8, "to_id": 1, "distance": 14 }, { "from_id": 8, "to_id": 2, "distance": 14 }, { "from_id": 8, "to_id": 3, "distance": 10 }, { "from_id": 8, "to_id": 4, "distance": 13 }, { "from_id": 8, "to_id": 5, "distance": 10 }, { "from_id": 8, "to_id": 6, "distance": 6 }, { "from_id": 8, "to_id": 7, "distance": 8 }, { "from_id": 8, "to_id": 9, "distance": 10 }, { "from_id": 8, "to_id": 10, "distance": 5057 }, { "from_id": 9, "to_id": 0, "distance": 8 }, { "from_id": 9, "to_id": 1, "distance": 4 }, { "from_id": 9, "to_id": 2, "distance": 8 }, { "from_id": 9, "to_id": 3, "distance": 4 }, { "from_id": 9, "to_id": 4, "distance": 8 }, { "from_id": 9, "to_id": 5, "distance": 5 }, { "from_id": 9, "to_id": 6, "distance": 6 }, { "from_id": 9, "to_id": 7, "distance": 2 }, { "from_id": 9, "to_id": 8, "distance": 10 }, { "from_id": 9, "to_id": 10, "distance": 5047 }, { "from_id": 10, "to_id": 0, "distance": 5055 }, { "from_id": 10, "to_id": 1, "distance": 5043 }, { "from_id": 10, "to_id": 2, "distance": 5045 }, { "from_id": 10, "to_id": 3, "distance": 5047 }, { "from_id": 10, "to_id": 4, "distance": 5045 }, { "from_id": 10, "to_id": 5, "distance": 5049 }, { "from_id": 10, "to_id": 6, "distance": 5053 }, { "from_id": 10, "to_id": 7, "distance": 5049 }, { "from_id": 10, "to_id": 8, "distance": 5057 }, { "from_id": 10, "to_id": 9, "distance": 5047 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 11 }, { "from_id": "F1", "to_id": "F4", "flow": 109 }, { "from_id": "F1", "to_id": "F5", "flow": 11749 }, { "from_id": "F1", "to_id": "F6", "flow": 103 }, { "from_id": "F1", "to_id": "F7", "flow": 2 }, { "from_id": "F1", "to_id": "F8", "flow": 28204 }, { "from_id": "F1", "to_id": "F9", "flow": 4 }, { "from_id": "F1", "to_id": "F10", "flow": 0 }, { "from_id": "F1", "to_id": "F11", "flow": 0 }, { "from_id": "F2", "to_id": "F1", "flow": 44 }, { "from_id": "F2", "to_id": "F3", "flow": 8941 }, { "from_id": "F2", "to_id": "F4", "flow": 0 }, { "from_id": "F2", "to_id": "F5", "flow": 2 }, { "from_id": "F2", "to_id": "F6", "flow": 0 }, { "from_id": "F2", "to_id": "F7", "flow": 0 }, { "from_id": "F2", "to_id": "F8", "flow": 0 }, { "from_id": "F2", "to_id": "F9", "flow": 4721 }, { "from_id": "F2", "to_id": "F10", "flow": 34798 }, { "from_id": "F2", "to_id": "F11", "flow": 2 }, { "from_id": "F3", "to_id": "F1", "flow": 0 }, { "from_id": "F3", "to_id": "F2", "flow": 390 }, { "from_id": "F3", "to_id": "F4", "flow": 38976 }, { "from_id": "F3", "to_id": "F5", "flow": 0 }, { "from_id": "F3", "to_id": "F6", "flow": 0 }, { "from_id": "F3", "to_id": "F7", "flow": 0 }, { "from_id": "F3", "to_id": "F8", "flow": 14696 }, { "from_id": "F3", "to_id": "F9", "flow": 1170 }, { "from_id": "F3", "to_id": "F10", "flow": 69 }, { "from_id": "F3", "to_id": "F11", "flow": 248 }, { "from_id": "F4", "to_id": "F1", "flow": 34 }, { "from_id": "F4", "to_id": "F2", "flow": 0 }, { "from_id": "F4", "to_id": "F3", "flow": 1446 }, { "from_id": "F4", "to_id": "F5", "flow": 1 }, { "from_id": "F4", "to_id": "F6", "flow": 0 }, { "from_id": "F4", "to_id": "F7", "flow": 0 }, { "from_id": "F4", "to_id": "F8", "flow": 882 }, { "from_id": "F4", "to_id": "F9", "flow": 0 }, { "from_id": "F4", "to_id": "F10", "flow": 0 }, { "from_id": "F4", "to_id": "F11", "flow": 8 }, { "from_id": "F5", "to_id": "F1", "flow": 236 }, { "from_id": "F5", "to_id": "F2", "flow": 4 }, { "from_id": "F5", "to_id": "F3", "flow": 785 }, { "from_id": "F5", "to_id": "F4", "flow": 11 }, { "from_id": "F5", "to_id": "F6", "flow": 1 }, { "from_id": "F5", "to_id": "F7", "flow": 397 }, { "from_id": "F5", "to_id": "F8", "flow": 0 }, { "from_id": "F5", "to_id": "F9", "flow": 15215 }, { "from_id": "F5", "to_id": "F10", "flow": 6 }, { "from_id": "F5", "to_id": "F11", "flow": 0 }, { "from_id": "F6", "to_id": "F1", "flow": 6 }, { "from_id": "F6", "to_id": "F2", "flow": 2 }, { "from_id": "F6", "to_id": "F3", "flow": 0 }, { "from_id": "F6", "to_id": "F4", "flow": 4338 }, { "from_id": "F6", "to_id": "F5", "flow": 0 }, { "from_id": "F6", "to_id": "F7", "flow": 0 }, { "from_id": "F6", "to_id": "F8", "flow": 5848 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F10", "flow": 124 }, { "from_id": "F6", "to_id": "F11", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 30 }, { "from_id": "F7", "to_id": "F2", "flow": 20274 }, { "from_id": "F7", "to_id": "F3", "flow": 0 }, { "from_id": "F7", "to_id": "F4", "flow": 0 }, { "from_id": "F7", "to_id": "F5", "flow": 6741 }, { "from_id": "F7", "to_id": "F6", "flow": 0 }, { "from_id": "F7", "to_id": "F8", "flow": 0 }, { "from_id": "F7", "to_id": "F9", "flow": 0 }, { "from_id": "F7", "to_id": "F10", "flow": 3321 }, { "from_id": "F7", "to_id": "F11", "flow": 0 }, { "from_id": "F8", "to_id": "F1", "flow": 0 }, { "from_id": "F8", "to_id": "F2", "flow": 0 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 1017 }, { "from_id": "F8", "to_id": "F5", "flow": 0 }, { "from_id": "F8", "to_id": "F6", "flow": 11003 }, { "from_id": "F8", "to_id": "F7", "flow": 0 }, { "from_id": "F8", "to_id": "F9", "flow": 0 }, { "from_id": "F8", "to_id": "F10", "flow": 91 }, { "from_id": "F8", "to_id": "F11", "flow": 1 }, { "from_id": "F9", "to_id": "F1", "flow": 2541 }, { "from_id": "F9", "to_id": "F2", "flow": 0 }, { "from_id": "F9", "to_id": "F3", "flow": 28037 }, { "from_id": "F9", "to_id": "F4", "flow": 2 }, { "from_id": "F9", "to_id": "F5", "flow": 0 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 53851 }, { "from_id": "F9", "to_id": "F8", "flow": 0 }, { "from_id": "F9", "to_id": "F10", "flow": 13598 }, { "from_id": "F9", "to_id": "F11", "flow": 2 }, { "from_id": "F10", "to_id": "F1", "flow": 1 }, { "from_id": "F10", "to_id": "F2", "flow": 174 }, { "from_id": "F10", "to_id": "F3", "flow": 0 }, { "from_id": "F10", "to_id": "F4", "flow": 0 }, { "from_id": "F10", "to_id": "F5", "flow": 0 }, { "from_id": "F10", "to_id": "F6", "flow": 0 }, { "from_id": "F10", "to_id": "F7", "flow": 0 }, { "from_id": "F10", "to_id": "F8", "flow": 10 }, { "from_id": "F10", "to_id": "F9", "flow": 0 }, { "from_id": "F10", "to_id": "F11", "flow": 1732 }, { "from_id": "F11", "to_id": "F1", "flow": 1851 }, { "from_id": "F11", "to_id": "F2", "flow": 37 }, { "from_id": "F11", "to_id": "F3", "flow": 26412 }, { "from_id": "F11", "to_id": "F4", "flow": 8 }, { "from_id": "F11", "to_id": "F5", "flow": 12765 }, { "from_id": "F11", "to_id": "F6", "flow": 0 }, { "from_id": "F11", "to_id": "F7", "flow": 0 }, { "from_id": "F11", "to_id": "F8", "flow": 9 }, { "from_id": "F11", "to_id": "F9", "flow": 1524 }, { "from_id": "F11", "to_id": "F10", "flow": 0 } ] }, "solution_variant": [ 4, 5, 3, 1, 6, 10, 8, 2, 0, 7, 9 ], "context_index": 49, "input_format": "markdown_table", "input_index_base": 0 }, { "task_name": "QAP", "problem_type": "QAP", "instruction": "Someone in charge of layout must give each book category a single shelf area and make sure each area holds only one category. The job is to pick which category goes where, and the measure of a good plan is the total walk burden: for every pair of categories take how often they’re checked out together, multiply that by how far apart their shelves are, and sum everything — lower totals mean patrons walk less. It’s a one-to-one placement: every category gets a spot and every spot gets one category. The concrete numbers for distances and borrowing links are shown below.\n\n{\n \"num_categories_and_areas\": 9,\n \"book_categories\": [\n \"F1\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\"\n ],\n \"shelf_areas\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9\n ],\n \"distance\": [\n {\n \"shelf_area_from_id\": 1,\n \"shelf_area_to_id\": 2,\n \"separation_distance\": 4\n },\n {\n \"shelf_area_from_id\": 1,\n \"shelf_area_to_id\": 3,\n \"separation_distance\": 7\n },\n {\n \"shelf_area_from_id\": 1,\n \"shelf_area_to_id\": 4,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 1,\n \"shelf_area_to_id\": 5,\n \"separation_distance\": 4\n },\n {\n \"shelf_area_from_id\": 1,\n \"shelf_area_to_id\": 6,\n \"separation_distance\": 4\n },\n {\n \"shelf_area_from_id\": 1,\n \"shelf_area_to_id\": 7,\n \"separation_distance\": 7\n },\n {\n \"shelf_area_from_id\": 1,\n \"shelf_area_to_id\": 8,\n \"separation_distance\": 9\n },\n {\n \"shelf_area_from_id\": 1,\n \"shelf_area_to_id\": 9,\n \"separation_distance\": 10\n },\n {\n \"shelf_area_from_id\": 2,\n \"shelf_area_to_id\": 1,\n \"separation_distance\": 4\n },\n {\n \"shelf_area_from_id\": 2,\n \"shelf_area_to_id\": 3,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 2,\n \"shelf_area_to_id\": 4,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 2,\n \"shelf_area_to_id\": 5,\n \"separation_distance\": 8\n },\n {\n \"shelf_area_from_id\": 2,\n \"shelf_area_to_id\": 6,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 2,\n \"shelf_area_to_id\": 7,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 2,\n \"shelf_area_to_id\": 8,\n \"separation_distance\": 5\n },\n {\n \"shelf_area_from_id\": 2,\n \"shelf_area_to_id\": 9,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 3,\n \"shelf_area_to_id\": 1,\n \"separation_distance\": 7\n },\n {\n \"shelf_area_from_id\": 3,\n \"shelf_area_to_id\": 2,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 3,\n \"shelf_area_to_id\": 4,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 3,\n \"shelf_area_to_id\": 5,\n \"separation_distance\": 11\n },\n {\n \"shelf_area_from_id\": 3,\n \"shelf_area_to_id\": 6,\n \"separation_distance\": 9\n },\n {\n \"shelf_area_from_id\": 3,\n \"shelf_area_to_id\": 7,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 3,\n \"shelf_area_to_id\": 8,\n \"separation_distance\": 4\n },\n {\n \"shelf_area_from_id\": 3,\n \"shelf_area_to_id\": 9,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 4,\n \"shelf_area_to_id\": 1,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 4,\n \"shelf_area_to_id\": 2,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 4,\n \"shelf_area_to_id\": 3,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 4,\n \"shelf_area_to_id\": 5,\n \"separation_distance\": 5\n },\n {\n \"shelf_area_from_id\": 4,\n \"shelf_area_to_id\": 6,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 4,\n \"shelf_area_to_id\": 7,\n \"separation_distance\": 4\n },\n {\n \"shelf_area_from_id\": 4,\n \"shelf_area_to_id\": 8,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 4,\n \"shelf_area_to_id\": 9,\n \"separation_distance\": 7\n },\n {\n \"shelf_area_from_id\": 5,\n \"shelf_area_to_id\": 1,\n \"separation_distance\": 4\n },\n {\n \"shelf_area_from_id\": 5,\n \"shelf_area_to_id\": 2,\n \"separation_distance\": 8\n },\n {\n \"shelf_area_from_id\": 5,\n \"shelf_area_to_id\": 3,\n \"separation_distance\": 11\n },\n {\n \"shelf_area_from_id\": 5,\n \"shelf_area_to_id\": 4,\n \"separation_distance\": 5\n },\n {\n \"shelf_area_from_id\": 5,\n \"shelf_area_to_id\": 6,\n \"separation_distance\": 2\n },\n {\n \"shelf_area_from_id\": 5,\n \"shelf_area_to_id\": 7,\n \"separation_distance\": 5\n },\n {\n \"shelf_area_from_id\": 5,\n \"shelf_area_to_id\": 8,\n \"separation_distance\": 7\n },\n {\n \"shelf_area_from_id\": 5,\n \"shelf_area_to_id\": 9,\n \"separation_distance\": 8\n },\n {\n \"shelf_area_from_id\": 6,\n \"shelf_area_to_id\": 1,\n \"separation_distance\": 4\n },\n {\n \"shelf_area_from_id\": 6,\n \"shelf_area_to_id\": 2,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 6,\n \"shelf_area_to_id\": 3,\n \"separation_distance\": 9\n },\n {\n \"shelf_area_from_id\": 6,\n \"shelf_area_to_id\": 4,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 6,\n \"shelf_area_to_id\": 5,\n \"separation_distance\": 2\n },\n {\n \"shelf_area_from_id\": 6,\n \"shelf_area_to_id\": 7,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 6,\n \"shelf_area_to_id\": 8,\n \"separation_distance\": 5\n },\n {\n \"shelf_area_from_id\": 6,\n \"shelf_area_to_id\": 9,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 7,\n \"shelf_area_to_id\": 1,\n \"separation_distance\": 7\n },\n {\n \"shelf_area_from_id\": 7,\n \"shelf_area_to_id\": 2,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 7,\n \"shelf_area_to_id\": 3,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 7,\n \"shelf_area_to_id\": 4,\n \"separation_distance\": 4\n },\n {\n \"shelf_area_from_id\": 7,\n \"shelf_area_to_id\": 5,\n \"separation_distance\": 5\n },\n {\n \"shelf_area_from_id\": 7,\n \"shelf_area_to_id\": 6,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 7,\n \"shelf_area_to_id\": 8,\n \"separation_distance\": 2\n },\n {\n \"shelf_area_from_id\": 7,\n \"shelf_area_to_id\": 9,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 8,\n \"shelf_area_to_id\": 1,\n \"separation_distance\": 9\n },\n {\n \"shelf_area_from_id\": 8,\n \"shelf_area_to_id\": 2,\n \"separation_distance\": 5\n },\n {\n \"shelf_area_from_id\": 8,\n \"shelf_area_to_id\": 3,\n \"separation_distance\": 4\n },\n {\n \"shelf_area_from_id\": 8,\n \"shelf_area_to_id\": 4,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 8,\n \"shelf_area_to_id\": 5,\n \"separation_distance\": 7\n },\n {\n \"shelf_area_from_id\": 8,\n \"shelf_area_to_id\": 6,\n \"separation_distance\": 5\n },\n {\n \"shelf_area_from_id\": 8,\n \"shelf_area_to_id\": 7,\n \"separation_distance\": 2\n },\n {\n \"shelf_area_from_id\": 8,\n \"shelf_area_to_id\": 9,\n \"separation_distance\": 1\n },\n {\n \"shelf_area_from_id\": 9,\n \"shelf_area_to_id\": 1,\n \"separation_distance\": 10\n },\n {\n \"shelf_area_from_id\": 9,\n \"shelf_area_to_id\": 2,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 9,\n \"shelf_area_to_id\": 3,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 9,\n \"shelf_area_to_id\": 4,\n \"separation_distance\": 7\n },\n {\n \"shelf_area_from_id\": 9,\n \"shelf_area_to_id\": 5,\n \"separation_distance\": 8\n },\n {\n \"shelf_area_from_id\": 9,\n \"shelf_area_to_id\": 6,\n \"separation_distance\": 6\n },\n {\n \"shelf_area_from_id\": 9,\n \"shelf_area_to_id\": 7,\n \"separation_distance\": 3\n },\n {\n \"shelf_area_from_id\": 9,\n \"shelf_area_to_id\": 8,\n \"separation_distance\": 1\n }\n ],\n \"flow\": [\n {\n \"category_from_id\": \"F1\",\n \"category_to_id\": \"F2\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F1\",\n \"category_to_id\": \"F3\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F1\",\n \"category_to_id\": \"F4\",\n \"co_borrow_frequency\": 16\n },\n {\n \"category_from_id\": \"F1\",\n \"category_to_id\": \"F5\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F1\",\n \"category_to_id\": \"F6\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F1\",\n \"category_to_id\": \"F7\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F1\",\n \"category_to_id\": \"F8\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F1\",\n \"category_to_id\": \"F9\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F2\",\n \"category_to_id\": \"F1\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F2\",\n \"category_to_id\": \"F3\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F2\",\n \"category_to_id\": \"F4\",\n \"co_borrow_frequency\": 19\n },\n {\n \"category_from_id\": \"F2\",\n \"category_to_id\": \"F5\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F2\",\n \"category_to_id\": \"F6\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F2\",\n \"category_to_id\": \"F7\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F2\",\n \"category_to_id\": \"F8\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F2\",\n \"category_to_id\": \"F9\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F3\",\n \"category_to_id\": \"F1\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F3\",\n \"category_to_id\": \"F2\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F3\",\n \"category_to_id\": \"F4\",\n \"co_borrow_frequency\": 18\n },\n {\n \"category_from_id\": \"F3\",\n \"category_to_id\": \"F5\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F3\",\n \"category_to_id\": \"F6\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F3\",\n \"category_to_id\": \"F7\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F3\",\n \"category_to_id\": \"F8\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F3\",\n \"category_to_id\": \"F9\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F4\",\n \"category_to_id\": \"F1\",\n \"co_borrow_frequency\": 16\n },\n {\n \"category_from_id\": \"F4\",\n \"category_to_id\": \"F2\",\n \"co_borrow_frequency\": 19\n },\n {\n \"category_from_id\": \"F4\",\n \"category_to_id\": \"F3\",\n \"co_borrow_frequency\": 18\n },\n {\n \"category_from_id\": \"F4\",\n \"category_to_id\": \"F5\",\n \"co_borrow_frequency\": 11\n },\n {\n \"category_from_id\": \"F4\",\n \"category_to_id\": \"F6\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F4\",\n \"category_to_id\": \"F7\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F4\",\n \"category_to_id\": \"F8\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F4\",\n \"category_to_id\": \"F9\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F5\",\n \"category_to_id\": \"F1\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F5\",\n \"category_to_id\": \"F2\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F5\",\n \"category_to_id\": \"F3\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F5\",\n \"category_to_id\": \"F4\",\n \"co_borrow_frequency\": 11\n },\n {\n \"category_from_id\": \"F5\",\n \"category_to_id\": \"F6\",\n \"co_borrow_frequency\": 22\n },\n {\n \"category_from_id\": \"F5\",\n \"category_to_id\": \"F7\",\n \"co_borrow_frequency\": 4\n },\n {\n \"category_from_id\": \"F5\",\n \"category_to_id\": \"F8\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F5\",\n \"category_to_id\": \"F9\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F6\",\n \"category_to_id\": \"F1\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F6\",\n \"category_to_id\": \"F2\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F6\",\n \"category_to_id\": \"F3\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F6\",\n \"category_to_id\": \"F4\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F6\",\n \"category_to_id\": \"F5\",\n \"co_borrow_frequency\": 22\n },\n {\n \"category_from_id\": \"F6\",\n \"category_to_id\": \"F7\",\n \"co_borrow_frequency\": 5\n },\n {\n \"category_from_id\": \"F6\",\n \"category_to_id\": \"F8\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F6\",\n \"category_to_id\": \"F9\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F7\",\n \"category_to_id\": \"F1\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F7\",\n \"category_to_id\": \"F2\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F7\",\n \"category_to_id\": \"F3\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F7\",\n \"category_to_id\": \"F4\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F7\",\n \"category_to_id\": \"F5\",\n \"co_borrow_frequency\": 4\n },\n {\n \"category_from_id\": \"F7\",\n \"category_to_id\": \"F6\",\n \"co_borrow_frequency\": 5\n },\n {\n \"category_from_id\": \"F7\",\n \"category_to_id\": \"F8\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F7\",\n \"category_to_id\": \"F9\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F8\",\n \"category_to_id\": \"F1\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F8\",\n \"category_to_id\": \"F2\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F8\",\n \"category_to_id\": \"F3\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F8\",\n \"category_to_id\": \"F4\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F8\",\n \"category_to_id\": \"F5\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F8\",\n \"category_to_id\": \"F6\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F8\",\n \"category_to_id\": \"F7\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F8\",\n \"category_to_id\": \"F9\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F9\",\n \"category_to_id\": \"F1\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F9\",\n \"category_to_id\": \"F2\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F9\",\n \"category_to_id\": \"F3\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F9\",\n \"category_to_id\": \"F4\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F9\",\n \"category_to_id\": \"F5\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F9\",\n \"category_to_id\": \"F6\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F9\",\n \"category_to_id\": \"F7\",\n \"co_borrow_frequency\": 0\n },\n {\n \"category_from_id\": \"F9\",\n \"category_to_id\": \"F8\",\n \"co_borrow_frequency\": 0\n }\n ]\n}\n\nIf you want to give the final assignment in a machine-friendly way, just stick to this little JSON shape — it's an easy form: a list where each entry is the shelf (location) id for the corresponding book category.\n\n{\n \"solution\": [\n ,\n ,\n ...,\n \n ]\n}\n\nPretty straightforward: \"solution\" is the list, and the first item is the shelf id assigned to the first category in the instance, the second item is the shelf id for the second category, and so on. This block is just a sketch of the shape I expect, not the actual answer — replace those placeholders with the exact ids from the instance when you give the final assignment.\n\nPlease use the identifiers exactly as they appear in the instance input — do not rename them or invent new labels.\n- for example: \"Valid identifiers look like plain numbers such as “1” or “23”, single capital letters like “A” or “B”, or a capital letter followed by digits like “A1” or “X7”\".", "instance": { "distance_matrix": [ [ 0, 4, 7, 3, 4, 4, 7, 9, 10 ], [ 4, 0, 3, 3, 8, 6, 3, 5, 6 ], [ 7, 3, 0, 6, 11, 9, 6, 4, 3 ], [ 3, 3, 6, 0, 5, 3, 4, 6, 7 ], [ 4, 8, 11, 5, 0, 2, 5, 7, 8 ], [ 4, 6, 9, 3, 2, 0, 3, 5, 6 ], [ 7, 3, 6, 4, 5, 3, 0, 2, 3 ], [ 9, 5, 4, 6, 7, 5, 2, 0, 1 ], [ 10, 6, 3, 7, 8, 6, 3, 1, 0 ] ], "flow_matrix": [ [ 0, 0, 0, 16, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 19, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 18, 0, 0, 0, 0, 0 ], [ 16, 19, 18, 0, 11, 0, 0, 0, 0 ], [ 0, 0, 0, 11, 0, 22, 4, 0, 0 ], [ 0, 0, 0, 0, 22, 0, 5, 0, 0 ], [ 0, 0, 0, 0, 4, 5, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], "objective": 496.0 }, "solution": [ 3, 4, 6, 5, 7, 8, 2, 0, 1 ], "obj": 496.0, "instance_variant": { "problem_type": "QAP", "num_facilities": 9, "num_locations": 9, "facilities": [ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9" ], "locations": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "distance_pairs": [ { "from_id": 1, "to_id": 2, "distance": 4 }, { "from_id": 1, "to_id": 3, "distance": 7 }, { "from_id": 1, "to_id": 4, "distance": 3 }, { "from_id": 1, "to_id": 5, "distance": 4 }, { "from_id": 1, "to_id": 6, "distance": 4 }, { "from_id": 1, "to_id": 7, "distance": 7 }, { "from_id": 1, "to_id": 8, "distance": 9 }, { "from_id": 1, "to_id": 9, "distance": 10 }, { "from_id": 2, "to_id": 1, "distance": 4 }, { "from_id": 2, "to_id": 3, "distance": 3 }, { "from_id": 2, "to_id": 4, "distance": 3 }, { "from_id": 2, "to_id": 5, "distance": 8 }, { "from_id": 2, "to_id": 6, "distance": 6 }, { "from_id": 2, "to_id": 7, "distance": 3 }, { "from_id": 2, "to_id": 8, "distance": 5 }, { "from_id": 2, "to_id": 9, "distance": 6 }, { "from_id": 3, "to_id": 1, "distance": 7 }, { "from_id": 3, "to_id": 2, "distance": 3 }, { "from_id": 3, "to_id": 4, "distance": 6 }, { "from_id": 3, "to_id": 5, "distance": 11 }, { "from_id": 3, "to_id": 6, "distance": 9 }, { "from_id": 3, "to_id": 7, "distance": 6 }, { "from_id": 3, "to_id": 8, "distance": 4 }, { "from_id": 3, "to_id": 9, "distance": 3 }, { "from_id": 4, "to_id": 1, "distance": 3 }, { "from_id": 4, "to_id": 2, "distance": 3 }, { "from_id": 4, "to_id": 3, "distance": 6 }, { "from_id": 4, "to_id": 5, "distance": 5 }, { "from_id": 4, "to_id": 6, "distance": 3 }, { "from_id": 4, "to_id": 7, "distance": 4 }, { "from_id": 4, "to_id": 8, "distance": 6 }, { "from_id": 4, "to_id": 9, "distance": 7 }, { "from_id": 5, "to_id": 1, "distance": 4 }, { "from_id": 5, "to_id": 2, "distance": 8 }, { "from_id": 5, "to_id": 3, "distance": 11 }, { "from_id": 5, "to_id": 4, "distance": 5 }, { "from_id": 5, "to_id": 6, "distance": 2 }, { "from_id": 5, "to_id": 7, "distance": 5 }, { "from_id": 5, "to_id": 8, "distance": 7 }, { "from_id": 5, "to_id": 9, "distance": 8 }, { "from_id": 6, "to_id": 1, "distance": 4 }, { "from_id": 6, "to_id": 2, "distance": 6 }, { "from_id": 6, "to_id": 3, "distance": 9 }, { "from_id": 6, "to_id": 4, "distance": 3 }, { "from_id": 6, "to_id": 5, "distance": 2 }, { "from_id": 6, "to_id": 7, "distance": 3 }, { "from_id": 6, "to_id": 8, "distance": 5 }, { "from_id": 6, "to_id": 9, "distance": 6 }, { "from_id": 7, "to_id": 1, "distance": 7 }, { "from_id": 7, "to_id": 2, "distance": 3 }, { "from_id": 7, "to_id": 3, "distance": 6 }, { "from_id": 7, "to_id": 4, "distance": 4 }, { "from_id": 7, "to_id": 5, "distance": 5 }, { "from_id": 7, "to_id": 6, "distance": 3 }, { "from_id": 7, "to_id": 8, "distance": 2 }, { "from_id": 7, "to_id": 9, "distance": 3 }, { "from_id": 8, "to_id": 1, "distance": 9 }, { "from_id": 8, "to_id": 2, "distance": 5 }, { "from_id": 8, "to_id": 3, "distance": 4 }, { "from_id": 8, "to_id": 4, "distance": 6 }, { "from_id": 8, "to_id": 5, "distance": 7 }, { "from_id": 8, "to_id": 6, "distance": 5 }, { "from_id": 8, "to_id": 7, "distance": 2 }, { "from_id": 8, "to_id": 9, "distance": 1 }, { "from_id": 9, "to_id": 1, "distance": 10 }, { "from_id": 9, "to_id": 2, "distance": 6 }, { "from_id": 9, "to_id": 3, "distance": 3 }, { "from_id": 9, "to_id": 4, "distance": 7 }, { "from_id": 9, "to_id": 5, "distance": 8 }, { "from_id": 9, "to_id": 6, "distance": 6 }, { "from_id": 9, "to_id": 7, "distance": 3 }, { "from_id": 9, "to_id": 8, "distance": 1 } ], "flow_pairs": [ { "from_id": "F1", "to_id": "F2", "flow": 0 }, { "from_id": "F1", "to_id": "F3", "flow": 0 }, { "from_id": "F1", "to_id": "F4", "flow": 16 }, { "from_id": "F1", "to_id": "F5", "flow": 0 }, { "from_id": "F1", "to_id": "F6", "flow": 0 }, { "from_id": "F1", "to_id": "F7", "flow": 0 }, { "from_id": "F1", "to_id": "F8", "flow": 0 }, { "from_id": "F1", "to_id": "F9", "flow": 0 }, { "from_id": "F2", "to_id": "F1", "flow": 0 }, { "from_id": "F2", "to_id": "F3", "flow": 0 }, { "from_id": "F2", "to_id": "F4", "flow": 19 }, { "from_id": "F2", "to_id": "F5", "flow": 0 }, { "from_id": "F2", "to_id": "F6", "flow": 0 }, { "from_id": "F2", "to_id": "F7", "flow": 0 }, { "from_id": "F2", "to_id": "F8", "flow": 0 }, { "from_id": "F2", "to_id": "F9", "flow": 0 }, { "from_id": "F3", "to_id": "F1", "flow": 0 }, { "from_id": "F3", "to_id": "F2", "flow": 0 }, { "from_id": "F3", "to_id": "F4", "flow": 18 }, { "from_id": "F3", "to_id": "F5", "flow": 0 }, { "from_id": "F3", "to_id": "F6", "flow": 0 }, { "from_id": "F3", "to_id": "F7", "flow": 0 }, { "from_id": "F3", "to_id": "F8", "flow": 0 }, { "from_id": "F3", "to_id": "F9", "flow": 0 }, { "from_id": "F4", "to_id": "F1", "flow": 16 }, { "from_id": "F4", "to_id": "F2", "flow": 19 }, { "from_id": "F4", "to_id": "F3", "flow": 18 }, { "from_id": "F4", "to_id": "F5", "flow": 11 }, { "from_id": "F4", "to_id": "F6", "flow": 0 }, { "from_id": "F4", "to_id": "F7", "flow": 0 }, { "from_id": "F4", "to_id": "F8", "flow": 0 }, { "from_id": "F4", "to_id": "F9", "flow": 0 }, { "from_id": "F5", "to_id": "F1", "flow": 0 }, { "from_id": "F5", "to_id": "F2", "flow": 0 }, { "from_id": "F5", "to_id": "F3", "flow": 0 }, { "from_id": "F5", "to_id": "F4", "flow": 11 }, { "from_id": "F5", "to_id": "F6", "flow": 22 }, { "from_id": "F5", "to_id": "F7", "flow": 4 }, { "from_id": "F5", "to_id": "F8", "flow": 0 }, { "from_id": "F5", "to_id": "F9", "flow": 0 }, { "from_id": "F6", "to_id": "F1", "flow": 0 }, { "from_id": "F6", "to_id": "F2", "flow": 0 }, { "from_id": "F6", "to_id": "F3", "flow": 0 }, { "from_id": "F6", "to_id": "F4", "flow": 0 }, { "from_id": "F6", "to_id": "F5", "flow": 22 }, { "from_id": "F6", "to_id": "F7", "flow": 5 }, { "from_id": "F6", "to_id": "F8", "flow": 0 }, { "from_id": "F6", "to_id": "F9", "flow": 0 }, { "from_id": "F7", "to_id": "F1", "flow": 0 }, { "from_id": "F7", "to_id": "F2", "flow": 0 }, { "from_id": "F7", "to_id": "F3", "flow": 0 }, { "from_id": "F7", "to_id": "F4", "flow": 0 }, { "from_id": "F7", "to_id": "F5", "flow": 4 }, { "from_id": "F7", "to_id": "F6", "flow": 5 }, { "from_id": "F7", "to_id": "F8", "flow": 0 }, { "from_id": "F7", "to_id": "F9", "flow": 0 }, { "from_id": "F8", "to_id": "F1", "flow": 0 }, { "from_id": "F8", "to_id": "F2", "flow": 0 }, { "from_id": "F8", "to_id": "F3", "flow": 0 }, { "from_id": "F8", "to_id": "F4", "flow": 0 }, { "from_id": "F8", "to_id": "F5", "flow": 0 }, { "from_id": "F8", "to_id": "F6", "flow": 0 }, { "from_id": "F8", "to_id": "F7", "flow": 0 }, { "from_id": "F8", "to_id": "F9", "flow": 0 }, { "from_id": "F9", "to_id": "F1", "flow": 0 }, { "from_id": "F9", "to_id": "F2", "flow": 0 }, { "from_id": "F9", "to_id": "F3", "flow": 0 }, { "from_id": "F9", "to_id": "F4", "flow": 0 }, { "from_id": "F9", "to_id": "F5", "flow": 0 }, { "from_id": "F9", "to_id": "F6", "flow": 0 }, { "from_id": "F9", "to_id": "F7", "flow": 0 }, { "from_id": "F9", "to_id": "F8", "flow": 0 } ] }, "solution_variant": [ 4, 5, 7, 6, 8, 9, 3, 1, 2 ], "context_index": 50, "input_format": "json", "input_index_base": 1 } ]