Suppose I have a level set of some function $f\colon\mathbb{R}^n\rightarrow\mathbb{R}^m$, say $L:=\{x:f(x)=c\}$. Let $S$ denote the points in $L$ at which $L$ is locally diffeomorphic to an open interval on the real line. Now define a set of vertices by $V:=(\overline{S}\setminus S)\cup\{\infty\}$, where bar denotes closure. Let's say two vertices $u,v\in V$ are adjacent if there is a continuous path $\gamma\colon[0,1]\rightarrow\mathbb{R}^n\cup\{\infty\}$ such that $\gamma(0)=u$, $\gamma(1)=v$, and $\gamma(t)\in S$ whenever $t\in(0,1)$.

**Question: Is this graph necessarily even if $f$ is polynomial? analytic?**

As an example, the following depicts the $(x,y)$'s such that $(x^2+y^2-2)(x^3-y^2)(xy-1)=0$, along with the corresponding graph:

In the graph, I put the point at infinity on the bottom right. The other vertices are $(0,0)$, $(1,1)$, $(1,-1)$ and $(-1,-1)$, and all of these have even degree.

Note that the graph is not necessarily even if $f$ is $C^\infty$, since the non-analytic smooth function in this article, namely

$$ f(x):=\left\{\begin{array}{ll}e^{-1/x}&\mbox{if }x>0\\0&\mbox{otherwise}\end{array}\right. $$

has a level set $\{x:f(x)=0\}=(-\infty,0]$ whose graph is a path of two vertices (each of degree $1$).