I am a 2nd year graduate student in theory. I have been working on a problem for the last year (in graph theory/algorithms). Until yesterday I thought I am doing well (I was extending a theorem from a paper). Today I realized that I have made a simple mistake. I realized that it will be much harder than I thought to do what I intended to do. I feel disappointed so much I am thinking about leaving grad school.
Is this a common situation that a researchers notices that her idea is not going to work after considerable amount of work?
What do you do when you realized that an approach you had in mind is not going to work and the problem seems too difficult to solve?
What advice would you give to a student in my situation?