Compute Singularity from the given weighted dual graph

For a rational surface singularity, Artin's result guarantees the existence of the fundamental cycle Z. Thinking in the reverse direction, I have the following question(s):

Que-1: Given a weighted graph, does there exist (and can we algorithmically find) a rational surface singularity, corresponding to this graph?

( I found one result in this direction, by Stephen S T Yau (Trans. of AMS, 1979)(Title: NORMAL TWO-DIMENSIONAL ELLIPTIC SINGULARITIES). But this doesnt give much about this problem. )

In general, given a weighted graph, we can compute the determinant of the intersection matrix, which equals the order of the divisor class group. But unless we know what are the valid coefficients for these $C_i$'s (so as to make it a valid fundamental cycle $Z$), we can't compute $Z\cdot Z$ and will not be able to check the rationality condition $-Z^2+Z\cdot K > 0$, where $K$ is the canonical divisor.

So if I start with random (integer) values for the coefficients in the fundamental cycle, how am I sure that the graph corresponds to the rational singularity. (In other words, I can compute $-Z^2$. But unless I know $K$, how can I compute $Z\cdot K$?) Thus the question boils down to whether I can compute valid $K$ from the given data?

Second question: Suppose, I know by some theory / other information, that the graph corresponds to the rational surface singularity. Is there any way to "compute" the definining equiations of the singularity?

--Mike