International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 184 - Number 11 |
Year of Publication: 2022 |
Authors: Ioannis S. Xezonakis, Danai Xezonaki |
10.5120/ijca2022922089 |
Ioannis S. Xezonakis, Danai Xezonaki . An Algorithm for Testing a Signed Graph for Balance. International Journal of Computer Applications. 184, 11 ( May 2022), 41-44. DOI=10.5120/ijca2022922089
A signed graph consists of a graph together with a sign characterizing each vertex. A fundamental concept of signed graphs is that of balance. In this paper a programming algorithm is presented in order to detect balance in signed graphs. The algorithm traverses each vertex at most once and uses two stacks for the implementation, each having a size of at most the number of vertices of the graph. Moreover, the graph need not be stored in computer's memory.