# A Graph-Transformational Approach to Swarm Computation

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Graph Transformation

#### 2.1. Directed Edge-Labeled Graphs

#### 2.2. Graph Transformation Rules

- (1)
- Choose a match $g\left(L\right)$ of L in G subject to the identification condition, which requires that those items that are identified via g belong to the gluing graph K, i.e., ${g}_{E}\left(e\right)={g}_{E}\left({e}^{\prime}\right)$ for $e,{e}^{\prime}\in {E}_{L}$ implies $e={e}^{\prime}$ or $e,{e}^{\prime}\in {E}_{K}$. (Without the identification condition, the Parallelization Theorem below would not hold.)
- (2)
- Remove the edges of ${g}_{E}\left({E}_{L}\right)-{g}_{E}\left({E}_{K}\right)$ and call the resulting graph Z.
- (3)
- Add the right-hand side R to Z by gluing Z with R in $g\left(K\right)$ yielding the graph H with ${V}_{H}={V}_{Z}\uplus ({V}_{R}-{V}_{K})$ and ${E}_{H}={E}_{Z}\uplus ({E}_{R}-{E}_{K})$. The edges of Z keep their labels, sources, and targets so that $Z\subseteq H.$ The edges of R keep their labels; they also keep their sources and targets provided that those belong to ${V}_{R}-{V}_{K}.$ Otherwise, they are redirected to the image of their original source or target, i.e., ${s}_{H}\left(e\right)=g\left({s}_{R}\left(e\right)\right)$ for $e\in {E}_{R}-{E}_{K}$ with ${s}_{R}\left(e\right)\in {V}_{K},$ and ${t}_{H}\left(e\right)=g\left({t}_{R}\left(e\right)\right)$ for $e\in {E}_{R}-{E}_{K}$ with ${t}_{R}\left(e\right)\in {V}_{K}.$

#### 2.3. Parallel Rule Application

**Fact**

**1**

- Let $G\underset{p}{\u27f9}X$ be a direct derivation w.r.t. $g:L\to G$. Then there are direct derivations $G\underset{{r}_{i}}{\u27f9}{H}_{i}$ with the matching morphisms ${g}_{i}=g|{L}_{i}$ that are pairwise parallel independent where the morphism $g|{L}^{\prime}:{L}^{\prime}\to G$ denotes the restriction of g to ${L}^{\prime}$. for $g:L\to G$ and ${L}^{\prime}\subseteq L$.
- Let $G\underset{{r}_{i}}{\u27f9}{H}_{i}$ for $i=1,\dots ,n$ be direct derivations w.r.t. ${g}_{i}:{L}_{i}\to G$. Let each two of them be parallel independent. Then there is a direct derivation $G\underset{p}{\u27f9}X$ w.r.t. $g:L\to G$ defined by $g|{L}_{i}={g}_{i}$ for $i=1,\dots ,n$.

#### 2.4. Control Conditions and Graph Class Expressions

#### 2.5. Graph Transformation Units

## 3. Graph-Transformational Swarms

**Definition**

**1**

**Definition**

**2**

- Graphs and rules are mathematically well-understood and quite intuitive syntactic means to model algorithmic processes. Moreover, the additional use of control and cooperation conditions as well as graph-class expressions allows very flexible forms of regulation.
- Derivations as sequences of rule applications provide an operational semantics that is precise and reflects the computational intentions in a proper way.
- Based on the formally defined derivation steps and the lengths of derivations, the approach provides a proof-by-induction principle that allows one to prove properties of swarm computations like termination, correctness, efficiency, etc.
- In the area of graph transformation, one encounters several tools for the simulation, model checking and SAT-solving of graph transformation systems that can be adapted to graph-transformational swarms.
- And maybe most important, the Parallelization Theorem establishes a systematic and reliable handling of massive parallelism. In several swarm approaches, the simultaneous actions of swarm members are organized in a very simplistic way by avoiding any kind of conflict or are required, but not always guaranteed (cf. e.g., [18]). In contrast to that, the simultaneous actions of members of graph-transformational swarms is assured whenever the member rules are applicable and pairwise independent. Both can be checked locally and much more efficiently than the applicability of the corresponding parallel rule.

## 4. A Simple Ant Colony

## 5. Cellular Automata

**Example**

**1.**

**Theorem**

**1.**

## 6. Particle Swarm Optimization

