1. Introduction
How the encoding works
Fix a vertex
ordering
Build ZDD to
represent
maximum
independent
sets
Any path from
root to terminal
1 is a set of
vertices that can
have the same
color
Application
1. Solving graph-coloring problem
Problem: color the graph so that no
adjacent vertices share the same
color.
Solution: A ZDD where a path from
root to 1 represents a set of vertices
that can be colored same.
MakeIndSetZDD
Reference
• Morrison, D. R., & Edward, C. S. (2013). Solving the pricing problem in a generic
branch-and-price algorithm using zero-suppressed binary decision diagrams. In
University of Illinois, Urbana-Champaign.
• Orlowski, S., Wessäly, R., Pióro, M., & Tomaszewski, A. (2010). SNDlib 1.0—
Survivable Network Design Library. Networks, 55(3), 276–286.
doi:10.1002/net.20371
• Andersen, H. R. (1999). An introduction to binary decision diagrams. Lecture notes
for Efficient Algorithms and Programs.
Findings
• The size of ZDD and the time it takes to construct
the ZDD all depend on vertex or edge ordering of
the original graph.
• Four different edge ordering rules:
• Order edge by vertex indegree.
• Order edge by vertex outdegree.
• Order edge by path from source to sink.
Algorithm: MakeIndSetZDD
Source Sink
Performance (ZDD
size/time) Original Performance(ZDD size/time)
9 0 180(0.01s) 236(0.02s)
8 0 102(0.02s) 192(0.02s)
7 0 116(0.01s) 137(0.02s)
6 0 94(0.01s) 182 (0.02s)
5 0 142(0.01s) 185(0.01s)
4 0 152(0.01s) 181(0.01s)
3 0 138(0.01s) 141(0.02s)
2 0 128(0.01s) 94(0.01s)
1 0 134(0.01s) 176(0.02s)
Special thanks to:
Future Work
• Further research into the relation between edge
ordering and the size of ZDD.
• Find out how the structure of the graph affects
ZDD size.
Zero-suppressed Binary Decision Diagram (ZDD)
Mentor: David R. Morrison, Mentee: Mingwei Hu
University of Illinois Urbana-Champaign, Department of Computer Science
› Inputs:
–A Boolean function:
› f 𝑥1, 𝑦1, 𝑥2, 𝑦2 = 𝑥1 ⟺ 𝑦1 ⋀ 𝑥2 ⇔ 𝑦2
–An ordering:
› 𝑥1 < 𝑦1 < 𝑥2 < 𝑦2
–Start from x1, replace it with either 0
or 1:
– f 0, 𝑦1, 𝑥2, 𝑦2 = 0 ⟺ 𝑦1 ⋀ 𝑥2 ⇔ 𝑦2
– f 1, 𝑦1, 𝑥2, 𝑦2 = 1 ⟺ 𝑦1 ⋀ 𝑥2 ⇔ 𝑦2
– Continue with other variables, until all
possible combinations are evaluated:
– f 0,0,0,0 = 0 ⟺ 0 ⋀ 0 ⇔ 0 = 1
– f 1,0,0,0 = 1 ⟺ 0 ⋀ 0 ⇔ 0 = 0
– ……
› A solution is a path from the root to
terminal 1.
› Binary Decision Diagram
– A data structure used for encoding solutions of
Boolean functions.
– ZDD is a modified version of BDD, used for
encoding set of Boolean combinations, i.e. implicit
Boolean function.
– A rooted, directed acyclic graph.
– Two terminal nodes:
0—empty set: ∅.
1—set of empty set: {∅}.
– Non-leaf node 𝑢 is represented by a three tuple
(𝑖, 𝑙, ℎ)
𝑖: the Boolean variable represented by 𝑢.
𝑙: Low edge “---”: variable 𝑖 doesn’t exist or has value 0.
ℎ: High edge “—”: variable 𝑖 exists or has value 1.
Vertex Adjacent vertices
0
1 7 0 4 8
2 4 8 7 5 6 0 1 3
3 0 4 1 8 7 6 5
4 0
5 4 7 1 0 8 6
6 4 8 7 0 1
7 0 4 8
8 4 0
9 8 1 6 4 7 5 3 2 0
Example: Given a directed graph with 10 vertices and
45 edges, build ZDD using MakePathZDD algorithm to
find all paths:
2. Solving shortest-path problem
Fix an edge
ordering
Build ZDD to
characterize
all paths
from S to T
Return the
path with the
minimum
weight
MakePathZDD
Problem: Given an directed graph with source T and sink T.
Solution: A ZDD that encodes all possible paths from S to T.
Use DFS to find several paths first and assign priority
order to the edges that are on these paths: