Characterizations of the Sobolev norms and the total variation via nonlocal functionals, and related problems | Synapse