mixed covering arrays on graphs presenter: latifa zekaoui joint work with karen meagher and lucia...
TRANSCRIPT
Mixed Covering Arrays on Mixed Covering Arrays on GraphsGraphs
Presenter:Presenter:
Latifa ZekaouiLatifa Zekaoui
Joint work with Karen Meagher and Lucia MouraJoint work with Karen Meagher and Lucia Mourato appear in the Journal of Combinatorial Designsto appear in the Journal of Combinatorial Designs
School of Information and TechnologySchool of Information and TechnologyUniversity of OttawaUniversity of Ottawa
22
OutlineOutline Covering ArraysCovering Arrays ApplicationsApplications Covering Arrays on GraphsCovering Arrays on Graphs Mixed Covering Arrays on GraphsMixed Covering Arrays on Graphs Graph HomomorphismsGraph Homomorphisms Mixed Qualitative Independence GraphMixed Qualitative Independence Graph nn-chromatic Graphs for -chromatic Graphs for nn = 2,3,4,5 = 2,3,4,5 Graph Operations: Tree & Cycle ConstructionGraph Operations: Tree & Cycle Construction Bipartite Graph ConstructionBipartite Graph Construction
33
Covering ArrayCovering ArrayA Covering Array, denoted CA(N, k, g), is a k x N array with: entries from Zg (g is the alphabet) and between any two rows any pair from Zg occurs in some column. (Pairs of rows satisfying this property are said to be Qualitatively Independent.)
CAN(k, g) is the smallest N such that a CA(N, k, g) exists.
Test light wiring in your home: 0 => OFF, 1 => ON
room \ test:room \ test: 11 22 33 44 55
bedroom 0 1 1 1 0
hall 0 1 1 0 1
bathroom 0 1 0 1 1
kitchen 0 0 1 1 1Example of an optimal CA: CAN(4, 2) = 5.
44
ApplicationsApplications
Covering Arrays are used in:Covering Arrays are used in:
Circuit Testing Circuit Testing (Boroday and Grunskii, 1992)(Boroday and Grunskii, 1992) Network Testing Network Testing (Williams and Probert, 1996)(Williams and Probert, 1996) Software Testing Software Testing (Cohen, Dalal, Fredman and (Cohen, Dalal, Fredman and
Patton, 1997; Cheng, Dumitrescu and Schroeder, 2003)Patton, 1997; Cheng, Dumitrescu and Schroeder, 2003)
55
Software Testing ApplicationSoftware Testing Application
Software Testing:Software Testing:
Test parameters individually.Test parameters individually. But faults generally result from the interaction between certainBut faults generally result from the interaction between certain parameters.parameters. Test every possible combination of parameter values. gTest every possible combination of parameter values. gk k GROWS EXPONENTIALLY!!GROWS EXPONENTIALLY!! Enormous test suite sizes even for a small number of parameters.Enormous test suite sizes even for a small number of parameters. Covering arrays are used to test interaction between every pair of parameters.Covering arrays are used to test interaction between every pair of parameters.
Example: 10 parameters with 4 input valuesExample: 10 parameters with 4 input values
k = 10, g = 4, All possible interactions => 4k = 10, g = 4, All possible interactions => 410 10 = 1,048,576 test suites.= 1,048,576 test suites.k = 10, g = 4, All pair-wise interactions => 29 test suites using a covering array.k = 10, g = 4, All pair-wise interactions => 29 test suites using a covering array.
Asymptotic result (Gargano, Korner and Vaccaro, 1990)Asymptotic result (Gargano, Korner and Vaccaro, 1990)
lim CAN( lim CAN( g, kg, k) = log ) = log kk kk
2
g
66
Circuit Testing ApplicationCircuit Testing Applicationxx11 xx22 xx33 xx44
{ x{ x33, x, x4 4 }}{ x{ x11,, xx22, x, x3 3 }}
We do not need to We do not need to test the interaction test the interaction between {xbetween {x11, x, x44} or } or
{x{x22, x, x44} .} .
x2x1
x3 x4
Build this graph:Build this graph:
Build a CA on the Build a CA on the above graph.above graph.
77
Software Testing: Relevant InteractionsSoftware Testing: Relevant InteractionsFind the area of two triangles given PFind the area of two triangles given P11, P, P22, P, P33, H, H11, H, H2 2 each with 3 values. each with 3 values.
AA11
PP11 PP22 PP33
HH22
HH11
AA22
calculateTriangleArea(P1, P2, P3, H1, H2)calculateTriangleArea(P1, P2, P3, H1, H2){{ A1 = 0.5 * (P2 – P1) * H1;A1 = 0.5 * (P2 – P1) * H1;
A2 = 0.5 * (P3 – P2) * H2;A2 = 0.5 * (P3 – P2) * H2;return (A1, A2)return (A1, A2)}}
We do not need to We do not need to test the interaction test the interaction between {Pbetween {P11, P, P33}, },
{P{P11, H, H22}, {P}, {P33, H, H11}, },
or {Hor {H11, H, H22} .} .
HH11
PP22PP11 PP33
HH22
Build this graph:Build this graph:
Build a CA on the Build a CA on the above graph.above graph.
88
Covering Arrays on GraphsCovering Arrays on GraphsA Covering Array on a Weighted Graph G, denoted CA(N, G, g), is a k x N array where k = |V(G)| with entries from Zg (g is the alphabet and weight on vertices) rows for adjacent vertices are qualitatively independent CAN(G , g) is the smallest N such that a CA(N, G, g) exists.
Test wiring in your home:room \ test:room \ test: 11 22 33 44
A: bedroomA: bedroom 00 00 11 11
B: hallB: hall 00 11 00 11
C: bathroomC: bathroom 00 11 11 00
D: kitchenD: kitchen 00 00 11 11
B: 2A: 2
C: 2 D: 2
Graph G
Example of an optimal CA: CAN(G, 2) = 4.
99
Covering ArrayCovering ArrayA Covering Array, denoted CA(N, k, g), is a k x N array with: entries from Zg (g is the alphabet) and between any two rows any pair from Zg occurs in some column. (Pairs of rows satisfying this property are said to be Qualitatively Independent.)
CAN(k, g) is the smallest N such that a CA(N, k, g) exists.
Test light wiring in your home: 0 => OFF, 1 => ON
room \ test:room \ test: 11 22 33 44 55
bedroom 0 1 1 1 0
hall 0 1 1 0 1
bathroom 0 1 0 1 1
kitchen 0 0 1 1 1Example of an optimal CA: CAN(4, 2) = 5.
1010
Software Testing: Mixed CaseSoftware Testing: Mixed CaseFind the area of two triangles given PFind the area of two triangles given P11, P, P22, P, P33, H, H11, H, H2 2 each with a different number of values. each with a different number of values.
AA11
PP11 PP22 PP33
HH22
HH11
AA22
calculateTriangleArea(P1, P2, P3, H1, H2)calculateTriangleArea(P1, P2, P3, H1, H2){{ A1 = 0.5 * (P2 – P1) * H1;A1 = 0.5 * (P2 – P1) * H1;
A2 = 0.5 * (P3 – P2) * H2;A2 = 0.5 * (P3 – P2) * H2;return (A1, A2)return (A1, A2)}}
We do not need to We do not need to test the interaction test the interaction between {Pbetween {P11, P, P33}, },
{P{P11, H, H22}, {P}, {P33, H, H11}, },
or {Hor {H11, H, H22} .} .
HH11
PP22PP11 PP33
HH22
Build this graph:Build this graph:
Build a CA on the Build a CA on the above graph.above graph.
1111
Mixed Covering Arrays on GraphsMixed Covering Arrays on GraphsA A Mixed Covering Array on a weighted GraphMixed Covering Array on a weighted Graph G, denoted by, denoted byCA(N, G, g1g2…gk), hashas mixed alphabet sizes for different rowsmixed alphabet sizes for different rowsin the graph. in the graph.
The The Product WeightProduct Weight of a graph of a graph G, denoted denoted PW(G), is is PW(G) = max {wG(u) * wG(v) : {u,v} є E(G) }.
CAN(G, g1,g2,…, gk) ≥ PW(G)
B: 3A: 2
C: 2 D: 2
room \ test:room \ test: 11 22 33 44 55 66
A: bedroomA: bedroom 00 11 00 11 00 11
B: hallB: hall 00 00 11 11 22 22
C: bathroomC: bathroom 00 11 11 00 11 00
D: kitchenD: kitchen 00 11 11 00 00 11
Example of an optimal CA: CAN(G, 233) = 6.
Graph G
1212
v (v)v (v)w(v) = 5 w( (v)) = w(v) = 5 w( (v)) = 44
Graph HomomorphismsGraph Homomorphisms
A mapping from V(A mapping from V(GG) to V() to V(HH) is a ) is a graph homomorphismgraph homomorphismfrom from GG to to HH if for all if for all vv, , ww V( V(GG), the vertices (), the vertices (vv) and () and (ww) ) are adjacent in are adjacent in HH whenever whenever vv and and ww are adjacent in are adjacent in GG. .
Let Let GG and and HH be weighted graphs. A mapping be weighted graphs. A mapping from V( from V(GG) to ) to V(V(HH) is a ) is a weight-restricted graph homomorphism, weight-restricted graph homomorphism, denoted denoted GG H,H, if is a graph homomorphism from if is a graph homomorphism from GG to to HH such that such that wwGG((vv) ≤ ) ≤ wwHH(( ((vv)), for all )), for all vv V( V(GG).).
w
vv
ww (w)(w)
(v)(v)
G H G H
v (v)v (v)w(v) = 5 w( (v)) = 7w(v) = 5 w( (v)) = 7
1313
Graph HomomorphismsGraph Homomorphisms
Theorem 1: (Meagher, Moura, Zekaoui)Theorem 1: (Meagher, Moura, Zekaoui)Let Let GG and and HH be weighted graphs with weights g be weighted graphs with weights g11, g, g22,…, ,…, ggkk and h and h11, h, h22, …, h, …, hl l respectively. If there exists a respectively. If there exists a weight-restricted graph homomorphism weight-restricted graph homomorphism : : GG H H thenthen CAN( CAN(GG, ) ≤ CAN(, ) ≤ CAN(HH, )., ).
Theorem 2Theorem 2: : (Meagher, Moura, Zekaoui)(Meagher, Moura, Zekaoui)
Let Let GG be a weighted graph with be a weighted graph with kk vertices vertices
and gand g11 ≤≤ g g22≤≤……≤ ≤ ggk k be positive weights. Then, be positive weights. Then,
CAN(CAN(KKωω((GG) ) , ) ≤ CAN(, ) ≤ CAN(GG, ) ≤ CAN(, ) ≤ CAN(KKΧΧ(G) (G) , )., ).
)(
1
G
iig
k
jjg
1
k
Gkllg
1)(
wi
k
ig
1j
l
jh
1
The following theorems are generalizations of work done byThe following theorems are generalizations of work done byMeagher and Stevens (2002) for the uniform alphabet case.Meagher and Stevens (2002) for the uniform alphabet case.
1414
nn-chromatic Graphs for -chromatic Graphs for nn = 2,3,4,5 = 2,3,4,5
Theorem 3Theorem 3: : (Meagher, Moura, Zekaoui)(Meagher, Moura, Zekaoui)Let Let GG be a weighted graph with be a weighted graph with kk vertices with vertices with
weights gweights g11 ≤ ≤ gg22 ≤≤ …… ≤ ≤ ggkk. If one of the following holds: . If one of the following holds:
1)1) χ χ(G) = 2, 3, (G) = 2, 3,
2) 2) χχ(G) = 4 and {2(G) = 4 and {244, 6, 644}, or}, or
3) 3) χχ(G) = 5 and {2(G) = 5 and {255, 3, 355, 23, 2344} and g} and gk-1 k-1 {4, 6, 10}, then {4, 6, 10}, then
CAN(CAN(GG, ) , ) ≤≤ g gk-1k-1ggkk..
The covering array number we are providing is an upper bound.The covering array number we are providing is an upper bound.
i
k
ki
g 3
i
k
ki
g 4
i
k
i
g1
From Theorem 2 and results from the paper by Moura, Stardom, From Theorem 2 and results from the paper by Moura, Stardom, Stevens, and Williams (2003), we get the next theorem.Stevens, and Williams (2003), we get the next theorem.
1515
Mixed Qualitative Independence GraphMixed Qualitative Independence Graph
Mixed Qualitative Independence GraphMixed Qualitative Independence Graph, denoted , denoted
QIQI((NN, ), is a graph, ), is a graph:: whose vertex set is the set of all gwhose vertex set is the set of all g ii-partitions of an -partitions of an NN-set-set
vertices are adjacent if and only if their corresponding partitions are qualitatively vertices are adjacent if and only if their corresponding partitions are qualitatively independent.independent.
Example: QI(6, 2x3)Example: QI(6, 2x3)
l
iig
1
gg1 1 = 2= 2 gg2 2 = 3= 3
156 | 234156 | 234
12 | 345612 | 3456
124 | 356124 | 356
123 | 456123 | 456 15 | 26 | 3415 | 26 | 34
12 | 35 | 4612 | 35 | 46
13 | 25 | 4613 | 25 | 46
1616
Corollary 5: (Meagher, Moura, Zekaoui)(Meagher, Moura, Zekaoui)
Let N be a positive integer and let G be a weighted graph with
distinct weights gg11, g, g22,…, g,…, grr, repeated, repeated s1, s2, …, sr times,
respectively. If ω(G) > ω(QI(N, ) or Χ(G) > Χ(QI(N, ),
then CAN(G, si
) > N.
Theorem 4Theorem 4: : (Meagher, Moura, Zekaoui)(Meagher, Moura, Zekaoui)
For a weighted graph For a weighted graph GG and positive integers and positive integers N N and gand g11, g, g22,…, ,…,
ggkk there exists a CA( there exists a CA(NN, , G,G, ) if and only if there exists a ) if and only if there exists a
weight-restricted graph homomorphism weight-restricted graph homomorphism GG QIQI((NN, , ). ).
Mixed Qualitative Independence GraphMixed Qualitative Independence Graph
r
iig
1
w
k
iig
1
ir
ig
1
k
iig
1
r
iig
1
1717
Mixed Covering Arrays on Graphs Mixed Covering Arrays on Graphs The problem of finding an optimal covering array on a general graph has The problem of finding an optimal covering array on a general graph has been shown to be NP-hard, even when restricted to the binary alphabet been shown to be NP-hard, even when restricted to the binary alphabet case. (Seroussi and Bshouty, 1988)case. (Seroussi and Bshouty, 1988)
We will build optimal covering arrays for special classes of graphs: trees, cycles, and bipartite graphs.
From Theorem 3, for G in one of these classes we have CAN(G, g1,g2,…,gk) ≤ gk-1gk.
Theorem 6: (Meagher, Moura, Zekaoui) Let G be a weighted tree, cycle or bipartite graph then,
CAN(G, g1,g2,…,gk) = PW(G).
1818
Graph OperationsGraph Operations One-vertex Edge Hooking
Insert a new edge where one end is in V(G) and the other is a new vertex.
Edge DuplicationCreate an edge that is parallel to an existing edge in G.
Weight-Restricted Edge SubdivisionEdge subdivision such that if Edge subdivision such that if xx is the new vertex in is the new vertex in GG adjacent to vertices adjacent to vertices y y and and zz then wthen wGG(x)w(x)wGG((yy) ) ≤ PW(G) and ≤ PW(G) and wwGG((xx)w)wGG((zz) ) ≤ PW(G).≤ PW(G).
The above operations will have no effect on the covering array number The above operations will have no effect on the covering array number of the modified graph.of the modified graph.
1919
4
Optimal Tree ConstructionOptimal Tree Construction
Build a tree T by starting Build a tree T by starting with an edge {u, v} such with an edge {u, v} such that PW(T) = that PW(T) = ww(u) * (u) * ww(v). (v).
Next, apply successive Next, apply successive one-vertex edge-hooking one-vertex edge-hooking in the proper order so as in the proper order so as to obtain T.to obtain T.
CAN(T, gCAN(T, g1 1 gg22…g…gkk)=PW(T))=PW(T)
PW(T) = 15PW(T) = 15
3
53
2
2
5
3 5
2
42
2020
Optimal Cycle ConstructionOptimal Cycle ConstructionTo build a CA onthe cycle C belowwith PW(C) = 9
Step 1:
Step 3:
Step 5:
Step 2:
Step 4:
3
3
3
3
2
3
3
2
2
3
3
012012012
000111222
010110101
000011110
012301230
A: 000111222B: 012012012
E: 010110101
C: 000011110D: 012301230
CA(9, C, 22324)
A:3
B:3
C:2D:4
E:2
3
3
24
2
2121
3
22
Graph Graph G: G: PW(PW(GG) = 12) = 12
Optimal Bipartite ConstructionOptimal Bipartite Construction
2
5
010101010101
012340123401
012012012012
001122334401
000000111111
000111222333
000000111111
3
5
2
2
4
5
2
4
5
2
43
5
2
5
5
5
2
2
5
2
43
Repeat the symbolsRepeat the symbols0,1,…, g-1 (PW(0,1,…, g-1 (PW(GG) / g) / gii) times) times
Repeat each symbol 0,1,…, Repeat each symbol 0,1,…, g-1 (PW(g-1 (PW(GG) / g) / gi i ) times) times
2222
Future WorkFuture Work
Finding Optimal Covering Arrays for other classes of graphsFinding Optimal Covering Arrays for other classes of graphs Solved for the uniform alphabet size cubic graphs and Solved for the uniform alphabet size cubic graphs and wheelswheels
Implementing Tabu Search Methods for Covering ArraysImplementing Tabu Search Methods for Covering Arrays Stardom’s Algorithm (2001).Stardom’s Algorithm (2001). Nurmela’s Algorithm (2004).Nurmela’s Algorithm (2004). Moura and Zekaoui’s Algorithm (in progress) Moura and Zekaoui’s Algorithm (in progress)
which combines greedy techniques with a tabu search which combines greedy techniques with a tabu search method that adds or deletes a test case at each iteration. method that adds or deletes a test case at each iteration.
2323
ReferencesReferences S.Y. Boroday and I.S Grunskii. Recursive generation of locally complete tests. Cybernetics and S.Y. Boroday and I.S Grunskii. Recursive generation of locally complete tests. Cybernetics and
Systems Analysis 28 (1992), 20- 25. Systems Analysis 28 (1992), 20- 25. C. Cheng, A. Dumitrescu and P. Schroeder. Generating small combinatorial test suites to cover C. Cheng, A. Dumitrescu and P. Schroeder. Generating small combinatorial test suites to cover
input-output relationships. Proceedings of the Third International Conference on Qualityinput-output relationships. Proceedings of the Third International Conference on Quality
software. Dallas (2003), p. 76-82.software. Dallas (2003), p. 76-82. D.M.Cohen, S.R.Dalal, M.L.Fredman, and G.C.Patton. The AETG system: an approach to D.M.Cohen, S.R.Dalal, M.L.Fredman, and G.C.Patton. The AETG system: an approach to
testing based on combinatorial design. IEEE Transactions on Software Engineering. 23(1997), testing based on combinatorial design. IEEE Transactions on Software Engineering. 23(1997),
p.437-44.p.437-44. C.J.Colbourn. Combinatorial aspects of covering arrays. Le Matematiche(Catania) 58(2004), C.J.Colbourn. Combinatorial aspects of covering arrays. Le Matematiche(Catania) 58(2004),
p. 121-167.p. 121-167. L.Garagano, J.Korner, and U.Vaccaro. Capacities: from information to extremal set theory. L.Garagano, J.Korner, and U.Vaccaro. Capacities: from information to extremal set theory.
Journal of Combinatorial Theory. 68(1994), p. 296-316.Journal of Combinatorial Theory. 68(1994), p. 296-316. K. Meagher, L. Moura, L. Zekaoui. Mixed Covering Arrays on Graphs. Journal of Combinatorial K. Meagher, L. Moura, L. Zekaoui. Mixed Covering Arrays on Graphs. Journal of Combinatorial
design. to appear.design. to appear. K. Meagher, B. Stevens. Covering arrays on graphs. Journal Combinatorial Theory. Ser. B K. Meagher, B. Stevens. Covering arrays on graphs. Journal Combinatorial Theory. Ser. B
95(2005), p. 134-151.95(2005), p. 134-151. L. Moura, J. Stardom, B. Stevens, A. Williams. Covering Arrays with Mixed Alphabet Sizes. L. Moura, J. Stardom, B. Stevens, A. Williams. Covering Arrays with Mixed Alphabet Sizes.
Journal of Combinatorial Design. 11(2003), p. 416-432.Journal of Combinatorial Design. 11(2003), p. 416-432. G. Seroussi and N.H.Bshouty. Vector sets for exhaustive testing of logic circuits. IEEE Trans. G. Seroussi and N.H.Bshouty. Vector sets for exhaustive testing of logic circuits. IEEE Trans.
on Infor. Theory. 34(1988), p. 513-522.on Infor. Theory. 34(1988), p. 513-522. A.Williams and R.L.Probert. A measure for component interaction test coverage. IEEE(2001), A.Williams and R.L.Probert. A measure for component interaction test coverage. IEEE(2001),
p. 301-311.p. 301-311.
2424
THANK YOUTHANK YOU