  We study two classes of inverse semigroups built from directed graphs, namely
graph inverse semigroups and a new class of semigroups that we refer to as
Leavitt inverse semigroups. These semigroups are closely related to graph
$C^*$-algebras and Leavitt path algebras. We provide a topological
characterization of the universal groups of the local submonoids of these
inverse semigroups. We study the relationship between the graph inverse
semigroups of two graphs when there is a directed immersion between the graphs.
We describe the structure of graphs that admit a directed cover or directed
immersion into a circle and we provide structural information about graph
inverse semigroups of finite graphs that admit a directed cover onto a bouquet
of circles. We also find necessary and sufficient conditions for a homomorphic
image of a graph inverse semigroup to be another graph inverse semigroup. We
find a presentation for the Leavitt inverse semigroup of a graph in terms of
generators and relations. We describe the structure of the Leavitt inverse
semigroup and the Leavitt path algebra of a graph that admits a directed
immersion into a circle. We show that two graphs that have isomorphic Leavitt
inverse semigroups have isomorphic Leavitt path algebras and we classify graphs
that have isomorphic Leavitt inverse semigroups. As a consequence, we show that
Leavitt path algebras are $0$-retracts of certain matrix algebras.
