We introduce and study algebraic structures underlying 2-dimensional Homotopy
Quantum Field Theories (HQFTs) with arbitrary target spaces. These algebraic
structures are formalized in the notion of a twisted Frobenius algebra. Our
work generalizes results of Brightwell, Turner, and the second author on
2-dimensional HQFTs with simply-connected or aspherical targets.
We give an explicit characterization for group extensions that correspond to
elements of the symmetric cohomology $HS^2(G,A)$. We also give conditions for
the map $HS^n(G,A)\to H^n(G,A)$ to be injective.
For a triple $(G,A,\kappa)$ (where $G$ is a group, $A$ is a $G$-module and
$\kappa:G^3\to A$ is a 3-cocycle) and a $G$-module $B$ we introduce a new
cohomology theory $_2H^n(G,A,\kappa;B)$ which we call the secondary cohomology.
We give a construction that associates to a pointed topological space $(X,x_0)$
an invariant $_2\kappa^4\in_2H^4(\pi_1(X),\pi_2(X),\kappa^3;\pi_3(X))$. This
construction can be seen a "3-type" generalization of the classical
$k$-invariant.