Algorithm 2 Fuzzy Quicksort
Input: a sequence of intervals , where and denotes the lower and upper bound of the interval
Output: a sorted sequence of input intervals
1:FuzzyQuicksort()
2:
3:procedure FuzzyQuicksort()
4:if then
5: FuzzyPartition()
6:FuzzyQuicksort()
7:FuzzyQuicksort()
8:end if
9:end procedure
10:
11:procedure FuzzyPartition()
12:exchange with
13:
14:
15:
16:for to do
17:if then // interval less than condition
18:exchange with
19:
20:exchange with
21:
22:else if and then // interval equal condition
23:exchange with
24:
25:end if
26:end for
27:return
28:end procedure