In the paper four semirings for solving social networks problems are c
onstructed. The closures of the matrix of a given signed graph over ba
lance and cluster semirings can be used to decide whether the graph is
balanced or clusterable. The closure of relational matrix over geodet
ic semirings contains for every pair of vertices u and v the length an
d the number of u - v geodesics; and for geodetic semiring the length
and the set of vertices on u - v geodesics. The algorithms for computi
ng the geodetic and the geodetic closure matrix are also given.