At Thursday 14/9/2006 20:31, Andrew McLean wrote:

Now I want to issue a series of queries, such that when I combine all
the data returned I have accessed all the records in the database.
However, I want to minimise the total number of queries and also want to
keep the number of records returned by more than one query small.

This is known as a "set cover" algorithm. You have a set of subsets, and want to determine the smallest set of those subsets, whose union is the universal set - (uh, what a mess!)

See "The Algorithm Design Manual" by Steven Skiena.
http://www.cs.sunysb.edu/~algorith/files/set-cover.shtml
Full text (not-so-legal, I presume): http://www2.toki.or.id/book/AlgDesignManual/BOOK/BOOK/NODE4.HTM



Gabriel Genellina
Softlab SRL

        
        
                
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! http://www.yahoo.com.ar/respuestas

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to