A Formal Model for Building a Social Network - IEEE Xplore

4 downloads 74 Views 893KB Size Report
East Carolina University. Greenville, NC, U.S.A.. {dingj, cruzi06}ecu.edu. Abstract- A social network is a map of specified ties between the actors being studied.
A Formal Model for Building a Social Network

Abstract-

Junhua Ding, Ismael Cruz

ChengCheng Li

Dept. of Computer Science East Carolina University Greenville, NC, U.S.A. {dingj, cruzi06}ecu.edu

Dept. of Technology Systems East Carolina University Greenville, NC, U.S.A. [email protected]

A social network is a map of specified ties between the

actors being studied. Social network analysis is the mapping and measuring of relationships between entities to provide a visual and mathematical analysis of relationships among actors. Interest in analyzing computer-based social networks has grown as human communication has increasingly moved online. More so, computer

logs give

the

ability

to instrument

and

measure

computer-based social network activities. The social network analysis of computer-based networks may reveal ways in which people communicate and this may find the type of products or services users are willing to pay for. In this paper, we extended a high level Petri nets with channels for formally modeling social networks. The formal model provides a solid foundation for rigorously analyze social network activities. We illustrated the idea and demonstrate the effectiveness of the approach through modeling and analyzing a friend suggestion function in a social network.

Keywords-social network; petri nets; friend suggestion I.

INTRODUCTION

Interest in analyzing computer-based networks has grown as human communication has increasingly moved online. More so, computer logs give the ability to instrument and measure computer-based network activities. The social network analysis of computer-based networks may reveal ways in which people communicate and cooperate [3]. In commerce this translates to find the type of products and services users are willing to pay for. At an organizational level social network analysis can be applied to reveal how information actually flows around and between the formal procedures and relationships mapped to organizational hierarchy charts, which has led to a development of organizational network analysis [3]. The Internet can also be viewed as a social network connected by hyperlinks that can traverse by clicking on the hyperlinks. A website is represented by a node and the hyperlink establishes a relationship between websites, and this application of social network analysis is known as hyperlink network analysis [13]. Generally speaking, a social network is a map of specified ties between the actors being studied [9], and social network analysis is the mapping and measuring of relationships between people, groups, organizations, computers, and other connected entities [9]. A computer-based social network site is a web-based service that allows individuals to: construct a public or semi-public profile within a bounded system, to articulate a list of other users with whom they share a connection, and to view and traverse their list of connections and those made by others within the system [I]. The fundamental technological features of social network

978-1-4577-0574-8/11/$26.00 ©2011 IEEE

sites are fairly consistent. Primary features include visible profiles with descriptors such as age, location, interests, an "about me" section, a profile photo, and a list of friends. Friendships are established on a request and accept basis. Links to each friend profile allows the traversal of the network graph by clicking on the profile. Public messaging capabilities allow users to leave public messages on friends' profiles, and private messaging functions similar to email with the user having an inbox and message threads. Alternatively, some sites have photo and video sharing capabilities allowing users to upload photos and video and maintain "albums." More recently, mobile applications allow users to remain connected whenever they are away from their desktop or laptop. In order to cater various interests, some sites are designed with specific ethnic, religious, sexual orientation, political, or other identity-driven categories in mind. While many sites existed that incorporated one or more of the aforementioned features prior to 1997. SixDegrees was the first service to combine all of these features in a single site in 1997 [1]. Currently, Facebook is the most popular social networking service with more than 600 million active users [2]. Other popular social network services include Bebo, Friendster, Hi5, Orkut, LinkedIn, and PerfSpot [16]. Computer-based social networks are more and more used by individuals as well as companies and organizations to exchange information and doing businesses. In the following sections, the social network means the computer-based social network. Formally modeling and analyzing social network activities have profound impact on the development of high quality social network systems, understanding of communication patterns, and finding of valuable products or services to be promoted to users. A rigorous approach toward modeling and analysis of social networks can help us to build more effective and efficient social network systems. This paper proposes the formalism based on Petri nets for modeling and analyzing social network, and the formalism and approach were illustrated through modeling and analyzing the central feature in a social network - friend suggestions for building the connection among friends. Petri nets [13] are a well-studied formal method with graphical and mathematical notations, noted for its many advantages on the behavioral specification and analysis of distributed concurrent systems, and they are also a promising tool for studying social network systems that are characterized as being concurrent, asynchronous, distributed, parallel, and non-deterministic [15]. Petri nets can serve as a powerful medium of communication between practitioners and

