2026-08-28·by Sijie Wang#idea#math

interval

Interval — VC = 2

Parent: examples Prereq: learning-theoryH, h, shattering.

Class H={ha,b:ab}H = \{\, h_{a,b} : a \le b \,\}, two parameters:

ha,b(x)={+axbotherwiseh_{a,b}(x) = \begin{cases} + & a \le x \le b \\ - & \text{otherwise} \end{cases}

Count it the same way. (Recall ha,b(p)=+h_{a,b}(p) = {+} iff apba \le p \le b.)

Shatter 2 points p₁ < p₂? labeling (h(p₁), h(p₂)); exhibit an [a,b] for each:

labelinga witnessing [a,b]realizable?
(−,−)any [a,b] with b < p₁
(+,−)[p₁, p₁] (so p₁ ≤ b < p₂)
(−,+)[p₂, p₂] (so p₁ < a ≤ p₂)
(+,+)[p₁, p₂]

All 4 realizable → shatters 2 → VC ≥ 2. (The (+,−)/(−,+) a threshold couldn't do, the interval now can.)

Shatter 3 points p₁ < p₂ < p₃? the labeling (+,−,+) requires a ≤ p₁ ≤ b and a ≤ p₃ ≤ b; together these give a ≤ p₁ < p₂ < p₃ ≤ b, forcing p₂ ∈ [a,b], i.e. h(p₂) = + — contradiction. So (+,−,+) is unrealizable → no 3 points shatter → VC < 3. So VC = 2.

So the interval's VC 2 came from counting shatterable points (2), not from "it has 2 endpoints" — the endpoint count matched here by luck.

Breaks on + − + (needs two separate bands) → climb to union-of-intervals.

about this entry

One of sijie's wiki entries. The AI on this site is grounded in the same corpus and answers in sijie's voice, with citations back to entries like this one — answering costs sijie money, so it waits behind a code: enter an access code →

interval