Solution (source code)

= Solution

Let $a_1,a_2,a_3$ denote the columns. The <Gram-Schmidt process> begins with $\|a_1\|=2$, so
$$
q_1=\frac12(1,1,1,1)^{\mathsf T},\qquad r_{11}=2.
$$
The second column has $r_{12}=q_1^{\mathsf T}a_2=4$ and residual
$$
a_2-4q_1=(-1,1,-1,1)^{\mathsf T}.
$$
This residual has norm $2$, giving $q_2=\tfrac12(-1,1,-1,1)^{\mathsf T}$ and $r_{22}=2$.

For the third column the <orthogonal projections> are $r_{13}=6$ and $r_{23}=4$. Subtracting them gives
$$
a_3-6q_1-4q_2=(1,1,-1,-1)^{\mathsf T}.
$$
Its norm is $2$, so $q_3=\tfrac12(1,1,-1,-1)^{\mathsf T}$ and $r_{33}=2$. Thus the requested thin <QR decomposition> is
$$
\boxed{Q=\frac12\begin{pmatrix}1&-1&1\\1&1&1\\1&-1&-1\\1&1&-1\end{pmatrix},\qquad R=\begin{pmatrix}2&4&6\\0&2&4\\0&0&2\end{pmatrix}}.
$$
The three displayed columns have pairwise zero <inner products> and unit norms; direct multiplication gives $QR=A$.