Let $n$ be a positive integer, and $s \leq n$ a positive real number.
Does there exist a Lipschitz function $f: \mathbb R^n \to \mathbb R$ such that the set on which $f$ is not differentiable has Hausdorff dimension $s$?
Let $n$ be a positive integer, and $s \leq n$ a positive real number.
Does there exist a Lipschitz function $f: \mathbb R^n \to \mathbb R$ such that the set on which $f$ is not differentiable has Hausdorff dimension $s$?
The answer is yes. The main idea for the following answer was communicated to me by user527492 in private communication.
First, based on the comment by Dave L Renfro, the question is solved in full for one dimensional domains, i.e. given nonnegative $s \leq 1$, there exists a Lipschitz function $f: \mathbb R \to \mathbb R$ that is differentiable exactly on a set of Hausdorff dimension $s$.
We proceed inductively. The base case is as above. For the inductive step, we split into two cases:
Case 1: $s \in [0, n-1]$.
We claim that given a function $f: \mathbb R^{n-1} \to \mathbb R$ that is non differentiable exactly on a set of Hausdorff dimension $s$, we may produce a function $\tilde f: \mathbb R^{n} \to \mathbb R$ that is differentiable exactly on a set of Hausdorff dimension $s$.
This proves that any Hausdorff dimension in $[0, n-1]$ may be achieved.
We will construct $\tilde f$ via mollification of $f$. In particular let $\phi_{t}: \mathbb R^{n-1} \to \mathbb R$ be a standard mollifier. We define
$$\tilde f(x, t) = \phi_t \ast f(x)$$
for $t \neq 0$, and $f(x, 0) = f(x)$.
This can easily be checked to be Lipschitz. It is smooth whenever $t > 0$, and is non differentiable precisely at $N \times \{0\}$, where $N \subset \mathbb R^{n-1}$ is the non differentiabilty set of $f$. This has Hausdorff dimension $s$ as claimed.
Case 2: $s \in (n-1, n]$.
This is the easier case - we may just fix a Lipschitz function $g: \mathbb R \to \mathbb R$ that is differentiable exactly on a set $E$ of Hausdorff dimension $s - n + 1$ and set $f(x_1, \dots, x_n) := g(x_1)$.
This is non differentiable on $E \times \mathbb R^{n-1}$, which has Hausdorff dimension $s$ as desired.