- Induction assumption:
- If
the precedence graph G
of n transactions
has
no cycles
then (⇒)
- Schedule S
of n transactions is
conflict-serializable
|
|
- Prove that:
- If
the precedence graph G
of n+1 transactions
has
no cycles
then (⇒)
- Schedule S
of n+1 transactions is
conflict-serializable
|
|
Proof:
- Given: the precedence graph G
of n+1 transactions
has
no cycles
(I.e.: G is a
tree !!!)
- Then:
That means
that we have the
following property in the
schedule S:
-
Every action (operation) of
Tk
in schedule S is
preceded by
non conflicting actions
from other transactions
Graphically:
Because:
-
Otherwise, there will be
an
in-going edge to
Tk !!!
|
|
Therefore, we can
move
all of
the actions of
Tk to the
front of the
schedule:
Result:
Therefore, schedule S is
conflict equivalent to
the following
schedule:
S "==" Tk ; S''
where: S'' is a schedule of n transactions
|
- Furthermore, the
dependency graph for
the schedule S'' is
as follows:
- The dependency graph for
the schedule S''
does not have
cycles:
- Because removing
a node Tk and
all its outgoing edgs
will not create
cycles in a graph
|
So:
- S'' is
a schedule of
n transactions
- Its dependency graph does
not have
cycles
|
By the
induction assumption, we
conclude that:
- S'' is a
conflict-serializable schedule
|
Therefore:
S "==" Tk ; S'' (from above)
S'' is conflict-serializable
S'' is conflict-equivalent to some serial schedule
===> S "==" Tk ; Serial Schedule
"==" also a Serial Schedule
===> S is conflict-serializable
|
|
|