What exactly is the logical relation between the links in the twelvefold chain of Pratītyasamutpāda? I'm struggling hard to make final sense of the chain of "dependent origination". In the oldest texts in Pali and Sanskrit, already, there are different explanations.

The Mahānidānasutta, where the chain has just nine links, the general formula is


  x-paccayā y


meaning


  through the condition of x, y (is).


Now the question arises, what kind of condition this is thought to be: a sufficient condition? A necessary condition? Or both of them?

The second part, states quite clearly, that if x is not there, then y is also not there, implying necessity of x for y.

Now, a general rule (e.g. Majjhima Nikaya 38, 19) states:


  imasmiṃ sati idaṃ hoti, imassuppādā idaṃ uppajjati


which translates as:


  If that is, this is, through arising of that, this arises


This is also consistent with a parallel in the Sanskrit Catuṣpariṣatsūtra but not with the view, that we are dealing with mere necessary conditions. They need to be sufficient, for this general statement to apply.

Now here things become even more complicated, since another general rule, actually a seemingly extended version of the former states (MN 79, 7, also in SN and Udana)


  imasmiṃ sati idaṃ hoti, imassuppādā idaṃ uppajjati; imasmiṃ asati idaṃ na hoti, imassa nirodhā idaṃ nirujjhati


which now means


  When that is, this is, through arising of that, this arises; when that is not, this is not, with cessation of that, this ceases.


implying biconditionality.

How are the different versions explained? What is, in the end, the relation between the links? What can be thought to be the Buddha's original version and intention?
As I understand, the relationship is that of mutual implication. This meaning is reflected in the name pratitya-samutpada, that is often translated as "dependent co-arising" and such.

Mutual implication means one of the categories serves as context for the other and the other way around. Top is defined against bottom and vice verse. Life is defined against death and vice verse. This (upclose) is defined against That (far). Subjective is defined against Objective.

The twelve nidanas are meant to explain the emergence of the notion of Death by implication from Birth, of Birth by implication from Identifying with Separate Being, of Identifying with Separate Being by implication from Goal-making, of Goal-making by implication from Temporal Projection, of Temporal Projection by implication from Sensation as Result, of Sensation as Result by implication from Contact, of Contact by implication from Doors onto the world, of Doors onto the world by implication from Objects, of Objects by implication from Recognition, of Recognition by implication from Imprints, of Imprints by implication from Ignorance.