The smelling function using a graph-based system