Optimization Techniques in the Magnetic Resonance Imaging