For a wide family of formations F it is proved that the F-residual of a permutation finite group can be computed in a polynomial time. Moreover, if in the previous case F is hereditary, then an F-subnormality of a subgroup can be checked in a polynomial time.