(Combinatorial?) Topology Problem.

Let C be a subset of the grid. Then C has a "dual graph", obtained by placing a vertex at the center of each square in C, and connecting two such vertices by an edge when they share an edge.

Exercise: Suppose C and C' have isomorphic dual graphs. Then either (1) they are homeomorphic or (2) at least one of C or C' has the property that two squares share a vertex, but not an edge.

For example, suppose C is a "C" of squares...so a collection of squares sharing adjacent edges which makes the shape of an upper case "C". And suppose C' is what you get by taking a large "ring" of squares where every square is adjacent to two others over edges, but then minus one of the 4 corner squares. Then so long as C and C' have the same number of squares, they will have isomorphic dual graphs (just a path), but they are not homeomorphic.

So the dual graph is good enough to distinguish between subsets of the grid that don't have squares which share a vertex but not an edge- let's call such subsets "edge matching". So for edge matching subsets, we have reduced the classification problem to understanding how many different types of dual graphs you can form.

Exercise 2: Dual graphs to edge matching subsets of the m x n grid correspond 1-1 to planar graphs on fewer than m*n vertices, satisfying the property that each vertex has valence <= 4.

The number of such graphs (up to isomorphism) grows extremely fast as a function of n and m, so this tells us that there are many subsets (edge matching or otherwise) up to homeomorphism in the m by n grid of squares.

Ok so what about subsets that aren't edge matching? For these there's a couple things we could do. For instance we could re-define the dual graph so that two vertices are connected by an edge if the corresponding squares share either an edge of a vertex. Then C and C' above will have different dual graphs and we can tell them apart so that's nice. But C' will have the same dual graph as the ring of squares, so that's bad. But it turns that if we make this alteration, dual graphs will correspond 1-1 to "homotopy type", not homeomorphism type. Homotopy is a looser equivalence than homeomorphism; intuitively, it captures "interesting" topology like loops which can not be contracted to points, but it doesn't capture parts of the space which can be continuously deformed down to a point. As an example, the letter "A" is homotopy equivalent to the letter "O" because you can just contract the two prongs of the A until they meet with the triangle, and then you can homeomorphically map the triangle to a round circle. However they are not homeomorphic.

So, we can think about general subsets of the grid (up to homotopy) by considering dual graphs, but now we need to up the maximum valence... one square can now be "adjacent" to at most 8 others. This is a gigantic number of graphs (assuming m and n are moderately sized). But if we can classify those graphs, we have reduced the general question to deciding when two homotopic subsets are homeomorphic. This isn't too hard...one just needs to examine the places where the two subsets fail the edge matching condition and see if such vertices can be matched up while preserving the combinatorics of the other squares. Hope that helps

/r/math Thread