Connected groupoids and action groupoids It is written in Wikipedia http://en.wikipedia.org/wiki/Groupoid,
that any connected groupoid $A\rightrightarrows X$ is isomorphic to the action groupoid
coming from a transitive action of some group $G$ on $X$.
I do not understand how to construct the corresponding group $G$.
Let $A\rightrightarrows X$ be a connected groupoid, where $X$ is the set of objects and $A$ is the set of arrows.
Choose an object $x_0\in X$, and consider the set $G=A(x_0,-)$, the set of all arrows starting from $x_0$.
I think that $G$ is the corresponding group. How can  I  define a composition law on $G$?
Any help will be appreciated.
 A: A connected groupoid A can be written as an action groupoid for many different groups G. All the groupoid determines is H, the group of automorphisms of any object in the groupoid, and the index of H in G, which is the cardinality of the set of objects of the groupoid. And any group G with subgroup H of the correct index, the action of G on the set of cosets of H has action groupoid isomorphic to A.
This is to be expected, because if we think of H as a one object groupoid and of X as an indiscrete groupoid (the set of objects is X, and there is a unique morphism between any pair of objects) then the original groupoid A is isomorphic to the product H × X,  so the isomorphism class of A depends only on the group H and the cardinality of X.
UPDATE 2: Here is a sloganized answer to the question: the equivalence class of a connected groupoid A is determined by the isomorphism class of the group H = Aut(x0); the isomorphism class of a category is given by the data of its equivalence class plus the number of isomorphic copies of each object in a skeleton.
UPDATE: Here is a proof of the claims above "UPDATE 2".
Claim 1: A is isomorphic to H × X.
Proof. Choose an object x0 of A, identify H with Aut(x0) and choose arbitrary morphisms ax : x0 → x. The isomorphism H × X → A is the identity on objects and sends a morphism (h, u) : x → y to the morphism ay h ax-1. (Here u is the unique morphism in X from x to y.) The inverse A → H × X sends a morphism a : x → y to (ay-1 a ax, u) --same u as above.
Claim 2: For any group G with a subgroup H of index |X|, the action groupoid of G acting on the set G/H of cosets is isomorphic to A. 
Proof. Both groupoids are isomorphic to H × X.
As an extreme example of this, let G act on itself by translation and take the action groupoid. This has set of objects G and a unique morphism between every pair of elements. Notice all traces of the group structure of G are gone: the isomorphism class of this indiscrete groupoid only depends on the cardinality of G.
A: Another way of looking at this is to use the equivalence of categories between covering morphisms of a groupoid $P$ and actions of $P$ on sets. (Recall that a covering morphism $p:G \to P$ is a groupoid morphism having unique path lifting. Not necessarily uniqe path lifting gives a fibration of groupoids.) Given an operation of $P$ on a set $X$ then the corresponding covering morphism may be written $P \ltimes X$, an action groupoid, and thought of as a semidirect product because it is a special case of the semidirect product for an action of a groupoid $P$ on a groupoid $H$. For this one needs a morphism of groupoids $\omega: H \to Ob(P)$, where the latter is thought of as a discrete groupoid, and an element $w: x \to y$ in $P$ gives a morphism of groupoids $w_*: \omega^{-1}(x) \to \omega^{-1}(y)$. One has to be precise on conventions to get all this right, which I won't do here. 
So a groupoid $G$ has a representation as an action groupoid whenever you  are given a covering morphism $ G \to P$. This is closely related to Omar's answer, of course. 
