Applications of NP Formalism and GHP Formalism in General Relativity