🤖 AI Summary
This study addresses the soft ρ-happy coloring problem on partially colored graphs: given a fixed precoloring of vertices, find a vertex coloring that maximizes the number of ρ-happy vertices—those whose fraction of same-color neighbors is at least ρ. The problem is NP-hard and closely related to community detection. We propose three efficient local search algorithms, including one with provable linear-time complexity. We provide the first systematic analysis revealing a positive correlation between ρ and community detection accuracy: higher ρ values yield ρ-happy colorings that more faithfully reflect ground-truth communities, albeit at the cost of increased difficulty in achieving balanced color partitions. Extensive experiments demonstrate that our algorithms significantly outperform state-of-the-art methods in both ρ-happy vertex coverage and computational efficiency. This work establishes a new paradigm for unsupervised community detection via graph coloring and delivers practical, scalable tools for this task.
📝 Abstract
For $0leq ρleq 1$ and a coloured graph $G$, a vertex $v$ is $ρ$-happy if at least $ρ°(v)$ of its neighbours have the same colour as $v$. Soft happy colouring of a partially coloured graph $G$ is the problem of finding a vertex colouring $σ$ that preserves the precolouring and has the maximum number of $ρ$-happy vertices. It is already known that this problem is NP-hard and directly relates to the community structure of the graphs; under a certain condition on the proportion of happiness $ρ$ and for graphs with community structures, the induced colouring by communities can make all the vertices $ρ$-happy. We show that when $0leq ρ_1<ρ_2leq 1$, a complete $ρ_2$-happy colouring has a higher accuracy of community detection than a complete $ρ_1$-happy colouring. Moreover, when $ρ$ is greater than a threshold, it is unlikely for an algorithm to find a complete $ρ$-happy colouring with colour classes of almost equal sizes. Three local search algorithms for soft happy colouring are proposed, and their performances are compared with one another and other known algorithms. Among them, the linear-time local search is shown to be not only very fast, but also a reliable algorithm that can dramatically improve the number of $ρ$-happy vertices.