Does every point in {0, 1, 2, 3} correspond to the image of one and only one point in {1, 2, 3, 4}? (You have already answered this) if so the inverse exists.

Alternativly in terms of the arrow diagram is every point in {1,2,3,4} the end point of one and only one arrow from a point in {1,2,3,4}, if so just reverse the arrows and this defines the inverse function.

CB