Generating random bigraphs with preferential attachment
GGenerating random bigraphs with preferential attachment
Dominik Grzelak a,1, ∗ , Barbara Priwitzer b , Uwe Aßmann a,1 a Software Technology Group, Technische Universität Dresden, Germany b Fakultät Technik, Hochschule Reutlingen, Germany
Abstract
The bigraph theory is a relatively young, yet formally rigorous, mathematical framework encompassingRobin Milner’s previous work on process calculi, on the one hand, and provides a generic meta-model for complex systems such as multi-agent systems , on the other. A bigraph F = (cid:104) F P , F L (cid:105) is a superpositionof two independent graph structures comprising a place graph F P (i.e., a forest) and a link graph F L (i.e., a hypergraph), sharing the same node set, to express locality and communication of processesindependently from each other.In this paper, we take some preparatory steps towards an algorithm for generating random bigraphswith preferential attachment feature w.r.t. F P and assortative (disassortative) linkage pattern w.r.t. F L .We employ parameters allowing one to fine-tune the characteristics of the generated bigraph structures.To study the pattern formation properties of our algorithmic model, we analyze several metrics fromgraph theory based on artificially created bigraphs under different configurations.Bigraphs provide a quite useful and expressive semantic for process calculi for mobile and globalubiquitous computing. So far, this subject has not received attention in the bigraph-related scientificliterature. However, artificial models may be particularly useful for simulation and evaluation of real-world applications in ubiquitous systems necessitating random structures. Keywords: bigraphs, random graphs, preferential attachment, assortativity, average neighbor degree,ubiquitous systems
1. Introduction and Motivation
Complex systems exhibit highly intertwined agents (physical or logical) organized in more or lesshierarchical-like structures where agents possess loose and close inter-linkages which additionally areequipped with different semantics (e.g., communication). Consequently, collections of agents (so-calledensembles) lead to unpredictable collective behavior (cf. [1, p. 2]). One can observe that the system’sdynamic and emergent complexity is greater than the sum of the individual collections and their parts.Hence, the development of any complex system is not feasible without understanding and responding tothe inter-dependencies and linkages equally on the macro- and microscopic scale.In this respect, agent-based models have become of increasing importance in different fields of appli-cation regarding the modeling and simulation of complex systems (see, for example, [2, 3, 4, 5]). Withinthis computational model, individual entities of a complex system are modeled as agents , whereas thebehavior and interaction between them are determined by a set of predefined rules . This rudimentarydescription coincides with the most common definition of agent-based models in the literature, namely,that agents act with each other within an environment over time in order to study systems exhibit-ing complex behavior (see [6] and [7] for a more detailed discussion). Owing to the considerable successagent-based modeling approaches have enjoyed so far in various domains, many formalisms have emergedaround that subject, among them different process calculi . Here, the term process "refers to behavior of ∗ Corresponding author
Email addresses: [email protected] (Dominik Grzelak), [email protected] (Barbara Priwitzer), [email protected] (Uwe Aßmann) Dominik Grzelak and Uwe Aßmann are also with Centre for Tactile Internet with Human-in-the-Loop (CeTI), Tech-nische Universität Dresden, 01062 Dresden, Germany.
Preprint submitted to SI on Discrete Models of Complex Systems: recent trends and analytical challengesFebruary 19, 2020 a r X i v : . [ c s . D M ] F e b system" which is, for example, the action of a user or the execution of a software system [8, p. 19-1].Agents interact with each other through communication links, which are identified by names . Morespecifically, the computational notion of such an algebra "is represented purely as the communication ofnames across links" [9, p. 1]. Many process calculi provide a sufficient level of abstraction, and share keyproperties such as compositional modeling and behavioral reasoning via equivalences and preorders (see[10, Ch. 1]), thus making them a remarkably straightforward and rich modeling language.One variant of process calculi, we continue to focus in this paper, are bigraphs devised by Robin Milnerand colleagues (see, among others, [11, 12, 13]). Bigraphs are a relatively new model for interactive anddistributed agents, where graphs are treated as the primary mathematical objects [14, p. 16]. Categorytheory is the broader underlying mathematical framework for axiomatizing and expressing bigraphs andtheir respective operations [13, p. 14]. The formal underpinning empowers a generic formalization offamilies of similar models and dynamical systems, which we unveil shortly. In particular, the theory isdedicated to the following two principal aims, which can be identified in the scientific literature:i) Creating a unifying theory for several existing process-calculi frameworks (see [14]). The particularlyexpressive bigraph structure enables the unification of a great variety of process calculi that focus oncommunication and locality [15] such as Calculus of Communicating Systems (CSS) [16], π -calculus[17] and mobile ambients [18]. Also bigraphical encodings for condition-event Petri nets have beenstudied in [13, 19, 20], capturing their syntax and semantic. Recently, the authors of the SpiderCalculus [21] indicated that bigraphs could represent this very calculus as well. Having a generalmeta-model for process calculi at hand that "can describe several concrete calculi" is a great benefitbecause "one can hope that a result for a meta-model can be transferred to all of these calculi" [22,pp. 127-128].ii) Developing a generic structural meta-model that enables modeling of ubiquitous systems (see [13]).So far, the bigraphical theory found application in various scientific fields where we wish to mentiona few, particularly important ones. With respect to biology, Krivine et al. [15] developed stochasticsemantics for bigraphs by using the process of membrane budding as an example, showing thatbigraphs are a well-suited candidate for representing complex bio-molecular reactions. Damgaardand Krivine [23] further investigated the development of a generic language by using the "bigraphicalframework as a basis for developing families of calculi for modelling of biological systems at themolecular level" [23, p. 2]. An orthogonal work of the previous ones is [24] where biological bigraphs ,a meta-model at the protein-level, is developed. Considering the wide field of computer science,Birkedal et al. [25] proposed the plato-graphical model for the formal modeling of context-awaresystems . Particularly useful for ubiquitous systems, Sevegnani and coworkers [26, 27] proposed ageneralization of Milner’s bigraph theory called bigraph with sharing which can model overlappingor intersecting realms (e.g., to model a shared space among many entities or overlapping wirelesssignals). Therefore, Sevegnani implemented directed acyclic graphs (DAG) instead of using treesfor the place graph (see Sec. 2). Modeling socio-technical systems is explored by Benford et al.[28] by means of the pervasive outdoor game called Savannah [29], where a socio-technical systemis understood as a facet of ubiquitous computing systems. The presented model includes fourperspectives: a computational, physical, human-related, and technology-related one. Based on this,the authors demonstrate the analysis of complex interactional phenomena and exploration of possibleinconsistencies among the four perspectives of this formal model [28].Related to the second mentioned long-term objective of Milner, we wish to investigate on the randomgeneration of bigraphs. Random bigraph generation is especially useful in applications necessitating theusage of random structures and for simulations of real-world systems (see also [30]). Another compellingreason for creating synthetic bigraphs includes benchmarking of bigraph-related algorithms. In order tofoster advances and evaluation of different algorithms such as frequent bigraph mining (which has yetto be developed, analogously to frequent subtree mining [31]) or bigraph matching , the development ofbigraph databases are inevitable. Synthetic graphs can then be acquired from such a bigraph databaseand derivatives constructed easily, ready to be used for a series of experiments. For example, Bunke etal. [32] used a graph database from [33] to study the computational complexity of their hypergraphmatching algorithm. We can observe that such graph databases are a valuable resource and that it isworth to follow this issue much further with respect to bigraphs. The database was designed to assess graph and subgraph isomorphism problems (see also [34] for further reference.).It is, however, not available anymore at the URL http://amalfi.dis.unina.it/graph . .1. Related Work To the best of our knowledge, random bigraph generation was not the main focus of related scientificresearch until now but extensively for similar graphical structures, e.g., DAGs, networks, trees, andforests, which we are briefly present below.A great many random network models have been studied so far, including the configuration model,the Erdös-Rényi (ER) model [35] and the Watts-Strogatz model (i.e., a small-world network model) [36].We refer the reader to [37] for a greater overview. This list is not exhaustive, but worth mentioningare further Wilson’s algorithm [38] for creating random spanning trees of an undirected graph, dynamicnetwork models [39] or random graphs with fixed degree sequences [40]. Most of them are sufficientlymatured, evaluated, and tested, and found their practical applicability in concrete domains. On thecontrary, observed from a pragmatic model transformation standpoint, Fernández et al. [41] present adifferent approach by means of graph rewriting. A port graph is used as the internal embodiment of asocial network. In this social network model, nodes represent people and edges the connections betweenthem. The graph is then incrementally expanded by consecutively applying rules which reconfigure thesocial network graph.
In this work, we shall focus on taking some preparatory steps towards an algorithm for generatingrandom bigraphs by extending the ideas of previous works. Due to the bigraph’s anatomy, however,former ideas are not always directly applicable within the framework of bigraphs. Thus, the generationdiffers from the usual network generation approaches and must be appropriately adapted. In particular,the main contribution of this paper is to investigate on the construction of bigraphical agents , a certainkind of bigraphs that are being appropriated by bigraphical reactive systems (BRS) . The reason forthis: Reduction semantics in process calculi are commonly prescribed by rules (i.e., reactions) of theform a (cid:95) a (cid:48) , where a, a (cid:48) are called agents (see also [13, 14]); making them also one of the main algebraicstructures concerning bigraph matching and rewriting (see Sec. 2.2). Both are necessarily the primaryoperations to cover the computational notion of bigraphs. Meaning, they are used almost withoutexception when conducting simulations or employing the bigraph theory for real-world applications. The paper is structured as follows. In Sec. 2, we begin by introducing bigraphs and bigraphicalreactive systems. Then in Sec. 3, we present our approach for random generation of place graphs first,and after link graphs. In Sec. 4, we compute several measures originating from network theory andconduct statistical analyses to capture information about the structure of the generated bigraphs andthe algorithm’s behavior. For example, we use global measures such as the assortativity for analyzinglink graphs and focus on the node degree distribution of place graphs. We provide proof outlines of someproperties based on statistical analyses of experimental data. Finally, Sec. 5 concludes this paper andgives some directions for future work.
2. Preliminaries: Bigraphs and Bigraphical Reactive Systems
We wish to give a brief introduction concerning the bigraph theory devised by Robin Milner. In thesequel, we use the formalization based on [13] for this purpose, where the reader can find all furtherrelevant formal definitions. A bigraph is either abstract or concrete . Specifically in this work, we areconcerned with pure concrete bigraphs (see also [13, 42, 43]). Bigraphs employ category theory as theformal mathematical underpinning; however, the reader does not need to be concerned about technicaldetails at this point. For the following explanation of the bigraph’s anatomy, we shall use the bigraphdepicted in Fig. 1 as a running example. Signature.
A bigraph is defined over a signature K which specifies the syntax of the bigraph. Let C = { C i } ≤ i ≤ n − denote the set of controls of a bigraph B over the signature K , C ∈ K . The signatureof the bigraph F in Fig. 1 is K = { Room : 0 , Computer : 1 , User : 0 , Phone : 1 , Data : 0 } . Definition 1. (Basic Signature (after [13, p. 7])) A basic signature takes the form ( K , ar ) . It has a set K whose elements are kinds of node called controls, and a map ar : K → N assigning an arity, a naturalnumber, to each control. The signature is denoted by K when the arity is understood. A bigraph over K assigns to each node a control, whose arity indexes the ports of a node, where links may be connected. BRSs are an extension for bigraphs, covering the dynamic aspect of the theory (see Sec. 2.2). ink Graph v v networkv v v v v Place Graph v v F P : 3 → 1 roots:sites:outer names: F L : ∅ → {network} Bigraph
F: <3, ∅ >→ <1, {network}> r RoomUser Phone Room d network Computer v v v Computer d v d v Data v v v Figure 1: A concrete bigraph with its corresponding place graph and link graph. The bigraph has one outer name Y = { network } , and one root n = { } . It has three sites m = { , , } and no inner names X = ∅ . Having arrived here, we define place graphs first, and link graphs after to finally combine them intobigraphs. Both graph structures are the constituents of a bigraph which are independently defined andonly share the same node set.
Place Graph.
A place graph is a forest of trees with special leaves. A tree of a place graph is a rootedunordered labeled graph, which is acyclic. It is used to model node hierarchies that reflect the parent-child-relations and is represented visually by nesting nodes into other nodes. Thus, inner nodes containedin outer nodes are called children of these. For instance, node v with ctrl ( v ) = User is a child of v with ctrl ( v ) = Room . This nesting is used to express physical or logical location, ownership, or similarconcepts (referring to Fig. 1, a room contains a computer and a user, where a user has a phone).
Siblings are nodes under the same parent. The gray shaded shapes are special leaves of the place graph, called sites , and represent "holes". They have two purposes. On the one hand, they abstract other nodes away,and on the other, they are used to nest other bigraph’s roots in these sites. A root of a place graph isalso called "region" (illustrated as an outermost container with a dotted border). Distinct finite ordinalsindex both roots and sites and represent the outer face and inner face of the place graph, respectively.
Definition 2. (Concrete Place Graph (after [13, p. 15])) A concrete place graph F = ( V F , ctrl F , prnt F ) : m → n is a triple having an inner face m and an outer face n , both finite ordinals. These index respectively thesites and roots of the place graph. F has a finite set V F ⊂ V of nodes, a control map ctrl F : V F → K and a parent map prnt F : m (cid:93) V F → V F (cid:93) n which is acyclic, i.e. if prnt iF ( v ) = v for some v ∈ V F then i = 0 .Link Graph. A link graph is a hypergraph where edges also connect to "special" graph elements thatform the interface of the link graph. These are called inner names and outer names . An integral partof a node is the port (see also Def. 1). The arity of a control determines how many ports a node has,meaning, how many links can be connected to this node. Each distinct node’s port can directly connectto an edge or an outer name. Links connect multiple points , i.e., inner names and ports . This notion isexpressed by the link graph depicted at the bottom-right of Fig. 1.
Definition 3. (Concrete Link Graph (after [13, p. 15])) A concrete link graph F = ( V F , E F , ctrl F , link F ) : X → Y is a quadruple having an inner face X and an outer face Y , both finite subsets of X , called respectively theinner and outer names of the link graph. F has finite sets V F ⊂ V of nodes and E F ⊂ E of edges, a control ap ctrl F : V F → K and a link map link F : X (cid:93) P F → E F (cid:93) Y where P F def = { ( v, i ) | i ∈ ar ( ctrl F ( v )) } is the set of ports of F . Thus ( v, i ) is the i th port of node v . We shall call X (cid:93) P F the points of F , and E F (cid:93) Y its links. Further, we distinguish between open and closed links. An outer name is an open link and an edgeis a closed link [42, p. 1013], and a point is open if its link is open, otherwise it is closed. A closed linkcan be thought of a "restricted" name which is invisible to the context and has no name attached to it,unlike an open name (see [22, p. 129]). A link is called idle when no point is connected to it. Referringto Fig. 1, all devices such as the two computers in the different rooms and the user’s phone are connectedwith the same network denoted by the outer name network (i.e., they share the same link ).Having defined a place graph and a link graph formally, we arrive at the definition for a concretebigraph.
Definition 4. (Concrete Bigraph (see [13, p. 15])) A concrete bigraph F = ( V F , E F , ctrl F , prnt F , link F ) : (cid:104) k, X (cid:105) → (cid:104) m, Y (cid:105) is a quintuplet comprising a concrete place graph F P = ( V F , ctrl F , prnt F ) : k → m and a concrete linkgraph F L = ( V F , E F , ctrl F , link F ) : X → Y . A concrete bigraph is also written as F = (cid:104) F P , F L (cid:105) .Elementary Bigraphs. Elementary bigraphs are node-free bigraphs; an exceptions are ions , atoms and molecules . We distinguish between placings and linkings (see [13]).They represent the set of basic bigraphs of which more complex ones can be built. Tab. 1 showssome basic bigraphs in their graphical and corresponding algebraic notation. A bijection from sites to Table 1: Overview of some elementary bigraphs.
Notation Example P l a c i n g s φ → join : 2 → join = γ , : 2 → γ , =
10 01 merge n : n → merge =
100 2 L i n k i n g s λ elementary substitution y / X : X → y y / { x ,x ,...,x n } = yx x x n ... elementary closure /x : x → (cid:15) / { x , x , ..., x n } = x x x n ... roots is called a permutation π and a bijective substitution is a renaming α . A substitution σ : X → Y is the tensor product of elementary substitutions σ def = y / X ⊗ · · · ⊗ y n − / X n − , where Y = { (cid:126)y } and X (cid:93) · · · (cid:93) X n − , and a closure is the tensor product of elementary closures /W def = /w ⊗ · · · ⊗ /w n − ,where W = { (cid:126)w } . The placing merge itself is recursively defined merge = 1 , merge = id , merge = join, merge n +1 = join ◦ ( id ⊗ merge n ) using only the identity place graph at and join . Composition.
To conclude this section, we discuss some of the basic bigraph operations for constructingmore sophisticated graph structures. All bigraphs can be obtained from elementary bigraphs using thebasic categorical operations, i.e., tensor product ⊗ for the juxtaposition of bigraphs and composition ◦ for nesting of bigraphs. Above, we have shown how to produce any substitution and closure by usingjust the tensor product. We shall illustrate their use by means of our running example bigraph B over5he signature K from Fig. 1. The full algebraic expression is B = ( network / { a,b } ⊗ join ) ◦ ( A ⊗ A )with A = ( id a ⊗ ( Room ◦ join )) ◦ ( id ⊗ Computer a )and A = ( b / { x,y } ⊗ Room ◦ join ) ◦ ((( y / { x } ⊗ User ) ◦ Phone x ◦ Data ◦ ⊗ Computer x ) . What we deliberately have left out, are derived operations that generalize the composition and tensorproduct, namely, nesting " . " and parallel product " || ", respectively, which allow name sharing. Usingthese derived operators yield in a more compact and convenient expression as the one presented above.For more information on this matter, we refer to [13]. For process calculi, it is common to express dynamics through reactions. A reaction is a labeledtransition of the form a L −−− (cid:66) a (cid:48) where L −−− (cid:66) is regarded as a reaction relation. Comparing two systems,whether they behave alike, is primarily conducted by means of a labeled transition system (LTS). Ingeneral, an LTS is a semantic model to describe distributed systems, which can be thought of as adirected graph with nodes and edges. Nodes are called the states of the system, and edges represent thetransitions. Each edge is labeled from some vocabulary expressing the action between two states. Thus,the label L indicates the action on how to reach the specific state a (cid:48) from a .To express dynamics within bigraphs, the extension called bigraphical reactive systems was introducedby Milner. Different notions of behavioral equivalence exist, such as trace equivalence or bisimilarity.The bigraph theory provides a uniformly treat across process calculi and a proof that bisimilarity isalways a congruence in a wide reactive system with RPOs [13, Theorem 7.16]. Here we briefly presentthe technical definitions. Readers interested in a more comprehensive presentation of this topic mayconsult [12, 13, 44]. In contrast to the reaction relation mentioned above a L −−− (cid:66) a (cid:48) , the key questionhere is whether these labels can be derived from a set of reaction rules of the form r −− (cid:66) r (cid:48) instead.Within the bigraphical framework, labels are regarded as contexts so that a L −−− (cid:66) a (cid:48) implies the reaction L ◦ a −− (cid:66) a (cid:48) . [14, p. 18] Here, the label represents how an "environment" contributes to the transitionsuch that L ◦ r −− (cid:66) L ◦ r (cid:48) and a (cid:48) = L ◦ r (cid:48) being minimal w.r.t. L for a set of reaction rules. [45, p. 17] Agents.
Bigraphs with the domain (cid:15) are called agents and are denoted with lower case letters of the form a : (cid:15) → I , often written a : I (see [45, p. 18] and [13, p. 74]). Thus, agents are called ground , meaning,they have no inner names and no sites. The initial set of bigraphs in a BRS are agents. Reaction Rules.
Reaction rules describe the semantics of a bigraphs. We distinguish between ground and parametric reaction rules.
Definition 5. (Parametric Reaction Rule (after [13, p. 91])) A parametric reaction rule for bigraphs isa triple of the form ( R : m → J, R (cid:48) : m (cid:48) → J, η : m (cid:48) → m ) where R is the parametric redex, R (cid:48) the parametric reactum, and η a map of finite ordinals. R and R (cid:48) must be lean, and R must have no idle roots or names. The rule generates all ground reaction rules ( r, r (cid:48) ) , where r (cid:108) R.d, r (cid:48) (cid:108) R (cid:48) . ¯ η ( d ) and d : (cid:104) m, Y (cid:105) is discrete. The parameter d is a discrete bigraph of the form d = d ⊗ · · · ⊗ d m − ; η the instantiation map where ¯ η ( d ) = d η (0) || · · · || d η ( m (cid:48) − .In order to evolve a bigraph, reaction rules must be applied to it. Considering the parametric reactionrule R = ( R, R (cid:48) ) , R is the search pattern to be found in an agent (i.e., the target bigraph). This problemis known as the bigraph matching problem . A bigraph is called lean if it has no idle edges [13, p. 26]. A bigraph is called discrete if all its links are open anddistinct (i.e., its link map is bijective). We write f (cid:108) g for arrows in the same homeset if there is a bijection ρ : | f | → | g | that respects the structure of f (see [13, p. 23]), where | f | denotes the support of a bigraph (see [13, Def. 2.4]). imple and Nice BRS. The purpose of our presented approach is to generate agents for a certain classof BRSs. For this reason, we wish to give the definition of a particular class of BRSs termed simple andnice . The imposed constraints are not severe and only produce a certain class that makes the LTS moretractable without losing expressiveness. For a detailed explanation with proofs, the reader may refer to[13, p. 96]. This leaves us with the formal definition of a general BRS and its special class:
Definition 6. (Bigraphical Reactive System (BRS) (after Definition 8.6 [13, p. 92])) A (concrete)bigraphical reactive system (BRS) over Σ consists of ‘ BG (Σ) equipped with a set ‘ R of parametric reactionrules closed under support equivalence; that is, if R (cid:108) S and R (cid:48) (cid:108) S (cid:48) and ‘ R contains ( R, R (cid:48) , η ) , then italso contains ( S, S (cid:48) , η ) . We denote the BRS by ‘ BG (Σ , ‘ R ) . It is safe if its sorting Σ is safe. Definition 7. (Simple and Nice BRS (after Definition 8.12 and 8.18 [13, pp. 95])) A parametric redexis simple if it is open (every link is open), guarding (no site has a root as parent) and inner-injective (notwo sites are siblings).A parametric redex is unary if its outer face is. A reaction rule is simple, or unary, if its redex is so.A BRS is simple, or unary, if all its reaction rules are so.A reaction rule is nice if it is safe, simple, unary, affine and tight. A BRS ‘ BG (Σ , ‘ R ) is nice if allits reaction rules are nice.
3. Random Bigraph Generation
We come now to our algorithm for generating random bigraphs, which covers the construction ofbigraph-compatible agents (recall the definition from Sec. 2.2). Beginning with our algorithmic approachfor place graph generation, we briefly detail the originating concept before introducing our link graphgeneration algorithm. In regards to the node connection, we cover two edge cases for the linking processof nodes for the link graph.
We adopt the Barabási-Albert (BA) model [46] as the underlying frameworkfor our purpose to generate random place graphs. The model is widely used among researchers of largenetworks [47, 48], at the same time simple in contrast to other graph models such as [49] or [50]. Barabásiet al. [46] propose a random graph generation algorithm for scale-free networks whose degree distributionasymptotically obeying a power-law distribution. This is also known as the preferential attachmentmodel. Vertices in a graph that have more connections than others will form larger clusters than verticeswith fewer edges. To clarify, the interconnection between vertices is not uniformly distributed. A newvertex has a higher probability of being connected to a vertex that already has a large number ofconnections (see [46]).We are recalling the algorithm from [46] for completeness here. Let G = ( V, E ) be an unlabelednetwork with a vertex set V , and an edge set E . At the first time step, the network is initialized witha small number of starting nodes m . Then at every subsequent time step, a new node is added andconnected to m different existing vertices (selection is subject to a certain probability) in G by m edges( m ≤ m ). The connection of a new vertex v to an existing vertex v i depends on the connectivity d ( v i ) (i.e., degree) of v i . So the probability that v is added to v i is Prob( v i ) = d ( v i ) (cid:80) j d ( v j ) = d ( v i ) | E | (see [46,p. 511]). Effectively, this implements the preferential attachment feature because vertices with more"children" tend to get more connections than those with fewer "children". Algorithm.
We use a slightly different notion concerning place graphs when referring to "connections".Owing to the well-defined meaning of nesting of place graphs within the bigraph theory, we resist usingthe term "connection" here (though the concept is similar), and use the relation has-children . We adoptthe former algorithm and introduce several changes: • The number of trees of a place graph can be specified by the parameter t indicating the initialnodes for F P (instead of m ). Then, n indicates the overall number of places (containing onlyroots and nodes in this case), and m = n − t represents the number of nodes in F P . The authors working on a framework, implemented with the Java programming language, for the creation and simu-lation of bigraphs. The proposed algorithm is also implemented therein. We discard the part regarding the connection of a freshly created node to m existing nodes at everytime step. Here, we consider a tree where a child node has only one parent. • We include control selection when creating a node by randomly assigning some control C k ∈ C which is drawn according to the discrete uniform distribution k = unif { , | C | − } . • In the original algorithm, we can observe that for an isolated vertex v i , the attachment probability isalways Prob( v i ) = 0 . We modify this property by giving each existing vertex a positive probabilityby incrementing the vertex degree by one, so that the attachment probability is always Prob( v i ) ≥ . However, we employ a "trick" to avoid the additional probability computation which determinesif a new node shall be nested within another one by keeping an additional list of node references. That means nodes appearing more frequently in the list corresponds to nodes having a higherdegree. As a result, the likelihood of being selected as a parent increases.
Algorithm 1
Algorithm for generating random place graphs for a given signature. procedure PGG ( t , n , C ) places ← ∅ i ← while | places | < t do places ← places (cid:93) Create_Root ( i ) i ← i + 1 end while for i ← t ; i < n ; i ← i + 1 do r ← unif { , | places | − } k ← unif { , | C | − } v ← Create_Node ( C k ) prnt F ( v ) ← places r places ← places ∪ v if i > then places ← places (cid:93) places r end if end for return F P = ( V F , ctrl F , prnt F ) : ∅ → t end procedure The procedure is shown in Algorithm 1 and shall be self-descriptive. However, we want to highlightsome facts. The method
Create_Root(index: int) in Line 5 creates a new root and takes an integeras argument indicating the index of this place. A control is randomly drawn from C for the node creation.Therefore, the method Create_Node(c: control) in Line 11 is responsible and accepts a controlas argument. The procedure is executed until n nodes in total are being created (including roots andnodes). The generation of a link graph depends on the support of a place graph (see [13, Def. 2.4]) andthe signature. For a given place graph of a bigraph over the signature K , we want to present how linksbetween nodes may be added. Therefore, we offer two strategies to define constraints on linkings betweennodes:i) Minimal Pairwise Port Linkage (Uniformly-Distributed) , andii)
Maximal Degree Correlation (Assortative or Disassortative) .For all strategies, we do not consider connections exclusively between inner names or allowing idle linksand idle inner names in general. This is due to the fact that we focus on the agent construction of niceand simple BRSs (refer to Sec. 2.2). A similar approach was also proposed within the discontinued graph framework
JUNG [51], where the authors used aLagrangian smoothing method to avoid a non-negative attachment probability. The idea is adopted from [52]. otation. Let us define some parameters first. We have p the probability that any link (whether open orclosed) is created. Then, p o is the probability that an outer name is created, similar is p e the probabilityfor edge creation. Both parameters are considered as weights (see Algorithm 2, Line 9). For our first strategy, we allow only one link connection (i.e., through an outer name or an edge)between a pair of nodes. The connection is enabled using the node’s port. It is obvious that the linkingis not reflected upon roots since only nodes have ports. The procedure is presented in Algorithm 2 andexplained in the following.
Algorithm 2
Pseudo-code for generating a random link graph with minimal pairwise port linkage. procedure MPPL ( nodes , p , p o , p e ) (cid:46) all nodes must have assigned a control with positive arity L ← (cid:98) . p | nodes |(cid:99) if L < then return "probability p is to small or to few nodes for creating links" end if c ← while c < L do assert i (cid:54) = j : i ← unif { , | nodes | − } ∧ j ← unif { , | nodes | − } if Weighted_Random ( p o , p e ) = 0 then l ← Create_Outer() Y ← Y (cid:93) l else l ← Create_Edge() E F ← E F (cid:93) l end if link F (( nodes i , ← l link F (( nodes j , ← l nodes ← nodes − { nodes i , nodes j } c ← c + 1 end while return F L = ( nodes, E F , ctrl F , link F ) : ∅ → Y end procedure The first step is to determine the maximal number of possible pairwise links L (Algorithm 2, Line 2)that can be created between the nodes. The fraction of the number of links to create, can be tunedby adjusting the parameter p ∈ [0 , . The function Weighted_Random(a: double, b: double) (Line 9) samples a value from the tuple (0 , with the given probabilities a and b corresponding to thevalue and of that tuple, respectively. For example, let a = 0 . and b = 0 . then there is a probabilityof
30 % to create an outer name (0) and a probability of
80 % to create an edge (1). The computed valueof that function is evaluated in the if-then construct to determine which link shall be created. The link l in question is either an outer name returned by the method Create_Outer() (Line 10), or an edgecreated by the method
Create_Edge() (Line 13). Both methods assign a unique label to that link.After, both variables nodes i and nodes j are being linked to l (Line 16 and Line 17). For convenience, weuse the first port of each selected node (refer to Def. 3). The linked nodes are then removed from nodes and ensures that no node is linked multiple times. This procedure is repeated until no more pairwiselinkings are possible. The second model aims to achieve the highest possible linkage between nodes under a given bigraph’ssignature. To obtain another perspective on this task, we regard the given controls with their assignedarities as degree sequence from which we want to create a link graph. Therefore, several models existsuch as the hidden parameter model or the configuration model (see [37]). Furthermore, we want toinfluence the link graph’s assortative or disassortative feature. Assortativity is a property indicating thepreference that nodes are more likely to connect to similar nodes. We must ensure that no self-loops oridle links are generated. We cannot create infinite links between nodes as the arity of a node is fixed andnaturally functions as a constraint. 9 ulvi-Brunet and Sokolov model. Our following model is influenced by the
Xulvi-Brunet and Sokolov model [53, 54]. It allows adjusting the magnitude of degree correlations for being either more assortativeor disassortative. Therefore, their model employs a parameter p ∈ [0 , to vary the network’s magnitudeof being fully assortative ( p = 1 ) or fully random ( p = 0 ). Consequently, it always allows us to generatemaximal degree correlations for both "directions". Algorithm.
Analogously in terms of link graphs, assortativity means that nodes with many ports tendto connect to similar nodes with high port numbers as well as nodes with small arity tend to connectto nodes whose controls also exhibit small arities. In contrast to disassortative mixing, nodes with higharity tend to connect to nodes with lower arity and vice versa.In the parlance of [37, 53, 54], we now explain the individual steps of our adapted algorithm for linkgraphs at this point instead of printing pseudo-code. Given F L with V F where each node is assigned acontrol with positive arity, all nodes are being put in a working queue Q at the beginning. Then, thefollowing steps are executed:Step 1. Randomly select different nodes where each one has at least one free port.Step 2. We then apply a simplified wiring step. Based on the desired degree correlation, the wiring is assortative or disassortative . For the former, we link both the nodes with the highest degree,followed by the remaining two nodes with the lowest degree. For the latter, we link the nodewith the highest and lowest degree, and finally, the two remaining ones. For linkage, a new edgeis created, and two nodes are connected to it via their free port. That means an edge will haveat most two vertices connected.Step 3. If a node has no free ports, it is removed from Q , thus, not available anymore for linkage. Thealgorithm is repeated, starting from Step 1, as long as the number of elements in Q is greater orequal than .Opposed to [53, 54], we are removing nodes from Q , which is a natural constraint within the frameworkof bigraphs as the arity specifies the maximum number of links a node can have. In this case, the algorithmterminates automatically if Q has less than four nodes.
4. Experimentation and Analysis
The structure of a place graph can exhibit complicated patterns realized by their parent-child-relationship. Here, we study several properties of some artificially created place graphs, including thedegree distribution and the distribution regarding the arity of the nodes. The following conducted placegraph analyses refer exclusively to Algorithm 1.
The number of children and parents of a node in a place graph F P is called the degree of a node d ( v ) = | prnt F ( v ) | + | prnt − F ( v ) | where prnt − F ( v ) returns the children of v . Thus, the degree of the nodedenotes the size of the open neighborhood of a node. With respect to pure bigraphs, a node can onlyhave one parent, so | prnt F ( v ) | = 1 .The first insight we obtain into F P is by computing the frequency of distinct node degrees. Letdeg ( d ) be the corresponding degree distribution:deg ( d ) def = fraction of nodes in the place graph with degree d. To assess the average degree distribution, we sample some place graphs. Therefore, we chose t = { , , } for the number of trees and n = { , , } for the number of nodes. For each parametercombination c t i ,n j ∈ t × n we performed r = 100 independent runs to generate a sufficiently large samplepopulation. The results are averaged and presented in Fig. 2.From Fig. 2 we can observe that only very few nodes have many children (to the right of the histogramis the long tail, the node frequency is small) whereas the greater number of nodes have less children itself(to the left of the histogram are the nodes that dominate, the node frequency is high). Such distributionsare identified by their long tails, which mainly reflect the preferential attachment property .10 .00.10.20.30.40.5 1 2 3 4 5 6 7 8 9 10 node degree node f r equen cy (t=1, n=100) node degree node f r equen cy (t=1, n=1000) node degree node f r equen cy (t=1, n=10000) node degree node f r equen cy (t=10, n=100) node degree node f r equen cy (t=10, n=1000) node degree node f r equen cy (t=10, n=10000) node degree node f r equen cy (t=50, n=100) node degree node f r equen cy (t=50, n=1000) node degree node f r equen cy (t=50, n=10000) Figure 2: Histograms of the node degree distribution for several place graphs with a varying number of roots t and nodes n are shown. A dashed vertical line marks the average node degree for each configuration. The average degree across all configurations is relatively constant, with a value of approximately . In other words, node nesting is not performed independently as it is analogously the case for theER model, where edges between nodes are created independently. However, an exception is noted for c , = 1 . This is not surprising because our algorithm always creates roots first, and consequently,half of the places are already root nodes, more or less "forcing" the remaining nodes to be nested underone of these roots. The first chosen ones in the early phase quickly turn the remaining roots to orphans,thus, becoming increasingly less likely to be selected. Many of them have a node degree of zero (i.e., nochildren), which explains the left-shift of the average degree compared to the other configurations. Now, we analyze the node distribution by taking the node’s port count into consideration. RecallingAlgorithm 1, we have chosen a uniform distribution for control selection, ensuring a highly diverse placegraph w.r.t. to a node’s control. Of course, one can choose a different distribution and assign to eachcontrol a different probability of occurrence. In any case, the control selection process is independent oftheir respective labels and arity. This kind of analysis we conduct shortly is especially essential, as itimpacts the execution of the link generation model (refer to Sec. 3.2 and Sec. 4.2). The interconnectionbetween nodes is only viable if their port count is not zero.Therefore, we ask the following question: How high is the probability that k nodes with positive arityare in some generated F P over the signature Σ with n nodes, when the fraction of controls with positivearity in Σ is p ∈ [0 , ? Claim 1.
A concrete place graph F P over Σ is randomly generated with n nodes (precluding roots andsites). Let us define p , the probability of controls with ar ( C i ) ≥ , and q = 1 − p for controls with ar ( C i ) = 0 , where C ∈ Σ . This separates C , regardless of its labels, into two groups. We then havefor (cid:126)v = { v i | ar ( ctrl ( v i )) ≥ } that p = | (cid:126)v | n . Denote by X the stochastic variable for the number ofnodes with positive arity. Then X obeys a binomial distribution X ∼ B n,p ( k ) with probability function (cid:0) nk (cid:1) p k (1 − p ) n − k . This means that the expected number of nodes having positive arity is np with meanvariance np (1 − p ) . To prove our claim, we compare the theoretical quantiles of the binomial distribution against ourexperimental data. Therefore, we vary i) the number of nodes, and, ii) the fraction of controls with apositive arity from a set of controls. We fix t = 1 (number of roots) and vary the number of nodes n = { , , } and the fraction p = { . , . , . , . } of controls assigned a positive arity from a11 able 2: Experimental values in comparison with the statistical measures of the binomial distribution. The correspondingtheoretical statistical measures are within parenthesis next to the computed ones. The expected value E [ X ] is np , themean variance Var[ X ] = np (1 − p ) . Probability | V F | E[ X ] Sd[ X ] Var[ X ] Skewness Kurtosis p = 0 . n = 10 n = 100 n = 1000 p = 0 . n = 10 n = 100 n = 1000 p = 0 . n = 10 n = 100 n = 1000 p = 0 . n = 10 n = 100 n = 1000 c p i ,n j ∈ p × n , we performed r = 10000 independent runsfor generating a sufficiently large sample population, which we averaged at the end. The results aresummarized in Tab. 2; the density distribution of the experimental data and the theoretical binomialdistribution are visualized in Fig. 3 for all parameter configurations c p i ,n j . Table 3: The table shows the parameter estimation by MLE and their goodness-of-fit by AIC. The binomial, Poisson, andgeometric discrete probability distributions were tested. The estimated parameter ˆ θ for each distribution is shown withits standard error SE and the corresponding result of the negative log-likelihood function L (ˆ θ ) . The statistical measureAIC (with k = 1 ) for the corresponding L (ˆ θ ) is shown. For the Poisson distribution we use the estimate µ = np i . Thetwo estimates p = 0 . , p = 0 . for the geometric distribution could not be computed by fitdistr and were computedmanually. Model Model Parameters Estimation ˆ θ SE L (ˆ θ ) AICBinomial Distribution p = 0 . , n = 1000 p = 0 . , n = 1000 p = 0 . , n = 1000 p = 0 . , n = 1000 µ = 100 µ = 250 µ = 500 µ = 800 p = 0 . p = 0 . p = 0 . p = 0 . binomial , Poisson and geometric distribution, gives us the best fit for ourexperimental data for each configuration c p i ,n j . To conduct the test, we use the R package fitdistr [55].We wish to briefly explain the procedure here to avoid common misconception. The fit of a distribution isperformed using maximum likelihood estimation (MLE). For an univariate parametric probability densityfunction f ( x i | θ ) , the aim is to find the best estimate for unknown θ . The best estimate ˆ θ is the valuewhich maximizes the likelihood function L ( θ ) = (cid:81) ni =1 f ( x i | θ ) = f ( x | θ ) · f ( x | θ ) · · · f ( x n | θ ) . To find the Remark: The employed method does not tell us how well it fits our data, instead it is used to compare the best fitamong a set of distribution models (see also [56, p. 62]). .00.20.40.6−5.0 −2.5 0.0 2.5 5.0 k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.1, n=10) k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.1, n=100) k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.1, n=1000) (a) Barplots of both density distributions for p = 0 . and each n i . k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.25, n=10) k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.25, n=100) k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.25, n=1000) (b) Barplots of both density distributions for p = 0 . and each n i . k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.5, n=10) k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.5, n=100) k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.5, n=1000) (c) Barplots of both density distributions for p = 0 . and each n i . k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.8, n=10) k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.8, n=100) k nodes with ar ( ctrl ( v i )) >0 p r obab ili t y (p=0.8, n=1000) (d) Barplots of both density distributions for p = 0 . and each n i . Figure 3: Barplots of the theoretical (blue) and experimental (orange) distribution for each parameter configuration c p i ,n j . ˆ θ = arg min θ − ln L ( θ ) = argmin θ − (cid:80) ni =1 ln f ( x i | θ ) . We judge the model’s goodness-of-fit by means of the Akaike informationcriteria (AIC) for selecting a model candidate from our set of models which is computed as the maximumof L ( θ ) : k + ln ( L ( θ )) − where k is the number of estimable parameters (cf. [56, p. 61]). The lowestvalue indicates the best model among the candidate models being used for evaluation. For reasons ofclarity concerning the results, the AIC is computed only for c p i ,n , n = 1000 from the same experimentaldata set as shown in Tab. 2. The results are presented in Tab. 3. Based on the AIC, we can opt for thebinomial distribution among our three candidate distributions as it best fits the data. The larger p i is,the higher the difference of the AIC between the binomial distribution and each of the other two modelsbecomes. This concludes the place graph analyses and leaves us with the link graph analyses. In this section, the following statements about the link graph generation algorithm refer exclusivelyto Algorithm 2. Therefore, we wish to study some properties of link graphs now.
Lemma 1.
The proportion of linked nodes to non-linked nodes of a link graph (with n places in total,where m nodes of n have a positive arity) is p mn ∝ n − p mn with p ∈ [0 , being the fraction of nodes being selected for the pairwise linking among the nodes assigneda positive arity. It is easy to verify that Lemma 1 is true with regards to Algorithm 2.Now, we determine the total number of linked nodes the algorithm creates. If p = 1 , it is easy to see,that at least two nodes must exist to create a pairwise connection, both having some control C i with ar ( C i ) ≥ . We can conclude from Algorithm 2 (refer to Line 2) that the number of pairwise links L among nodes { v i } i ∈{ ,...,m } of a link graph F L is: L = (cid:36) pm (cid:37) . (1)To ensure pairwise linkage ( L > ), the lower bound for the parameter p is p ≥ m with m ≥ . Proposition 1.
Let X be the discrete stochastic variable describing the selection of a node for linkageand f : i → N a mapping assigning every node index the number of ports of the corresponding node.We consider m nodes subject to the condition f ( i ) ≥ , v i ∈ V F , i ∈ { , . . . , n } . Then the probability pr k = P rob ( X = k ) for a node v k to be selected for linkage is m . This means that P rob ( X ≥
1) = 1 . Regarding Algorithm 2, already connected nodes are removed from the set of available nodes, effec-tively decrementing m by after every iteration. However, every node has the same probability of beingselected for linking, which leaves the selection process independent. It is guaranteed that at least onenode pair is found for linking when the lower bound is respected. The following analysis refers to the algorithm explained in Sec. 3.2.2 and investigates the question ofwhether there is any correlation between the node’s ports and the assortativity of nodes. Assortativityis a key measure for investigating the structure of a network [57]. Link graphs provide similar semanticscompared to networks because their hyperedges allow the connection of multiple nodes to one edge.Therefore, the assortativity (also termed degree correlation) among all nodes is a measure indicating howthe linkage behavior depends on the node’s port count, and thus, the control’s arity (cf. [37, 57, 58]).For such interpretation of the behavior of the link graph generation model presented in Sec. 3.2.2, we usean alternative measure from [58] to inspect the node’s assortativity of a link graph, instead of using the degree correlation function or the degree correlation coefficient [59] (for a detailed explanation of thesetwo measures see [37, 59]). The reason is that the degree correlation coefficient may misestimate theassortativity in large networks [57]. 14he alternative metric of assortativity of a network topology is rather seen as a relative concept byThedchanamoorthy et al. [58], which we wish to adopt here. We agree that it provides a more relevantperspective on the node assortativity distribution as it is often not meaningful considering networkseither completely as assortative or disassortative [58]. We study the link graph’s topology by classifyingthe assortativity of a link graph on the node level instead on the graph level because individual nodescan exhibit assortative and disassortative tendencies [58]. The indicator of the node’s disassortativity(i.e., being non-assortative) for a link graph F L reads: δ v = 1 d v (cid:88) d i ∈ neighbors L ( v ) | d i − d v | (2)which is called the average neighbor difference (cf. [58, p. 2452]), where d v = | link F ( ports ( v )) | with ports ( v ) = { ( v, i ) | i ∈ ar ( ctrl F ( v )) } and neighbors L ( v ) = link − F ( link F ( ports ( v ))) − ports ( v ) for a linkgraph F L (refer to Def. 3). However, we omit the associated port of a node in each tuple ∈ neighbors L for Eq. (2); for example we write neighbors L ( v ) = { v i , . . . , v i + n } for { ( v i , , ( v i , , . . . , ( v i + n , } . Itmeasures the number of differences concerning the degree of some node between the node’s neighbors interms of the link graph. Therefore, we take into account the number of actually connected ports insteadof only using the arity of the node’s control.As an example, consider Fig. 4 which shows a link graph with four nodes and two outer names. Node v has 3 ports which are connected to the edges e , e and the outer name y , thus d v = 3 . Furtherit is linked to all remaining nodes, namely to v by edge e , also to v via edge e and outer name y ,and lastly to v by y , thus neighbors L ( v ) = { v , v , v } . The neighbors themselves have the degrees d v = 1 , d v = 3 , d v = 1 , hence, δ v = ( | − | + | − | + | − | ) / . . v v v v y y e e Figure 4: An arbitrary link graph with four nodes and two outer names. The average neighbor difference is a quantitywhich reflects the disassortativity of a node. For the given link graph, the average difference for the highlighted node v is δ v = 1 . . Then, the values are scaled by dividing each δ v by S = (cid:80) δ v so that the sum of the scaled values ˆ δ v is S (cid:48) = 1 . A scaling factor λ = S (cid:48) + rN = rN is introduced such that (cid:80) ( λ − ˆ δ v ) = N λ − S (cid:48) = r (see[58, p. 2453]), where N is the number of nodes and r the correlation coefficient (see [60]) to match thenetwork’s assortativity. Finally, the assortativity of a node is calculated as α v = λ − ˆ δ v . (3)By definition, all assortative nodes yield α v ≥ . We wish to give some explanatory remarks on theinterpretation of Eq. (3) for the analysis we shortly conduct. We consider nodes with an assortativitywithin the interval of the deviation +3 σ α ( − σ α ) as slightly more assortative (slightly more disassorta-tive) than the distribution’s average µ α in the link graph. As apparent from the above discussion, themetric explains the relative assortativity on the node level instead of making assumptions on the higher network level . The measure is defined for undirected networks which bigraphs are: the links of the linkgraph make no distinction between indegree and outdegree, and self-loops are not permitted.For the analysis we randomly generate two link graphs, one being assortative and one being disas-sortative (refer to the algorithm in Sec. 3.2.2), each with N = 1000 nodes and 40 controls with random The node degree definition refers exclusively to link graphs here but is the same concept as introduced in Sec. 4.1.1 forplace graphs. With − ≤ r ≤ , where r = 1 indicates perfect assortativity and r = − indicates perfect disassortativity. ll ll l l ll l lllll lll ll ll l ll l lll ll l ll lll ll ll ll ll l lll ll ll lll l l llll lll ll ll l ll ll lll lll l l l ll l l ll l lllll ll ll ll ll ll lll l lll l lll ll ll ll l llll ll ll l l ll l lll l ll l ll lll ll lll l ll l ll ll lll lll ll lll l l l lll ll l ll lll llll ll l ll l ll l ll l ll lll ll l ll ll lll l llll l lll lll lll ll l ll lll l lll llll l l ll l ll ll l lll lll lll l lll l lll ll l lll ll ll llll lll lll ll ll l l llll lll ll ll l ll ll lllll ll l l lll l l l lll l ll l llll l lll ll llll l llll l lllll lll l lll ll l l lll ll ll ll l lll ll l lll l ll ll lll ll l ll ll ll ll lll l ll ll ll ll l lll ll ll ll llll l lll lll l ll l llll l ll ll lll ll ll ll ll l lll ll ll ll l lll l ll llll l ll ll l lll l ll llll lll lll ll lll ll l ll ll lll l ll lll l l llll ll ll ll ll l llll ll l lll lll ll l l ll ll l ll ll lll ll ll lll l lll lll lll lll ll ll ll ll l ll ll l l ll l l ll l ll ll ll lll l ll l ll lll ll ll ll l llll l lll l l l ll ll l ll ll ll ll ll l llll l l l ll ll lll ll l llll l llll l l lll l lll l ll ll lll l ll l ll l ll l ll lllll lll llllll l lll l lll ll l ll l ll l l lll ll l l llll l lll lll l lll l l lllll l l llllll l ll ll l ll ll ll ll lll ll l ll llll lllll ll lll l l llll ll llll l ll lll ll ll lll ll lll ll ll l ll llll ll ll ll l lllll lll ll ll ll ll l ll ll ll lll ll lll l lllll ll l llll l ll l l ll ll l ll lll ll l lll ll ll lll l ll ll ll ll ll lll ll ll ll llll ll lll ll ll ll ll l lllll l ll l l −0.003−0.002−0.0010.0000.0010.002 0 10 20 30 40 port count node a ss o r t a t i v i t y a v Arity
Link graph with assortative mixing (a) Node assortativity for a link graph with assortativemixing. ll ll l ll ll ll ll lll ll l l lll ll ll ll l ll ll ll ll lll ll ll l lll l l ll llll ll ll ll l ll ll ll ll ll ll l l ll lll lll lll ll ll ll ll l lll ll ll lll ll l ll ll ll ll ll ll lll ll lll l ll ll llll ll ll ll lll ll ll l ll l ll l lll ll ll l ll ll ll ll l ll llll l lll lll l lll ll l l ll l llll lll ll ll ll ll l ll ll llll l l ll ll lll lll ll lll lll lll l l l ll l ll ll ll lll llll ll l llll l l lll l llll ll ll l ll l l lllll l ll ll l lll ll ll l lll ll l ll ll ll ll ll l ll ll llll ll l ll ll ll l l lll ll l ll ll ll l ll ll ll l ll ll lll ll ll ll llll l ll lll ll ll llll l l ll lll l ll ll lll l lll l llll lll l ll l ll lll ll llll lllll l l lll l l lll llll l ll l ll l lll l ll l ll llll l ll lll l ll l ll ll llll l ll l lll ll lll l l ll ll l ll ll l lll l lll ll l l ll lll l ll ll lll lll lll l l lll l l llll ll ll lll l ll lll l ll ll ll ll l l l l lll lll ll lll llll l l llll ll l ll lll ll l ll lll llll ll ll l lll l ll lll l lll ll ll llll l lll lll lll lll l ll ll ll l ll lll ll ll ll l ll l ll lll lll ll l ll l l lll l l llll llll ll l l l lll ll l lll ll lll l l lll lll ll l lll l ll ll ll ll llll lll lll l l ll l ll ll ll ll ll l lll l ll lll l lll ll l ll l ll ll l ll llll l l lll l lll ll lll ll l lll ll lll ll l ll ll llll ll ll ll ll ll l lll ll ll l ll ll ll ll l lll ll ll ll l l lll lll ll llll l ll ll ll ll ll ll l ll lll ll ll ll lll ll l ll ll ll ll ll l llll l ll l l lll lll ll l ll lll ll l ll l ll lll l l ll l lll l ll lll l ll l l −0.002−0.0010.000 0 10 20 30 40 port count node a ss o r t a t i v i t y a v Arity
Link graph with disassortative mixing (b) Node assortativity for a link graph with disassorta-tive mixing.
Figure 5: Node assortativity distribution of two link graphs ( N = 1000 ) generated under different configurations, namely,with an assortative (left) and disassortative (right) tendency. Each point represents a distinctive node. The x-axis denotesthe number of ports of a node already occupied by a link, and the color denotes the associated arity of the node. They-axis reflects the node assortativity of each node according to Eq. (3). arity ar ∈ { , . . . , } so that the node’s arities obey a uniform distribution. Then, a node with arity ar i has the probability | ar | to be selected. The results are depicted in Fig. 5 and explained below. Thevalues on the y-axis denote the assortativity of a node (Eq. (3)), the x-axis shows the actual port countof the node, and the color legend reflects the arity of a node.The initial "arity sequence" derived by this selection process determines the frequency distributionof a node’s ports available for linking. The algorithm can nearly connect every free port of a node withanother node’s port. This is apparent from the color legend of Fig. 5, which denotes the control’s arityassociated with a node. In other words, a counterexample of the current situation would be if a pointcolored light-blue (i.e., ar > ) would be visible far left in the distribution (i.e., having high arity butlow port count). The current case, however, illustrates that the link graph is nearly fully connected (noport is left unused). Assortative Mixing.
The randomly generated assortative link graph is depicted in Fig. 5a, with mean µ α = 0 . and standard deviation σ α = 0 . . We have chosen λ = N = 0 . assuming the linkgraph is perfectly assortative r = 1 . The majority of nodes . are slightly more assortative, and . of the nodes being slightly more disassortative. The rest of the nodes ( . ) show a strong non-assortative linkage behavior. To a great extent, Fig. 5a displays an equal node assortativity distributionwith respect to the port count, meaning that hubs are generated, including nodes with similar arities.A notable exception is that the left-most nodes exhibit both an assortative and disassortative mixingpattern. Moreover, the linear estimate exhibits an increasing trend leading to the remark that nodeswith higher arity appear to be more assortative than the rest. Thus, it appears that high arity nodestend to connect more quickly to other high arity nodes. Disassortative Mixing.
The node assortativity distribution of the disassortative link graph is depicted inFig. 5b. We chose λ = 0 assuming the link graph is perfectly disassortative r = − , yielding α v = − ˆ δ v , µ α = − . and σ α = 0 . . Considering all disassortative nodes α v < , the fraction of nodesbeing slightly more assortative is . , and slightly more disassortative is . . The rest of the nodes( . ) show a strong non-assortative linkage behavior. Moreover, the distribution in Fig. 5b exhibitsvery similar characteristics to the node assortativity distribution of the ER network ( N = 1000 nodes, M = 3000 links) in [58, Fig. 3]. Especially for the peripheral nodes, the distribution displays a moredisassortative mixing compared to the core nodes around a port count of . It can be observed fromFig. 5b that small arity nodes tend to connect more often to nodes with high arity nodes than vice versa.They have a much lower node assortativity value than the peripheral nodes on the right-hand side of thedistribution. Because nodes with a small arity are removed early by the algorithm and high arity nodesremain available for linkage and share them between similar nodes at the end.16 . Discussion and Conclusion We have presented a bigraph generation algorithm with a preferential attachment feature for placegraphs and two linking pattern variants regarding link graphs and analyzed some of their properties.A main result of the work is that bigraphs can be efficiently generated from different standpoints: Ourmethods enable us to start either with the place graph or the link graph. The computational independenceof both algorithms has the effect that one place graph can be created, and, based upon this, multipledifferent link graphs can be derived easily. Moreover, the individual algorithms allow the variation ofseveral parameters, for example, the number of roots and nodes, choosing between a minimal or maximumnumber of connections between nodes; features that can provide good quality of results in a short periodof time.The results of the place graph generation algorithm in Sec. 4.1 can be summarized as follows. Thedegree distribution follows a power-law distribution, and the distribution of nodes with positive arityobeys a binomial distribution. We verified that the preferential attachment feature is implemented byour algorithm, which is indicated by the long tail regarding the node degree distribution (see Fig. 2).It can be seen that nodes with many children accumulate more children faster (i.e., more children arenested under these). In other words, there are only a few branches in the place graph that are very deep,yet much more flat hierarchies exist.Concerning the link graph generation algorithm, we presented two variants for the linkage behaviorbetween nodes of a link graph. The first being termed
Minimal Pairwise Port Linkage . The algorithmyields a link graph where only two nodes at once are linked together. Regarding the second algorithmcalled
Maximal Degree Correlation , the link graph exhibits a fully connected pattern, where multipleconnections between the same nodes are possible. It can be seen that the second approach is suitablefor producing more complex link graphs. Owed to the fixed control’s arity, the link graph generationalgorithm does not achieve a distinctive assortative/non-assortative mixing pattern. This is due to thefact that nodes with a relatively small arity are removed early in the process and are thus not availableanymore for linkage. However, we can observe when choosing the disassortative mixing variant thatnodes with a high arity tend to connect to nodes with a low arity and small-arity nodes to high-aritynodes.Unlike other random network algorithms, a link graph cannot create infinite links between nodessince the arity of a control represents a constraint that must be taken into account. Thus, the nodedegree is prescribed because of the fixed arity of a control. This naturally leads to a more relative nodeassortativity regardless of the original mixing pattern (assortative or disassortative) of the generated linkgraph.
Our bigraph generation algorithm gives us the possibility to create synthetic graphs that are a usefulresource within many domains of application. With this in mind, we can better address scalabilityproblems of bigraphs by analyzing models focusing on properties such as the number and size of reactionrules and agents, also further by adding runtime variations to it for more sophisticated analyses.For instance, fog-based applications based on bigraphical meta-models [61] can utilize synthetic mod-els for benchmarking simulation methods. With regards to a location model such in [61], we can testand simulate nearest neighbor or navigation queries within such a model. These queries are expressedas reaction rules. One can test whether certain reaction rules impact the number of synthesized statesof a transition system of a BRS when these rules are applied (i.e., the bigraph matching and rewritingproblem). An example of such a reaction rule might aim to locate specific nodes of a particular locationwhere the location bigraph is randomly synthesized with our proposed method.Moreover, we can more easily measure the performance of new model checking (see [62]) algorithmsby generating many bigraph models under different constraints very conveniently. When performingmodel checking, it would be helpful to build such models under different constraints for analyzing theeffects of the state space explosion problem. One can investigate whether specific reaction rules affectstate space explosion depending on the size or structure of an agent, for instance.
We plan to include the notion of place and link sortings in our algorithms. Controls are equippedwith so-called sorts to ensure certain properties of a bigraph (e.g., a node assigned the control
Room cannot be nested under a node with the control
User ) (see [13]). To implement this idea, our algorithms17ust be adapted in such a way that place and link sorts are preserved. This feature may be necessaryfor creating more sophisticated bigraphs with regards to real-world ubiquitous computing applicationswhere the semantic of structural containment plays a role.We have chosen a purely algorithmic approach in our work. However, it is interesting to observe thatwe can make use of the bigraphical framework itself when creating random bigraphs. Such a pragmaticapproach from a modeling standpoint was shown by Fernández et al. [41], where port graphs are used.Nodes of port graphs "have explicit connection points called ports", similar to bigraphs, "to which edgesare attached" [41, p. 3]. Different rewrite rules define the attachment behavior. We may adopt this inthe future to evaluate its versatility.
Acknowledgment
Funded by the German Research Foundation (DFG, Deutsche Forschungsgemeinschaft) as part ofGermany’s Excellence Strategy – EXC 2050/1 – Project ID 390696704 – Cluster of Excellence "Centrefor Tactile Internet with Human-in-the-Loop" (CeTI) of Technische Universität Dresden.
ReferencesReferences [1] S. W. Loke, Representing and reasoning with the internet of things: A modular rule-based model for ensembles ofcontext-aware smart things 3 (8) 1–17. doi:10.4108/eai.9-3-2016.151113 .URL http://dro.deakin.edu.au/view/DU:30096156 [2] Agent-Based Models of Geographical Systems.URL [3] A. Namatame, S.-H. Chen, Agent-Based Modeling and Network Dynamics, Oxford University Press.[4] J. B. Cho, Y. S. Mansury, X. Ye, Churning, power laws, and inequality in a spatial agent-based model of socialnetworks 57 (2) 275–307. doi:10.1007/s00168-016-0791-4 .URL https://doi.org/10.1007/s00168-016-0791-4 [5] M. Müller, An ABM of Heterogeneous Consumers and Demand, in: M. Müller (Ed.), An Agent-Based Model ofHeterogeneous Demand, Springer Fachmedien Wiesbaden, pp. 75–104. doi:10.1007/978-3-658-18722-4_4 .URL https://doi.org/10.1007/978-3-658-18722-4_4 [6] A. Crooks, A. Heppenstall, Introduction to Agent-Based Modelling, in: Agent-Based Models of Geographical Systems,pp. 85–105. doi:10.1007/978-90-481-8927-4_5 .[7] T. Metz, Agent-based modeling (abm), in: S. Jäckle (Ed.), Neue Trends in den Sozialwissenschaften: InnovativeTechniken für qualitative und quantitative Forschung, Springer Fachmedien Wiesbaden, pp. 11–50. doi:10.1007/978-3-658-17189-6_2 .URL https://doi.org/10.1007/978-3-658-17189-6_2 [8] J. Baeten, D. Van Beek, J. Rooda, Process algebra, in: P. A. Fishwick (Ed.), Handbook of Dynamic System Modeling,Chapman&Hall/CRC Computer and Information Science Series, Chapman & Hall/CRC Press, pp. 19.1–19.19.[9] R. Milner, J. Parrow, D. Walker, A calculus of mobile processes, I 100 (1) 1–40. doi:10.1016/0890-5401(92)90008-4 .URL [10] Handbook of Process Algebra, Elsevier. doi:10.1016/B978-0-444-82830-9.X5017-6 .URL https://linkinghub.elsevier.com/retrieve/pii/B9780444828309X50176 [11] R. Milner, Axioms for bigraphical structure.[12] O. H. Jensen, R. Milner, Bigraphs and mobile processes (revised).URL [13] R. Milner, The Space and Motion of Communicating Agents, 1st Edition, Cambridge University Press.[14] R. Milner, Bigraphical Reactive Systems, in: CONCUR 2001 — Concurrency Theory, Lecture Notes in ComputerScience, Springer, Berlin, Heidelberg, pp. 16–35. doi:10.1007/3-540-44685-0_2 .URL https://link.springer.com/chapter/10.1007/3-540-44685-0_2 [15] J. Krivine, R. Milner, A. Troina, Stochastic Bigraphs 218 73–96. doi:10.1016/j.entcs.2008.10.006 .URL [16] R. Milner, A Calculus of Communicating Systems, Springer-Verlag.[17] R. Milner, Communicating and Mobile Systems: The pi -Calculus, Cambridge University Press.[18] L. Cardelli, A. D. Gordon, Mobile ambients 240 (1) 177–213. doi:10.1016/S0304-3975(99)00231-5 .URL [19] R. Milner, Bigraphs for Petri Nets, in: J. Desel, W. Reisig, G. Rozenberg (Eds.), Lectures on Concurrency andPetri Nets: Advances in Petri Nets, Lecture Notes in Computer Science, Springer Berlin Heidelberg, pp. 686–701. doi:10.1007/978-3-540-27755-2_19 .URL https://doi.org/10.1007/978-3-540-27755-2_19 [20] J. J. Leifer, R. Milner, Transition Systems, Link Graphs and Petri Nets 16 (6) 989–1047. doi:10.1017/S0960129506005664 .URL http://dx.doi.org/10.1017/S0960129506005664 [21] B. C. Pierce, A. Romanel, D. Wagner, The Spider Calculus – Computing in Active Graphs.[22] E. Elsborg, T. T. Hildebrandt, D. Sangiorgi, Type Systems for Bigraphs, in: C. Kaklamanis, F. Nielson (Eds.),Trustworthy Global Computing, Lecture Notes in Computer Science, Springer Berlin Heidelberg, pp. 126–140.
23] T. C. Damgaard, J. Krivine, A Generic Language for Biological Systems based on Bigraphs.[24] G. Bacci, D. Grohmann, M. Miculan, Bigraphical models for protein and membrane interactions 11 3–18. arXiv:0911.4510 , doi:10.4204/EPTCS.11.1 .URL http://arxiv.org/abs/0911.4510 [25] L. Birkedal, S. Debois, E. Elsborg, T. Hildebrandt, H. Niss, Bigraphical Models of Context-Aware Systems, in:Foundations of Software Science and Computation Structures, Lecture Notes in Computer Science, Springer, Berlin,Heidelberg, pp. 187–201. doi:10.1007/11690634_13 .URL https://link.springer.com/chapter/10.1007/11690634_13 [26] M. Sevegnani, BIGRAPHS WITH SHARING AND APPLICATIONS IN WIRELESS NETWORKS.URL [27] M. Sevegnani, M. Calder, Bigraphs with sharing 577 43–73. doi:10.1016/j.tcs.2015.02.011 .URL [28] S. Benford, M. Calder, T. Rodden, M. Sevegnani, On Lions, Impala, and Bigraphs: Modelling Interactions in Physi-cal/Virtual Spaces 23 (2) 9:1–9:56. doi:10.1145/2882784 .URL http://doi.acm.org/10.1145/2882784 [29] S. Benford, D. Rowland, M. Flintham, A. Drozd, R. Hull, J. Reid, J. Morrison, K. Facer, Life on the edge: Supportingcollaboration in location-based experiences, ACM, pp. 721–730. doi:10.1145/1054972.1055072 .URL http://dl.acm.org/citation.cfm?id=1054972.1055072 [30] S. Nobari, X. Lu, P. Karras, S. Bressan, Fast Random Graph Generation, in: Proceedings of the 14th InternationalConference on Extending Database Technology, EDBT/ICDT ’11, ACM, pp. 331–342. doi:10.1145/1951365.1951406 .URL http://doi.acm.org/10.1145/1951365.1951406 [31] Y. Chi, R. R. Muntz, S. Nijssen, J. N. Kok, Frequent Subtree Mining – An Overview 66 (1-2) 161–198.URL https://content.iospress.com/articles/fundamenta-informaticae/fi66-1-2-08 [32] H. Bunke, P. Dickinson, M. Kraetzl, M. Neuhaus, M. Stettler, Matching of Hypergraphs — Algorithms, Applications,and Experiments, in: H. Bunke, A. Kandel, M. Last (Eds.), Applied Pattern Recognition, Studies in ComputationalIntelligence, Springer Berlin Heidelberg, pp. 131–154. doi:10.1007/978-3-540-76831-9_6 .URL https://doi.org/10.1007/978-3-540-76831-9_6 [33] P. Foggia, C. Sansone, M. Vento, A database of graphs for isomorphism and sub-graph isomorphism benchmarking,in: CoRR, pp. 176–187.[34] M. De Santo, P. Foggia, C. Sansone, M. Vento, A Large Database of Graphs and Its Use for Benchmarking GraphIsomorphism Algorithms 24 (8) 1067–1079. doi:10.1016/S0167-8655(02)00253-2 .URL http://dx.doi.org/10.1016/S0167-8655(02)00253-2 [35] P. Erdös, A. Rényi, On random graphs i 6 290–297.[36] D. J. Watts, S. H. Strogatz, Collective dynamics of ‘small-world’ networks 393 (6684) 440–442. doi:10.1038/30918 .URL [37] A.-L. Barabási, M. Pósfai, Network Science, Cambridge University Press.[38] D. B. Wilson, Generating random spanning trees more quickly than the cover time, in: Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing - STOC ’96, ACM Press, pp. 296–303. doi:10.1145/237814.237880 .URL http://portal.acm.org/citation.cfm?doid=237814.237880 [39] X. Zhang, C. Moore, M. E. J. Newman, Random graph models for dynamic networks 90 (10) 200. doi:10.1140/epjb/e2017-80122-8 .URL https://doi.org/10.1140/epjb/e2017-80122-8 [40] B. Fosdick, D. Larremore, J. Nishimura, J. Ugander, Configuring Random Graph Models with Fixed Degree Sequences60 (2) 315–355. doi:10.1137/16M1087175 .URL https://epubs.siam.org/doi/abs/10.1137/16M1087175 [41] M. Fernández, H. Kirchner, B. Pinaud, J. Vallet, Labelled Graph Rewriting Meets Social Networks, in: D. Lucanu(Ed.), Rewriting Logic and Its Applications, Lecture Notes in Computer Science, Springer International Publishing,pp. 1–25.[42] R. Milner, Axioms for bigraphical structure 15 (6) 1005–1032. doi:10.1017/S0960129505004809 .URL [43] R. Milner, Pure bigraphs: Structure and dynamics 204 (1) 60–122. doi:10.1016/j.ic.2005.07.003 .URL [44] O. H. Jensen, R. Milner, Bigraphs and Transitions, in: Proceedings of the 30th ACM SIGPLAN-SIGACT Symposiumon Principles of Programming Languages, POPL ’03, ACM, pp. 38–49. doi:10.1145/604131.604135 .URL http://doi.acm.org/10.1145/604131.604135 [45] R. Milner, Bigraphical reactive systems: Basic theory.[46] A.-L. Barabási, R. Albert, Emergence of Scaling in Random Networks 286 (5439) 509–512. arXiv:10521342 , doi:10.1126/science.286.5439.509 .URL https://science.sciencemag.org/content/286/5439/509 [47] M. Newman, The Structure and Function of Complex Networks 147 40–45. doi:10.1016/S0010-4655(02)00201-1 .[48] A. Clauset, C. R. Shalizi, M. E. J. Newman, Power-Law Distributions in Empirical Data 51 (4) 661–703. doi:10.1137/070710111 .URL https://epubs.siam.org/doi/abs/10.1137/070710111 [49] D. Eppstein, J. Wang, A steady state model for graph power laws arXiv:cs/0204001 .URL http://arxiv.org/abs/cs/0204001 [50] C. R. Palmer, J. Gregory Steffan, Generating network topologies that obey power laws, Vol. 1, pp. 434–438 vol.1. doi:10.1109/GLOCOM.2000.892042 .[51] J. O’Madadhain, D. Fisher, S. White, P. Smyth, Y.-b. Boey, Analysis and Visualization of Network Data Using JUNG.[52] D. Michail, J. Kinable, B. Naveh, J. V. Sichi, JGraphT – A Java library for graph data structures and algorithms arXiv: .URL http://arxiv.org/abs/1904.08355 [53] R. Xulvi-Brunet, I. M. Sokolov, Reshuffling scale-free networks: From random to assortative 70 (6) 066102. doi:10.1103/PhysRevE.70.066102 .URL https://link.aps.org/doi/10.1103/PhysRevE.70.066102 [54] R. Xulvi-Brunet, I. M. Sokolov, Changing Correlations in Networks: Assortativity and Dissortativity 36.[55] M. L. Delignette-Muller, C. Dutang, Fitdistrplus: An R Package for Fitting Distributions 64 (1) 1–34. doi:10.18637/jss.v064.i04 .URL [56] K. P. Burnham, D. R. Anderson, Model Selection and Multimodel Inference: A Practical Information-TheoreticApproach, 2nd Edition, Springer-Verlag.URL [57] D. N. Fisher, M. J. Silk, D. W. Franks, The Perceived Assortativity of Social Networks: Methodological Problemsand Solutions, in: R. Missaoui, T. Abdessalem, M. Latapy (Eds.), Trends in Social Network Analysis: InformationPropagation, User Behavior Modeling, Forecasting, and Vulnerability Assessment, Lecture Notes in Social Networks,Springer International Publishing, pp. 1–19. doi:10.1007/978-3-319-53420-6_1 .URL https://doi.org/10.1007/978-3-319-53420-6_1 [58] G. Thedchanamoorthy, M. Piraveenan, D. Kasthuriratna, U. Senanayake, Node Assortativity in Complex Networks:An Alternative Approach 29 2449–2461. doi:10.1016/j.procs.2014.05.229 .URL [59] M. E. J. Newman, Assortative mixing in networks 89 (20) 208701. arXiv:12443515 , doi:10.1103/PhysRevLett.89.208701 .[60] M. E. J. Newman, Mixing patterns in networks 67 (2) 026126. arXiv:cond-mat/0209450 , doi:10.1103/PhysRevE.67.026126 .URL http://arxiv.org/abs/cond-mat/0209450 [61] D. Grzelak, U. Aßmann, Bigraphical meta-modeling of fog computing-based systems, in: A. Deutsch, N. Fatès (Eds.),Summer Solstice 2019: Conference on Discrete Models of Complex Systems, 2019, pp. 19–21.[62] Handbook of Model Checking.URL