{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/learning-augmented-online-algorithm-for-two","title":"Learning-augmented Online Algorithm for Two-level Ski-rental Problem","arxiv_id":"2402.06715","date":"2024-02-09","proceeding":null,"authors":["Keyuan Zhang","Zhongdong Liu","Nakjung Choi","Bo Ji"],"abstract":"In this paper, we study the two-level ski-rental problem,where a user needs to fulfill a sequence of demands for multiple items by choosing one of the three payment options: paying for the on-demand usage (i.e., rent), buying individual items (i.e., single purchase), and buying all the items (i.e., combo purchase). Without knowing future demands, the user aims to minimize the total cost (i.e., the sum of the rental, single purchase, and combo purchase costs) by balancing the trade-off between the expensive upfront costs (for purchase) and the potential future expenses (for rent). We first design a robust online algorithm (RDTSR) that offers a worst-case performance guarantee. While online algorithms are robust against the worst-case scenarios, they are often overly cautious and thus suffer a poor average performance in typical scenarios. On the other hand, Machine Learning (ML) algorithms typically show promising average performance in various applications but lack worst-case performance guarantees. To harness the benefits of both methods, we develop a learning-augmented algorithm (LADTSR) by integrating ML predictions into the robust online algorithm, which outperforms the robust online algorithm under accurate predictions while ensuring worst-case performance guarantees even when predictions are inaccurate. Finally, we conduct numerical experiments on both synthetic and real-world trace data to corroborate the effectiveness of our approach.","url_abs":"https://arxiv.org/abs/2402.06715v1","url_pdf":"https://arxiv.org/pdf/2402.06715v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"learning-augmented-online-algorithm-for-two","repo_url":"https://github.com/nauyek/ladtsr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.06715","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.06715"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nauyek/ladtsr","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/nauyek/LADTSR","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":1,"ran":5},"by_repo_kind":{"official":{"samples":6,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":6,"samples":[{"code_sha256_prefix":"8b94f89dc9e56e64","entry":"DTSR_LA","repo":"nauyek/LADTSR","repo_kind":"official","path":"Algorithms.py","file_url":"https://github.com/nauyek/LADTSR/blob/HEAD/Algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8b94f89dc9e56e64"}},{"code_sha256_prefix":"c4277a8fddff1ac1","entry":"DTSR_generator","repo":"nauyek/ladtsr","repo_kind":"official","path":"Functions.py","file_url":"https://github.com/nauyek/ladtsr/blob/HEAD/Functions.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c4277a8fddff1ac1"}},{"code_sha256_prefix":"2c72b0fe52251443","entry":"DTSR_generator_total","repo":"nauyek/ladtsr","repo_kind":"official","path":"Functions.py","file_url":"https://github.com/nauyek/ladtsr/blob/HEAD/Functions.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2c72b0fe52251443"}},{"code_sha256_prefix":"96eb580fb31739f7","entry":"Follow_the_Prediction","repo":"nauyek/ladtsr","repo_kind":"official","path":"Algorithms.py","file_url":"https://github.com/nauyek/ladtsr/blob/HEAD/Algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"96eb580fb31739f7"}},{"code_sha256_prefix":"ee0917283e0262a2","entry":"TLLA_DTSR","repo":"nauyek/ladtsr","repo_kind":"official","path":"Algorithms.py","file_url":"https://github.com/nauyek/ladtsr/blob/HEAD/Algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ee0917283e0262a2"}},{"code_sha256_prefix":"4454ee3f530a9bf8","entry":"create_hard_instance","repo":"nauyek/ladtsr","repo_kind":"official","path":"Functions.py","file_url":"https://github.com/nauyek/ladtsr/blob/HEAD/Functions.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4454ee3f530a9bf8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}