Skip to main content
. 2020 Mar 4;22(3):296. doi: 10.3390/e22030296
Algorithm 2 graph grammar based optimization of graph structure and embedment
  • (1)

    Initialize the current graph embedment by some graph topology and some initial map {G0, φ0(G0)}.

  • (2)

    For the current graph embedment {Gi, φi(Gi)}, apply all grammar operations from a grammar set {Ψ1,…, Ψr}, and generate a set of s candidate graph injections {Dk,ϕ(Dk), k=1s}.

  • (3)

    Further optimize each candidate graph embedment using Algorithm 1, and obtain a set of s energy values {U¯ϕ(Dk)(Dk)}

  • (4)

    Among all candidate graph injections, select an injection map with the minimum energy as {Gi+1,ϕi+1(Gi+1)}.

Repeat 2–4 until the graph contains a required number of nodes.