An analytical solution for the multigroup slab geometry discrete ordinates problems