Is there a function $f$ such that for any presentation $$G=\langle x\_1,\ldots,x\_n \mid r\_1,\ldots,r\_k\rangle\quad \text{with}\quad |r\_i|\leq 3$$ 


$k\leq f(n)$ implies that $G$ has non-abelian free subgroups.


Of course $f=0$ works trivially, I am asking for bigger functions.



Number of relations and free subgroups
$f(n)=n-2$ works as I said in the comment above. On the other hand, $f(n) < n-1$ for $n\ge 4$. Indeed, the metabelian Baumslag-Solitar group can be given by relations $\langle x\_1,...,x\_{n-1},u,v,t\mid x\_1=x\_2, x\_2=x\_3, ..., x\_{n-2}=x\_{n-1}, tx\_1=u, ut^{-1}=v, x\_1^2=v\rangle $ with $n+2$ generators and $n+1$ relations. So the answer is $f(n)=n-2$ - for every $n\ge 4$. 


