do i need discrete math for algorithms