正在加载图片...
Activity Selection Problem Suppose we have a set S =fa1,a2,...,an of n proposed activities that wish to use a resource,such as a lecture hall,which can serve only one activity at a time.Each activity ai has a start time si and a finish time fi,where 0<s<fi<oo.If selected,activity ai takes place during the half-open time interval [si,f).Activities a;and aj are compatible if the intervals [si,f)and [sj,fi)do not overlap.That is,ai and aj are compatible if si>fi or sj=fi.In the activity-selection problem,we wish to select a maximum-size subset of mutually compatible activities. re sorted 一个样本输入: 5678 10 8 8 2 11 14Activity Selection Problem 一个样本输入:
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有