USING HIGH LEVEL PETRI NETS TO MODEL THE INTER-SESSION NETWORK CODING

In this paper, we model an acyclic communication network as a net graph, and we use this net graph to define inter session-network coding as high level Petri graph. We then model inter-session network coding as a set of streaming high level Petri net graphs. Finally, we find a particular binding for the variables sets of these streaming high level Petri graphs in such a way the sink places in the net graph which models the acyclic communication network can be marked with the requested marking. AMS Subject Classification: 94A99


Introduction
The theory of network coding for a single multicast session (intra-session network coding) is well studied by Ahlswede et al. [1], Follow-up works include [2], which shows that linear network coding is sufficient for a single multicast session.An algebraic approaches to network coding have been introduced in [3]- [5].Several other related works of intra-session network coding can be found in [6]- [8].when we generalize the problem such that there are more than one session and receivers may demand different sets of information, finding the optimal network coding strategy is still an open question.The linear coding is shown to be insufficient for optimal coding in the multi-session case [9].In their paper [3] Koetter and Medard introduced an algebraic point view on network coding but the solvability decision problem is shown to involve Grobner basis computation, whose complexity may prohibit practical implementations for large problems.In this paper, we model an acyclic communication network as a net graph (NG), and we use this net graph to define inter session-network coding (INC) as high level Petri graph (HLPNG) [10], [11].We then model intersession network coding as a set of streaming high level Petri graphs (SHLPNG).We then find a particular binding for the variables sets of these streaming high level Petri graphs in such a way sink places in the net graph which models the acyclic communication network can be marked with the requested marking.Our work is based on high level Petri nets [11], which were chosen due to their well-accepted capability of expressing concurrency, non-determinism and reactive behavior, Furthermore, the wide range of simulation and analysis tools for Petri nets can be exploited for the evaluation of models and the verification of crucial system properties [12].The rest of this article is organized as follows, we will start with a notational description of the inter-session network coding problem and the high level Petri net.We then introduce an algorithm to construct the network graph (NG) for a high level Petri net from a communication network.In Section 3, we define inter-session network coding as high level Petri net graph.In Section 4, we model the inter-session network coding (INC) as a set of streaming high level Petri net graphs.In Section 5, we find a particular binding for the variables sets of these streaming high level Petri net graphs.

System Setting
We model the network by a directed acyclic graph G = (V, E) where V and E are the set of all nodes and links, respectively [13], links are denoted by round brackets (v 1 , v 2 ) ∈ E and assumed to be directed, the head and tail of an link e = (v ′ , v) ∈ E are denoted by v = head(e) and v ′ = tail(e) [3], for each node v ∈ V we define In(v) = {e ∈ E; head(e) = v}, Out(v) = {e ′ ∈ E; tail(e ′ ) = v},then the sets of source and sink nodes are define as follows:

Petri Nets
Petri nets are a graphical and mathematical modeling tool applicable to many systems, they are promising tools for describing and studying information processing systems [15].

Definition 1. [11]
A net graph is a structure N G = (P, T, F ) where: • P is a finite set of nodes, called Places.
• T is a finite set of nodes, called Transitions, disjoint from P .
• F ⊂ (P × T ) (T × P ) is a set of directed edges called arcs.
It is easy to verify that definition 1 is equivalent to definition 2.
Definition 2. A net graph is a structure N G = (P, T ; F in , F out ) where: • P is a finite set of nodes, called Places.
• T is a finite set of nodes, called Transitions, disjoint from P .
• F in ⊂ T × P is a set of of directed edges called input arcs.
• F out ⊂ P × T is a set of of directed edges called output arcs.
• V is an S-indexed set of variables, disjoint from O.
• H = (S H , O H ) is a many-sorted algebra for the signature Sig.
• T ype : P → S H is a function which assigns types to places.

• AN = (A, T C) is a pair of net annotations:
-A is a function that annotates each arc with a term that when evaluated (for any binding) results in a multiset over the associated place's type.
-TC is a function that annotates transitions with Boolean expressions.
• M 0 is the initial marking function which associates a multiset of tokens (of the correct type) with each place.

