TITLE: Obstruction to extension of non-abelian groups - finite example?
QUESTION [13 upvotes]: Let $G$ be a non-abelian group, let $\Pi$  be a group, and let $\eta: \Pi\rightarrow Out(G)$ be a homomorphism, where $Out(G)$ is the group of automorphisms of G modulo the normal subgroup of inner automorphisms.  The obstruction to the existence of an exact sequence
$1\rightarrow G \rightarrow B \rightarrow \Pi \rightarrow 1$
that induces $\eta$ is a certain cohomology class in $H^3(\Pi,Z(G))$, where $Z(G)$ is the center of $G$ (c.f. Homology, Mac Lane, IV.8.). 
Does anyone know an example of $(G,\Pi, \eta)$ where this obstruction is nonzero, with $G$ finite?  What is the smallest group $G$ for which there exist $\Pi,\eta$  with a non-trivial obstruction?

REPLY [13 votes]: The smallest example when $\eta: \Pi\to \text{Out}(G)$ does not give rise to an extension
of $\Pi$ by $G$ is when $G=D_{16}$,
the dihedral group has order 16. (Apologies to those who write it as $D_8$.)
Pick $c,h\in D_{16}$ 
a rotation of order 8 and a reflection.
The elements of $\text{Out}(D_{16})\cong C_2\times C_2$
correspond to four types of automorphisms 
$$
  \begin{array}{cccccccc}
  I   &:&& c\mapsto c^{\pm 1} && h\mapsto h\cdot c^{\text{even}} && \text{(inner)}\cr
  II  &:&& c\mapsto c^{\pm 3} && h\mapsto h\cdot c^{\text{even}} \cr
  III &:&& c\mapsto c^{\pm 1} && h\mapsto h\cdot c^{\text{odd}}  \cr
  IV  &:&& c\mapsto c^{\pm 3} && h\mapsto h\cdot c^{\text{odd}},  \cr
  \end{array}
$$
and there is no extension of $\Pi=C_2$ by $G=D_{16}$ 
with $\Pi$ acting on $G$ as a type $IV$ automorphism.
One way to see this is just to go through the 51 groups of order 32; 
only five of them contain $D_{16}$, number 18,19,39,42,43 in GAP
or Magma. The first two $D_{32}, SD_{32}$ give a type III action, next two 
$C_2\times D_{16}, (C_2\times C_8):C_2$ a type I action, and the last one $D_8:C_2^2$ a type 
II action. 
Another way is to use the fact that dihedral, semi-dihedral and generalized quaternion
groups are the only non-abelian 2-groups whose commutator subgroup has index 4 (and index 1 or 2 is impossible). The 
commutator subgroup $G'$ of $G=D_{16}$ is generated by $c^2$, and an extension $B$ of 
type $III$ or $IV$ acts non-trivially on $G/G'=\{1,c,h,ch\}$, so $B'<B$ has again index 4. So
it must be $D_{32}$ or $SD_{32}$, since $Q_{32}$ has no dihedral subgroups. But both of these
are visibly not type $IV$ extensions, because the non-trivial coset of $G$ in $B$ is represented by an element whose square is $c$, and it conjugates $c$ to itself. 
I suppose in this example 
$$
  H^3(\Pi,Z(G))=H^3(C_2,C_2)=H^1(C_2,C_2)=\text{Hom}(C_2,C_2)=C_2,
$$
which pins down the obstruction class uniquely.