Capítulo 4. Marco Metodológico
4.2 Diagnóstico
4.2.4 Reflexiones
In our social network setup, a node in the associated friendship graph corresponds to a user of the network and the users’ social friendship connections are represented by edges in the graph. Based on the shortest path distances between users, and in presence of dynamic (friendship) updates (see Section 9.1), we formally define in the following the notion of dynamic friendship graphs in social networks.
Dynamic Friendship Graph
We introduce the basic data structure used in this social network setup, representing the inverted lists required by our incremental APSD algorithm, and the terminology
and notation used in the following discussion of the algorithm for dynamically updat- ing users’ lists of transitive friends in social networks. The terminology and definitions are based on the data model introduced in Part A, Section 3.1. Hence, the friendship graph of social tagging networks is defined by the social friendship relations of users (see Part A, Definition 3.1) inherent to the network.
Definition 9.2 (User U ). Each user U of a social network is represented by a node in the corresponding friendship graph.
The friendship relations between users define the friendship edges in the graph: Definition 9.3 (Friendship Edge(U, Uf) & Friend Uf). A direct edge e= (U, Uf) in
the friendship graph represents the friendship relation between two usersU , Ufand is
called a friendship edge.Uf is called a friend ofU .
Definition 9.4 (Dynamic Friendship Graph G). We consider G= (G0, . . . , Gt, . . .) a
sequence of directed, weighted friendship graphsGtfort > 0 with a constant node
setV = {U0, . . . , Un−1}, and a varying set Etof edges and weightswt. The nodes
correspond to the users in a social network and the weighted edges to the friendship edges between pairs of users. The indext in the sequence of friendship graphs corre- spond to the version of the graph at timet.
A friendship graph Gt = (V, Et) with friendship edges Et at time t does not
contain any self edges. For each edge e = (Ui → Uj) ∈ Et, there is an edge
weight0 < wt(e) < 1. Two consecutive friendship graphs Gt−1 and Gt in the se-
quence differ either by
• the weight of a friendship edge that was increased in Gt, i.e.wt−1(e) < wt(e)
for exactly one edgee and wt(e0) = wt−1(e0) for all other edges e06= e, or
• a single friendship edge e = (U → Uf) was added to Gt−1.
Note:The restriction to a constant set of users has been made only to simplify the discussion. The retrieval of the nearest friends for newly added users without friendship edges is trivial as there are no connections to friends at all. Hence, those users could be ignored for the definition of Gtand Gt+1. However, as soon as there’s a new edge for
or to such a node, the problem description complies to the one mentioned above. We call the new or increased friendship edge in Gt, for t >0, a friendship update
on U at time t. It can be thought of as a user Uf in Gt−1is becoming a friend or a
better friend of U at time t.
Definition 9.5 (Friendship Update(U → Uf)). We consider the insertion of a new
friendship edge(U → Uf) or the change of a weight of an existing friendship edge
(U → Uf), representing the difference in the sequence of friendship graphs from Gt−1
toGt, afriendship update on U with respect to Uf at timet.
Each friendship update is defined by a unique timestampT Se(U → Uf) corre-
sponding to timet of the occurrence of the update.
With this construction of a friendship graph, we now can define the friendship strengths, the shortest paths and the distances between users. The definitions follow the ones given in Chapter 6 of Part A for our CONTEXTMERGEalgorithm.
We define the friendship strength between two direct friends to be a value between0 and1 and being equal to the weight of the corresponding friendship edge.
Definition 9.6 ((Direct) Friendship Strength sf,t(U → Uf)). We define the direct
friendship strength sf,t(U→ Uf) of a direct friend Uf of a userU in Gtas
0 < sf,t(e) = wt(e) < 1
where e = (U → Uf) ∈ Et, i.e. sf,t(e) is equal to the weight wt(e) of the edge
e= (U → Uf) in Gt.
The friendship strength along a certain path in the friendship graph is computed as the product over all the path’s edge weights:
Definition 9.7 ((Indirect) Friendship Strength sf,t(U1 → · · · → Un)). We define the
indirect friendship strength sf,t(U1 → · · · → Un) of a user Un wrt. userU1 for a
path(U1→ · · · → Un) as
sf,t(U1→ · · · → Un) =
Y
1≤i<n
sf,t(Ui→ Ui+1)
With reference to Definition 9.1, we define the weight associated to each path as follows:
Definition 9.8 (Weight of Path π). The weight of a path π = (U1 → · · · → Un)
leading fromU1 toUn is equal to the indirect friendship strength sf,t(π) computed
forπ.
Finally, we define the friendship strength for arbitrary users in the graph as follows: Definition 9.9 ((Maximal) Friendship Strength sf,t(U, Uf)). Let Πt(U, Uf) be the set
of pathsπ = (U → · · · → Uf) in Gt. We define thefriendship strength or maximal
friendship strength sf,t(U, Uf) of an arbitrary user Uf 6= U wrt. a user U to be equal
to the maximal weight over all paths fromU to Uf if there is such path,0 otherwise
and1 if Uf = U : sf,t(U, Uf) = 1 if Uf = U 0 if Πt(U, Uf) =∅
max{sf,t(π)| π ∈ Πt(U, Uf)} otherwise.
Based on the friendship definitions between users, we define the shortest path in the friendship graph of a social network as follows:
Definition 9.10 (Shortest Path). We define the length of a path π from U to Uf inGt
to be the inverse of the indirect friendship strengthsf,t(π) computed for path π or 0
ifUf= U .
Theshortest path from a user U to a user UfinGtis the path with maximal weight
fromU to UfinGt.
Hence, the shorter a path starting at U and ending at Uf, the greater its weight and
the stronger is the friendship strength of Uf wrt. U .
In compliance with the notion of a dynamic friendship graph given in Defini- tion 9.4, we define for each user U a dynamic friendship list of users being friends of U with respect to a given time t.
U2 U3 U U1 0.9 0.5 0.4 0.8
(a) Example friendship graphG0
0.9 0.72 0.5 U U1 U3 U2 (b) Friendship list ofU wrt. G0
Figure 12: Example of a friendship graph G0with users U , U1, U2and U3in (a) and
the corresponding friendship list F listU,0for U in (b).
Definition 9.11 (Dynamic Friendship List F listU,t). We define the dynamic friendship
list F listU,tof a userU as the list of pairs(Uf, s) for all transitive friends Uf ofU
inGtin descending order ofs with s= st(U, Uf) is equal to the (maximal) friendship
strength ofUfwith respect toU .
Figure 12a depicts an initial friendship graph G0consisting of four users U , U1, U2
and U3 with no friendship updates. The weight of the shortest path is determined by
multiplying the edge weights. In Figure 12b the corresponding dynamic friendship list F listU,tat time t= 0 of user U is sketched.