An Introduction to Signed Petri Net

. In this paper, the notion of a signed graph and Petri net (PN) is combined to introduce a new concept of Signed Petri net (SiPN). The balancedness in the signed graph, formulated by Harary and Cartwright, can be used to study and analyze social networks. This notion of balancedness is extended to Petri net via SiPN as such a concept has not been deﬁned for already existing Petri nets. A balanced SiPN has been deﬁned and its characterization is given. An illustrative example is provided which utilizes the newly introduced concept of assignment of sign to places of SiPN to determine whether an online transaction initiated by a bank customer is denied or approved by the bank. Lastly, applications of SiPN in the message transmission system and production unit are discussed. These concepts clearly demonstrate the advantages of the proposed approach of SiPN.


Introduction
A Petri net was first introduced in Carl Adam Petri's [1] dissertation submitted in 1962.However, it is difficult to model complex processes using the classical definition of Petri net given by him, and thus, many extensions and restrictions of Petri net have been proposed [2][3][4][5][6][7][8][9].In the field of graph theory, Harary [10] introduced a signed graph and gave the characterization for a balanced signed graph.
is concept of the signed graph has been used in [11] for predicting positive and negative links in online social networks and for determining the stability of the social model using the degree of balanceness [12].Although various applications of PN have been given in the literature [4,13,14], the notion of balanceness of the modeled system does not exist in Petri net theory.e authors introduced a modified PN model with negative tokens for automated reasoning and to represent time constraint in batch activity, respectively [15,16].
ese developments in the field of graph theory and Petri net theory in the form of balancedness and negative tokens, respectively, motivated us to bridge the gap between Petri net and signed graph and introduce a new concept of Signed Petri net (SiPN).A SiPN is nothing but a bipartite signed digraph with dynamics associated with it in the form of tokens in places.ere are various concepts in the signed graph that help in modeling of social interactions and checking the stability of the system so modeled.However, due to nondynamic nature of the signed graph, the system needs to be modeled using multiple signed graphs.Hence, we were interested in introducing an extension of Petri net called as Signed Petri net which can represent all possible interactions between a group of individuals via single SiPN as opposed to multiple signed graphs.e SiPN can be used to represent various configurations of a signed graph by a change in the marking of SiPN due to firing of transitions.
is shows the advantage of the proposed research over a signed graph.We cannot differentiate among the tokens existing in a place of a PN.In order to overcome this limitation, two types of tokens (positive and negative) exist in a SiPN making it easier to represent the resources/processes common to a place via different types of tokens.e positive and negative arcs which exist in a SiPN make it possible to extend balancedness notion of a signed graph to a Petri net which can be used to model social networks and study them using a single SiPN rather than multiple signed graph.us, a SiPN is an extension of PN which adopts the characteristics of both signed graph and PN and has advantages over the both.Furthermore, an illustrative example is given to demonstrate the advantages of the proposed research in Section 2.2 which uses the newly introduced concept of assigning sign to places of a SiPN.e rest of the paper is structured as follows.In Section 2, SiPN has been introduced along with its related terminology.A method to assign a sign to vertices of a SiPN has been given along with an illustrative example to show the advantage of using a SiPN.In Section 3, balanced SiPN is defined and its characterization is given.In Section 4, we apply the proposed SiPN to model a message transmission system and a production unit.

Signed Graph.
A signed graph is an ordered pair S � (G, σ), where G � (V, E) is called the underlying graph of S and σ: E ⟶ +, − { } is a function which assigns either a positive or negative sign to each edge.
A signed graph depicts situations or structures in which both, a relation and its opposite, may occur, e.g., "like" and "dislike" in social relations, a simple reply of either "Yes" or "No" in communication.A signed graph has been used extensively to represent the interpersonal relationship among the group of individuals, study international relations between nations, and study the stability of traffic control problem at an intersection.

