Recognize functions from graphs