- ${v}_{i(t+1)}={v}_{it}+{U}_{t}(0,{\varphi}_{1})\otimes (p{b}_{it}-{p}_{it})+{U}_{t}(0,{\varphi}_{2})\otimes (b{n}_{it}-{p}_{it}),$
- ${p}_{i(t+1)}={p}_{it}+{v}_{i(t+1)},$
- $p{b}_{i(t+1)}={p}_{i(t+1)}$ if $f\left({p}_{i(t+1)}\right)>f\left(p{b}_{it}\right)$ and $p{b}_{i(t+1)}=p{b}_{it}$ otherwise.

**Theorem**

**2.**

- In the framework of graph transformation, the usual underlying structures are finite graphs or infinite discrete graph in exceptional cases. But all the concepts employed in the paper work for arbitrary sets of nodes and edges including the set of real numbers, the Euclidean space of some dimension or other continuous domains. Nevertheless, we have decided to consider a discrete version of particle swarm optimization as we want to demonstrate the potential of the usual graph transformation rather than to introduce a new kind of graph transformation. Nevertheless, the latter may be an interesting topic of future research.
- Moreover, implementations of particle swarm models are always discretized. As long as the abstract models are continuous, testing is the only way to validate an implementation against the model. A discrete abstract model between a continuous model and the implementation may allow to prove general properties and to improve the trustworthiness of system development in this way.
- In the literature, one encounters applications of particle swarm optimization to solve discrete problems (see, e.g., [30,31,32,33]). In such a case, a discrete abstract model seems to be appropriate. The particles correspond to problem solutions and the velocity and position updates, as introduced above, are redefined to be applicable to the discrete space. The graph-transformational model $swarm\left(PS\right)$ above can also be adapted in the same way to solve discrete problems. In this case $space(N,f)$ and the operators in the rule $newvel$ should be adapted to the corresponding domains. Despite those changes all other components can be used unchanged

