TSP tours in Mathematica

numPoints=30;
points=RandomReal[1,{numPoints,2}]
pointPlot=ListPlot[points->Range[numPoints],PlotRange->{{0,1},{0,1}},AspectRatio->1]

Simplicial Complexes

Consider the following set of points in (ℝ^2). These will be the vertices (or 0-simplices) of a simplicial complex.

numPoints=10;
points={{0.26153,0.124706},{0.475356,0.338278},{0.197786,0.319451},{0.039825,0.237645},{0.145179,0.492856},{0.836802,0.665642},{0.761772,0.905109},{0.673323,0.712484},{0.927742,0.79145},{0.455305,0.639258}}
pointPlot=ListPlot[points->Range[numPoints],PlotRange->{{0,1},{0,1}},AspectRatio->1]

Now define an abstract simplicial complex:

complex=

Using the given set of points, we can draw the geometric realization of our simplicial complex:

drawGeometricRealization[complex_,points_]:=Module[
{verts={}, edges={}, faces={}},

(* make lists of simplices of each dimension *) 
Do[



,{simplex,complex}];


(* return the drawing *) 
(* Graphics[{Cyan,Triangle[faces],Black,Line[edges],PointSize[Medium],Point[verts]}] *)
]

Closure under subsets

A simplicial complex is supposed to be closed under subsets. This means that if σ is a simplex in an abstract simplicial complex K, then every subset of σ is also a simplex in K.

Write a function that takes a family of sets K and determines whether or not it is closed under subsets.