Title: An algebraic theory of graphs