Algorithms and Models for Problems in Networking