Petri Net.
e definition of Petri net which we shall adopt in the paper is the one given by Jensen [2].
A Petri net (PN) is a 5-tuple N � (P, T, I − , I + , μ 0 ), where (1) P is the finite, nonempty set of places (2) T is the finite, nonempty set of transitions (3) P ∩ T � ∅ (4) I − , I + : (P × T) ⟶ N, where N is the set of nonnegative integers, are called negative and positive incidence functions, respectively (5) ∀p ∈ P and ∃ t ∈ T such that I − (p, t) ≠ 0 or I + (p, t) ≠ 0, and ∀t ∈ T, ∃ p ∈ P such that I − (p, t) ≠ 0 or I + (p, t) ≠ 0 (6) μ 0 : P ⟶ N is the initial marking which gives the initial distribution of tokens in places An arbitrary distribution of tokens in the places is called a marking given by μ: P ⟶ N.
(1) I − (p, t) represents the number of arcs from place p to transition t and I + (p, t) represents the number of arcs from transition t to place p. e number of arcs from a place p (or transition t) to a transition t (or place p) can also be considered as the weight of the arc (p, t) (or (t, p)).
A Petri net without its initial marking is called a Petri net structure.
A Petri net with all arcs of weight one is called an Ordinary Petri net.
A pair of place p and transition t is called a self-loop if p is both an input and an output place of t.A Petri net without any self-loop is called a Pure Petri net.

Signed Petri Net
Let N � (P, T, I − , I + , μ 0 ) be a PN. e arc set of the Petri net N is defined as A signed Petri net (SiPN) is defined as a 3-tuple , where E is the arc set of N ′ .An edge is called a positive or negative edge, respectively, according to the sign + or − assigned to it using the function σ.
(3) μ 0 � (μ + 0 , μ − 0 ) is the initial marking of SiPN, where (a) μ + 0 : P ⟶ N gives the initial distribution of positive tokens in the places, called positive marking of SiPN.(b) μ − 0 : P ⟶ N gives the initial distribution of negative tokens in the places, called negative marking of SiPN.us, a marking in SiPN can be represented as a vector In the graphical representation of a SiPN, positive and negative arcs are represented by solid and dotted lines, respectively.A positive token is represented by a filled circle and a negative token by an open circle, as shown in Figure 1.
A SiPN is said to be negative if all of its arcs are negative in sign.
e underlying graph of a SiPN N * , denoted by N ] , is the graph where directions of the arcs of N * have been removed.
A Complete SiPN is a SiPN where every place-transition pair is connected by a bidirectional arc (either positive or negative).
A path (cycle) in a SiPN N * is the path (cycle) in its underlying graph N ] .
e sign of a path in a SiPN N * is defined as the product of sign of arcs on the path.
e sign of a cycle in a SiPN N * is defined as the product of sign of arcs on the cycle.If this product is positive, the cycle is called a positive cycle, and a negative cycle if the product is negative.

2
Journal of Mathematics

Execution Rules for Signed Petri
Net.We know that the execution of a Petri net depends on the distribution of tokens in its places.e execution takes place by firing of a transition.A transition may fire if it is enabled.
An enabled transition t may fire at μ After firing, it yields a new marking given by the rule: ( We say that μ 1 is reachable from μ and write μ ⟶ t μ 1 .We restrict the movement of positive (negative) tokens to positive (negative) arcs only.
Remark 1.A source transition is always enabled while a sink transition is never enabled in a SiPN.

Assignment of Sign to Vertices of a SiPN.
e vertices in a SiPN can also be assigned sign.A transition is an assigned sign by the product of sign of arcs (incoming and outgoing) incident on it.In Figure 1, all transitions are positive in sign.
Places can be the assigned sign in one of the two ways: (1) With Respect to Arcs.Sign is assigned to a place by taking the product of incident arcs (incoming and outgoing) on that place.In Figure 1, places p 1 and p 3 are positive in the sign, while p 2 and p 4 are negative in the sign.( 2) With Respect to Marking.Sign is assigned to a place by taking the product of sign of tokens in that place in the given marking.A place without token is considered to be positive.In Figure 1, places Figure 1: SiPN with initial marking ((1, 0, 0, 0), (0, 1, 0, 0)).
p 1 , p 3 , and p 4 are positive in sign, while p 2 is negatively signed with respect to μ 0 .
Remark 2. Assigning sign to places with respect to arcs does not utilize the most important characteristic of PN which is its dynamic behaviour.Hence, assigning a sign to places with respect to marking has been used throughout the paper.An example is given which utilizes the concept of the place sign to determine whether an online transaction initiated by a bank customer is approved or denied by the bank.
is transaction is based on the verification of one-time password (OTP) sent by the bank to the registered mobile number of the customer.
is situation is modeled by a SiPN, as shown in Figure 4.
When a customer enters an OTP, firing of transition t 1 takes place.e number of times that t 1 fires is equal to the number of digits in the OTP.On firing of t 1 , a positive token is generated in place p which represents the digit entered by the customer.is entered digit is then verified by comparing it with the corresponding digit of the OTP (sent by the bank), which exists in the bank system.If these two digits do not match, then the positive token is converted to a negative token, else it remains the same.On verification of the digit, firing of either t 2 or t 3 takes place depending on whether a positive or negative token is present in place p.After the firing of either t 2 or t 3 , the sign of place q is checked.If the sign of place q with respect to this marking is negative, then the transaction is denied by the bank.On the contrary, if it is positive, the next digit of the OTP is checked in a similar manner until all the digits are exhausted.us, we can conclude whether a transaction is denied or approved by the bank based on the sign of place q.If, at any marking, the sign of place q is negative, bank denies transaction to the customer.However, if, for all the markings with μ(q) ≠ 0, the sign of place q is positive, then the transaction is approved by the bank.

Reachability Tree of Signed Petri Net.
e reachability set R(N * , μ) of a SiPN N * is the set of all markings of N * reachable from μ.
A reachability tree represents the reachability set of a given SiPN.e reachability tree of the SiPN in Figure 1 is given in Figure 5.

Balanced Signed Petri Net
A SiPN N * is said to be balanced if all of its cycles are positive in the underlying graph N ] .A SiPN without cycles in its underlying graph N ] is balanced.

