On page 87 of the book " Introductory to group theory by Bogopolski", they gave an example of the fundamental group of a graph of groups with respect to a maximal subtree, which I understood well. However, the problem below asks to find the fundamental group of a graph of groups without any mention to a maximal subtree, but I tried to solve it anyway. What changes about finding it without a maximal subtree? Is my way the right one? Thanks for your help!
Question: Find a presentation for the fundamental group of the graph of groups $(\mathbb{G, Y})$ defined as follows. The graph $Y$ is a triangle with 3 vertices $v_{1}, v_{2}, v_{3}$ and 6 edges $e_{j}$, $1\le j\le 6$ with $e_{4}=\overline{e}_{1}, e_{5}=\overline{e}_{2} $ and $e_{6}=\overline{e}_{3}$; the initial vertices are $\alpha(e_{1})=v_{1}, \alpha(e_{2})=v_{2}, \alpha(e_{3})=v_{3}$ and the terminal vertices are $\tau(e_{1})=v_{2}, \tau(e_{2})=v_{3}, \tau(e_{3})=v_{1}$. Let $l,m,n\ge 2$ be integers. The vertex groups and edge groups are $$G_{e_{1}}=G_{\overline{e}_{1}}=\mathbb{Z}_{l}=< a| a^{l} >,$$
$$G_{e_{2}}=G_{\overline{e}_{2}}=\mathbb{Z}_{m}=<b|b^{m}>,$$ $$G_{e_{3}}=G_{\overline{e}_{3}}=\mathbb{Z}_{n}=<c|c^{n}>,$$ $$G_{v_{1}}=\mathbb{Z}_{n}\oplus\mathbb{Z}_{l}=<c,a|cac^{-1}a^{-1}, c^{n}, a^{l}>,$$ $$G_{v_{2}}=\mathbb{Z}_{l}\oplus \mathbb{Z}_{m}=<a,b|bab^{-1}a^{-1}, a^{l}, b^{m}>,$$ $$G_{v_{3}}=\mathbb{z}_{m}\oplus\mathbb{Z}_{n}=<b,c|bcb^{-1}c^{-1}, b^{m}, c^{n}>.$$ The monomorphisms $\alpha_{e}: G_{e}\to G_{\alpha(e)}$ are the obvious inclusions. For instance, $$\alpha_{e_{1}}:\mathbb{Z}_{l}=G_{e_{1}}\to G_{\alpha (e_{1})}=G_{v_{1}}=\mathbb{Z}_{n}\oplus\mathbb{Z}_{l}$$ is given by $\alpha_{e_{1}}(x)=(1,x)$, where $1$ denotes the identity element of $\mathbb{Z}_{n}$.
What I have tried: $$\pi_{1}(\mathbb{G},Y)=\langle a,b,c,t_{e_{1}}, t_{e_{2}}, t_{e_{3}}|ca^{-1}ca^{-1}, c^{n}, a^{l}, bab^{-1}a^{-1}, b^{m}, bcb^{-1}c^{-1}, t^{-1}_{e_{1}}(1,a)t_{e_{1}}=(a,1), t^{-1}_{e_{2}}(1,b)t_{e_{2}}=(b,1), t^{-1}_{e_{3}}(1,c)t_{e_{3}}=(c,1) \rangle$$
If you are not given a maximal tree, then you have to compute one for yourself.
You can compute maximal trees, also called "spanning trees", using the depth first search algorithm. I'll carry out the algorithm on your example, but, I strongly advise you to draw a picture of the graph in order to learn to see maximal trees.
A maximal tree $T$ in a connected graph $G$ will contain each vertex. Roughly speaking, the depth first search algorithm builds $T$ inductively, starting with one vertex, and then adding one edge at a time as long as the new edge connects one vertex already in the graph with another vertex not yet in the graph. Since $G$ is connected, the algorithm is guaranteed to stop after a number of steps equal to the number of vertices.
We'll build $T$ inductively, starting with
Next, we'll ask: whats the first edge that connects $T_1$ to one of the other vertices $v_2,v_3$? The answer is $e_1$, because $\alpha(e_1)=v_1$ and $\tau(e_1)=v_2$. So, we not throw in $v_2$ and $e_1$, and so
Next, we'll ask: what's the first edge that connects $T_2$ to the remaining vertex $v_3$? The answer is $e_2$, because $\alpha(e_2)=v_2$ and $\tau(e_3)=v_3$, and so
and the algorithm is done.