Theory Of Resource Allocation For Robust Distributed Computing