sub-graph) with particular properties (as we will de-
tail in the following). Finding cohesive subgraphs in-
side a network is a well-known problem that has been
applied in several contexts (Bader and Hogue, 2003;
Spirin and Mirny, 2003; Sharan and Shamir, 2000).
While a classical approach to compute dense sub-
graphs is the identification of cliques (i.e., complete
sub-graphs induced by a set of vertices which are all
pairwise connected by an edge), this definition is of-
ten too stringent for particular applications. This is
the case, when the knowledge on how an individual
(vertex) is embedded in the sub-network (e.g., some
vertices could act as “bridges” between groups, as in
our case) is a critical issue to take into account. There-
fore alternative definitions of cohesive sub-graphs can
be introduced, for example by relaxing some con-
straints, leading to the concept of relaxed clique (Ko-
musiewicz, 2016). Here, we follow this approach by
relaxing the definition of distance between vertices.
In a clique distinct vertices are at distance of 1, in our
case, vertices can be at distance of at most s = 2. A
sub-graph where all the vertices are at distance of at
most 2 is called a 2-club (or, more in general, s-club
for different values of s).
3.2 Main Definitions
Let us consider a graph G = (V,E), and a subset V
0
⊆
V . We denote by G[V
0
] the subgraph of G induced by
V
0
. Formally G[V
0
] = (V
0
,E
0
), where
E
0
= {{u,v} : u,v ∈ V
0
∧ {u,v} ∈ E}.
Given a set V
0
⊆ V , we say that V
0
induces the graph
G[V
0
]
1
. The distance d
G
(u,v) between two vertices
u,v of G, is the length of a shortest path in G which
has u and v as endpoints. The diameter of a graph
G = (V,E) is max
u,v∈V
d
G
(u,v), i.e., the maximum
distance between any two vertices of V . In other
words, a 2-club in a graph G = (V,E) is a sub-graph
G[W], with W ⊆ V , that has diameter of at most 2.
Moreover, given a vertex v ∈ V , we define the set N(v)
as follows:
N(v) = {u : {v,u} ∈ E}
N(v) is called the neighborhood of v.
We formulate the “social computational problem”
described above, using 2-clubs, in such a way that
paths connecting T with items R has to “transit”
through x ∈ X.
In this way, we are currently seeking (within the
input “social graph”) a 2-Club, G[T ∪X ∪R], where T ,
1
Notice that all the graphs we consider are undirected.
X and R represent the sets of new users, experienced
teachers, and resources, respectively.
Please notice that, if such a structure (i.e., a maxi-
mum size 2-clubs) exists, then for any pair of vertices,
it must exist at least one simple path of length 2, i.e.,
a path composed by a triple of vertices. This, in turn,
will also be true for any pair, (t,r) where t ∈ T, r ∈ R.
Indeed, our goal will be to find a largest-size 2-clubs
which has the further property of providing, the maxi-
mum number of pairs (t, r), characterized by the triple
of vertices (t,x,r) ∈ (T × X × R). In this case, the
following set of fundamentals edges are important to
provide a correct optimization procedure.
• Edges between users, E, (i.e.,, between new
teachers T and experienced teachers X), express-
ing e.g., interest to cooperate, similarity etc.
• Edges between users and items, F, expressing that
an experienced teacher x, has already applied a
course resource, r. In this case the edges in X × R
will be constructed by knowing both the educa-
tional history of each (experienced) teacher, x, and
the resource r, which x has already applied for its
courses.
In this situation, the paths given by the triple of ver-
tices (t,x,r) ∈ (T × X × R) would suggest to teacher
t ∈ T to contact colleagues, x ∈ X, about the recom-
mended resource, r ∈ R. For sake of clarity, before
defining computationally the problem, we refer to any
vertex, x ∈ X, for which there exists at least one pair
(t,r) ∈ T × R within its neighborhood N(x) as “fea-
sible vertex”. Similarly, a set of “feasible vertices”
C will be referred as “feasible set”, and a pair (t,r),
for which there exists the feasible vertex x ∈ X , will
be named “‘feasible pair”. Considering the above dis-
cussion, we can define the following variant of the
2-clubs maximization problem.
Problem 1. Input: a graph G = (T ∪ X ∪ R, E ∪F).
Output: a set V
0
⊆ T ∪ X ∪ R such that G[V
0
] is a 2-
club having both maximum size and the largest num-
ber of feasible pairs.
4 A GENETIC ALGORITHM
The complexity of Maximum s-club has been exten-
sively studied in literature, and unfortunately it turns
to be NP-hard for each s ≥ 1 (Bourjolly et al., 2002).
The same property holds for our variant of Maximum
2-club, thus making optimization potentially imprac-
ticable. For this reason, we designed a Genetic Al-
gorithm (GA) to seek faster approximation solutions
see, e.g., (Mitchell, 1996) for details.
CSEDU 2019 - 11th International Conference on Computer Supported Education
88