├── .github └── workflows │ ├── markdownlint.yml │ └── reuse.yml ├── .mdlrc ├── .pre-commit-config.yaml ├── .reuse └── dep5 ├── CONTRIBUTING.md ├── LICENSES ├── Apache-2.0.txt ├── CC-BY-4.0.txt └── CC0-1.0.txt ├── README.md ├── problems ├── optimal-scaling │ └── README.md └── service-placement │ ├── data │ ├── base.txt │ ├── graph.txt │ └── solution_base.txt │ ├── images │ ├── base_graph.png │ └── base_graph.png.license │ ├── problem-statement-sp.md │ └── support │ ├── evaluation.py │ └── generator.py └── templates └── problem ├── README.md ├── data ├── instance01 │ ├── description.txt │ ├── input.txt │ ├── output01.txt │ └── output02.txt └── instance02 │ ├── input.txt │ └── output.txt ├── images └── .gitkeep └── support └── .gitkeep /.github/workflows/markdownlint.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Alexandre Jesus 2 | # 3 | # SPDX-License-Identifier: CC0-1.0 4 | 5 | name: markdownlint (mdl) check 6 | 7 | on: [push, pull_request] 8 | 9 | jobs: 10 | delivery: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - name: Run markdownlint (mdl) 15 | uses: actionshub/markdownlint@main 16 | -------------------------------------------------------------------------------- /.github/workflows/reuse.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. 2 | # 3 | # SPDX-License-Identifier: CC0-1.0 4 | 5 | name: REUSE Compliance Check 6 | 7 | on: [push, pull_request] 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - name: REUSE Compliance Check 15 | uses: fsfe/reuse-action@v3 16 | -------------------------------------------------------------------------------- /.mdlrc: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Alexandre Jesus 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | style "relaxed" 6 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Alexandre Jesus 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | repos: 6 | - repo: https://github.com/fsfe/reuse-tool 7 | rev: v3.0.2 8 | hooks: 9 | - id: reuse 10 | - repo: https://github.com/markdownlint/markdownlint 11 | rev: v0.13.0 12 | hooks: 13 | - id: markdownlint 14 | -------------------------------------------------------------------------------- /.reuse/dep5: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: problem-statements 3 | Upstream-Contact: Alexandre Jesus 4 | Source: https://github.com/roar-net/problem-statements 5 | 6 | Files: templates/problem/data/**/*.txt 7 | Copyright: 2024 Alexandre Jesus 8 | License: CC0-1.0 9 | 10 | Files: problems/service-placement/data/*.txt 11 | Copyright: 2024 Noé Godinho 12 | License: CC0-1.0 -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Contributing 8 | 9 | We are glad that you want to contribute to our problem statements 10 | repository. This document will try to answer some common questions that may 11 | arise. 12 | 13 | ## Issues 14 | 15 | We use GitHub to track and discuss all project issues. If you identify any kind 16 | of issue or bug in the project (for example a mistake in a problem statement or 17 | bug in some code), or have ideas for improvements please feel free to open a new 18 | issue [here](https://github.com/roar-net/problem-statements/issues). 19 | 20 | ## Contributions 21 | 22 | We follow a [forking 23 | workflow](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project) 24 | for contributions to this repository. The main steps are: 25 | 26 | 1. Fork the project (https://github.com/roar-net/problem-statements/fork) 27 | 1. Create a feature branch 28 | 1. Stage, commit, and push your changes 29 | 1. Create a [Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) 30 | 31 | After you create a pull request the maintainers of this repository will review 32 | it to validate its correctness and relevance. Any issues identified will be 33 | discussed in the pull request discussion. 34 | 35 | ### Problem submission 36 | 37 | To submit a problem statement open a pull request with a new problem inside the 38 | `problems` folder following the template provided in 39 | [templates/problem](./templates/problem). 40 | 41 | Each problem must have its own folder inside the `problems` folder. The name of 42 | the folder should be in kebab-case and sufficiently descriptive, e.g., 43 | `binary-knapsack` for the 0-1 Knapsack Problem, or `tsp` for the Traveling 44 | Salesman Problem. 45 | 46 | ### Continuous Integration 47 | 48 | When you create a pull request several checks are automatically performed, in 49 | particular: 50 | 51 | - We run the [REUSE Tool](https://github.com/fsfe/reuse-tool/) to make sure that 52 | has copyright and licensing information (see below) 53 | - We run [mdl](https://github.com/markdownlint/markdownlint) to make sure all 54 | markdown files (if there are any) are correctly formatted. 55 | 56 | In order to have your contribution accepted into the repository both checks 57 | should pass successfully. 58 | 59 | We provide a pre-commit config that automatically runs these checks locally 60 | before you commit your changes. 61 | 62 | ### Copyright and Licensing 63 | 64 | Every file should be licensed to avoid any ambiguity on reuse. We follow the 65 | [REUSE Specification - Version 3.0](https://reuse.software/spec/) to declare 66 | copyright and licence information for all files in a standardised 67 | way. Furthremore, we use the [REUSE Tool](https://github.com/fsfe/reuse-tool/) 68 | to automatically check that all files have the required copyright and licence 69 | information. 70 | 71 | Note that this repository is governed under the Copyright and Licensing Policy 72 | of ROAR-NET which can be found [here](https://roar-net.eu/copyright_policy). In 73 | particular, original problem statements and support materials are expected to be 74 | licensed under the CC-BY-4.0 or Apache 2.0 licences as appropriate. Exceptions 75 | for non-original or derivative work shall be analysed on a case-by-case basis 76 | taking into account the goals of the COST Action. One general exception in this 77 | repository is that sample data files may be licensed under CC0-1.0 if you wish 78 | for ease of use. Contributions not abiding to this policy may be rejected. 79 | -------------------------------------------------------------------------------- /LICENSES/Apache-2.0.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. 10 | 11 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. 12 | 13 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 14 | 15 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. 16 | 17 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. 18 | 19 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. 20 | 21 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). 22 | 23 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. 24 | 25 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." 26 | 27 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 28 | 29 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 30 | 31 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 32 | 33 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: 34 | 35 | (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and 36 | 37 | (b) You must cause any modified files to carry prominent notices stating that You changed the files; and 38 | 39 | (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and 40 | 41 | (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. 42 | 43 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 44 | 45 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 46 | 47 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 48 | 49 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 50 | 51 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 52 | 53 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. 54 | 55 | END OF TERMS AND CONDITIONS 56 | 57 | APPENDIX: How to apply the Apache License to your work. 58 | 59 | To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. 60 | 61 | Copyright [yyyy] [name of copyright owner] 62 | 63 | Licensed under the Apache License, Version 2.0 (the "License"); 64 | you may not use this file except in compliance with the License. 65 | You may obtain a copy of the License at 66 | 67 | http://www.apache.org/licenses/LICENSE-2.0 68 | 69 | Unless required by applicable law or agreed to in writing, software 70 | distributed under the License is distributed on an "AS IS" BASIS, 71 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 72 | See the License for the specific language governing permissions and 73 | limitations under the License. 74 | -------------------------------------------------------------------------------- /LICENSES/CC-BY-4.0.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution 4.0 International 2 | 3 | Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. 4 | 5 | Using Creative Commons Public Licenses 6 | 7 | Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. 8 | 9 | Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors. 10 | 11 | Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public. 12 | 13 | Creative Commons Attribution 4.0 International Public License 14 | 15 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 16 | 17 | Section 1 – Definitions. 18 | 19 | a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. 20 | 21 | b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. 22 | 23 | c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. 24 | 25 | d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. 26 | 27 | e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. 28 | 29 | f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. 30 | 31 | g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. 32 | 33 | h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. 34 | 35 | i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. 36 | 37 | j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. 38 | 39 | k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. 40 | 41 | Section 2 – Scope. 42 | 43 | a. License grant. 44 | 45 | 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: 46 | 47 | A. reproduce and Share the Licensed Material, in whole or in part; and 48 | 49 | B. produce, reproduce, and Share Adapted Material. 50 | 51 | 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 52 | 53 | 3. Term. The term of this Public License is specified in Section 6(a). 54 | 55 | 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 56 | 57 | 5. Downstream recipients. 58 | 59 | A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. 60 | 61 | B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 62 | 63 | 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). 64 | 65 | b. Other rights. 66 | 67 | 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 68 | 69 | 2. Patent and trademark rights are not licensed under this Public License. 70 | 71 | 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. 72 | 73 | Section 3 – License Conditions. 74 | 75 | Your exercise of the Licensed Rights is expressly made subject to the following conditions. 76 | 77 | a. Attribution. 78 | 79 | 1. If You Share the Licensed Material (including in modified form), You must: 80 | 81 | A. retain the following if it is supplied by the Licensor with the Licensed Material: 82 | 83 | i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); 84 | 85 | ii. a copyright notice; 86 | 87 | iii. a notice that refers to this Public License; 88 | 89 | iv. a notice that refers to the disclaimer of warranties; 90 | 91 | v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; 92 | 93 | B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and 94 | 95 | C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 96 | 97 | 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 98 | 99 | 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 100 | 101 | 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. 102 | 103 | Section 4 – Sui Generis Database Rights. 104 | 105 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: 106 | 107 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; 108 | 109 | b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and 110 | 111 | c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. 112 | For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. 113 | 114 | Section 5 – Disclaimer of Warranties and Limitation of Liability. 115 | 116 | a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. 117 | 118 | b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. 119 | 120 | c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. 121 | 122 | Section 6 – Term and Termination. 123 | 124 | a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. 125 | 126 | b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 127 | 128 | 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 129 | 130 | 2. upon express reinstatement by the Licensor. 131 | 132 | c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. 133 | 134 | d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. 135 | 136 | e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. 137 | 138 | Section 7 – Other Terms and Conditions. 139 | 140 | a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. 141 | 142 | b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. 143 | 144 | Section 8 – Interpretation. 145 | 146 | a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. 147 | 148 | b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. 149 | 150 | c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. 151 | 152 | d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. 153 | 154 | Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. 155 | 156 | Creative Commons may be contacted at creativecommons.org. 157 | -------------------------------------------------------------------------------- /LICENSES/CC0-1.0.txt: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # ROAR-NET Problem Statements 8 | 9 | This repository contains a list of problem statements collected in the scope of 10 | [ROAR-NET](https://roar-net.eu/). 11 | 12 | ## Contributing 13 | 14 | To contribute a problem statement open a pull request with a new problem in the 15 | `problems` folder following the template provided in 16 | [templates/problem](./templates/problem). 17 | 18 | Each problem must have its own folder inside the `problems` folder. The name of 19 | the folder should be in kebab-case and sufficiently descriptive, e.g., 20 | `binary-knapsack` for the 0-1 Knapsack Problem, or `tsp` for the Travelling 21 | Salesman Problem. 22 | 23 | Please read the guidelines described in [CONTRIBUTING.md](./CONTRIBUTING.md) 24 | before contributing. 25 | 26 | ## Copyright and Licence 27 | 28 | Each problem statement and support material is subject to its own copyright and 29 | licence information. Copyright and licence information is declared using the 30 | [REUSE Specification Version 3.0](https://reuse.software/spec). Use of any 31 | material must comply with its licence. 32 | 33 | ## Acknowledgements 34 | 35 | This repository is based upon work from COST Action Randomised Optimisation 36 | Algorithms Research Network (ROAR-NET), CA22137, supported by COST (European 37 | Cooperation in Science and Technology). 38 | 39 | COST (European Cooperation in Science and Technology) is a funding agency for 40 | research and innovation networks. Our Actions help connect research initiatives 41 | across Europe and enable scientists to grow their ideas by sharing them with 42 | their peers. This boosts their research, career and innovation. 43 | 44 | [www.cost.eu](https://www.cost.eu) 45 | 46 |
47 | COST and European Union Logos 48 | -------------------------------------------------------------------------------- /problems/optimal-scaling/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Optimal Scaling of Cloud Services 7 | 8 | André Bento, University of Coimbra, Centre for Informatics and Systems of the University of Coimbra, Department of Informatics Engineering. 9 | 10 | Copyright 2024 André Bento. 11 | 12 | This document is licensed under CC-BY-4.0. 13 | 14 | ## Introduction 15 | 16 | Cloud services operate on infrastructures that leverage shared resources, enabling these services to access the same physical resources independently. This model fosters scalability, flexibility, and cost-effectiveness for both providers and users of cloud services. Cloud services are encapsulated in containers, which can be replicated as necessary to maximize the utilization of infrastructure resources. This scalability ensures that the system can accommodate higher loads, thereby increasing availability for a given workload. As a result, each service dynamically utilizes a flexible allocation of Virtual Central Processing Units (vCPUs) and Gibibytes of Memory for every allocated replica. For instance, a login service may require 1 vCPU and 2 GiB of memory for each replica. 17 | Among the crucial quality of service metrics are Availability and Cost. Availability represents the ratio of successful requests to total requests, while Cost encompasses the total expenses incurred across all replicas of all services. 18 | 19 | ## Task 20 | 21 | The problem consists in determining the optimal replica configuration for the entire system, aiming at maximizing Availability ($A$) and minimizing Cost ($C$). 22 | 23 | ## Problem statement 24 | 25 | The objective function is to minimize $U + C$, where $U$ represents Unavailability (calculated as $1 - A$), and $C$ denotes the normalized cost of the entire system. 26 | The first constraint aims at introducing a threshold for availability as a Service Level Objective (SLO) and is calculated as follows: $A >= 1 - A_{SLO}$. 27 | The second constraint aims at introducing limits to the cost and is calculated as follows: $0 <= C <= 1$. 28 | The replica configuration for the entire system is represented by variable $x$. Each element $x_i$ in $x$ corresponds to the number of replicas for service $i$, where $x_i$ is a positive integer value representing the number of replicas for service $i$. 29 | 30 | $A$ is computed by multiplying all the Availabilities of each service, $A = A_1 * A_2 * ... * A_n$. 31 | 32 | $C$ is computed by summing all the CPU and Memory requirements per replica, $C = \frac{\sum_{i=1}^{n}\sum_{j=1}^{r}{\left(c_c \times \textit{cpu}\_{i} + c_m \times \textit{mem}\_{i}\right) \times x_{ij}}}{C_{max}}$. 33 | 34 | ## Instance data file 35 | 36 | The problem instance file format can be structured in a plain text (txt) format. 37 | Here is a breakdown of each field: 38 | 39 | - NSvcs: Indicates the total number of services described in the file. 40 | - ASLO: Indicates the SLO for the Availability. 41 | - SvcId: Identifies the service, starting from 1. 42 | - Load: Represents the load on the service, measured in requests per second. 43 | - CPUPerReplica: Specifies the vCPU requirement per replica of the service. 44 | - MemPerReplica: Specifies the memory requirement, in Gibibytes, per replica of the service. 45 | - CPUCostCoeff, MemCostCoeff: These coefficients represent the cost associated with CPU and memory usage, respectively. 46 | 47 | Here is an example of a problem instance file: 48 | 49 | ```text 50 | NSvcs 51 | ASLO 52 | SvcId1, Load, CPUPerReplica, MemPerReplica 53 | SvcId2, Load, CPUPerReplica, MemPerReplica 54 | ... 55 | CPUCostCoeff,MemCostCoeff 56 | ``` 57 | 58 | ## Solution file 59 | 60 | The problem instance file format can be structured in a plain text (txt) format. 61 | Here is a breakdown of each field: 62 | 63 | - ObjFuncVal: The value of the objective function of the solution ranging from 0 to 2. 64 | - A: The overall availability of the system. 65 | - C: The total cost of the solution. 66 | - [RplSvc1, RplSvc2, ...]: An array listing the replicas for each service, $x$, representing the optimal configuration of the system. 67 | 68 | Here is an example of a problem solution file: 69 | 70 | ```text 71 | ObjFuncVal, A, C 72 | [RplSvc1, RplSvc2, ...] 73 | ``` 74 | 75 | ## Example 76 | 77 | ### Instance 78 | 79 | Here is an example of a problem instance file: 80 | 81 | ```text 82 | 2 83 | 0.9 84 | 1, 1, 0.5, 1 85 | 2, 1, 0.2, 0.2 86 | 0.0427,0.0039 87 | ``` 88 | 89 | ### Solution 90 | 91 | Here is an example of a problem solution file (possibly not the optimal global solution): 92 | 93 | ```text 94 | 0.9871061228716791, 0.9525361228716791, 0.034570000000000004 95 | [1, 1] 96 | ``` 97 | 98 | ### Explanation 99 | 100 | The solution of this example instance indicates that the optimal configuration for the system is to have one replica of the service 1 and one replica of the service 2. The value of the objective function is around 0.9871, with around 95.25% for the overall availability of the system, and the total cost is around 0.0346 $/hour. The solution meets all constraints. 101 | 102 | ## Acknowledgements 103 | 104 | This problem statement is based upon work from COST Action Randomised Optimisation Algorithms Research Network (ROAR-NET), CA22137, is supported by COST (European Cooperation in Science and Technology), and is also funded in part by the Portuguese Foundation for Science and Technology (FCT) through Doctoral Grant No. BD.06012.2021. 105 | 106 | ### References 107 | 108 | Bento, A., Araujo, F., & Barbosa, R. (2023). Cost-Availability Aware Scaling: Towards Optimal Scaling of Cloud Services. Journal of Grid Computing, 21(4), 80. 109 | -------------------------------------------------------------------------------- /problems/service-placement/data/base.txt: -------------------------------------------------------------------------------- 1 | 6 2 | 0,1000,512,0.1 3 | 1,1000,512,0.1 4 | 2,1000,512,0.1 5 | 3,1000,512,0.1 6 | 4,1000,512,0.1 7 | 5,1000,512,0.1 8 | 7 9 | 0,1,1000,0.1 10 | 0,2,1000,0.2 11 | 1,3,100,0.1 12 | 1,4,1000,0.2 13 | 2,4,1000,0.2 14 | 3,5,1000,0.1 15 | 4,5,1000,0.2 16 | 2 17 | 0,5,500 18 | 1 19 | 100,100 20 | 0,5,100 21 | 2 22 | 100,100 23 | 100,100 24 | -------------------------------------------------------------------------------- /problems/service-placement/data/graph.txt: -------------------------------------------------------------------------------- 1 | 17 2 | 0,140,975,0.7570916757786222 3 | 1,811,432,0.7944794013875176 4 | 2,167,576,0.6274493398263619 5 | 3,304,313,0.24472970320092713 6 | 4,872,457,0.3345397358259321 7 | 5,940,590,0.9681740056097662 8 | 6,373,606,0.5908934147299227 9 | 7,230,258,0.8312314248663948 10 | 8,191,456,0.2412815684090508 11 | 9,512,782,0.8537258939298681 12 | 10,232,215,0.8431449435011426 13 | 11,671,639,0.07504091153838588 14 | 12,891,957,0.495855150385512 15 | 13,503,119,0.9517564906869577 16 | 14,650,370,0.8036295416391118 17 | 15,806,285,0.930390523287642 18 | 16,723,213,0.059098755885862775 19 | 136 20 | 0,1,291,0.3325735558684838 21 | 0,2,859,0.8659156334316354 22 | 0,3,852,0.23005448075024937 23 | 0,4,148,0.7496050353363964 24 | 0,5,185,0.2416389997563616 25 | 0,6,770,0.3960066975001838 26 | 0,7,428,0.9961126877022661 27 | 0,8,285,0.5401300612334258 28 | 0,9,531,0.7563135730709126 29 | 0,10,554,0.5187186152073249 30 | 0,11,624,0.9558860853230121 31 | 0,12,916,0.6753284851028512 32 | 0,13,419,0.8216872823208434 33 | 0,14,292,0.7808981153902612 34 | 0,15,532,0.9705809531967985 35 | 0,16,463,0.9936385381212375 36 | 1,2,705,0.7767697600817121 37 | 1,3,129,0.8900299372971435 38 | 1,4,443,0.40627233638149407 39 | 1,5,912,0.07485683185124692 40 | 1,6,544,0.8947870436158527 41 | 1,7,603,0.8886045538319953 42 | 1,8,748,0.8381399345159976 43 | 1,9,945,0.6151728409491204 44 | 1,10,735,0.5466898886357597 45 | 1,11,726,0.8018572117417729 46 | 1,12,289,0.01757587555191442 47 | 1,13,171,0.4701668539766072 48 | 1,14,359,0.172537885271555 49 | 1,15,476,0.7409229388161654 50 | 1,16,189,0.2946992178765734 51 | 2,3,117,0.7398265365703778 52 | 2,4,742,0.7671107520776049 53 | 2,5,694,0.12456605684864508 54 | 2,6,381,0.3749971280407113 55 | 2,7,184,0.5967228404986399 56 | 2,8,794,0.38239373978380653 57 | 2,9,699,0.4059830584976514 58 | 2,10,269,0.6003758163809962 59 | 2,11,874,0.04370170419268138 60 | 2,12,879,0.25781754987220373 61 | 2,13,163,0.24962205971116225 62 | 2,14,387,0.13111341419584466 63 | 2,15,793,0.1973105107147043 64 | 2,16,204,0.8143101505067339 65 | 3,4,864,0.2579178605105501 66 | 3,5,745,0.6561370300489229 67 | 3,6,445,0.07684978082125882 68 | 3,7,190,0.10415192410977259 69 | 3,8,678,0.8357284202273302 70 | 3,9,380,0.9157945229486989 71 | 3,10,836,0.8320093426686718 72 | 3,11,691,0.02915273654406858 73 | 3,12,881,0.8093689681566402 74 | 3,13,359,0.6725505351538221 75 | 3,14,836,0.5505484415676392 76 | 3,15,452,0.5934063260018677 77 | 3,16,626,0.8328762832119958 78 | 4,5,398,0.3531373841095041 79 | 4,6,161,0.8535471404233866 80 | 4,7,337,0.8817267153307655 81 | 4,8,498,0.14213430267872784 82 | 4,9,440,0.5586250757944377 83 | 4,10,575,0.9917704321747041 84 | 4,11,649,0.2433513911909415 85 | 4,12,864,0.3009278505187517 86 | 4,13,895,0.0906961526602238 87 | 4,14,526,0.3439582625120622 88 | 4,15,270,0.4856382371290855 89 | 4,16,123,0.11580492524329822 90 | 5,6,874,0.7973166495551424 91 | 5,7,625,0.43149056665402985 92 | 5,8,380,0.5511987704272575 93 | 5,9,888,0.9813927528676352 94 | 5,10,331,0.5394041527833018 95 | 5,11,753,0.6168705509025334 96 | 5,12,694,0.6338099200742046 97 | 5,13,285,0.6924545183193789 98 | 5,14,609,0.9618384381599212 99 | 5,15,189,0.5594279036792132 100 | 5,16,768,0.6048481991877318 101 | 6,7,632,0.44833622673971807 102 | 6,8,285,0.8807888021056872 103 | 6,9,543,0.8750833522575892 104 | 6,10,500,0.26747371788901453 105 | 6,11,353,0.7167083103212505 106 | 6,12,193,0.21675130239682328 107 | 6,13,721,0.7440191327387629 108 | 6,14,517,0.19184842691283888 109 | 6,15,132,0.3878926180697828 110 | 6,16,544,0.0985906187066381 111 | 7,8,984,0.06750481933424379 112 | 7,9,348,0.5302362286593942 113 | 7,10,297,0.8032598681136883 114 | 7,11,813,0.9208561334810897 115 | 7,12,772,0.6949515208103406 116 | 7,13,169,0.8145899502278373 117 | 7,14,253,0.28008103730192846 118 | 7,15,674,0.1809125144443139 119 | 7,16,243,0.21993394581379988 120 | 8,9,464,0.4931605590570094 121 | 8,10,489,0.19285836935563716 122 | 8,11,909,0.26210361619665523 123 | 8,12,388,0.3372459164427748 124 | 8,13,529,0.4358180534060755 125 | 8,14,171,0.8904161580815458 126 | 8,15,979,0.07088231025022695 127 | 8,16,687,0.42966573151535736 128 | 9,10,894,0.05814218010525307 129 | 9,11,852,0.4903770628075028 130 | 9,12,909,0.60124331564382 131 | 9,13,477,0.9062361194838595 132 | 9,14,962,0.6204458228986175 133 | 9,15,407,0.4714951658694253 134 | 9,16,379,0.1734794795408322 135 | 10,11,955,0.27257467703547955 136 | 10,12,665,0.0024432677511803114 137 | 10,13,806,0.1647228671883323 138 | 10,14,228,0.2091341185938742 139 | 10,15,777,0.5994185730834284 140 | 10,16,475,0.9051980189759903 141 | 11,12,604,0.10161639881140916 142 | 11,13,735,0.583809486260594 143 | 11,14,537,0.2766751230222373 144 | 11,15,715,0.2277825193190598 145 | 11,16,353,0.30283673044725723 146 | 12,13,813,0.5021304386230762 147 | 12,14,156,0.4914879238730556 148 | 12,15,268,0.8537899907734803 149 | 12,16,645,0.08023205925820165 150 | 13,14,740,0.711179078120787 151 | 13,15,781,0.5541127904037113 152 | 13,16,173,0.8616492611842045 153 | 14,15,126,0.18043583511255745 154 | 14,16,909,0.7362530397822998 155 | 15,16,529,0.320059309719012 156 | 43 157 | 13,6,12 158 | 6 159 | 50,22 160 | 71,23 161 | 28,88 162 | 69,85 163 | 62,39 164 | 98,84 165 | 9,12,37 166 | 30 167 | 66,38 168 | 43,25 169 | 62,19 170 | 47,73 171 | 43,25 172 | 54,20 173 | 59,91 174 | 71,64 175 | 10,14 176 | 54,48 177 | 41,92 178 | 87,32 179 | 39,76 180 | 57,62 181 | 54,62 182 | 74,43 183 | 28,61 184 | 33,35 185 | 32,81 186 | 77,54 187 | 11,21 188 | 19,66 189 | 47,35 190 | 82,78 191 | 27,62 192 | 10,55 193 | 60,25 194 | 25,88 195 | 15,54 196 | 56,56 197 | 12,7,57 198 | 17 199 | 18,80 200 | 85,67 201 | 28,73 202 | 72,90 203 | 47,68 204 | 86,44 205 | 57,71 206 | 10,82 207 | 35,39 208 | 34,29 209 | 28,50 210 | 92,41 211 | 80,22 212 | 71,75 213 | 80,24 214 | 66,82 215 | 38,89 216 | 5,16,80 217 | 4 218 | 61,70 219 | 86,53 220 | 93,72 221 | 45,82 222 | 0,7,61 223 | 24 224 | 35,89 225 | 34,32 226 | 50,19 227 | 26,77 228 | 88,12 229 | 40,68 230 | 64,36 231 | 42,88 232 | 40,50 233 | 53,34 234 | 58,76 235 | 63,92 236 | 38,36 237 | 87,62 238 | 26,17 239 | 56,88 240 | 70,93 241 | 85,24 242 | 72,14 243 | 54,73 244 | 76,96 245 | 66,95 246 | 31,57 247 | 66,42 248 | 6,15,79 249 | 43 250 | 57,87 251 | 58,45 252 | 18,52 253 | 29,29 254 | 21,20 255 | 59,82 256 | 65,83 257 | 24,68 258 | 27,64 259 | 10,44 260 | 91,10 261 | 48,43 262 | 23,71 263 | 40,57 264 | 65,34 265 | 17,51 266 | 65,59 267 | 31,70 268 | 45,17 269 | 80,62 270 | 24,58 271 | 58,10 272 | 72,52 273 | 29,66 274 | 77,10 275 | 77,62 276 | 51,41 277 | 37,59 278 | 100,55 279 | 92,18 280 | 84,85 281 | 63,88 282 | 18,67 283 | 100,12 284 | 70,72 285 | 52,83 286 | 15,71 287 | 15,81 288 | 95,66 289 | 11,91 290 | 86,61 291 | 14,60 292 | 25,46 293 | 2,6,99 294 | 40 295 | 83,56 296 | 25,26 297 | 80,85 298 | 20,21 299 | 88,67 300 | 77,99 301 | 35,78 302 | 24,71 303 | 100,15 304 | 87,95 305 | 40,19 306 | 40,88 307 | 95,42 308 | 98,85 309 | 46,68 310 | 71,13 311 | 47,72 312 | 83,68 313 | 66,99 314 | 88,10 315 | 12,89 316 | 99,56 317 | 86,85 318 | 72,65 319 | 28,16 320 | 80,76 321 | 28,25 322 | 49,16 323 | 31,80 324 | 11,81 325 | 96,11 326 | 88,60 327 | 26,28 328 | 21,43 329 | 58,52 330 | 46,35 331 | 93,65 332 | 87,45 333 | 93,74 334 | 98,41 335 | 13,8,88 336 | 6 337 | 45,59 338 | 58,70 339 | 35,81 340 | 64,66 341 | 80,94 342 | 31,49 343 | 10,6,85 344 | 10 345 | 88,15 346 | 70,14 347 | 72,91 348 | 48,30 349 | 39,75 350 | 67,41 351 | 36,23 352 | 31,52 353 | 67,45 354 | 35,48 355 | 10,3,77 356 | 30 357 | 88,53 358 | 33,99 359 | 51,71 360 | 79,97 361 | 77,59 362 | 28,46 363 | 22,78 364 | 26,20 365 | 27,61 366 | 89,69 367 | 57,83 368 | 31,89 369 | 37,31 370 | 43,67 371 | 82,15 372 | 21,25 373 | 90,18 374 | 32,21 375 | 37,83 376 | 35,59 377 | 34,24 378 | 63,10 379 | 100,93 380 | 12,86 381 | 43,52 382 | 78,80 383 | 57,39 384 | 32,40 385 | 65,93 386 | 65,82 387 | 13,16,53 388 | 38 389 | 96,78 390 | 81,48 391 | 58,85 392 | 61,73 393 | 100,85 394 | 39,56 395 | 75,45 396 | 39,89 397 | 17,21 398 | 57,68 399 | 41,87 400 | 50,18 401 | 48,95 402 | 22,29 403 | 59,10 404 | 63,55 405 | 51,14 406 | 60,42 407 | 85,22 408 | 13,67 409 | 15,94 410 | 69,25 411 | 24,47 412 | 33,24 413 | 39,44 414 | 97,52 415 | 24,86 416 | 43,47 417 | 37,80 418 | 10,79 419 | 93,20 420 | 28,86 421 | 57,78 422 | 87,60 423 | 30,21 424 | 80,32 425 | 46,60 426 | 15,24 427 | 9,8,40 428 | 1 429 | 90,35 430 | 2,10,27 431 | 12 432 | 77,50 433 | 68,75 434 | 90,12 435 | 81,49 436 | 70,19 437 | 43,38 438 | 92,62 439 | 87,49 440 | 79,15 441 | 91,16 442 | 73,93 443 | 66,74 444 | 1,8,34 445 | 20 446 | 63,96 447 | 91,70 448 | 82,15 449 | 95,11 450 | 16,42 451 | 76,49 452 | 91,86 453 | 33,23 454 | 91,81 455 | 86,99 456 | 67,30 457 | 18,78 458 | 83,84 459 | 19,16 460 | 100,26 461 | 14,44 462 | 54,45 463 | 11,10 464 | 24,47 465 | 20,82 466 | 7,9,42 467 | 10 468 | 25,92 469 | 86,73 470 | 71,15 471 | 74,56 472 | 89,80 473 | 56,94 474 | 88,25 475 | 41,20 476 | 58,24 477 | 88,27 478 | 8,1,16 479 | 12 480 | 52,26 481 | 12,98 482 | 89,21 483 | 47,27 484 | 27,26 485 | 20,75 486 | 64,93 487 | 69,73 488 | 12,60 489 | 40,26 490 | 62,17 491 | 15,89 492 | 8,10,96 493 | 47 494 | 100,36 495 | 91,46 496 | 96,70 497 | 10,96 498 | 58,56 499 | 86,43 500 | 95,27 501 | 44,42 502 | 99,10 503 | 51,40 504 | 47,84 505 | 37,50 506 | 93,57 507 | 34,77 508 | 12,88 509 | 21,96 510 | 41,93 511 | 56,65 512 | 93,14 513 | 84,41 514 | 50,89 515 | 29,30 516 | 23,22 517 | 61,36 518 | 72,50 519 | 82,74 520 | 93,71 521 | 95,76 522 | 10,35 523 | 10,45 524 | 32,45 525 | 99,40 526 | 94,52 527 | 91,12 528 | 66,34 529 | 52,75 530 | 56,13 531 | 68,12 532 | 73,71 533 | 43,37 534 | 36,83 535 | 70,65 536 | 23,97 537 | 81,35 538 | 90,28 539 | 68,45 540 | 56,29 541 | 15,4,46 542 | 5 543 | 100,83 544 | 98,91 545 | 92,84 546 | 68,100 547 | 98,26 548 | 12,0,64 549 | 7 550 | 52,37 551 | 62,58 552 | 26,29 553 | 52,60 554 | 57,56 555 | 54,85 556 | 75,49 557 | 6,4,37 558 | 47 559 | 85,31 560 | 73,89 561 | 22,96 562 | 64,52 563 | 49,19 564 | 53,60 565 | 69,75 566 | 95,86 567 | 25,94 568 | 54,49 569 | 84,15 570 | 19,72 571 | 45,19 572 | 76,45 573 | 13,70 574 | 12,15 575 | 40,18 576 | 38,35 577 | 98,66 578 | 62,31 579 | 38,81 580 | 15,63 581 | 71,15 582 | 86,70 583 | 19,32 584 | 15,37 585 | 42,42 586 | 55,13 587 | 10,48 588 | 35,44 589 | 37,44 590 | 32,10 591 | 13,73 592 | 84,76 593 | 45,74 594 | 22,24 595 | 46,20 596 | 79,65 597 | 42,61 598 | 64,75 599 | 81,73 600 | 56,52 601 | 11,41 602 | 76,96 603 | 16,49 604 | 70,92 605 | 40,28 606 | 0,1,61 607 | 32 608 | 43,10 609 | 52,21 610 | 54,54 611 | 64,16 612 | 23,80 613 | 18,59 614 | 19,41 615 | 66,79 616 | 46,32 617 | 65,27 618 | 61,30 619 | 49,49 620 | 49,35 621 | 19,65 622 | 28,73 623 | 34,67 624 | 60,69 625 | 33,27 626 | 32,22 627 | 37,50 628 | 16,36 629 | 75,33 630 | 94,28 631 | 98,94 632 | 36,99 633 | 77,91 634 | 39,87 635 | 82,39 636 | 25,67 637 | 62,27 638 | 37,36 639 | 51,40 640 | 9,12,87 641 | 6 642 | 23,93 643 | 56,32 644 | 97,99 645 | 97,65 646 | 61,65 647 | 55,81 648 | 11,5,94 649 | 10 650 | 89,14 651 | 76,15 652 | 16,78 653 | 84,92 654 | 49,65 655 | 64,87 656 | 21,64 657 | 70,55 658 | 73,79 659 | 65,45 660 | 0,6,99 661 | 42 662 | 88,44 663 | 27,44 664 | 31,42 665 | 63,18 666 | 47,22 667 | 41,99 668 | 74,76 669 | 23,70 670 | 18,26 671 | 91,34 672 | 100,97 673 | 94,65 674 | 68,10 675 | 43,82 676 | 29,82 677 | 48,49 678 | 76,73 679 | 35,29 680 | 80,17 681 | 42,18 682 | 43,95 683 | 64,74 684 | 86,15 685 | 17,62 686 | 72,13 687 | 50,59 688 | 50,34 689 | 20,51 690 | 92,10 691 | 19,48 692 | 69,33 693 | 47,85 694 | 16,42 695 | 35,30 696 | 44,74 697 | 88,77 698 | 58,93 699 | 76,37 700 | 39,48 701 | 68,78 702 | 11,13 703 | 81,13 704 | 2,7,90 705 | 35 706 | 22,63 707 | 16,43 708 | 31,78 709 | 73,29 710 | 51,55 711 | 10,95 712 | 98,69 713 | 26,49 714 | 38,18 715 | 99,45 716 | 35,22 717 | 93,32 718 | 68,83 719 | 98,82 720 | 56,83 721 | 91,87 722 | 10,41 723 | 86,65 724 | 11,47 725 | 54,79 726 | 57,28 727 | 77,37 728 | 20,57 729 | 63,26 730 | 95,13 731 | 53,32 732 | 23,23 733 | 58,12 734 | 59,81 735 | 29,46 736 | 75,40 737 | 59,16 738 | 11,17 739 | 74,89 740 | 12,92 741 | 0,14,22 742 | 49 743 | 50,82 744 | 95,59 745 | 68,61 746 | 86,97 747 | 83,26 748 | 54,48 749 | 74,53 750 | 55,50 751 | 93,35 752 | 39,86 753 | 74,70 754 | 86,81 755 | 43,38 756 | 88,64 757 | 83,11 758 | 73,72 759 | 53,96 760 | 20,49 761 | 78,25 762 | 65,69 763 | 38,73 764 | 85,26 765 | 18,23 766 | 57,65 767 | 44,86 768 | 29,24 769 | 10,74 770 | 94,64 771 | 65,95 772 | 44,58 773 | 59,11 774 | 96,49 775 | 51,91 776 | 16,77 777 | 85,13 778 | 25,12 779 | 61,57 780 | 73,52 781 | 16,89 782 | 79,67 783 | 60,93 784 | 86,60 785 | 36,19 786 | 72,88 787 | 28,19 788 | 28,46 789 | 98,19 790 | 25,18 791 | 66,91 792 | 2,0,32 793 | 7 794 | 24,87 795 | 47,98 796 | 54,81 797 | 77,15 798 | 19,26 799 | 41,52 800 | 53,77 801 | 2,14,89 802 | 21 803 | 67,59 804 | 30,17 805 | 55,78 806 | 100,48 807 | 31,56 808 | 36,38 809 | 48,82 810 | 56,64 811 | 18,90 812 | 86,34 813 | 35,85 814 | 28,68 815 | 85,37 816 | 85,40 817 | 55,56 818 | 52,77 819 | 35,51 820 | 18,89 821 | 51,66 822 | 23,83 823 | 49,41 824 | 10,6,10 825 | 27 826 | 20,86 827 | 21,33 828 | 81,29 829 | 70,47 830 | 89,95 831 | 31,83 832 | 22,29 833 | 96,72 834 | 56,20 835 | 91,96 836 | 42,70 837 | 76,81 838 | 22,76 839 | 15,97 840 | 73,41 841 | 21,11 842 | 90,72 843 | 72,43 844 | 20,53 845 | 99,92 846 | 29,30 847 | 24,72 848 | 48,72 849 | 30,15 850 | 91,64 851 | 33,44 852 | 90,36 853 | 8,0,96 854 | 2 855 | 43,15 856 | 36,29 857 | 14,4,77 858 | 28 859 | 92,84 860 | 15,61 861 | 61,80 862 | 36,32 863 | 52,10 864 | 89,77 865 | 22,93 866 | 83,18 867 | 69,98 868 | 62,55 869 | 70,93 870 | 66,73 871 | 24,40 872 | 23,42 873 | 73,67 874 | 48,43 875 | 96,29 876 | 89,19 877 | 79,44 878 | 29,35 879 | 49,56 880 | 89,29 881 | 16,22 882 | 21,66 883 | 33,63 884 | 58,63 885 | 17,94 886 | 39,53 887 | 15,3,38 888 | 49 889 | 79,42 890 | 96,42 891 | 70,46 892 | 94,52 893 | 23,52 894 | 73,31 895 | 88,13 896 | 100,77 897 | 64,43 898 | 50,68 899 | 21,16 900 | 83,42 901 | 16,21 902 | 84,79 903 | 10,52 904 | 62,79 905 | 95,34 906 | 81,10 907 | 51,16 908 | 71,18 909 | 66,77 910 | 55,72 911 | 10,96 912 | 27,81 913 | 87,11 914 | 35,45 915 | 51,73 916 | 59,42 917 | 26,62 918 | 100,87 919 | 47,55 920 | 98,25 921 | 31,83 922 | 10,65 923 | 61,94 924 | 42,19 925 | 87,44 926 | 41,64 927 | 43,80 928 | 83,48 929 | 36,34 930 | 63,83 931 | 94,34 932 | 89,65 933 | 12,100 934 | 58,14 935 | 32,20 936 | 91,95 937 | 86,24 938 | 8,13,54 939 | 32 940 | 70,54 941 | 56,30 942 | 66,42 943 | 60,62 944 | 39,70 945 | 12,22 946 | 67,99 947 | 83,33 948 | 78,23 949 | 83,29 950 | 78,57 951 | 49,85 952 | 86,62 953 | 53,39 954 | 36,86 955 | 34,82 956 | 14,96 957 | 27,66 958 | 83,47 959 | 100,53 960 | 50,86 961 | 71,21 962 | 33,16 963 | 48,33 964 | 20,75 965 | 56,43 966 | 99,25 967 | 64,98 968 | 45,35 969 | 30,67 970 | 58,54 971 | 39,51 972 | 4,16,38 973 | 32 974 | 96,62 975 | 18,95 976 | 78,84 977 | 38,99 978 | 91,10 979 | 70,41 980 | 25,61 981 | 86,63 982 | 51,28 983 | 19,18 984 | 28,29 985 | 23,70 986 | 25,97 987 | 30,13 988 | 98,18 989 | 45,24 990 | 17,28 991 | 27,40 992 | 10,48 993 | 51,87 994 | 73,25 995 | 78,39 996 | 50,28 997 | 59,22 998 | 13,49 999 | 83,26 1000 | 81,63 1001 | 12,100 1002 | 36,31 1003 | 83,88 1004 | 65,93 1005 | 46,27 1006 | 7,9,14 1007 | 16 1008 | 88,20 1009 | 41,41 1010 | 79,89 1011 | 73,30 1012 | 86,12 1013 | 10,87 1014 | 22,55 1015 | 11,95 1016 | 20,52 1017 | 46,87 1018 | 23,38 1019 | 61,42 1020 | 56,21 1021 | 14,75 1022 | 71,90 1023 | 56,93 1024 | 2,13,59 1025 | 11 1026 | 88,42 1027 | 69,30 1028 | 45,39 1029 | 93,65 1030 | 54,80 1031 | 80,77 1032 | 82,36 1033 | 84,25 1034 | 62,83 1035 | 88,80 1036 | 12,28 1037 | 3,1,37 1038 | 36 1039 | 85,62 1040 | 77,26 1041 | 61,63 1042 | 63,76 1043 | 59,34 1044 | 51,90 1045 | 65,53 1046 | 97,49 1047 | 72,74 1048 | 40,61 1049 | 90,28 1050 | 72,95 1051 | 11,11 1052 | 40,75 1053 | 89,32 1054 | 58,54 1055 | 14,75 1056 | 93,65 1057 | 30,70 1058 | 85,26 1059 | 24,51 1060 | 32,94 1061 | 61,52 1062 | 74,83 1063 | 31,73 1064 | 16,33 1065 | 12,22 1066 | 45,39 1067 | 39,55 1068 | 83,66 1069 | 77,68 1070 | 40,74 1071 | 93,54 1072 | 87,74 1073 | 20,13 1074 | 42,42 1075 | 3,16,68 1076 | 19 1077 | 12,76 1078 | 51,54 1079 | 75,55 1080 | 97,91 1081 | 33,41 1082 | 96,57 1083 | 90,10 1084 | 17,18 1085 | 18,88 1086 | 11,22 1087 | 32,93 1088 | 36,42 1089 | 79,94 1090 | 11,88 1091 | 21,21 1092 | 98,81 1093 | 21,53 1094 | 69,95 1095 | 47,70 1096 | 14,10,83 1097 | 35 1098 | 32,50 1099 | 33,53 1100 | 47,17 1101 | 78,78 1102 | 95,71 1103 | 11,85 1104 | 45,97 1105 | 23,49 1106 | 80,71 1107 | 79,27 1108 | 78,34 1109 | 74,97 1110 | 32,89 1111 | 17,64 1112 | 12,86 1113 | 49,70 1114 | 48,95 1115 | 98,58 1116 | 46,58 1117 | 94,40 1118 | 82,83 1119 | 100,56 1120 | 10,36 1121 | 23,81 1122 | 15,72 1123 | 53,36 1124 | 20,86 1125 | 24,19 1126 | 57,21 1127 | 14,15 1128 | 40,36 1129 | 36,17 1130 | 16,58 1131 | 60,91 1132 | 25,37 1133 | 8,16,81 1134 | 11 1135 | 54,62 1136 | 34,26 1137 | 59,48 1138 | 85,90 1139 | 15,33 1140 | 97,53 1141 | 28,54 1142 | 85,73 1143 | 79,15 1144 | 20,88 1145 | 27,83 1146 | 13,2,15 1147 | 38 1148 | 77,14 1149 | 30,27 1150 | 92,59 1151 | 39,62 1152 | 27,19 1153 | 56,91 1154 | 29,18 1155 | 83,33 1156 | 83,73 1157 | 31,27 1158 | 42,22 1159 | 74,53 1160 | 93,50 1161 | 76,92 1162 | 17,81 1163 | 83,74 1164 | 92,49 1165 | 21,15 1166 | 62,63 1167 | 57,33 1168 | 75,19 1169 | 67,86 1170 | 95,31 1171 | 96,32 1172 | 52,43 1173 | 93,84 1174 | 90,36 1175 | 42,95 1176 | 98,86 1177 | 86,19 1178 | 39,42 1179 | 29,53 1180 | 100,52 1181 | 45,85 1182 | 65,17 1183 | 24,35 1184 | 37,74 1185 | 71,20 1186 | 15,7,22 1187 | 32 1188 | 51,14 1189 | 68,70 1190 | 75,74 1191 | 87,16 1192 | 57,70 1193 | 56,78 1194 | 33,93 1195 | 35,82 1196 | 17,40 1197 | 80,83 1198 | 54,73 1199 | 13,60 1200 | 99,31 1201 | 72,79 1202 | 41,53 1203 | 69,70 1204 | 95,70 1205 | 70,94 1206 | 35,80 1207 | 25,15 1208 | 12,67 1209 | 20,61 1210 | 40,87 1211 | 66,36 1212 | 56,94 1213 | 12,89 1214 | 44,40 1215 | 90,24 1216 | 82,63 1217 | 94,60 1218 | 91,77 1219 | 75,62 1220 | 16,3,51 1221 | 36 1222 | 22,23 1223 | 28,60 1224 | 20,63 1225 | 59,90 1226 | 28,49 1227 | 75,13 1228 | 11,40 1229 | 58,20 1230 | 56,10 1231 | 83,89 1232 | 91,90 1233 | 83,76 1234 | 57,100 1235 | 18,72 1236 | 43,41 1237 | 29,83 1238 | 79,65 1239 | 79,11 1240 | 28,88 1241 | 32,42 1242 | 56,46 1243 | 92,51 1244 | 19,99 1245 | 79,33 1246 | 19,67 1247 | 37,62 1248 | 52,99 1249 | 43,92 1250 | 76,56 1251 | 41,49 1252 | 41,20 1253 | 99,71 1254 | 21,88 1255 | 52,57 1256 | 24,51 1257 | 89,53 1258 | -------------------------------------------------------------------------------- /problems/service-placement/data/solution_base.txt: -------------------------------------------------------------------------------- 1 | 0,1,4,5 2 | 0 3 | 0,1,3,5 4 | 0 5 | 0 6 | -------------------------------------------------------------------------------- /problems/service-placement/images/base_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roar-net/problem-statements/68ae664c7ea7cbd58296fe93cb76d07c5f5afb9d/problems/service-placement/images/base_graph.png -------------------------------------------------------------------------------- /problems/service-placement/images/base_graph.png.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2024 Noé Godinho 2 | 3 | SPDX-License-Identifier: CC-BY-4.0 -------------------------------------------------------------------------------- /problems/service-placement/problem-statement-sp.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Service Placement Problem 8 | 9 | Noé Godinho, University of Coimbra, Centre for Informatics and Systems of the University of Coimbra, Department of Informatics Engineering. 10 | 11 | Copyright 2024 Noé Godinho. 12 | 13 | This document is licensed under CC-BY-4.0. 14 | 15 | ## Introduction 16 | 17 | One of the main problems in communications is the routing problem, where the goal is to find a path between two devices that minimises a given metric. Usually, that metric is latency or number of hops. 18 | However, this problem is restrictive as it does not account for bandwidth or device usage constraints. 19 | 20 | The service placement problem was proposed to tackle these issues. The goal is to optimise a set of requests in a network, where each request is composed by source and destination, bandwidth requirements and a set of services to offload, with CPU and RAM requirements. This problem is NP-complete, making it hard to solve in realistic scenarios. Thus, efficient techniques to obtain (near-)optimal solutions are necessary. 21 | 22 | ## Task 23 | 24 | Given a graph, a set of requests and their services to be offloaded, minimise the overall latency and processing time of all requests and services, taking resource constraints (CPU and RAM) into account. 25 | 26 | ## Detailed description 27 | 28 | Given $N$ nodes, $R$ requests and $S_r$ services for each request $r$, the following objective function aims to minimise latency and processing time: 29 | 30 | $$\min \sum_{r=1}^R \left(\sum_{u=1}^N \sum_{v=1}^N x_{uvr}l_{uv} + \sum_{i=1}^N \sum_{s=1}^{S_r} y_{irs}p_i \right)$$ 31 | 32 | where $x_{er}$ is a 1 if request $r$ traverses edge $e$, 0 otherwise. $y_{irs}$ is 1 if service $s$ from request $r$ is offloaded to node $i$, 0 otherwise. $l_e$ and $p_i$ are the latency of edge $e$ and processing time of node $i$, respectively. 33 | 34 | The first constraints aim to ensure that the offloaded services do not exceed the total CPU and RAM. The equations are as follows: 35 | 36 | $$\sum_{r=1}^R \sum_{s=1}^{S_r} y_{irs} C_{rs} \leq \gamma_i, ~~~~~\forall i=1,\ldots,N$$ 37 | $$\sum_{r=1}^R \sum_{s=1}^{S_r} y_{irs} M_{rs} \leq \mu_1 ~~\forall i=1,\ldots,N$$ 38 | 39 | where $C_{rs}$ and $M_{rs}$ correspond to the requested CPU and RAM, respectively. $\gamma_i$ and $\mu_i$ correspond to the total CPU and RAM of each node. 40 | 41 | It is also necessary to ensure that the total bandwidth of each link is not exceeded. The constraint is as follows: 42 | 43 | $$\sum_{r=1}^R x_{uvr} B_{uv} \leq \lambda_i, ~~\forall u,v=1,\ldots,N$$ 44 | 45 | where $B_{uv}$ corresponds to the requested bandwidth and $\lambda_i$ corresponds to the total bandwidth of an edge $(u, v)$. 46 | 47 | Finally, it is necessary to ensure that a path exists. The equation is as follows: 48 | 49 | $$\sum_{j=1}^N x_{ijr} - \sum_{j=1}^N x_{jir} = U_{ir}, ~~\forall i=1,\ldots,N, r=1,\ldots,R$$ 50 | 51 | where $U_{ir}$ is 1 if node $i$ corresponds to a source node, -1 if $i$ corresponds to a target node and 0 otherwise. 52 | 53 | ## Instance data file 54 | 55 | Each instance file contains a graph, the requests, and their services requirements. 56 | 57 | The first line contains an integer denoting the number of nodes $N$. 58 | Each of the following $N$ lines gives the information for a node. In particular, for each node there are 4 comma separated numbers (the first 3 are integers, the last is a floating point number), denoting the ID of the node, the total CPU (in MIPS), the total RAM (in Mb), and the service processing time (in s), respectively. 59 | 60 | After the nodes, there is a line with a single integer denoting the number of edges. 61 | Each edge contains the connected nodes, the bandwidth (in Mbps), and the latency (in s). 62 | 63 | Then, the requests start. 64 | The first line contains $R$ number of requests. 65 | Each request contains the source node, the destination node, and the requested bandwidth. 66 | 67 | Afterwards, the services for each request are described. 68 | The first line contains $S_r$ number of services for each given request. 69 | Each service contains the requested CPU (in MIPS) and RAM (in Mb). 70 | 71 | Constraints:\ 72 | 73 | - $N \geq 2$\ 74 | - $E \geq N-1$\ 75 | - $R \geq 1$\ 76 | - $S_r \geq 1$ 77 | 78 | ## Solution file 79 | 80 | The solution file starts with the path for the first request, followed by the node where each service of the request is placed. The nodes in the first line must be comma separated and, afterwards, there should be one line per service after the path. 81 | 82 | The number of requests and services for each request in the solution file must match the values of the instance file, as well as the source and destination nodes for each request. 83 | 84 | ## Example 85 | 86 | ### Instance 87 | 88 | ``` 89 | 6 90 | 0,1000,512,0.1 91 | 1,1000,512,0.1 92 | 2,1000,512,0.1 93 | 3,1000,512,0.1 94 | 4,1000,512,0.1 95 | 5,1000,512,0.1 96 | 7 97 | 0,1,1000,0.1 98 | 0,2,1000,0.2 99 | 1,3,100,0.1 100 | 1,4,1000,0.2 101 | 2,4,1000,0.2 102 | 3,5,1000,0.1 103 | 4,5,1000,0.2 104 | 2 105 | 0,5,500 106 | 1 107 | 100,100 108 | 0,5,100 109 | 2 110 | 100,100 111 | 100,100 112 | ``` 113 | 114 | ### Solution 115 | 116 | ``` 117 | 0,1,4,5 118 | 0 119 | 0,1,3,5 120 | 0 121 | 0 122 | ``` 123 | 124 | Objective function value: 1.1s 125 | 126 | ### Explanation 127 | 128 | The presented graph contains 6 nodes, each with a total of 1000 MIPS, 512 Mb of RAM, and 0.1s of processing time. 129 | 7 edges are considered, with 1000 Mb of bandwidth (except edge 1-3, with 100 Mb), and 0.1s or 0.2s latency. 130 | The following image shows the network topology of the example instance. ![Example graph instance](images/base_graph.png) 131 | 132 | This instance aims to optimise two requests. Both requests have the node 0 as the source and node 5 as the destination. 133 | The first requires a value of 500 Mb of bandwidth and needs to offload 1 service, which requires 100 MIPS and 100 Mb of RAM. 134 | The second requires a value of 100 Mb of bandwidth and needs to offload 2 services, each requiring 100 MIPS and 100 Mb of RAM. 135 | 136 | Regarding the solution, the first line contains the path 0,1,4,5 of request 1, followed by the node where the service is offloaded (0). Edge 1-3 cannot be used due to the low bandwidth. 137 | Afterwards, the path 0,1,3,5 for request 2 is shown, followed by the nodes where both services of request 1 are offloaded (both use node 0). 138 | Since the number of services is small and the processing time is the same for all nodes, the offloaded services can use the same node without worsening the objective function value. 139 | 140 | To evaluate the solution, several verifications are made. Each request path and services' nodes must be valid, and the problem constraints must be ensured. If any of these verifications are not valid, $\infty$ will be returned. Otherwise, the presented value will be the sum of latency and processing time of each node/link. 141 | 142 | ## Acknowledgements 143 | 144 | This problem statement is based upon work from COST Action Randomised Optimisation Algorithms Research Network (ROAR-NET), CA22137, is supported by COST (European Cooperation in Science and Technology). 145 | 146 | ## References 147 | 148 | N. Godinho, H. Silva, M. Curado, and L. Paquete, ‘A reconfigurable resource management framework for fog environments’, Future Generation Computer Systems, vol. 133, pp. 124–140, 2022, doi: [10.1016/j.future.2022.03.015](https://doi.org/10.1016/j.future.2022.03.015). 149 | 150 | N. Godinho, M. Curado, and L. Paquete, ‘Optimization of Service Placement with Fairness’, in 2019 IEEE Symposium on Computers and Communications (ISCC), Jun. 2019, pp. 1–6. doi: [10.1109/ISCC47284.2019.8969652](https://doi.org/10.1109/ISCC47284.2019.8969652). 151 | 152 | X. Huang, S. Ganapathy, and T. Wolf, ‘Evaluating Algorithms for Composable Service Placement in Computer Networks’, in 2009 IEEE International Conference on Communications, Dresden, Germany: IEEE, Jun. 2009, pp. 1–6. doi: [10.1109/ICC.2009.5199007](https://doi.org/10.1109/ICC.2009.5199007). 153 | 154 | N. Kumari, A. Yadav, and P. K. Jana, ‘Task offloading in fog computing: A survey of algorithms and optimization techniques’, Computer Networks, vol. 214, p. 109137, Sep. 2022, doi: [10.1016/j.comnet.2022.109137](https://doi.org/10.1016/j.comnet.2022.109137). 155 | 156 | H. Lin, S. Zeadally, Z. Chen, H. Labiod, and L. Wang, ‘A survey on computation offloading modeling for edge computing’, Journal of Network and Computer Applications, vol. 169, p. 102781, Nov. 2020, doi: [10.1016/j.jnca.2020.102781](https://doi.org/10.1016/j.jnca.2020.102781). 157 | -------------------------------------------------------------------------------- /problems/service-placement/support/evaluation.py: -------------------------------------------------------------------------------- 1 | """ 2 | SPDX-FileCopyrightText: 2024 Noé Godinho 3 | 4 | SPDX-License-Identifier: Apache-2.0 5 | """ 6 | 7 | 8 | import math 9 | import networkx as nx 10 | 11 | 12 | def read_problem(filename): 13 | G = nx.Graph() 14 | requests = [] 15 | 16 | with open(filename + ".txt", 'r') as f: 17 | num_nodes = int(f.readline().strip()) 18 | 19 | for _ in range(num_nodes): 20 | values = f.readline().strip().split(",") 21 | node = int(values[0]) 22 | cpu = int(values[1]) 23 | ram = int(values[2]) 24 | processing = float(values[3]) 25 | 26 | G.add_node(node) 27 | G.nodes[node]['cpu'] = cpu 28 | G.nodes[node]['ram'] = ram 29 | G.nodes[node]['processing'] = processing 30 | 31 | num_edges = int(f.readline().strip()) 32 | 33 | for _ in range(num_edges): 34 | values = f.readline().strip().split(",") 35 | u = int(values[0]) 36 | v = int(values[1]) 37 | bandwidth = int(values[2]) 38 | latency = float(values[3]) 39 | G.add_edge(u, v) 40 | G.edges[u, v]['bandwidth'] = bandwidth 41 | G.edges[u, v]['latency'] = latency 42 | 43 | num_requests = int(f.readline().strip()) 44 | 45 | for i in range(num_requests): 46 | source, destination, bandwidth = map(int, f.readline().strip().split(",")) 47 | num_services = int(f.readline().strip()) 48 | services = [] 49 | 50 | for j in range(num_services): 51 | cpu, ram = map(int, f.readline().strip().split(",")) 52 | services.append({'cpu': cpu, 'ram': ram}) 53 | 54 | requests.append({'source': source, 'destination': destination, 'bandwidth': bandwidth, 'services': services}) 55 | 56 | return G, requests 57 | 58 | 59 | def read_solution(filename, requests): 60 | solution = [] 61 | 62 | with open(filename + ".txt", 'r') as f: 63 | for i in range(len(requests)): 64 | path = list(map(int, f.readline().strip().split(","))) 65 | nodes = [] 66 | 67 | for j in range(len(requests[i]['services'])): 68 | node = int(f.readline().strip()) 69 | nodes.append(node) 70 | 71 | solution.append({'path': path, 'nodes': nodes}) 72 | 73 | return solution 74 | 75 | 76 | def evaluate_solution(filename_problem, filename_solution): 77 | G, requests = read_problem(filename_problem) 78 | solution = read_solution(filename_solution, requests) 79 | 80 | return calc_value(G, requests, solution, 'latency', 'processing') 81 | 82 | 83 | def calc_value(G, requests, solution, edge_metric, node_metric): 84 | value = 0 85 | cpu = [0] * G.number_of_nodes() 86 | ram = [0] * G.number_of_nodes() 87 | bandwidth = {(u, v): 0 for u, v in G.edges()} 88 | 89 | if len(requests) != len(solution) or len(solution) == 0: 90 | return math.inf 91 | 92 | for i in range(len(requests)): 93 | path = solution[i]['path'] 94 | nodes = solution[i]['nodes'] 95 | 96 | if len(path) <= 1 or not nx.is_path(G, path): 97 | return math.inf 98 | 99 | if path[0] != requests[i]['source'] or path[-1] != requests[i]['destination']: 100 | return math.inf 101 | 102 | if len(requests[i]['services']) == 0: 103 | return math.inf 104 | 105 | for j in range(len(path)-1): 106 | u = path[j] 107 | v = path[j+1] 108 | value += G.edges[u, v][edge_metric] 109 | bandwidth[u, v] += requests[i]['bandwidth'] 110 | 111 | if bandwidth[u, v] > G.edges[u, v]['bandwidth']: 112 | return math.inf 113 | 114 | for j in range(len(requests[i]['services'])): 115 | node = nodes[j] 116 | 117 | if not G.has_node(node): 118 | return math.inf 119 | 120 | value += G.nodes[node][node_metric] 121 | cpu[node] += requests[i]['services'][j]['cpu'] 122 | ram[node] += requests[i]['services'][j]['ram'] 123 | 124 | if cpu[node] > G.nodes[node]['cpu'] or ram[node] > G.nodes[node]['ram']: 125 | return math.inf 126 | 127 | return value 128 | 129 | 130 | if __name__ == '__main__': 131 | print(evaluate_solution("../data/base", "../data/solution_base")) -------------------------------------------------------------------------------- /problems/service-placement/support/generator.py: -------------------------------------------------------------------------------- 1 | """ 2 | SPDX-FileCopyrightText: 2024 Noé Godinho 3 | 4 | SPDX-License-Identifier: Apache-2.0 5 | """ 6 | 7 | 8 | import matplotlib.pyplot as plt 9 | import networkx as nx 10 | import random 11 | 12 | 13 | def visualise_graph(G): 14 | pos = {0: [0, 0.25], 1: [1, 0.5], 2: [1, 0], 3: [2, 0.5], 4: [2, 0], 5: [3, 0.25]} 15 | nx.draw(G, pos=pos, with_labels=True) 16 | 17 | plt.show() 18 | 19 | 20 | def generate_problem(filename, edge_probability=1): 21 | G = nx.Graph() 22 | connected = False 23 | 24 | while not connected: 25 | num_nodes = random.randint(5, 100) 26 | 27 | for i in range(num_nodes): 28 | G.add_node(i) 29 | G.nodes[i]['cpu'] = random.randint(100, 1000) 30 | G.nodes[i]['ram'] = random.randint(100, 1000) 31 | G.nodes[i]['processing'] = random.random() 32 | 33 | for u in range(num_nodes): 34 | for v in range(num_nodes): 35 | if u != v: 36 | if random.random() < edge_probability: 37 | G.add_edge(u, v) 38 | G.edges[u, v]['bandwidth'] = random.randint(100, 1000) 39 | G.edges[u, v]['latency'] = random.random() 40 | 41 | connected = nx.is_connected(G) 42 | 43 | requests = [] 44 | num_requests = random.randint(1, 100) 45 | for i in range(num_requests): 46 | source = random.randint(0, num_nodes-1) 47 | destination = random.randint(0, num_nodes-1) 48 | while destination == source: 49 | destination = random.randint(0, num_nodes-1) 50 | 51 | num_services = random.randint(1, 50) 52 | services = [] 53 | for j in range(num_services): 54 | services.append({'cpu': random.randint(10, 100), 'ram': random.randint(10, 100)}) 55 | 56 | requests.append({'source': source, 'destination': destination, 'bandwidth': random.randint(10, 100), 'services': services}) 57 | 58 | write_to_file(G, requests, filename) 59 | 60 | 61 | def generate_base_problem(): 62 | G = nx.Graph() 63 | 64 | for i in range(6): 65 | G.add_node(i) 66 | G.nodes[i]['cpu'] = 1000 67 | G.nodes[i]['ram'] = 512 68 | G.nodes[i]['processing'] = 0.1 69 | 70 | G.add_edge(0,1) 71 | G.edges[0,1]['bandwidth'] = 1000 72 | G.edges[0,1]['latency'] = 0.1 73 | G.add_edge(0,2) 74 | G.edges[0,2]['bandwidth'] = 1000 75 | G.edges[0,2]['latency'] = 0.2 76 | G.add_edge(1,3) 77 | G.edges[1,3]['bandwidth'] = 100 78 | G.edges[1,3]['latency'] = 0.1 79 | G.add_edge(1,4) 80 | G.edges[1,4]['bandwidth'] = 1000 81 | G.edges[1,4]['latency'] = 0.2 82 | G.add_edge(2,4) 83 | G.edges[2,4]['bandwidth'] = 1000 84 | G.edges[2,4]['latency'] = 0.2 85 | G.add_edge(3,5) 86 | G.edges[3,5]['bandwidth'] = 1000 87 | G.edges[3,5]['latency'] = 0.1 88 | G.add_edge(4,5) 89 | G.edges[4,5]['bandwidth'] = 1000 90 | G.edges[4,5]['latency'] = 0.2 91 | 92 | requests = [{'source': 0, 'destination': 5, 'bandwidth': 500, 'services': [{'cpu': 100, 'ram': 100}]}, {'source': 0, 'destination': 5, 'bandwidth': 100, 'services': [{'cpu': 100, 'ram': 100}, {'cpu': 100, 'ram': 100}]}] 93 | 94 | write_to_file(G, requests, "../data/base") 95 | generate_solution_base_problem() 96 | 97 | visualise_graph(G) 98 | 99 | 100 | def generate_solution_base_problem(): 101 | with open("../data/solution_base.txt", 'w') as file: 102 | file.write("0,1,4,5\n") 103 | file.write("0\n") 104 | file.write("0,1,3,5\n") 105 | file.write("0\n") 106 | file.write("0\n") 107 | 108 | 109 | def write_to_file(G, requests, filename): 110 | with open(filename + ".txt", 'w') as file: 111 | file.write(str(G.number_of_nodes()) + "\n") 112 | for i in list(G.nodes): 113 | string = str(i) + "," + str(G.nodes[i]['cpu']) + "," + str(G.nodes[i]['ram']) + "," + str(G.nodes[i]['processing']) + "\n" 114 | file.write(string) 115 | 116 | file.write(str(G.number_of_edges()) + "\n") 117 | for (i,j) in list(G.edges): 118 | string = str(i) + "," + str(j) + "," + str(G.edges[i,j]['bandwidth']) + "," + str(G.edges[i,j]['latency']) + "\n" 119 | file.write(string) 120 | 121 | file.write(str(len(requests)) + "\n") 122 | for i in range(len(requests)): 123 | file.write(str(requests[i]['source']) + "," + str(requests[i]['destination']) + "," + str(requests[i]['bandwidth']) + "\n") 124 | file.write(str(len(requests[i]['services'])) + "\n") 125 | 126 | for j in range(len(requests[i]['services'])): 127 | file.write(str(requests[i]['services'][j]['cpu']) + "," + str(requests[i]['services'][j]['ram']) + "\n") 128 | 129 | 130 | if __name__ == '__main__': 131 | generate_base_problem() 132 | generate_problem("../data/graph") 133 | -------------------------------------------------------------------------------- /templates/problem/README.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 10 | 16 | 17 | 18 | 19 | # Problem template 20 | 21 | 22 | This folder provides a template for problem statements. 23 | 24 | Replace the problem statement below according to the instructions within that 25 | file (and remove this section). 26 | 27 | Place any images and figures in the `images` folder. 28 | 29 | Place instance data in the `data` folder. The organisation within that folder is 30 | merely a suggestion and may be adapted according to the problem needs. 31 | 32 | Place any support material (e.g., instance generators, solution evaluators, 33 | solution visualisers) in the `support` folder. 34 | 35 | Template follows below. 36 | 37 | --- 38 | 39 | 40 | 41 | # Problem Name – Title 42 | 43 | First Author, Some Affiliation, Somewhere in the world 44 | Second Author, Some Affiliation, Elsewhere 45 | 46 | 48 | 49 | Copyright 2024 ... place copyright holders here. 50 | 51 | This document is licensed under XXXX. 52 | 53 | 55 | 56 | ## Introduction 57 | 58 | In this section provide a brief introduction of the problem, possibly including 59 | its motivation and context. This should be a short (2 or 3 paragraphs) 60 | high-level description. 61 | 62 | ## Task 63 | 64 | Describe the high-level optimisation task in one or two sentences. 65 | 66 | ## Detailed description 67 | 68 | Provide a detailed description of the problem in this section. This should 69 | detail what parameters characterise a problem instance, what characterises a 70 | solution, how a solution is evaluated (e.g. an objective function), and solution 71 | feasibility constraints. 72 | 73 | ## Instance data file 74 | 75 | Describe the format of a problem instance file. 76 | 77 | ## Solution file 78 | 79 | Describe the format of a solution file. 80 | 81 | ## Example 82 | 83 | ### Instance 84 | 85 | Provide a small example instance in the described format. 86 | 87 | ### Solution 88 | 89 | Provide a feasible solution to the example instance in the described format 90 | (including its evaluation measure). 91 | 92 | ### Explanation 93 | 94 | Optionally, provide a descriptive and/or visual explanation of the solution (and 95 | its evaluation measure value) for the instance. 96 | 97 | ## Acknowledgements 98 | 99 | This problem statement is based upon work from COST Action Randomised 100 | Optimisation Algorithms Research Network (ROAR-NET), CA22137, is supported by 101 | COST (European Cooperation in Science and Technology). 102 | 103 | 105 | 106 | ## References 107 | 108 | Put any relevant references here. 109 | -------------------------------------------------------------------------------- /templates/problem/data/instance01/description.txt: -------------------------------------------------------------------------------- 1 | A description of this instance if justified. 2 | -------------------------------------------------------------------------------- /templates/problem/data/instance01/input.txt: -------------------------------------------------------------------------------- 1 | some input data here 2 | -------------------------------------------------------------------------------- /templates/problem/data/instance01/output01.txt: -------------------------------------------------------------------------------- 1 | an example output 2 | -------------------------------------------------------------------------------- /templates/problem/data/instance01/output02.txt: -------------------------------------------------------------------------------- 1 | another valid output for this instance 2 | -------------------------------------------------------------------------------- /templates/problem/data/instance02/input.txt: -------------------------------------------------------------------------------- 1 | another input 2 | -------------------------------------------------------------------------------- /templates/problem/data/instance02/output.txt: -------------------------------------------------------------------------------- 1 | an output for this instance 2 | -------------------------------------------------------------------------------- /templates/problem/images/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roar-net/problem-statements/68ae664c7ea7cbd58296fe93cb76d07c5f5afb9d/templates/problem/images/.gitkeep -------------------------------------------------------------------------------- /templates/problem/support/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roar-net/problem-statements/68ae664c7ea7cbd58296fe93cb76d07c5f5afb9d/templates/problem/support/.gitkeep --------------------------------------------------------------------------------