Given a finite collection $X$ of finite sets, what are some efficient methods for deciding whether or not $X$ is a topology?
Obviously it is possible to brute-force the problem by checking the conditions $\emptyset\in X$, and $\bigcup Y\in X$, $\bigcap Y\in X$ for every $Y\in \mathcal{P}(X)$; but this is extremely inefficient - $O\left(2^{|X|}\right)$, I think - for large $X$. Is there a faster way to check if $X$ is a topology?
One way: for each $x \in X$ compute $M_x= \bigcap\{O \in \mathcal{T}: x \in O\}$ a finite intersection of open sets, hence open. So check also that the computed $M_x \in \mathcal{T}$ as well. If you have some incidence data structure (so for each $x \in X, O \in \mathcal{T}$ a boolean to determine $x \in O$ or not), this is a simple loop to compute. Then for each (non-empty) open set $O$, check whether the $M_x$ inside it union up to $O$: for any $x \in O$ check whether $M_x \subseteq O$: if not, "no topology", else remove $M_x$ from $O$ till $O$ is empty, and try the next $O$. Precise implementation will depend on your data structures, and this is not a programming site. This will run in about $|\mathcal{T}| \cdot |X|$ steps, I think.