# Diffusion of gas across a membrane

Two adiabatic cylinders are divided internally into two equal parts by a semi-permeable membrane. The membrane only lets hydrogen pass through it. The first cylinder has one half filled with hydrogen (P=1atm) and other half is vacuum initially. The second cylinder has the first part filled with hydrogen(P=1atm) and the second part with oxygen (P=2atm) initially.

When both systems achieve equilibrium, what is the ratio of hydrogen gas (moles) present on either sides of the partition in both cases.

I can see that the first cylinder will have hydrogen in ratio 1:1, but I have a problem with the second part. I think there shouldn't be any diffusion because the pressure on the other side is already greater. But as it turns out, the answer given for second part is also 1:1. Can someone tell me why this is so?

To get an intuition, why only partial pressure is important, consider the following. In left half you have mixed gas at $$2.5~\text{atm}$$: $$4$$ parts oxygen and $$1$$ part hydrogen. In the right half only $$0.5~\text{atm}$$ hydrogen. The molecules bombard the membrane from the left $$5$$ times more frequently than from the right. But at the same time, only $$1/5$$ of those molecules are actually hydrogen, which gives us the frequency of hydrogen molecules colliding with membrane the same.