Pairing correlations in quantum systems: algebraic and variational approaches