NP-hard networking problems: exact and approximate algorithms