All valid Scheduling sequence

Lets imagine you are given a list of tasks which can over lap. Task i is defined as interval [start_i, end_i] where start_i and end_i are some timestamp. The end_i will be > start_i.
Now, How many ways you can schedule these task meeting the conditon that for any task i, end_i > start_i. The tasks can interleave.

Example 2 Tasks. [Task i and Task j]
Valid Sequences: 
			[start 1, start 2, end 1, end 2]
			[start 2, start 1, end 1, end 2]
			[start 1, start 2, end 2, end 1]
			[start 2, start 1, end 2, end 1]
			
			[start 1, end 1, start2 , end 2]
			[start 2, end 2, start 1, end 1]

Invalid:
			[start 1,  end 1, end 2, start 2] # end 2 < start 2 
			[start 1, start 1, start 2, end 2] # start 1 repeat
			[start 1, start 2, end 1]        # there is no end 2
			
Comments (0)