Editing Graphs to Satisfy Diversity Requirements

  • Huda Chuangpishit
  • Manuel LafondEmail author
  • Lata Narayanan
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11346)


Let G be a graph where every vertex has a colour and has specified diversity constraints, that is, a minimum number of neighbours of every colour. Every vertex also has a max-degree constraint: an upper bound on the total number of neighbours. In the Min-Edit-Cost problem, we wish to transform G using edge additions and/or deletions into a graph \(G'\) where every vertex satisfies all diversity as well as max-degree constraints. We show an \(O(n^5 \log n)\) algorithm for the Min-Edit-Cost problem, and an \(O(n^3 \log n \log \log n)\) algorithm for the bipartite case. Given a specified number of edge operations, the Max-Satisfied-Nodes problem is to find the maximum number of vertices whose diversity constraints can be satisfied while ensuring that all max-degree constraints are satisfied. We show that the Max-Satisfied-Nodes problem is W[1]-hard, in parameter \(r+ \ell \), where r is the number of edge operations and \(\ell \) is the number of vertices to be satisfied. We also show that it is inapproximable to within a factor of \(n^{1/2-\epsilon }\). For certain relaxations of the max-degree constraints, we are able to show constant-factor approximation algorithms for the problem.



We thank Jaroslav Opatrny for useful discussions.


  1. 1.
    Ahuja, R.K., Goldberg, A.V., Orlin, J.B., Tarjan, R.E.: Finding minimum-cost flows by double scaling. Math. Program. 53(1–3), 243–266 (1992)MathSciNetCrossRefGoogle Scholar
  2. 2.
    Bredereck, R., Hartung, S., Nichterlein, A., Woeginger, G.J.: The complexity of finding a large subgraph under anonymity constraints. In: Cai, L., Cheng, S.-W., Lam, T.-W. (eds.) ISAAC 2013. LNCS, vol. 8283, pp. 152–162. Springer, Heidelberg (2013). Scholar
  3. 3.
    Cheah, F., Corneil, D.G.: The complexity of regular subgraph recognition. Discrete Appl. Math. 27(1–2), 59–68 (1990)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Chvátal, V., Fleischner, H., Sheehan, J., Thomassen, C.: Three-regular subgraphs of four-regular graphs. J. Graph Theory 3(4), 371–386 (1979)MathSciNetCrossRefGoogle Scholar
  5. 5.
    Cornuéjols, G.: General factors of graphs. J. Comb. Theory Ser. B 45(2), 185–198 (1988)MathSciNetCrossRefGoogle Scholar
  6. 6.
    Dondi, R., Lafond, M., El-Mabrouk, N.: Approximating the correction of weighted and unweighted orthology and paralogy relations. Algorithms Mol. Biol. 12(1), 4 (2017)CrossRefGoogle Scholar
  7. 7.
    Duan, R., Pettie, S., Su, H.-H.: Scaling algorithms for weighted matching in general graphs. In: Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 781–800. Society for Industrial and Applied Mathematics (2017)Google Scholar
  8. 8.
    Fischer, A., Suen, C.Y., Frinken, V., Riesen, K., Bunke, H.: A fast matching algorithm for graph-based handwriting recognition. In: Kropatsch, W.G., Artner, N.M., Haxhimusa, Y., Jiang, X. (eds.) GbRPR 2013. LNCS, vol. 7877, pp. 194–203. Springer, Heidelberg (2013). Scholar
  9. 9.
    Gao, X., Xiao, B., Tao, D., Li, X.: A survey of graph edit distance. Pattern Anal. Appl. 13(1), 113–129 (2010)MathSciNetCrossRefGoogle Scholar
  10. 10.
    Garey, M.R., Johnson, D.S.: Computers and Intractability, vol. 29. W. H. freeman, New York (2002)Google Scholar
  11. 11.
    Golovach, P.A.: Editing to a connected graph of given degrees. Inf. Comput. 256, 131–147 (2017)MathSciNetCrossRefGoogle Scholar
  12. 12.
    Golovach, P.A., Mertzios, G.B.: Graph editing to a given degree sequence. Theoret. Comput. Sci. 665, 1–12 (2017)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Hartung, S., Nichterlein, A., Niedermeier, R., Suchỳ, O.: A refined complexity analysis of degree anonymization in graphs. Inf. Comput. 243, 249–262 (2015)MathSciNetCrossRefGoogle Scholar
  14. 14.
    Hu, H., Yan, X., Huang, Y., Han, J., Zhou, X.J.: Mining coherent dense subgraphs across massive biological networks for functional discovery. Bioinformatics 21, i213–i221 (2005)CrossRefGoogle Scholar
  15. 15.
    Lewis, J.M., Yannakakis, M.: The node-deletion problem for hereditary properties is NP-complete. J. Comput. Syst. Sci. 20(2), 219–230 (1980)MathSciNetCrossRefGoogle Scholar
  16. 16.
    Lin, B.: The parameterized complexity of k-Biclique. In: Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 605–615. Society for Industrial and Applied Mathematics (2015)Google Scholar
  17. 17.
    Liu, K., Terzi, E.: Towards identity anonymization on graphs. In: Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data, pp. 93–106. ACM (2008)Google Scholar
  18. 18.
    Liu, Y., Wang, J., Guo, J., Chen, J.: Cograph editing: complexity and parameterized algorithms. In: Fu, B., Du, D.-Z. (eds.) COCOON 2011. LNCS, vol. 6842, pp. 110–121. Springer, Heidelberg (2011). Scholar
  19. 19.
    Lovász, L.: The factorization of graphs. ii. Acta Mathematica Academiae Scientiarum Hungarica, 23(1–2), 223–246 (1972)MathSciNetCrossRefGoogle Scholar
  20. 20.
    Mathieson, L., Szeider, S.: Editing graphs to satisfy degree constraints: a parameterized approach. J. Comput. Syst. Sci. 78(1), 179–191 (2012)MathSciNetCrossRefGoogle Scholar
  21. 21.
    Neuhaus, M., Bunke, H.: A graph matching based approach to fingerprint classification using directional variance. In: Kanade, T., Jain, A., Ratha, N.K. (eds.) AVBPA 2005. LNCS, vol. 3546, pp. 191–200. Springer, Heidelberg (2005). Scholar
  22. 22.
    Neuhaus, M., Bunke, H.: Bridging the Gap Between Graph Edit Distance and Kernel Machines, vol. 68. World Scientific, Singapore (2007)Google Scholar
  23. 23.
    Riesen, K., Bunke, H.: Approximate graph edit distance computation by means of bipartite graph matching. Image Vis. Comput. 27(7), 950–959 (2009)CrossRefGoogle Scholar
  24. 24.
    Riesen, K., Neuhaus, M., Bunke, H.: Bipartite graph matching for computing the edit distance of graphs. In: Escolano, F., Vento, M. (eds.) GbRPR 2007. LNCS, vol. 4538, pp. 1–12. Springer, Heidelberg (2007). Scholar
  25. 25.
    Subramanya, V.: Graph editing to a given neighbourhood degree list is fixed-parameter tractable. Master’s thesis, University of Waterloo (2016)Google Scholar
  26. 26.
    Yannakakis, M.: Edge-deletion problems. SIAM J. Comput. 10(2), 297–309 (1981)MathSciNetCrossRefGoogle Scholar
  27. 27.
    Zeng, Z., Tung, A.K.H., Wang, J., Feng, J., Zhou, L.: Comparing stars: on approximating graph edit distance. Proc. VLDB Endow. 2(1), 25–36 (2009)CrossRefGoogle Scholar
  28. 28.
    Zuckerman, D.: Linear degree extractors and the inapproximability of max clique and chromatic number. In: Proceedings of the Thirty-Eighth Annual ACM Symposium on Theory of Computing, pp. 681–690. ACM (2006)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  • Huda Chuangpishit
    • 1
  • Manuel Lafond
    • 2
    Email author
  • Lata Narayanan
    • 3
  1. 1.Department of MathematicsRyerson UniversityTorontoCanada
  2. 2.Department of Computer ScienceUniversité de SherbrookeSherbrookeCanada
  3. 3.Department of Computer Science and Software EngineeringConcordia UniversityMontréalCanada

Personalised recommendations