Modeling the Acyclic Communication Network
We will introduce an algorithm to model the communication network G = (V, E) as a net graph N G = (P, T ; F in , F out ).

Algorithm
Input : A directed acyclic graph G = (V, E), Set of sources S, Set of sinks T .
2. For (every node, in any upstream-to-downstream order [16]) -Create a set of new places {p v 1 , ......., p v m }. - 1 and there is a transition t e w j ∈ T where e w j ∈ In(head(e v i )) ) * If (there is a transition t e u k ∈ T where e u k ∈ In(v)) • Create a new arc in e v i = (t e u k , p v i ).
• F in ← F in ∪ {in e v i }.
• else -If (there is a transition t e w j ∈ T where e w j ∈ In(v)) 3. For (every place p ∈ P ) -Create a new arc in p = (t p , p).
-F in ← F in ∪ {in p }.

Figure 1
Output : N G = (P, T ; F in , F out ).
Example 5.If the input of the algorithm 2.3.1 is the network in Figure 1 then its output is the network graph in the Figure 2 We will introduce some important definitions in the net graph NG which models acyclic communication network, and define the streaming high level Petri net(SHLPN).
Definition 13.The requested marking in the sink place p R i is the symbol which is demanded by the sink node R i .

Modeling the Inter-Session Network Coding (INC) as a HLPNG
In this section we present a formal definition of inter-session network coding (INC) by using the definition of high level Petri net graph (HLPNG).Definition 14.An INC on the communication network G = (V, E) is a structure where: according to the Algorithm 2.3.1.
• H = ({F q , Boolean}, {L, true}) is a many-sorted algebra for the signature Sig, where: F q is a finite field of size q and the obvious correspondences are made :F H = F q , BOOL H = Boolean, L H = , (true BOOL ) H = true.
• T ype : P → {F q } is a function which assigns the type F q to all places.
• AN = (A, T C) is a pair of net annotations: -A : F → F q [V ]: A(t, p) = p i ∈P re(t) M (p i ).a i where a i ∈ V , M (p i ) = A(P re(p i ), p i ) and A(t ij , s ij ) = X i for all j where t ij is a virtual transition and X i is the symbol which is produced in the source node s i , A(p, t) = A(P re(p), p).
-T C : T → {true BOOL } is a function that annotates every transition with the Boolean constant true.
This definition can be seen to be one to one correspondence with a more simple definition given below.

Definition 15. An INC on the communication network
where: according to the Algorithm 2.3.1.
• V = {a 1 , ......, a n } is a finite set of variables A(P re(p i ), p i ) and A(t ij , s ij ) = X i for all j where t ij is a virtual transition and X i is the symbol which is produced in the source node s i , A(p, t) = A(P re(p), p).
This is because: • Every transition is annotated with the Boolean constant true.
• The type of each places is the same and given by F q hence there is no need typing places.

