cubic graph check, disconnected graph check