This document summarizes an algorithm midterm solution from 2014. It includes a problem statement diagram with three activities labeled a1, a2 and a3. It then provides two counter examples where the activities are selected based on either their duration (d) or number of overlaps (n). In both cases, activities a1 and a2 are selected before a3 due to having a lower d or n value.
This document summarizes an algorithm midterm solution from 2014. It includes a problem statement diagram with three activities labeled a1, a2 and a3. It then provides two counter examples where the activities are selected based on either their duration (d) or number of overlaps (n). In both cases, activities a1 and a2 are selected before a3 due to having a lower d or n value.
This document summarizes an algorithm midterm solution from 2014. It includes a problem statement diagram with three activities labeled a1, a2 and a3. It then provides two counter examples where the activities are selected based on either their duration (d) or number of overlaps (n). In both cases, activities a1 and a2 are selected before a3 due to having a lower d or n value.
Figure 2: Counter example, where a1 , a2 and a3 are activities
6. (5) For activities a1 , a2 and a3 , we let their duration d(a1 ) = d(a2 ) < d(a3 ) Select activity a1 initially Select activity a2 , since a2 is compatible with a1 Dont select activity a3 , since a3 is not compatible with a2 End (6) For activities a1 , a2 and a3 , we let their number of overlaps n(a1 ) = 1, n(a2 ) = 1 and n(a3 ) = 2, such that n(a1 ) = n(a2 ) < n(a3 ) The rest are the same as (5)