Research Article

Characterization of 2-Path Product Signed Graphs with Its Properties

Algorithm 2

To check if the given signed graph is a 2-path product of some other signed graph.
Input. The adjacency matrix of signed graph and dimension
Output. If is a 2-path for some signed graph then returns its adjacency matrix .
Process
(1) We use Algorithm 1 to detect if is a 2-path signed graph.
(2) Use algorithm in [34] to check if is balanced.
(3) for to do
(4)   ; for to do
(5)     if then
(6)      ;
(7) ;
(8) for to do
(9)   
(10) if then
(11)   The given signed graph is not a 2-path product signed graph
(12) else
(13)   The given signed graph is a 2-path product signed graph