I'd go ahead and call it a bug, but I don't know what is causing it (sadly, I'm not a kernel developer). I can verify it's a bug below and I can offer a workaround to create the desired graph easily.
Here is a function that should create a RelationGraph
but without the vertex labels, although I think that could be added easily enough,
bootstrapRelationGraph[func_, list_] :=
Select[Tuples[Range@Length@list, 2],
func[list[[First@#]], list[[Last@#]]] &] //
(Graph[Flatten[{#1 -> #2} & @@@ #]] &);
We can test that it makes a graph equivalent to that from RelationGraph
,
graph1 = bootstrapRelationGraph[
StringTake[#1, -1] === StringTake[#2, 1] &, idiom[[37 ;; 125]]]
graph2 = RelationGraph[StringTake[#1, -1] === StringTake[#2, 1] &,
idiom[[37 ;; 125]]]
IsomorphicGraphQ[graph1, graph2]

Now the smallest sublist I found that reproduces the error is {1664, 1665, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591}
, as seen below the bootstrapped version does not give the erroneous results.
graph1 = bootstrapRelationGraph[
StringTake[#1, -1] === StringTake[#2, 1] &,
idiom[[{1664, 1665, 1584, 1585, 1586, 1587, 1588, 1589, 1590,
1591}]]];
graph2 = RelationGraph[StringTake[#1, -1] === StringTake[#2, 1] &,
idiom[[{1664, 1665, 1584, 1585, 1586, 1587, 1588, 1589, 1590,
1591}]]];
{graph1, graph2}
IsomorphicGraphQ[graph1, graph2]

As far as I can tell, that signals that there is some kind of bug in RelationGraph
. You can get the full graph easily enough by
bootstrapRelationGraph[
StringTake[#1, -1] === StringTake[#2, 1] &, idiom]

Edit
The simplest example I can find that reproduces this bug is
{RelationGraph[Last@#1 == First@#2 &,
Join[{{1, 2}, {3, 4}}, Partition[Range[4, 12], 2, 1]]],
RelationGraph[Last@#1 == First@#2 &,
Join[{{1, 2}, {3, 4}}, Partition[Range[3, 11], 2, 1]]]}

So the bug has nothing to do with the Chinese character set and nothing to do with String
functions.
-
and>
to make your regex more readable. ;) $\endgroup$1664
and1665
are used in a list of at least 78 elements. $\endgroup$