Algorithm Question

Gabriel Genellina gagsl-py at yahoo.com.ar
Thu Sep 14 22:54:31 EDT 2006


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




More information about the Python-list mailing list