Theorem 1. A partition of the set of vertices V � (P ∪ T) in a
SiPN N * into two disjoint subsets V 1 and V 2 , one of which may be empty such that all the arcs between vertices of the same subset are positive and all arcs between vertices of different subsets are negative, is possible in the following cases: (1) All the arcs in N * are positive (2) All the arcs in N * are negative (3) Any place in N * has either positive or negative incoming as well as outgoing arcs (4) Any transition in N * has either positive or negative incoming as well as outgoing arcs Proof (1) In this case, we take V 1 � V(� P ∪ T) and V 2 � ∅.
(2) In this case, we begin with a place p i in V and put it in subset V 1 .Since only negative arcs exist among all the vertices, therefore, all the transitions connected to this place p i must lie in the subset V 2 .Now, the places connected to these transitions must lie in the subset V 1 .Continuing in this manner, until all the vertices are put in either V 1 or in V 2 , we obtain V 1 � P and V 2 � T. (3) By WLOG, we begin with a place with positive incoming and outgoing arcs and put it in the subset V 1 .
Since the transitions which are connected to this place are connected by positive arcs only, put these transitions in V 1 as well.Now, the transitions can have both types (positive and negative) of arcs incident on them.e places connected to these transitions via positive arcs lie in subset V 1 and those connected through negative arcs lie in subset V 2 .Again these places are connected by only one kind of arcs so places in subset V 1 will have connections to transitions via positive arcs only and we put those transitions in subset V 1 .e places placed in subset   Journal of Mathematics V 2 have negative arcs through which they are connected to other transitions, which then will also lie in subset V 1 .We continue this process unless all vertices (places and transitions) are exhausted.(4) In this case, we can proceed as in case 3.By WLOG, we begin with a transition having positive incoming and outgoing arcs.Proof.If N * is negative, then such a bipartite partition exists has been proved in eorem 1 (2).
Conversely, suppose such a bipartite partition of V exists.Because of this partition, no arc exists within the set.Hence, no positive arcs exist resulting in an all negative SiPN.
Note: eorems 2-4 and Corollary 2 have been formulated using the results given by Harary for a signed graph [10].□ Theorem 2. A complete SiPN N * is balanced if its vertex set V � (P ∪ T) can be partitioned into two disjoint subsets V 1 and V 2 , one of which may be empty such that all arcs between vertices of the same subset are positive and all arcs between vertices of different subsets are negative.
Proof.Suppose such a partition of the vertex set V � P ∪ T exists in a complete SiPN.We need to show that all the cycles in N ] are positive.Because of this partition, any cycle in N ] always has even number of negative arcs if it exists; thus, the product of sign of arcs in the cycle is positive, making the SiPN balanced.
We prove the converse part by contradiction.Suppose a complete SiPN N * is balanced and such a partition does not exist.Let |V| > 3 (for |V| � 2, 3 result is obvious).By WLOG, we assume that there exists at least one negative arc within a subset (say V 1 ) while trying to partition V. Let this negative arc exist between vertices v i and v j (place-transition pair).Since |V| > 3, there exist at least two more vertices v k and v l in V (place-transition pair).Since N * is complete, v k is connected to v j and v l is connected to v i .Now, three cases arise: in this case, the arcs between v i and v l and between v j and v k are positive.e cycle of length four, so formed by vertices v i , v j , v k , and v l , is negative.
(2) If v k , v l ∈ V 2 , in this case, the arcs between v i and v l and between v j and v k are negative.e cycle of length four, so formed by v i , v j , v k , and v l , is negative.
here, the arc between v i and v l is negative while that between v j and v k is positive.Also, the arc between v k and v l is negative.e cycle of length four, so formed by v i , v j , v k , and v l , is negative.
If the partition does not exist on account of a positive arc across the subsets, then the result can be proved on similar lines.
In any of the cases, the negative cycle so formed will contradict the balanceness of N * .us, our assumption is wrong, and there always exists such a partition.
Journal of Mathematics arc-disjoint cycles.Each of these cycles consists of a subpath of A and a subpath of B. e cycle must be positive in sign which implies these subpaths must be of the same sign.Joining these subpaths with common arcs, we removed earlier leads to paths A and B having the same sign.Conversely, we have all paths joining any two distinct vertices v 1 and v 2 in N * of same sign.Hence, all cycles containing v 1 and v 2 must be positive.Since, v 1 and v 2 are arbitrary, all cycles in N * are positive.us, N * is balanced.

