Research Article

A Metric on the Space of Partly Reduced Phylogenetic Networks

Algorithm 2

Deciding equivalence for two nodes and .
() input: nodes and
() if the indeg of and the indeg of are not equal, or the ISE of doesn’t have (the ESE of
  doesn’t have i.e., and are from two networks) then
()  return
() end if
() if and are roots then
()  add to the IE of
()  add to the IE of
() else
()  flag false
()  for each parent of do
()   for each parent of do
()    if b.label = true then
()     continue
()    end if
()    if the IE of has then
()     flag = true
()     b.label = true
()    end if
()   end for
()   if flag = false then
()    return
()   else
()    flag = false
()   end if
()  end for
()   add to the IE of
()  add to the IE of
() end if