Suppose we are given a smooth function $z: \mathbb{R}^n \to \mathbb{R}$, a point $x\_0 \in \mathbb{R}^n$ and a set $\mathcal{F}$ consisting of certain paths in $\mathbb{R}^n$, i.e. $f: [0,1] \to \mathbb{R}^n$ for $f \in \mathcal{F}$. Assume that for each $f \in \mathcal{F}$, there exists a $t \in [0,1]$ such that $f(t) = x\_0$, and that the function $z \circ f: [0,1] \to \mathbb{R}$ has a local minimum in $t$. Under what conditions on $\mathcal{F}$ does it follow that $z$ has a local minimum at $x\_0$?


Is is easily seen that it is enough if $\mathcal{F}$ consists of all continuous paths going through $x\_0$. However, the set of straight lines going through $x\_0$ is not enough (consider $x\_0 = (0,0)$ and $z(x,y) = (y^2 - 2x)(y^2 - x)$, by Peano).


The standard argument to see that continuous paths are sufficient, is to assume not; i.e. there are points $(x\_k)\_{k\in\mathbb{N}}$ such that $x\_k \to x\_0$ and $z(x\_k) < z(x\_0)$. Now construct a continuous path along going through $(x\_k)$ and you are done. So one may also consider which $\mathcal{F}$ are such that for each converging sequence of points $(x\_k)$ one can find a subsequence $(x\_{k\_l})$ and an $f \in \mathcal{F}$ such that $f$ goes through $(x\_{k\_l})$.


Can we classify sets $\mathcal{F}$ for which the local minimality of $z$ holds? More specifically, I am interested in paths for which each component is twice differentiable. 



Minimum of $z:\mathbb{R}^n \to \mathbb{R}$ along paths implies local minimum of $z$
Answer: $C^\infty$ curves suffice for arbitrary functions $z: \mathbb{R}^n \to \mathbb{R}$.


Suppose we are given any function $z: \mathbb{R}^n \to \mathbb{R}$, a point $x\_0 \in \mathbb{R}^n$ and let $\mathcal{F}$ consisting of $C^\infty$ (i.e. infinitely differentiable) $f: [0,1] \to \mathbb{R}^n$ such that $f(0)=x\_0$ and all derivatives of $f$ vanish at $x\_0$ (these functions are all restrictions of $C^\infty$ maps from $\mathbb{R}$ to $\mathbb{R}^n$.) 


Claim: If for every $f \in \mathcal{F}$ the function $z \circ f: [0,1] \to \mathbb{R}$ has a local minimum at $0$, then $z$ has a local minimum at $x\_0$.


Proof: We may assume that $x\_0=0$. If $z$ does not have a local minimum at $x\_0=0$, then as noted by the OP, there are points $(x\_k)\_{k\in\mathbb{N}}$ such that $x\_k \to 0$ and $z(x\_k) < z(0)$ for all $k \ge 1$. Passing to a subsequence, we may assume that the Euclidean norm $| \cdot|$ satisfies $|x\_k|<2^{-k}$. 


We will construct $f \in \mathcal{F}$ such that $f(1/k)=x\_k$ for all $k>1$ and this will prove the claim. 


Let $\psi\_0$ be a $C^\infty$ bump function on $[0,1]$ such that $\psi\_0$ and all its derivatives vanish at 0 and 1 yet $\psi\_0$ is positive on $(0,1)$. e.g., $\psi\_0(t)=\exp(-1/[t(1-t)])$. Define $\psi\_1(t)=\int\_0^t \psi\_0(s) ds$ and $\psi(t)=\psi\_1(t)/\psi\_1(1)$. 


Then $\psi(0)=0$ and $\psi(1)=1$ and all the derivatives of $\psi$ vanish at 0 and 1. For $k \ge 2$, write $d\_k= 1/(k-1)-1/k$ and $y\_k=x\_{k-1}-x\_{k}$. Define $f: [0,1] \to \mathbb{R}^n$ as follows:


First $f(0)=0$. Second, 
if $k\ge 2$ and $1/k <t \le 1/(k-1)$ then
 $$f(t):=x\_{k}+\psi((t-1/k)/d\_k) y\_k \,.
$$
In particular $f(1/k)=x\_k$ for $ k\ge 1$. Clearly $f$ is $C^\infty$ in $(0,1]$. 
For $1/k <t \le 1/(k-1)$ and $j \ge 0$, the $j$'th derivative of $f$ satisfies 
$$|f^{(j)}(t)| \le nC\_j \delta\_k^{-j} 2^{-k} \le nC\_j2^j t^{-2j} 2^{-t/2} \, ,
$$
 where $C\_j$ depend only on $j$. This implies that $f$ is differentiable at 0 and all its derivatives vanish at 0, so $f \in \mathcal{F}$. 


