Hello friends,
I am looking for a fast algorithm that would calculate that for two directed graphs g1 and g2 ,is g2 is a subgraph of g2 or not. G1 will contain thousands of nodes and g will contain only 100-150 nodes.

You mean if g2 is a subgraph of g1? Or else, g2 is automatically a subgraph of g2.
Well read this paper on the algorithm.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.