Adding prototyping script for task partitioning. A best effort algorithm.