Reconstruction of the equation of state for the cyclic universes in homogeneous and isotropic cosmology