237

theoreticians: practitioners can learn from theoreticians on how to make their models more methodical, and theoreticians can learn from practitioners on how to make their models more realistic [13]. PredicatelTransition (PrT) nets [8] are a class of high-level Petri nets that are especially suitable for modeling social network systems, and they are efficient in reachability analysis [7]. In this paper, we extended PrT nets with dynamic communication channels [12] to model social networks. The extended PrT nets can model a social network with a much more compact model comparing to the corresponding PrT net model. The extended PrT nets also provide better facility for modularizing and encapsulating each entity in a social network. Therefore, the extended PrT nets models are easier to be understood. In the following sections, the extended PrT nets serving as the modeling tool are discussed in Section 2. Section 3 describes the algorithms for building connections in a social network. Section 4 discusses how to model a friend suggestion using the extended PrT nets. Finally, we outline our conclusion as well as future work in section 5. II.

A.

A PREDICATED/TRANSITION NET WITH CHANNELS

PrT nets used in this paper are same as the nets defined in [15], which restricted the predicate types as enumerable types.

Definition 1 (PrT Nels). A PrT net is a tuple (P, T, F, .E, L, qJ, Mo), where: P is a finite set of predicates (first order places), T is a finite set of transitions (P n T 0, PUT pi 0), and F (Px1) U (TxP) is a flow relation, or simply a set of arcs. (P, T, F) forms a directed net. � is a structure consisting of some sorts of individuals (constants) together with some operations and relations. L is a labeling function on arcs. Given an arc IEF', the labeling of J, L(j), is a set of labels, which are tuples of individuals and variables. The tuples in L(j) have the same length, representing the arity of the predicate connected to the arc. The zero tuple indicating a no-argument predicate (an ordinary place in Petri nets) is denoted by the special symbol . cp is a mapping from a set of inscription formulae to transitions. The inscription on transition IEI', CP(I}, is a logical formula built from variables and the individuals, operations, and relations in structure 2, variables occurring free in a formula have to occur at an adjacent input arc of the transition. Mo is the initial or current marking.



(I) where Mo(P} is the set of tokens residing in predicate p. Each token is a tuple of symbolic individuals or structured terms constructed from individuals and operations in I. Let

°1- {P EP:(p,t)EF } and to - {PEP:(/,p)EF } be the

pre-condition predicates and the post-condition predicates of transitions t, respectively. Let

pO

- t ET:(p,/)EF } be

°p- t ET:(t,p)EF } and

the sets of input transitions and output transitions of predicate p, respectively. For a subset of

Q�P:Q=U p� 0p

QO =U p� p O

and

Basically, a transition I in a PrT net is enabled under marking Mo if there is a substitution 0 such that 110E Mo(P} for any label

IE L(p, t) for all � t and CP(t) evaluates true with regard to 0, where I/O yields a token by substituting all variables in label I with the corresponding bounded values with regard to O. The firing of an enabled transition I removes all tokens in {I/O: IE L(I, p}} from each input predicate � I , and adds all tokens in {lIO: I E L(I, p}} to each output predicate � t. After the firing of I, we get a new marking M'. Formally, M](p} Mo(P} =

-

{1I0: IE L(t, p}} for any � t, and M](p}

=

Mo(P} U {I/O: I

1 E L(I, p}} for any � . We denote a firing/occurrence

