Taken from 1976 Ullmann Part2
Naive alogrithm for subgraph isomorphism.
1. How to determine the isomorphism of the sub-graph.
There is a gα and gβ, Gα has pa points, QA edge, Gβ has a PB point, QB Bar edge. A is the adjacency matrix of Gα, and the corresponding B is the adjacency matrix of gβ. So how to judge isomorphism. Set A is a sub-image, B is the original. Then there is a mapping of points to B of point A. The pattern of this mapping is called M. M is the PA row, PB column. One of the properties of M is that there is only one 1 per row and at most one 1 per column. This is a mapping of the point in a to the point in B. We define a c = [CIJ] = M (MB) T. If I and J have edges in figure A can deduce that I and J have edges in Figure C. Then why is that right? Because M is a map, the MB is the mapped point in B that is drawn out in order to correspond to the B point. The meaning of the I row J column 1 in M is the first point of a, and the first J point of B. The meaning of the first row J column in MB 1 is that the point of the I point of a is now one edge to the first J point of B. Transpose the matrix to multiply M. C is the point in B and a and the edges in B are all drawn out to form a graph.
So if AIJ = 1 can deduce CIJ = 1. A is the isomorphism of a sub-graph of B.
Sub-graph Isomorphism algorithm series (1)