Pseudo code for graphin values