Topology

Author

Eric W. Weisstein
September 18, 2002

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Topology/Topology.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Topology.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Initialization

<<DiscreteMath`Combinatorica`;

Code

TopologyQ[x_List,t_List]:=Module[{},MemberQ[t,x]&&MemberQ[t,{}]&&And@@(MemberQ[t,#]&/@Intersection@@@KSubsets[t,2])&&And@@(MemberQ[t,#]&/@Union@@@Subsets[t])]

Topologies[n_]:=Module[{r=Range[n]},Select[Subsets[Subsets[r]],TopologyQ[r,#]&]]

Enumeration

Length/@Table[Topologies[n],{n,4}]//Timing

Topologies[1]//ColumnForm

Topologies[2]//ColumnForm

Topologies[3]//ColumnForm