Efficient Algorithms for Agent-Based Semantic Resource Discovery