## 7. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Bonabeau, E.; Dorigo, M.; Theraulaz, G. Swarm Intelligence: From Natural to Artificial Systems; Oxford University Press: Oxford, UK, 1999. [Google Scholar]
- Kennedy, J.; Eberhart, R.C. Swarm Intelligence; Evolutionary Computation Series; Morgan Kaufman: San Francisco, CA, USA, 2001. [Google Scholar]
- Olariu, S.; Zomaya, A.Y. Handbook of Bioinspired Algorithms and Applications; Chapman & Hall/CRC: London, UK, 2005. [Google Scholar]
- Engelbrecht, A.P. Fundamentals of Computational Swarm Intelligence; John Wiley & Sons: Pasadena, CA, USA, 2006. [Google Scholar]
- Blum, C.; Merkle, D. (Eds.) Swarm Intelligence: Introduction and Applications; Natural Computing Series; Springer: New York, NY, USA, 2008. [Google Scholar]
- Chakraborty, A.; Kar, A.K. Swarm Intelligence: A Review of Algorithms. In Nature-Inspired Computing and Optimization: Theory and Applications; Patnaik, S., Yang, X.S., Nakamatsu, K., Eds.; Modeling and Optimization in Science and Technologies; Springer International Publishing: Cham, Switzerland, 2017; pp. 475–494. [Google Scholar]
- Rosenberg, L.; Willcox, G. Artificial Swarm Intelligence. In Intelligent Systems and Applications, Proceedings of the 2019 Intelligent Systems Conference (IntelliSys 2019), London, UK, 5–6 September 2019; Bi, Y., Bhatia, R., Kapoor, S., Eds.; Advances in Intelligent Systems and Computing; Springer: Berlin/Heidelberg, Germany, 2019; Volume 1037, pp. 1054–1070. [Google Scholar]
- Bansal, J.C.; Singh, P.K.; Pal, N.R. (Eds.) Evolutionary and Swarm Intelligence Algorithms; Studies in Computational Intelligence; Springer International Publishing: Cham, Switzerland, 2019. [Google Scholar]
- Osaba, E.; Yang, X.S. (Eds.) Applied Optimization and Swarm Intelligence; Springer Tracts in Nature-Inspired Computing; Springer: Singapore, 2021. [Google Scholar]
- Kreowski, H.J.; Kuske, S. Graph Transformation Units with Interleaving Semantics. Formal Asp. Comput.
**1999**, 11, 690–723. [Google Scholar] [CrossRef] - Kuske, S.; Luderer, M. Autonomous Units for Solving the Capacitated Vehicle Routing Problem Based on Ant Colony Optimization. Electron. Commun. EASST
**2010**, 26, 23. [Google Scholar] - Kuske, S.; Luderer, M.; Tönnies, H. Autonomous Units for Solving the Traveling Salesperson Problem Based on Ant Colony Optimization. In Dynamics in Logistics; Kreowski, H.J., Scholz-Reiter, B., Thoben, K.D., Eds.; Springer: Berlin/Heidelberg, Germany, 2011; pp. 289–298. [Google Scholar]
- Abdenebaoui, L.; Kreowski, H.J.; Kuske, S. Graph-transformational swarms. In Proceedings of the Fifth Workshop on Non-Classical Models for Automata and Applications (NCMA 2013), Umeå, Sweden, 13–14 August 2013; Bensch, S., Drewes, F., Freund, R., Otto, F., Eds.; Österreichische Computer Gesellschaft: Vienna, Austria, 2013; pp. 35–50. [Google Scholar]
- Abdenebaoui, L. Graph-Transfromational Swarms: A Graph-Transformational Approach to Swarm Computation. Ph.D. Thesis, University of Bremen, Bremen, Germany, 2016. [Google Scholar]
- Rozenberg, G. (Ed.) Handbook of Graph Grammars and Computing by Graph Transformation; Volume 1: Foundations; World Scientific: Singapore, 1997. [Google Scholar]
- Ehrig, H.; Ehrig, K.; Prange, U.; Taentzer, G. Fundamentals of Algebraic Graph Transformation (Monographs in Theoretical Computer Science. An EATCS Series); Springer: Berlin/Heidelberg, Germany, 2006. [Google Scholar]
- Kreowski, H.J.; Klempien-Hinrichs, R.; Kuske, S. Some Essentials of Graph Transformation. In Recent Advances in Formal Languages and Applications; Esik, Z., Martin-Vide, C., Mitrana, V., Eds.; Studies in Computational Intelligence; Springer: Berlin/Heidelberg, Germany, 2006; Volume 25, pp. 229–254. [Google Scholar]
- Pedemonte, M.; Nesmachnow, S.; Cancela, H. A survey on parallel ant colony optimization. Appl. Soft Comput.
**2011**, 11, 5181–5197. [Google Scholar] [CrossRef] - Geiß, R.; Kroll, M. GrGen.NET: A Fast, Expressive, and General Purpose Graph Rewrite Tool. In Proceedings of the 3rd International Symposium on Applications of Graph Transformation with Industrial Relevance (AGTIVE ’07); Schürr, A., Nagl, M., Zündorf, A., Eds.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2018; Volume 5088, pp. 568–569. [Google Scholar]
- Von Neumann, J. The general and logical theory of automata. In Cerebral Mechanisms in Behavior-The Hixon Symposium, 1948; Wiley: Pasadena, CA, USA, 1951; pp. 1–41. [Google Scholar]
- Von Neumann, J. Theory of Self-Reproducing Automata; Burks, A.W., Ed.; University of Illinois Press: Urbana, IL, USA, 1966. [Google Scholar]
- Codd, E.F. Cellular Automata; Academic Press: New York, NY, USA, 1968. [Google Scholar]
- Wolfram, S. A New Kind of Science; Wolfram Media Inc.: Champaign, IL, USA, 2002. [Google Scholar]
- Kari, J. Theory of Cellular Automata: A Survey. Theor. Comput. Sci.
**2005**, 334, 3–33. [Google Scholar] [CrossRef][Green Version] - Peitgen, H.O.; Jürgens, H.; Saupe, D. Chaos and Fractals: New Frontiers of Science; Springer: Berlin/Heidelberg, Germany, 1992; Chapter 5; pp. 229–296. [Google Scholar]
- Kennedy, J.; Eberhart, R. Particle Swarm Optimization. In Proceedings of the IEEE International Conference on Neural Networks (ICNN’95), Perth, WA, USA, 27 November–1 December 1995; Volume 4, pp. 1942–1948. [Google Scholar]
- Poli, R.; Kennedy, J.; Blackwell, T. Particle swarm optimization—An Overview. Swarm Intell.
**2007**, 1, 33–57. [Google Scholar] [CrossRef] - Poli, R. Analysis of the publications on the applications of particle swarm optimisation. J. Artif. Evol. Appl.
**2008**, 2008, 685175. [Google Scholar] [CrossRef] - Sibalija, T.V. Particle Swarm Optimisation in Designing Parameters of Manufacturing Processes: A Review (2008–2018). Appl. Soft Comput.
**2019**, 84, 105743. [Google Scholar] [CrossRef] - Houssein, E.H.; Gad, A.G.; Hussain, K.; Suganthan, P.N. Major Advances in Particle Swarm Optimization: Theory, Analysis, and Application. Swarm Evol. Comput.
**2021**, 63, 100868. [Google Scholar] [CrossRef] - Clerc, M. Discrete Particle Swarm Optimization, illustrated by the Traveling Salesman Problem. In New Optimization Techniques in Engineering; Studies in Fuzziness and Soft Computing; Springer: Berlin/Heidelberg, Germany, 2004; Volume 141, pp. 219–239. [Google Scholar]
- Moraglio, A.; Togelius, J. Geometric particle swarm optimization for the sudoku puzzle. In GECCO; Lipson, H., Ed.; ACM: New York, NY, USA, 2007; pp. 118–125. [Google Scholar]
- Farmahini-Farahani, A.; Vakili, S.; Fakhraie, S.M.; Safari, S.; Lucas, C. Parallel Scalable Hardware Implementation of Asynchronous Discrete Particle Swarm Optimization. Eng. Appl. Artif. Intell.
**2010**, 23, 177–187. [Google Scholar] [CrossRef] - Abdenebaoui, L.; Kreowski, H.J.; Kuske, S. Graph-Transformational Swarms with Stationary Members. In Proceedings of the Technological Innovation for Cloud-Based Engineering Systems: 6th IFIP WG 5.5/SOCOLNET Doctoral Conference on Computing, Electrical and Industrial Systems (DoCEIS 2015), Costa de Caparica, Portugal, 13–15 April 2015; Camarinha-Matos, M.L., Baldissera, A.T., Di Orio, G., Marques, F., Eds.; Springer International Publishing: Cham, Switzerland, 2015; pp. 137–144. [Google Scholar]
- Abdenebaoui, L.; Kreowski, H.J. Modeling of Decentralized Processes in Dynamic Logistic Networks by Means of Graph-Transformational Swarms. Logist. Res.
**2016**, 9, 1–13. [Google Scholar] [CrossRef] - Abdenebaoui, L.; Kreowski, H.J. Decentralized Routing of Automated Guided Vehicles by Means of Graph-Transformational Swarms. In Dynamics in Logistics, Proceedings of the 5th International Conference LDIC, Bremen, Germany, 2016; Freitag, M., Kotzab, H., Pannek, J., Eds.; Lecture Notes in Logistics; Springer: Berlin/Heidelberg, Germany, 2016. [Google Scholar]

