Singularity Theory and its applications to Robotic Algorithms and Complex System