Optimal Sequential Resource Sharing And Exchange In Multi-Agent Systems