Reconstruction of a function of bounded variation The variation of a function $f:[a,b]\to\mathbb R$ is defined by
\begin{align*}
\text{Var}(f,[a,b]):=\sup_P\sum_{j=1}^n|f(t_{j-1})-f(t_j)|,
\end{align*}
where $P$ runs through all partitions $P=(a=t_0<\ldots<t_n=b)$ of $[a,b]$. Then $f$ is said to be of bounded variation, if $\text{Var}(f,[a,b])<\infty$. 
It is well known that $f$ has at most countably many points of discontinuity, that each discontinuity is a jump, and that one-sided limits exist at each point of $[a,b]$.
Now, take an arbitrary function $f$ with at most countably many discontinuities. Let $I\subset[a,b]$ be the union of $\mathbb Q$ and the set of discontinuities of $f$. Then $I$ is countable and can be written as a sequence $I=(t_k)_{k\in\mathbb N}$. Define $x_k:=f(t_k)$. Since $I$ is dense in $[a,b]$ and $f$ is continuous at each point of $[a,b]\backslash I$, one can reconstruct $f$ by only knowing $(t_k,x_k)$.
The question now is: If I only know the sequence $(x_k)$, can I decide whether $f$ is of bounded variation?
The problem is of course that we cannot say that $\sum_{k=1}^\infty|x_{k-1}-x_k|\leq\text{Var}(f,[a,b])<\infty$. It is also not possible to write all elements of $I$ as an increasing sequence $(t_k)$ such that $x_k=f(t_k)$, since $I$ is dense in $[a,b]$.
Moreover, if, for instance, $(x_k)$ jumps between 0 and 1, then one cannot say if $f$ has only one jump from 0 to 1 or more.
Any help is highly appreciated. Thanks in advance!
 A: I have came up with the following theorem. Proof is quite long, but only because I wanted to make everything clear. Please let me know if you spot any mistakes.
Theorem. If for all permutations $σ : \mathbb{N} → \mathbb{N}$ we have
$$
\sum^∞_{n=1} |x_{σ(n-1)}-x_{σ(n)}| < ∞ \tag{1}
$$
then $f$ is of bounded variation ($f \in BV$).
Proof.  Assume $(1)$. First, I will show, that $f$ is bounded.
For the sake of contradiction assume, that $f$ is unbounded. Clearly $f|_{\mathbb{Q} \cap[a,b]}$ is bounded, say, by $L > 0$. But since $f$ is unbounded, there is a sequence $(w_n)$ of irrationals in $(a, b)$ such that $f(w_n) → ∞$,  $f(w_n) > 2L$ for each $n \in \mathbb{N}$ and  $w_m \neq w_n$  whenever $m \neq n$. Thus, no mater how small the $δ > 0$ is, there exist a rational $q \in (w_k - δ, w_k + δ) \cap \mathbb{Q}$, such that $|f(w_k) - f(q)| > L$. Thus $\{w_n : n \in \mathbb{N} \}$ are points of discontinuity.
Let $(z_n)$ be a sequence in $[a, b]$ such that $z_n$ is some rational if $n$ is even (such that $z_{2m} \neq z_{2n}$ whenever $m \neq n$), and $z_n = w_n$ if $n$ is odd. Since $|f(z_{n-1}) - f(z_n)| > L$ and  $\{ z_n : n \in \mathbb{N} \} \subset I$ we have for some permutation $σ$ for which
$$
∞ = \lim_{n → ∞} n L ≤  \sum^\infty_{n = 1} |f(z_{n-1}) - f(z_n)| ≤ \sum^∞_{n=1} |x_{σ(n-1)}-x_{σ(n)}|.
$$
Which is a contradiction.
Now I will show, that $f \in BV$. Let
$$
a = r_0 < r_1 < \dots < r_n = b
$$
be an arbitrary partition denoted by $P'$. Construct partition $P$ in the following way. Let $a = p_0, b = p_n \in P$. For $i=1,2, \dots, n-1$

*

*If $r_i$ is a discontinuity point of $f$, then let $r_i=p_i \in P$.

*Otherwise $r_i$ is a continuity point. Thus there is rational $p_i \in (r_{i-1}, r_i) \cap \mathbb{Q}$ such that $|f(p_i) - f(r_i)| < ε$ for any $ε> 0$.

Thus $|f(r_{i-1}) - f(r_i)| < |f(p_{i-1}) - f(p_i)| + 2ε$ for $i = 1, 2, \dots, n-1$.
By construction $P$ is a finite partition of $[a, b]$. Moreover $P \subset I$. Since $f$ is bounded there exist $N > 0$ such that, for any partition $P'$, we have that $|p_0 - p_1|, |p_{n-1} - p_n| ≤ N$. Therefore
$$
\begin{align}
\text{var}(f, P) &= \sum^n_{i=1} |f(r_{i-1}) - f(r_i)|\\
&≤ 2N + \sum^{n-1}_{i=2}|f(r_{i-1}) - f(r_i)| \\
&≤ 2N + \sum^{n-1}_{i=2}2ε + |f(p_{i-1}) - f(p_i)| \\
&= 2N + 2nε + \sum^{n-1}_{i=2}|f(p_{i-1}) - f(p_i)|.
\end{align}
$$
Now let $ε = 1/2n$ and $σ$ be such that $x_{σ(i)} = f(p_i)$ for $i \in \{ 0,1, \dots, n\}$. We have
$$
\begin{align}
\text{var}(f, P) &≤ 2N + 2nε + \sum^{n-1}_{i=2}|f(p_{i-1}) - f(p_i)| \\
&= 2N + 1 + \sum^{n-1}_{i=2}|x_{σ(i-1)} - x_{σ(i)}| \\
&≤ 2N + 1 + M \\
&< ∞
\end{align}
$$
Since for every finite partition $P$ the $\text{var}(f, P)$ is bounded by $2L + 1 + M$, the supremum is also bounded. Thus $f \in BV$.

Examples. Note that this is quite a weak theorem as it can be applied to very narrow subset of functions with two sided limits. For example constant functions and nonnegative functions with countable support (with two sided limits) like
$$h(x) =
\begin{cases}
\frac{1}{n^2}  &\text{when } x = \frac{1}{n} \text{ for some } n \in \mathbb{N} \\
0 & \text{otherwise}
\end{cases}
$$
are in this set. But there are typical examples of functions of bounded variation, like $g(x) = x$ for which we cannot use the theorem as $(1)$ explodes.