□ Theorem 4.
A SiPN N * is balanced if its set of vertices V � (P ∪ T) can be partitioned into two disjoint subsets V 1 and v 2 ; one of which may be empty such that all the arcs between vertices of the same subset are positive and all arcs between vertices of different subsets are negative.
Proof.We are given a partition V 1 and v 2 of the set of vertices of N * .We can extend N * to a complete SiPN.Take a pair of nonconnected place and transition.If they lie in the same subset, join them with a positive bidirected arc, otherwise with a negative one.By eorem 2, the complete SiPN so obtained is balanced, and by its Corollary 2, given SiPN is balanced.
Conversely, let N * be balanced.Consider any nonadjacent pair (place-transition) of vertices v 1 and v 2 .By eorem 3, all the paths joining v 1 and v 2 have the same sign.Join v 1 and v 2 by a bidirected arc of the same sign as the sign of these paths.In this way, all the cycles thus introduced are positive, resulting in balanced SiPN.Once, we do this for all the nonadjacent vertices, we get a complete SiPN.Our result follows from eorem 2.

Message Transmission System.
When two parties need to communicate securely, i.e., they do not want a third party to listen in and they require a channel for secure communication.Secure communication is a way to transfer message from the source to the receiver so that it is not susceptible to eavesdropping or interception.We use the concept of SiPN which is introduced in this paper to model a message transmission system which is secure.
Consider a message which needs to be transferred from a source to a destination securely.In order to make the transmission secure, we divide our message into two parts, the first half of the message is represented by a positive token and the other half via a negative one.e places p 1 and p 6 are the source and the destination for the message, respectively.All other places are buffer for the message, which holds the message until it is ready to be transmitted, by firing of corresponding transitions.
e transitions are events which transfer the message from one place to another.Note that In a SiPN, positive tokens move on positive arcs and negative tokens on negative arcs only.erefore, we have a fixed path for the movement of both the tokens and no part of the message can move on the path of the other part of the message.Also, we restrict all transitions to have only arcs of one sign either positive or negative, i.e., for is restriction makes it impossible for any intermediate place/transition to have access to both parts of the message, thus avoiding leakage.
In Figure 6, a message is divided into two parts at place p 1 which is the source of the message.e positive token (which is the first half of the message) enables transition t 1 and the negative token (the other half of the message) enables transition t 2 .When the transitions t 1 and t 2 fire, the message transmission begins.To reach the destination p 6 , the positive token moves on path t 1 p 4 t 4 p 5 t 6 and the negative token on path t 2 p 2 t 3 p 3 t 5 .ese two parts of the message can then be combined to get the complete message at place p 6 .
In this way, the message is transmitted from the source to the destination securely.e division of message into two parts and transfer of these parts via different paths reduce the chances of leakage of the message.

