# minimal number of relations in nonabelian dihedral groups of order a power of 2

In my recent minimal number of relations r question for the symmetric group of degree 3, it was demonstrated that r = 2. What is r in general for nonabelian dihedral groups of order a power of 2? Or more specifically is r = 2 or 3 for the dihedral group of order 8? And if r = 2, what are the defining relations and how does one show that we actually get the dihedral group of order 8 from these relations? My motivation in asking this question is that by the sharpened Golod/Shafarevich inequality, we know that for finite p-groups (actually for nilotent groups) that r > (d/2) squared where d is the minimal number of generators of the group. I would like to know if for d large enough if this inequality can possibly be sharpened further, to r > (d/2) squared + 1. And in particular, for d = 4 are there any known examples as above with r = 5?

$r=3$ for dihedral groups of order divisible by $4$. The standard presentation shows that $r \le 3$, and the fact that the Schur multiplier is nontrivial (it has order $2$) shows that $r-d \ge 1$, so $r=3$.