adding the algorithm regarding the inclusion and exclusion algorithm