If you think of the exponents of the base units as forming a vector, you want to choose a set of repeating variables which are linearly independent and span the space.
The pi variables are dimensionless by definition, so you set the exponents of each unit to 0.
But yes, there can be more than one correct combination of variables.
Not sure if this will answer your queries, but I did get intrigued by the implied question:
Could Newton have derived his theory of gravitation from dimensional analysis?
Newton had a hunch that planetary motion is nothing more than a direct result of the same effect that makes objects drop to earth: the presumed universal attraction between all masses. He wanted to derive the consequences of this hypothesis. Available to him were his three laws of motion, as well as two important observations:
1) the empirical fact that different masses undergo the same acceleration (observed by Galileo)
2) Kepler's third law of planetary motion: the square of the orbital period of a planet is proportional to the cube of the radius of its orbit around the sun.
The first observation tells Newton he has to consider the acceleration $g = F_g/m$ ($m$ being the planetary mass) due to gravity rather than the force $F_g$ itself. The second observation tells him that a constant (which we will refer to as Kepler's constant) $K$ will probably play a role in the law of gravitation that he is seeking. This constant is the product of the square of the angular frequency $\omega$ with the cube of the radius $r$ of the planetary orbital motion: $K = \omega^2 r^3$. And finally, apart from $g$ and $K$, the distance $r$ is expected to feature in the equation sought.
So, Newton was seeking a relation $f(K, r, g) = 0$. Kepler's constant $K = (2 \pi)^2 AU^3 yr^{-2}$ has dimensions $[L^3 T^{-2}]$, the distance $r$ has dimension $[L]$, and the acceleration $g$ has dimension $[L T^{-2}]$. So one dimensionless parameter can be defined: $r^2 g/K$. This directs Newton towards an equation of the form $g \propto K/r^2$. In terms of the force $F_g = m \ g$, this reads:
$$F_g \propto K \frac{m}{r^2}$$
However, according to Newton's third law, this force needs to be mutual between the two bodies. If $M$ denotes the sun's mass, it follows that $K = G M$ with $G$ a universal constant equal to $(2 \pi)^2 M_{sol}^{-1} AU^3 yr^{-2}$. The result is an equation symmetric in both masses:
$$F_g \propto G \frac{M \ m}{r^2}$$
Obviously, we can replace the proportionality sign with an equal sign provided we absorb any mathematical factors hidden from the dimensional analysis into the constant $G$.
Best Answer
Your two vectors work fine, but their difference is (0,0,1,-1) which gives the book's term h/l (or l/h depending on your convention). If x can be written as a sum of two vectors A and B, it can also be written as a sum of A and A-B, since $aA+bB = (a+b)A + b(B-A)$.