IP Subnet Management?

Hey everyone, I've been trying to come up with an
algorithm to describe the assignment of IP subnets.
I have something in a proof of concept form that
will break a block of addresses into subnets at
a user's request. The thing is that the assignments
it makes are provably optimal. Within the limits
you may place on an assignment, there will never
be more than one empty subnet of any particular size.
I am curious as to what other things I should try
and put into this. Right now, if you request a /16 from
a /8, the /16 is considered assigned and further
changes within it are not possible. Would 'children'
so to speak be useful for you? What would your ideas
be? How have you tackled this problem?
Feel free to respond off list if you'd like :slight_smile:

Appreciate your time!

Mike (sick of spreadsheets) Wiacek