Diophantine Approximation and its Applications