[ [ [ sequence as: Mo /IOI > MI /202 > M2··· lnOn > Mn, or, simply, 1]0]1202 ... lnOn, where 1](1 ::: i::: n} is a transition, Oi(1 ::: i::: n} is the substitution for firing ti, and M; (1 ::: i ::: n) is the marking after Ii fires, respectively.

B.

Predicated/Transition Nels

=

predicates

PrT Nels Exlended wilh Channels

In order to model the interaction and communication between nets, dynamic channels are introduced to PrT nets. A channel is a mechanism associated with a transition for sending and receiving messages between transitions in different nets. For convenience, we introduce the operator \ for removing items from an expression. For example, cp(I}\c means removing expression c from expression cp(I}. We defme a(x} as the value of x, dom(x} as the value range of x, and ¢ represents empty.

Definition 2 (Channel). A channel C is an interaction relation between transitions in a PrT net model, C (I, e, p) where: I is a transition in a PrT net N (P, T, F, .E, L, cp, Mo). cp(t) contains an output channel mc!(dJ, ... , d,J, where mc is the channel variable, ! represents that mc is an output channel; and dJ, ... , dn are formal parameters for mc. e is a transition in a PrT net N' (P', E, F', �', L', cp', M'o), and cp(e} contains an input channel MC'?(d'J, ... , d',J, where MC' is the channel identifier (constant), ? represents that MC is an input channel, and d'J, , d'n are formal parameters for MC'. t communicates e via channel mc under making (M, M'), when (1) I and e both are enabled if channels are not considered, and (2) a (mc) MC', (3) dom(dJ dom(d'J, 1::: i::: n, where M is the marking of N, and M' is the marking of N'. I and e fire at the same time following ordinary PrT net rules. p t x e is the interaction =

=

=

•••



=



relation. The transition t sends data of (dJ, ... , d,J from °1 to channel mc when I and e fire, and the transition e receives data of (d'J, ... , d',J from channel mc and moves data from channel

mc to

eO

when I and e fire.

Definilion 3 (CPrT NelS). A CPrT net is a tuple (P, T, F, .E, L, cp, Mo , C, W), where: (P, T, F, .E, L, qJ, Mo ) is a PrT net. C is a finite set of input or output channels, Vc E C, c (CI, CT, CP), where: CI is the channel identifier; and CI E .E,. CT is the channel type; CT E {I, ?}, where ! represents an output channel, and ? represents an input channel; CP is the channel parameter representing the data type passing through the =

238

channel, and CP E I. W is a finite set of transitions, and W k T, 'Vt E W, 3c E C, cp(t)\c =F cp(t). From above definitions of channels and CPrT nets, we know that a CPrT net model might be consisted of several nets and they communicate through channels. An output channel identifier could be a variable, which is instantiated with a concrete value and matched to an input channel at run time so that the communication topology is dynamically built based on the context of the communication transitions. The basic idea behind the transformation of a CPrT net into an equivalent PrT net is to merge transitions that involve in the channel communication. When the transition that has an output channel is merged with the transition that has the matched input channel during the communication (the two transitions are firing at the same time), the arcs of the merged transition are the union of the arcs of the two communication transitions. The guard condition of the merged transition is formed by the conjunction of the guards from the communication transitions and an expression that is used to decide the matching of the input channel and an output channel. Because the binding of each of the two communication transitions is independent, it is important to make sure the set of variables of the two communication transitions are disjoint before the transitions can be merged [5]. For each communication transition t, each variable v E var(t) is renamed with a new variable s of the same type as v, and make sure that the name of each new variable is unique in the global domain. Figure 1 illustrates the transformation procedure.

t c!

e C?< p’1, p’2> te c=C



Figure l. The synchronous communication between channels

The transition t and e are in different nets, and both of them are enabled under certain marking (M" M2)' The transition t has channel c!(pJ)= p(sr), place pJ holds one or more node/net 10 sr.

q>(p2) - p((p3)= p(sr). q>(p4)= p(sr). q>(p5) = p(p((p6)= p((p7) - p« s, sr,p». q>(p7)= p(