Reliability evaluation for wireless sensor networks with chain structures using the universal generating function