How does one derive the likelihood from the pmf below?
I think I can derive the first 2 branches of the likelihood. For example the pmf has $x=\theta/2, \ x=2\theta, \ x=2\theta+1$ for theta even. The first equation is valid whether x is even or odd. The second only valid for x even, and the third when x is odd. We do a similar reasoning for the second branch. So, re-equate the equations in terms of x, and get the first two branches of the likelihood. I have no idea how to obtain the third one...
There's no need for a context, all you need is right there. But if you'd like to know more the example was taken from here, page 7 (127), section 5.3.2.
Any help would be appreciated.

I would like to help resolving this issue. Let's put aside for the moment the case $\theta=1$.
I suggest looking at the values of $\theta$ columnwise. The first column is $x=\theta/2$ when $\theta$ is even and $(\theta-1)/2$ when $\theta$ is odd.
We notice that these give the same image $x$ for two consecutive numbers $\theta$, even-odd . In other words if $\theta=2k$ and $\theta=2k+1$, for $k=1,2,3\ldots$, then $x=k$.
Another important think is that there are no "gaps" in the values of $x$. This means that $x$ takes all possible values $2,3\ldots$. So, for any value of $x\neq 1$ either odd or even there correspond two values of $\theta$, $\theta=2x$ and $\theta=2x+1$.
For the other two branches one can express $x$ by merging the two expressions as $x=2\theta$ and $x=2\theta+1$, $\theta=2,3,\ldots$.
These two functions are depicted on the whole range of values, the former on the evens and the second on the odds. So for $x$ even $\theta=x/2$ and for $x$ odd $\theta=(x-1)/2$.
Now, when $x=1$, $\theta=1$(obvious), $\theta=2$, from top equation, and $\theta=3$ from middle equation.
Q: $P(\delta(X)=\theta)$=?
A: Assume that $\theta=1$. Observing the pmf we see that the only possible values for $X=1,2,3$ each with probability 1/3 and $\delta(1)=\delta(2)=\delta(3)=1$.
Therefore $P(\delta(X) = 1) =P(1,2,3)=1$.
Now assume that $\theta\neq 1$. The probability can break as $$P(\delta(X) = \theta) =P(X \;\text{is even};\delta(X) = \theta) +P(X \;\text{is odd};\delta(X) = \theta) $$ $$=P(X \;\text{is even};X = 2 \theta) +P(X \;\text{is odd};X = 2\theta+1) $$ $$=P(X = 2 \theta) +P(X = 2\theta+1) $$
The last equality holds because $2\theta$ is even and $2\theta +1$ is odd for every $\theta$ and $X$ is even or $X$ is odd are larger events than $X=2\theta$ and $X=2\theta+1$, respectively.
Finally, $$P(X = 2 \theta) +P(X = 2\theta+1)=1/3+1/3=2/3 $$