Computation and algorithmic solution of topological indices of certain graphs