Factorizations of a polynomial $P(t)\in R[t]$ over an associative algebra $R$ into a product of linear polynomials $(t-a)$ can be described by a directed graph. The elements $a$ generate a subalgebra in $R$ called the subalgebra of pseudo-roots of $P(t)$. On the other hand, to any directed graph $\Gamma $ one can associate the universal algebra of pseudo-roots $A(\Gamma )$ generated by edges of $\Gamma $ with relations defined by pairs of paths having the same origin and the same end. Algebras $A(\Gamma )$ and their quadratic dual algebras (when they exist) have many interesting combinatorial properties that will be discussed in the talk. In particular, such algebras provide a new class of Koszul algebras.