  Let G be a simple finite graph such that each vertex has an integer value and
different vertices have different values. Let S be a finite non-empty set of
primes. We call G an S-graph if any two vertices are connected by an edge if
and only their values differ by a number which is composed of primes from S. We
prove e.g. that for every G there exist infinitely many finite sets S such that
G is an S-graph. We deal with cycles and complete bipartite graphs G. We
consider the triangles in G for a deeper analysis. Finally we prove that G is
an S-graph for all S if and only if G is cubical. Besides combinatorial and
numbertheoretical arguments some deep Diophantine results concerning S-unit
equations are used in our proofs.