Extension of the Message Transmission
System.In the extended model, places and transitions have usual meanings as in the model above, except for the transitions t 1 and t 8 , which represent a process of dividing the incoming part of the message into two parts.
In Figure 7, a message is divided into two parts at place p 1 which is the source of the message.e positive token (which is the first half of the message) enables transition t 8 and the negative token (the other half of the message) enables transition t 1 .When the transitions t 1 and t 8 fire, the parts of the message are further divided into two parts each.us, the original message is now divided into four parts.By WLOG, we assume that a positive token always represents the first half of the message or the first half of the part of the message.As the message transmission continues, the positive token (i.e., first half of the first part of the message) moves on the path p 8 t 9 p 9 t 10 and finally reaches the destination which is place p 10 .Similarly, negative token (second half of the first part of the message) moves on the path p 6 t 6 p 7 t 7 and reaches the destination.In a similar fashion, other half of the original message is further divided into two parts by transition t 1 and reaches the destination p 10 .
In this way, our message is moved by dividing it into four parts and transmitting these parts through different routes.
is makes it difficult for anyone to access the whole message simultaneously, thereby making it secure.e model can be modified to divide the message into more parts so as to increase the level of secureness by dividing the message further, at the transitions which follow the transition t 1 and t 8 .

Production
Unit.We consider a production unit which produces and packages a product.e product is produced by first creating its parts, which are six in number separately 6 Journal of Mathematics and then assembling them together to get the final product in the assembling unit.In Figure 8, parts of the product are produced at place p 1 .We assume that the parts which are heavier than a prescribed weight of W units are represented by a positive token and the remaining parts via a negative one. is is done so that the heavier parts move on the path p 1 t 2 p 3 t 4 p 4 , which is suitable for transporting heavy parts, rather than on the path p 1 t 1 p 2 t 3 p 4 through which lighter parts are transported.All the transitions in the SiPN represent an event of the transfer of token (part) from one place to another.e places p 2 and p 3 are the test units which check the working of a part.Whenever a part of a product comes, it is tested for the required characteristics (depending on the product), and based on it, the part is segregated after being classified as "Tested Okay" or "not."us, the transitions t 4 and t 7 can fire accordingly.If the part is working correctly, it passes the test and moves to the assembling unit via firing of transition t 3 or t 4 .On the contrary, if the part turns out to be defective, it is rejected and moved to place p 6 by firing of transitions t 6 or t 7 .Whenever a part moves to the assembling unit or it is rejected, production of such a part should start again.Hence, we add arcs (t 3 , p 1 ), (t 4 , p 1 ); (t 6 , p 1 ), (t 7 , p 1 ).
If none of the six parts are rejected, the final product is assembled at place p 4 .We represent this final product by a token whose sign is equal to the product of sign of all the tokens representing parts of the product (this sign is positive here).
is final product is then moved to place p 5 for packaging by firing of transition t 5 .It should be noted that the sign of arcs (p 4 , t 5 ) and (t 5 , p 5 ) is the same as the sign of token representing the final product.

Conclusion and Scope
e concept of signed Petri net has been introduced along with the characterization of a balanced SiPN.An example which utilizes the newly introduced concept of assignment of sign to places of a SiPN is given which demonstrates the advantages of using a SiPN.
e application of SiPN in the message transmission system and production unit is discussed.
e concepts of dynamical balancedness and domination have been developed by the authors, which we plan to introduce in our future work.ese concepts do not exist for previously existing PN models and show how the proposed extension of SiPN is advantageous.

□ 3 . 1 .( 1 )
Observation.In addition to the four cases mentioned in eorem 1, such a partition of vertices into two disjoint subsets in a pure SiPN N * is possible in the following two cases also: Any place in a pure SiPN N * has incoming and outgoing arcs of opposite signs (i.e., if incoming arcs are positive, then outgoing arcs are negative and vice versa) (2) Any transition in a pure SiPN N * has incoming and outgoing arcs of opposite signs Corollary 1.A SiPN N * is negative if such a partition of the set of vertices, and V is a bipartite partition.

□ Theorem 3 .
A SiPN N * is balanced if, for each pair of distinct vertices v 1 and v 2 , in the underlying graph N ] , all paths joining v 1 and v 2 have the same sign.

Packing
p

Figure 7 :
Figure 7: A message transmission system with the message divided into four parts.
Figure 6: A message transmission system with message divided into two parts.