(a)控制流图
(b)保存素数的数组长度为3时。t2=(n=5)会超出数组范围,而t1=(n=3)不会
(c)n=0
(d)
节点覆盖{1,2,3,4,5,6,4,7,8,2,9,10,11,9,12}
边覆盖{(1,2),(2,3),(3,4),(4,5),(5,6),(6,4),(4,5),(5,7),(7,8),(8,2),(2,9),(9,10),(10, 11),(11,9),(9,12)}
{(1,2),(2,3),(3,4),(4,5),(5,6),(6,4),(4,7),(7,8),(8,2),(2,9),(9,10),(10, 11),(11,9),(9,12)}
基本路径覆盖:={(1,2,10,11),(3,4,8,9,2,10,11,12),(3,4,8,2,10,11,12),(3,4,8,9,2,10,11),(3,4,8,2,10,11),(4,5,7,4),(4,5,6,8,9,2,3,4),(4,5,6,8,2,3,4),(4,8,9,2,3,4),(4,8,2,3,4),(5,7,4,5),(5,6,8,9,2,3,4,5),(1,2,3,4,8,9),(1,2,3,4,5,7),(1,2,3,4,5,6,8,9),(1,2,10,11,12),(2,3,4,8,9,2),(2,3,4,8,2),(2,3,4,5,7),(2,3,4,5,6,8,9,2),(2,3,4,5,6,8,2),(2,10,11,12),(2,10,11),(3,4,5,6,8,9,2,3),(3,4,5,6,8,2,3),(3,4,8,9,2,3),(3,4,8,2,3),(3,4,5,6,8,9,2,10,11,12),(3,4,5,6,8,2,10,11,12),(3,4,5,6,8,9,2,10,11),(3,4,5,6,8,2,10,11),(5,6,8,2,3,4,5),(6,8,9,2,3,4,5,6),(6,8,9,2,3,4,5,6),(6,8,9,2,3,4,5,7),(6,8,2,3,4,5,7),(7,4,5,7),(7,4,8,9,2,3),(7,4,8,2,3),(7,4,5,6,8,9,2,3),(7,4,5,6,8,2,3),(7,4,5,6,8,9,2,10,11,12),(7,4,5,6,8,9,2,10,11),(7,4,5,6,8,2,10,11,12),(7,4,5,6,8,2,10,11),(7,4,8,9,2,10,11,12),(7,4,8,9,2,10,11),(7,4,8,2,10,11,12),(7,4,8,2,10,11),(8,2,3,4,8),(8,9,2,3,4,8),(8,2,3,4,5,6,8),(8,9,2,3,4,5,6,8),(9,2,3,4,8,9),(9,2,3,4,5,6,8,9),(11,12,11),(12,11,12)}.
测试结果: