common-problem

Algorithm for seating groups of people?

I'm interested in writing an application that can determine how to seat groups of 2-10 people at tables that can hold 10 people. There will probably be about 15 tables and 140 people total. I don't want to break up any of the groups of people. It seems like it might be a common problem and I was wondering if anyone had any suggestions...