FilipePrates / HappySet-IC

For an undirected graph G = (V, E) and a subset S ⊆ V of vertices, a vertex v is happy if v and all its neighbors are in S; otherwise unhappy. Given an undirected graph G = (V, E) and an integer k, the goal of MaxHS is to find a subset S ⊆V of k vertices such that the number of happy vertices is maximized.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MaxHappySet solver results: time vs N & Class & K

All graph classes Interactive Results (HTML: Download Raw File-> Open in your favorite browser)

Maximum Happy Set problem (MaxHS):

For an undirected graph G = (V, E) and a subset S ⊆ V of vertices, a vertex v is happy if v and all its neighbors are in S; otherwise unhappy. Given an undirected graph G = (V, E) and an integer k, the goal of MaxHS is to find a subset S ⊆V of k vertices such that the number of happy vertices is maximized. max ∑_i∈V hi s.t. ∑_i∈V yi = k, hi ≤yi, ∀i ∈V, hi ≤yj , ∀i ∈V, j ∈N (i), hi ≥∑_j∈N(i)yj −|N (i)|+ yi, ∀i ∈V, y ∈ B|V|

alt text

alt text

alt text alt text alt text alt text alt text

Maximum Happy Set problem (MaxHS)

For an undirected graph G = (V, E) and a subset S ⊆ V of vertices, a vertex v is happy if v and all its neighbors are in S; otherwise unhappy. Given an undirected graph G = (V, E) and an integer k, the goal of MaxHS is to find a subset S ⊆V of k vertices such that the number of happy vertices is maximized. max ∑_i∈V hi s.t. ∑_i∈V yi = k, hi ≤yi, ∀i ∈V, hi ≤yj , ∀i ∈V, j ∈N (i), hi ≥∑_j∈N(i)yj −|N (i)|+ yi, ∀i ∈V, y ∈ B|V|

About

For an undirected graph G = (V, E) and a subset S ⊆ V of vertices, a vertex v is happy if v and all its neighbors are in S; otherwise unhappy. Given an undirected graph G = (V, E) and an integer k, the goal of MaxHS is to find a subset S ⊆V of k vertices such that the number of happy vertices is maximized.


Languages

Language:HTML 95.9%Language:Jupyter Notebook 4.1%Language:Python 0.0%