Modeling the Inter-Session Network Coding (INC) as a Set of Streaming High Level Petri Net Graphs
In this section we remodel the INC as a set of streaming high level Petri nets, by introduce couple of algorithms.The first algorithm transfers the net graph of the HLPNG (which models the INC), to a set of net graphs which satisfy the conditions of streaming high level Petri net graph.The second algorithm constructs the set of streaming high level Petri net graphs (which model the INC) from the output of the first algorithm.
For (every p i ∈ P ′ ) • repeat -For (every p ∈ P i , p is not signed) * If (there is a signed transition t ∈ P re(p)).
-For (every t ∈ T i , t is not signed) * P i ← P i P re(t).* F iout ← F iout (P re(t), t).* sign t.
• Until all p j and t i are signed. Output: Example 16.If the input of the algorithm 4.1 is the network graph in Figure 2 then it's output is the network graphs in the Figure 3.
are the cardinals of the sets P re(t), P ost(t), P re(p), P ost(p) respectively, in N G i where t ∈ T i , p ∈ P i .Definition 18.An arc f ′ ∈ F i in connects to the arc f ∈ F i in if and only if there is a transition t ∈ T i and a place p ∈ P i such that p ∈ P re(t), f ′ ∈ OA(t) and f ∈ IA(p).For every -A k (p, t) = A k (P re(p), p).
Output : There are two sets of equations which have to be satisfied by a binding for variables sets V 1 , V 2 , ......, V |P ′ | to solve the inter-session network coding [4]: • The first one is the equations which the sink places use them to obtain the requested marking, we note that for each p ∈ P ′ there is a unique Petri net H i such that p ∈ P i , if the requested marking in p is M 0 (p l ), f = (t, p) is the input arc for p in H i , A(f ) = |S| k=1 a j k X k where a i k = j a i kj then : • the second one comes from the fact that multi-copies of the same arc in NG maybe appear in more than one net graph from {N G 1 , ..
avoid division by zero when some variable take the value zero we write a l i a k j = a l j a k i for i, j = 1, ...., |S|; i = j.
we note that: • Each equation in the first set involves mutually exclusive set of variables.
• Each equation in the second set has a maximum degree of two.
So we can use these properties to simplifying the equations.
After we find a binding for the variables sets V 1 , V 2 , ......, V |P ′ | which satisfies the previous equations, we use this binding to evaluate the expression for each input arc in N G as follows: Let f ∈ F in and f 1 , f 2 , ....., f |D| are the corresponding arcs in the streaming Petri nets H and f ∈ IA(p) we define sub vector B f f ′ collecting the multiplying factors on corresponding arcs of f ′ that connect to corresponding arcs of f .The vectors C f , B f for each f ∈ F in can be computed by the following algorithm.
• For (every t ∈ T , in any upstream-to-downstream order) - ) are the corresponding arcs to (t ij , s ij ) in the streaming high level Petri nets.We know that A(t ij , s ij ) = X i so C (t ij ,s ij ) = (0 i 10 |S|−i ) and B (t ij ,s ij ) (k) = a k ij .-Else * if (C f , B f have been calculated for all f ∈ IA(p); ∀p ∈ P re(t) ) • For (every f ′ ∈ OA(t) ) 1. calculate the matrix E f f ′ = (B f f ′ ) T .C f for all f ∈ IA(p); p ∈ P re(t) and define E f ′ := f E f f ′ so each row in E f ′ corresponds to A i (f ′′ ) for some i ∈ {1, ....., |p ′ |} where f ′′ is a corresponding arc of f .
2. Let C f ′ be any non-zero row (say,i) of E f ′ or the zero row if E f ′ is a zero matrix.
3. Put B f ′ (j) to equal the result of dived the j th row of E f ′ by C f ′ .
Output: The vectors C f , B f for each f ∈ F in .The set of vectors {C f : f ∈ F in } determines a binding for the variable set V , which allows us to mark the sink places with the requested marking and subsequently solve the inter-session network coding problem.

Definition 6 .Remark 7 .
A place p is a source place if and only if |IA(P re(p)| = 0.In the output of the algorithm 2.3.1 we denote the set of source places which represent the source node s i , byP s i = {s ij : j = 1, ......., c i }where c i is the number of places in NG which represent the source node s i .

Remark 19 .
In the output of the algorithm 4.1, for each k; 1 ≤ k ≤ |p ′ | we denote the set of source places in N G k which represent the source node s i in G) by P k s i = {s k ij : j = 1, ....., m k } where m k is the number of places in N G k which represent the source node s i .

5 .
Solving the Inter-Session Network Coding Problem by Finding a Particular Binding for the Variables Sets V 1 , V 2 , ......, V |P ′ | [14] , s 2 , .....s w } and R = {R 1 , R 2 , .....R N }.Without loss of generality we assume that all source nodes produce exactly one unit of data per unit time, and assume that all sink nodes demand exactly one unit of data per unit time, so if a source node s produces more than one unit of data per unit time, we add virtual source nodes that produce exactly one unit of data per unit time, and if a sink node t demands more than one unit of data per unit time, we add virtual sink nodes that demand exactly one unit of data per unit time.Each session is denoted by a tuple (s i , t i ) where s i and t i denote the source and the sink node of the session i[14].