This is a classic CS problem I encountered in my work:
I have a list of resources I need to load. each resource has a list of constraints it needs in order to load and when loaded satisfies other constraints that other resources may need. In example: resource X has a,b,c as constraints so it can only load when a,b and c are fulfilled. when loaded, X satisfies constraints n and m which are needed by resource Y which also needs constraint p in order to load so when another resource will load and satisfy the p constraint, Y will load, and in turn satisfy other constraints. 
The list of constraints needed by all resources is final, meaning that each resource may need several constraints and each constraint may be needed by several resources. 
Also, one resource needs null constraints in order to load hence must be the first to load. 

Ok, after this long explanation here is my question: 
How can I find the best loading sequence of the resources when all I know in advance is which constraints are needed per resource but do not know (in advance) which constraints are satisfied by a resource once loaded?

hope my explanation was clear enough...
thanks!