  For the two versions of the KdV equation on the positive half-line an
initial-boundary value problem is well posed if one prescribes an initial
condition plus either one boundary condition if $q_{t}$ and $q_{xxx}$ have the
same sign (KdVI) or two boundary conditions if $q_{t}$ and $q_{xxx}$ have
opposite sign (KdVII). Constructing the generalized Dirichlet to Neumann map
for the above problems means characterizing the unknown boundary values in
terms of the given initial and boundary conditions. For example, if
$\{q(x,0),q(0,t) \}$ and $\{q(x,0),q(0,t),q_{x}(0,t) \}$ are given for the KdVI
and KdVII equations, respectively, then one must construct the unknown boundary
values $\{q_{x}(0,t),q_{xx}(0,t) \}$ and $\{q_{xx}(0,t) \}$, respectively. We
show that this can be achieved without solving for $q(x,t)$ by analysing a
certain ``global relation'' which couples the given initial and boundary
conditions with the unknown boundary values, as well as with the function
$\Phi^{(t)}(t,k)$, where $\Phi^{(t)}$ satisifies the $t$-part of the associated
Lax pair evaluated at $x=0$. Indeed, by employing a Gelfand--Levitan--Marchenko
triangular representation for $\Phi^{(t)}$, the global relation can be solved
\emph{explicitly} for the unknown boundary values in terms of the given initial
and boundary conditions and the function $\Phi^{(t)}$. This yields the unknown
boundary values in terms of a nonlinear Volterra integral equation.
