In most basic abstract algebra courses, the free group is directly constructed, a process that I find rather unwieldy. An alternate method of characterizing the free group is by means of its universal property: for any function $f:S\to G$, an arbitrary group, there is a function $g:S\to F\_{S}$ and a unique homomorphism $\varphi: F\_{S}\to G$ such that $f=\varphi g$. Of course, a direct construction of the free group is necessary to show that any group actually satisfies this definition. I was wondering what happened when the definition was dualized. In other words, let $P\_{S}$ be the group such that for any function $f:G\to S$, there is a function $g:P\_{S}\to S$ and a unique homomorphism $\varphi:G\to P\_{S}$ such that $f=g\varphi$. It would seem, in light of Cayley's theorem, that $P\_{S}$ is just the set of permutations on $S$, but I'm not sure of this. Does anyone know what $P\_{S}$ is?



Dualizing the definition of a free group
As has been noted in the comments, your definition of "free group on $S$" is not quite right. The map $g\colon S\to F\_S$ is fixed, and is part of the "free group" (that is, the free group on $S$ is the pair $(F\_S,g)$, with $g\colon S\to F\_S$ a set-theoretic map). The universal property is that for every set map $f\colon S\to G$ into an arbitrary group, there exists a unique homomorphism $\varphi\colon F\_S\to G$ such that $g = \varphi f$. But $f$ is not allowed to depend on $g$. 


It is not hard to see that no such "cofree group" can exist on sets with more than one element. Suppose that you have a set $S$ with more than one element, and a "cofree group" on $S$, $C\_S$, together with a set-theoretic map $f\colon C\_S\to S$ such that for every group $G$ and every set-theoretic map $g:G\to S$, there exists a unique homomorphism $\varphi\colon G\to C\_S$ such that $f = g\varphi$. Let $a\in S$ be different from $f(e)$; then the map $g\colon G\to S$ with $g(x)=a$ cannot factor through $C\_S$. 


As for the case $S=\{s\_0\}$, uniqueness of $\varphi$ forces $C\_S$ to be the trivial group, because both the zero map and the identity on $C\_S$ would satisfy the universal property relative to $f$.


The free group construction is the left adjoint of the underlying set functor. In general, left adjoints respect colimits and right adjoints respect limits; that is why the underlying set of a product of groups is the set-theoretic product of the underlying sets (underlying set is the right adjoint, so it respects limits like the product), and why the free group on the disjoint union of two sets is the free product of the free groups on the two sets (disjoint union being the coproduct in $Sets$, free product the coproduct in $Groups$, and coproduct being a colimit). As James Borger notes, if you had a dual of the free group construction, it would be the right adjoint of the underlying set functor and would therefore have to respect colimits. So that the underlying set of a free product of groups would have to be the disjoint union of the underlying sets of the groups. This does not occur, so no such object can exist.


P.S. As has also been pointed out in the comments, the universal property is nice and all, and can prove uniqueness, but in general one needs either very high-power categorical/universal algebraic theorems to deduce existence, or one must actually *construct* the objects in some way. In the case of free groups, while there are many constructions (e.g., as a "big direct product"; see the reference I'm about to give), it is via words or other equivalent constructions (e.g., the fundamental group of a bouqet of circles) that one can get a better handle of them. But if you like universal constructions (nothing wrong with that!) I recommend taking a look at George Bergman's [An Invitation to General Algebra and Universal Constructions](http://math.berkeley.edu/~gbergman/245/). It has three different constructions of the free group in Chapter 2.


