11.3 Regarding the Complexity of Graph Isomorphism Problems 149
Victoria can do her work in polynomial time. A permutation π can be
represented as (π(1),...,π(n)). When generating a random permutation, one
must take care that each π(i)isdifferentfromπ(1),...,π(i − 1). This can
be done by generating the log(n − i +1) bits of a random integer k which
represents that for π(i) we should choose the (k + 1)st smallest as yet unused
number. With probability less than 1/2, k>n−i+1 and so is too large. In this
case we simply repeat the procedure up to n times. The probability that this
method fails to produce a permuation is then less than n/2
n
, which is so small
that Victoria can just arbitrarily choose whether or not to accept the pair of
graphs. By the robustness of the
IP-classes with respect to small changes in
the error-probability, this small amount of error won’t make any difference.
We have discussed the procedure for generating a random permutation in
detail here, but in the future we will simply make statements like “generate
a random π ∈ S
n
” without further commentary.
If G
0
and G
1
are not isomorphic, then H is isomorphic to G
i
but not to
G
1−i
. So Paul can determine i by applying all π
∈ S
n
to G
0
and G
1
,and
comparing the results to H. He sets j = i and sends this value to Victoria
who will correctly accept (G
0
,G
1
). If Victoria decides to accept also in the
(rare) case that she is unable to generate a random permutation, then this
interactive proof system will have one-sided error.
If G
0
and G
1
are isomorphic, all three of the graphs that Paul has (G
0
,
G
1
,andH) are isomorphic. In fact there will be exactly as many π
∈ S
n
with H = π
(G
0
) as there are π
∈ S
n
with H = π
(G
1
). We want to take
a closer look at this observation. Let G
∗
=(V
∗
,E
∗
)withV
∗
= {1, 2, 3} and
E
∗
= {{1, 2}}.Forπ
∗
defined by π
∗
(1) = 2, π
∗
(2) = 1, π
∗
(3) = 3, we have
π
∗
(G
∗
)=G
∗
. In general, the permutations π on G with π(G)=G form the
automorphism group of G, denoted Aut(G). These permutations form a group
under composition of functions. Since the order (size) of a subgroup always
divides the order of a group, n!/| Aut(G)| is an integer. We claim that there
are exactly | Aut(H)| many π
∈ S
n
with H = π
(G
0
). Since there is such a
permutation π
, the set of permutations π
∗
◦ π
such that π
∗
∈ Aut(H) form
| Aut(H)| many permutations of the desired kind. Furthermore, there cannot
be any more such permutations because if
π(G
0
)=H and π
(G
0
)=H,then
π
◦ (
π)
−1
(H)=H and π
∗
:= π
◦ (π)
−1
∈ Aut(H). So (π
∗
)
−1
∈ Aut(H)and
π =(π
∗
)
−1
◦ π
belongs to the set of permutations we already have.
By definition Prob(i =0)=Prob(i =1)=1/2, and the only ad-
ditional information for Paul is the random graph H. We have seen that
H is (independent of the value of i) a random graph from the set of
n!/| Aut(G
0
)| = n!/| Aut(G
1
)| graphs that are isomorphic to G
0
and G
1
.So
Prob(i =0| H)=Prob(i =1| H)=1/2 and Paul is in the situation of
having to correctly provide the outcome of a fair coin toss. No matter how
he decides, he will only succeed with probability 1/2. So the entire interac-
tive proof system has a one-sided error-probability just over 1/2. For non-
isomorphic graphs Victoria’s decision is correct, and for isomorphic graphs,
she makes an error with probability
1
2
+
n
2
n+1
. If we carry out the protocol