Minimum of $z:\mathbb{R}^n \to \mathbb{R}$ along paths implies local minimum of $z$ 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. 
 A: 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}$.  
