Amotz Bar-Noy , David Peleg , Mor Perry , Dror Rawitz
{"title":"Graph realization of distance sets","authors":"Amotz Bar-Noy , David Peleg , Mor Perry , Dror Rawitz","doi":"10.1016/j.tcs.2024.114810","DOIUrl":null,"url":null,"abstract":"<div><p>The <span>Distance Realization</span> problem is defined as follows. Given an <span><math><mi>n</mi><mo>×</mo><mi>n</mi></math></span> matrix <em>D</em> of nonnegative integers, interpreted as inter-vertex distances, find an <em>n</em>-vertex weighted or unweighted graph <em>G</em> realizing <em>D</em>, i.e., whose inter-vertex distances satisfy <span><math><mi>d</mi><mi>i</mi><mi>s</mi><msub><mrow><mi>t</mi></mrow><mrow><mi>G</mi></mrow></msub><mo>(</mo><mi>i</mi><mo>,</mo><mi>j</mi><mo>)</mo><mo>=</mo><msub><mrow><mi>D</mi></mrow><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow></msub></math></span> for every <span><math><mn>1</mn><mo>≤</mo><mi>i</mi><mo><</mo><mi>j</mi><mo>≤</mo><mi>n</mi></math></span>, or decide that no such realizing graph exists. The problem was studied for general weighted and unweighted graphs, as well as for cases where the realizing graph is restricted to a specific family of graphs (e.g., trees or bipartite graphs). An extension of <span>Distance Realization</span> that was studied in the past is where each entry in the matrix <em>D</em> may contain a <em>range</em> of consecutive permissible values. We refer to this extension as <span>Range Distance Realization</span> (or <span>Range-DR</span>). Restricting each range to at most <em>k</em> values yields the problem <em>k</em>-<span>Range Distance Realization</span> (or <em>k</em>-<span>Range-DR</span>). The current paper introduces a new extension of <span>Distance Realization</span>, in which each entry <span><math><msub><mrow><mi>D</mi></mrow><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow></msub></math></span> of the matrix may contain an arbitrary set of acceptable values for the distance between <em>i</em> and <em>j</em>, for every <span><math><mn>1</mn><mo>≤</mo><mi>i</mi><mo><</mo><mi>j</mi><mo>≤</mo><mi>n</mi></math></span>. We refer to this extension as <span>Set Distance Realization</span> (<span>Set-DR</span>), and to the restricted problem where each entry may contain at most <em>k</em> values as <em>k</em>-<span>Set Distance Realization</span> (or <em>k</em>-<span>Set-DR</span>).</p><p>We first show that 2-<span>Range-DR</span> is NP-hard for unweighted graphs (implying the same for 2-<span>Set-DR</span>). Next we prove that 2-<span>Set-DR</span> is NP-hard for unweighted and weighted trees.</p><p>Finally, we explore <span>Set-DR</span> where the realization is restricted to the families of stars, paths, cycles, or caterpillars. For the weighted case, our positive results are that there exist polynomial time algorithms for the 2-<span>Set-DR</span> problem on stars, paths and cycles, and for the 1-<span>Set-DR</span> problem on caterpillars. On the hardness side, we prove that 6-<span>Set-DR</span> is NP-hard for stars and 5-<span>Set-DR</span> is NP-hard for paths, cycles and caterpillars. For the unweighted case, our results are the same, except for the case of unweighted stars, for which <em>k</em>-<span>Set-DR</span> is polynomially solvable for any <em>k</em>.</p></div>","PeriodicalId":49438,"journal":{"name":"Theoretical Computer Science","volume":"1019 ","pages":"Article 114810"},"PeriodicalIF":0.9000,"publicationDate":"2024-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Theoretical Computer Science","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0304397524004274","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0
Abstract
The Distance Realization problem is defined as follows. Given an matrix D of nonnegative integers, interpreted as inter-vertex distances, find an n-vertex weighted or unweighted graph G realizing D, i.e., whose inter-vertex distances satisfy for every , or decide that no such realizing graph exists. The problem was studied for general weighted and unweighted graphs, as well as for cases where the realizing graph is restricted to a specific family of graphs (e.g., trees or bipartite graphs). An extension of Distance Realization that was studied in the past is where each entry in the matrix D may contain a range of consecutive permissible values. We refer to this extension as Range Distance Realization (or Range-DR). Restricting each range to at most k values yields the problem k-Range Distance Realization (or k-Range-DR). The current paper introduces a new extension of Distance Realization, in which each entry of the matrix may contain an arbitrary set of acceptable values for the distance between i and j, for every . We refer to this extension as Set Distance Realization (Set-DR), and to the restricted problem where each entry may contain at most k values as k-Set Distance Realization (or k-Set-DR).
We first show that 2-Range-DR is NP-hard for unweighted graphs (implying the same for 2-Set-DR). Next we prove that 2-Set-DR is NP-hard for unweighted and weighted trees.
Finally, we explore Set-DR where the realization is restricted to the families of stars, paths, cycles, or caterpillars. For the weighted case, our positive results are that there exist polynomial time algorithms for the 2-Set-DR problem on stars, paths and cycles, and for the 1-Set-DR problem on caterpillars. On the hardness side, we prove that 6-Set-DR is NP-hard for stars and 5-Set-DR is NP-hard for paths, cycles and caterpillars. For the unweighted case, our results are the same, except for the case of unweighted stars, for which k-Set-DR is polynomially solvable for any k.
期刊介绍:
Theoretical Computer Science is mathematical and abstract in spirit, but it derives its motivation from practical and everyday computation. Its aim is to understand the nature of computation and, as a consequence of this understanding, provide more efficient methodologies. All papers introducing or studying mathematical, logic and formal concepts and methods are welcome, provided that their motivation is clearly drawn from the field of computing.