This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Ü ½ Ü¾
ÜÒ to a transposition network and the state of the network
Solution: Consider an input
.
after the th comparator. We denote the data held by line after the th comparator by
Lemma 1 Consider the descending input
Consider also any other input
Ü½
, then
. Ü¾ Ò Ò ½
½ to some Òinput transposition network.
ÜÒ . For any pairs of lines and with
, if Proof. We use induction over the Ö comparators in order.
,
For a base case, consider the network before any comparators. For any and with
¼
¼
because the input is descending. Thus, we make no claim about any of the
.
¼
Assume that the claim holds after the ½th comparator. Consider the th comparator. Because we
have a transposition network, we compare two adjacent lines and · ½. We need to show that the
claim holds (for all pairs) of lines after the th comparator. That is, consider any two lines and with
½
Ö. Suppose that
. Then we need to show that
. We have several
cases:
Case 1 Suppose that
and
· ½. Note that
´ · ½µ
because of how a comparator works,
so
´ · ½µ
.
,
· ½,
, and
· ½. Then lines
and are not involved in
Case 2 Suppose that
the comparator. Thus, ½ ½ . By our inductive assumption, we have
. ½ ½ , which yields ½ ½
, and
. Then we have
Ñ Ò´
Case 3 Suppose that ½ ½ ´ · ½µ ½ µ
Ñ Ü´
´ · ½µ
µ. By the inductive assumption,
and ½ ½ ½ ½ ½ ´ ·
½µ
. Thus,
Ñ Ò´
´ · ½µ
µ
. ½ ½ ½ ½
Case 4 Suppose that
, but
·½. Then we have
Ñ Ü´ ½ ½ ´ · ½µ ½ µ.
If ½ ´ · ½µ ½, then we have ½...
View Full
Document
 Spring '07
 BradleyKuszmaul

Click to edit the document details