I have a question about computing the VC dimension for a general hypothesis class $\mathcal{H}$. I know the process for computing VC dimension is as follows:
Find the lower bound $n$, such that there exists a set $|S|=n$ can be shattered by $\mathcal{H}$
Find the upper bound $n+1$, such that there does not exist any set $|S|=n+1$ can be shattered by $\mathcal{H}$
I've also seen some examples in the textbook, e.g. proving the VC-dimension for linear classifiers in the 2-D plane by generating 1 point, 2 points, 3 points, etc.
Is this method that enumerating set $S$ by increasing the size of $S$ step by step the standard method of computing the VC dimension? It seems very inefficient to me.
If I need to compute the VC dimension for a general hypothesis class $\mathcal{H}: \mathbb{R}^n \rightarrow \{0,1\}$ instead of some naive hypothesis class like linear classfiers. We can add some constraints on the hypothesis class such that its VC dimension won't be $\infty$. My question is how to compute the VC dimension for this hypothesis class? Shall we enumerate all the possible set $S$ from size $1$ to $+\infty$ that can be shattered by $\mathcal{H}$?
The reason why I have this question is that I've seen some proof about some specific hypothesis classes which are more complicated, but their proof is just like as follows (1) they prove one set $|S|=n$ can be shattered and (2) they prove no $|S| = n+1$ can be shattered. It seems to me their upper bound $n+1$ just comes from nowhere. I'm really confused how they just came up with this upper bound. Did people calculate this upper bound by enumerating from 1 to $+\infty$?