The inventory management of items, such as banner ads to be displayed on web
sites, is disclosed. In one embodiment, a method constructs a number of item slot
groups and a number of meta item slot groups. Each item slot group has a number
of item slots. Each meta group encompasses one or more item slot groups, and has
a number of item slots equal to the total number of item slots of its constituent
groups. The method allocates each of a number of items of a first type over the
item slots of the meta groups that are unfilled, by matching characteristics of
the item to characteristics of the meta groups. The method also allocates each
of a number of items of a second type over both the item slots of the meta groups
as well as the groups that are unfilled, again by matching characteristics of the
item to characteristics of the groups.