## Short Biography of Authors

**Larbi Abdenebaoui**is a postdoc researcher in the field of interactive systems with the focus on digital media processing and graph-based computation. Having a background in machine learning, he is exploring the combination of state-of-the-art methods of deep learning with swarm-inspired paradigms in order to perform content-based analysis, modelling and retrieval of image collections. The gained knowledge from this research is shared with students in lectures at the University of Oldenburg.

**Hans-Jörg Kreowski**is a retired professor for Theoretical Computer Science at the University of Bremen. His main research interests are in the areas of graph transformation and rule-based systems including Petri nets, DNA computing and reaction systems. His research concerns the theoretical foundation, the use of the approaches as modeling and analysis frameworks and the application in Software Engineering, Computer Graphics, Artificial Intelligence, and Logistics. Moreover, he spends some of his efforts to topics in Computer and Society. Readers are refered to www.informatik.uni-bremen.de/theorie (accessed on 06 April 2021) for more information.

**Sabine Kuske**is a lecturer and research assistant at the university of Bremen in Germany. She is interested in rule based graph transformation, Petri nets and graph algorithms. Readers can contact her at [email protected] or visit www.informatik.uni-bremen.de/kuske (accessed on 06 April 2021).

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Abdenebaoui, L.; Kreowski, H.-J.; Kuske, S. A Graph-Transformational Approach to Swarm Computation. *Entropy* **2021**, *23*, 453.
https://doi.org/10.3390/e23040453

**AMA Style**

Abdenebaoui L, Kreowski H-J, Kuske S. A Graph-Transformational Approach to Swarm Computation. *Entropy*. 2021; 23(4):453.
https://doi.org/10.3390/e23040453

**Chicago/Turabian Style**

Abdenebaoui, Larbi, Hans-Jörg Kreowski, and Sabine Kuske. 2021. "A Graph-Transformational Approach to Swarm Computation" *Entropy* 23, no. 4: 453.
https://doi.org/10.3390/e23040453