Bipolarity
- 773
- 2
I've been trying to prove the following, without much success.
Let ##B## and ##C## be nonempty finite subsets of an ordered field ##\mathbb{F}##. Define the swapping operation ##S## as follows:
It takes an element ##b## from ##B##, an element ##c## from ##C##, removes ##b## from ##B## and gives it to ##C##, removes ##c## from ##C## and gives it to ##B##. Now suppose that ##\max(B) \geq \min(C)##. Then prove that in a finite number of operations of S, the sets ##B## and ##C## can be transformed so that ##\max(B) < \min(C)##.
Where would I start? I'm thinking by we can use induction/loop invariants, but I don't have much experience in algorithm proofs, so I could use some help. Thanks!
BiP
Let ##B## and ##C## be nonempty finite subsets of an ordered field ##\mathbb{F}##. Define the swapping operation ##S## as follows:
It takes an element ##b## from ##B##, an element ##c## from ##C##, removes ##b## from ##B## and gives it to ##C##, removes ##c## from ##C## and gives it to ##B##. Now suppose that ##\max(B) \geq \min(C)##. Then prove that in a finite number of operations of S, the sets ##B## and ##C## can be transformed so that ##\max(B) < \min(C)##.
Where would I start? I'm thinking by we can use induction/loop invariants, but I don't have much experience in algorithm proofs, so I could use some help. Thanks!
BiP
Last edited by a moderator: