Combinatorial Methods For Analyzing Network Security And Reliability