Answer:
Step 1 of 1
For This proof we tack contradiction, and assume binary locks for simplicity.
Let n transactions T1, T2, ..., Tn such that they all obey the basic two-phase locking rule which is no transaction has an unlock operation followed by a lock operation. And Suppose that a non-(conflict)-serializable schedule S for T1, T2, ..., Tn does occur; then, according to the precedence (serialization) graph for S must have a cycle. Hence, there must be some sequence within the schedule of the form:
S: ...; [o1(X); ...; o2(X);] ...; [ o2(Y); ...; o3(Y);] ... ; [on(Z); ...; o1(Z);]...
where each pair of operations between square brackets [o,o] are conflicting (either [w,w], or [w, r], or [r,w]) in order to create an arc in the serialization graph. This implies that in transaction T1, Than a sequence of the following form occurs:
T1: ...; o1(X); ... ; o1(Z); ...
Furthermore, T1 has to unlock item X (so T2 can lock it before applying o2(X) to follow
the rules of locking) and has to lock item Z (before applying o1(Z), but this must occur
after Tn has unlocked it). Hence, a sequence in T1 of the following form occurs:
T1: ...; o1(X); ...; unlock(X); ... ; lock(Z); ...; o1(Z); ...
This implies that T1 does not obey the two-phase locking protocol (since lock(Z) follows
unlock(X)), contradicting our assumption that all transactions in S follow the two-phase
locking protocol.