  Let $D = d_1, d_2, \ldots, d_n$ and $F = f_1, f_2,\ldots, f_n$ be two
sequences of positive integers. We consider the following decision problems: is
there a $i)$ multigraph, $ii)$ loopless multigraph, $iii)$ simple graph, $iv)$
connected simple graph, $v)$ tree, $vi)$ caterpillar $G = (V,E)$ such that for
all $k$, $d(v_k) = d_k$ and $\sum_{w\in \mathcal{N}(v_k)} d(w) = f_k$ ($d(v)$
is the degree of $v$ and $\mathcal{N}(v)$ is the set of neighbors of $v$). Here
we show that all these decision problems can be solved in polynomial time if
$\max_{k} d_k$ is bounded.
  The problem is motivated by NMR spectroscopy of hydrocarbons.
