Solved in a direct way.
#ways in which 'N' objects can be divided into K partitions where any partition can get any num including 0 is given by
C( N+K-1, K-1), where N = objects & K =partitions
# a b c d 1 2 3 4
T1: R(A) W(A) R(B) W(B) T2: R(B) W(B) R(C) W(C)
Constraints we need to follow while making conflict serializable schedules for the above transactions are :
1) For T1: a < b < c < d ( Here '<' means "comes before")
2) For T2: 1 < 2 < 3 < 4
3) When T1 < T2: d < 1 Since there are two conflicts of d. One with 1 (WR case) and another with 2 (WW case).Apart from this constraint, we must satisfy 1) & 2) constraints too for building conflict serializable schedules.
4) When T2 < T1: 2 < c Since there is one conflict of c with 2. Apart from this constraint, we must satisfy 1) & 2) constraints too for building conflict serializable schedules.
T1 < T2: Only one schedule exists! a b c d 1 2 3 4
T2 < T1: Three cases exists, arranging with reference to this structure _1_2_3_4_. All the blanks are partitions which can hold any no of items.(including 0)
a < b < 2 < c < d: For a < b < 2, N = 2; K =2; C( 2+2-1,2-1) = C(3,1) = 3.
For 2 < c < d, N =2; K =3; C(2+3-1, 3-1) = C(4,2) = 6
Thus 6 * 3 =18
a < 2 < b < c < d: For a < 2, N = 1; K = 2; C( 2+1-1,2-1) = C(2,1) = 2
For 2 < b < c < d. K = 3; N = 3; C(3+3-1,3-1) = C(5,2) = 10
Thus 10 * 2 = 20
2 < a < b < c < d: K = 3; N = 4; C(4+3-1,3-1) = C (6,2) = 15
So, T2 < T1 has 18 + 20 + 15 = 53 arrangements and T1 < T2 has 1 arrangement. Thus total 54(ans)