What to do if an advisor does not give enough time of his to you I am a student of  Pure Mathematics and wanted to work in Linear Algebra,Abstract Algebra etc.. I entered a PhD program in 2015 in a University.

My adivisor wanted a scholar to work in the field of Graph Theory.

My advisor works in the field of Cryptography and said previously that though he could not publish anything in Graph Theory but he is very keen to work here.
He said that he has connections in this field to whom he can send me if I have doubts in Graph Theory which he can't answer.Also he said he will start reading with me and told me that we two will have a great time.

Believing him I took up research in Spectral Graph Theory.I read some books in this field and  started having doubts.I asked him about that but he simply said that he is too busy  to look into my problems because of his conferences and asked me leave them.

Also he told me that he is developing ties with other advisors in this field but he has not yet succeeded and it will take time.

In one year,he has not ever sat with me and discussed any problem nor has he advised me which books to read as he says that it is the work of the scholar to find out new problems and decide what to read and what not.He says his guide also treated him the same way.

Though he has 6-8 scholars where some have completed and 2-3 have submitted there PhD and working as part-time lecturers. I am his first scholar in the recent 3-4 years and he assured me all sorts of co-operation if I join him.
He told me that he wants to broaden his field of research and that's why he wanted me to work here.

Can I leave him?But if I join somewhere else they will ask me what I was doing in these two years,what should I say them?

What should I do?Is this what happens in  a PhD?

Isn't there any role of a guide in ones PhD?

Please help me with some of your advice.Thank you very much
In addition to dan's answer, I would add one practical piece of advice. Ask your mentor to schedule a 30-60 minute weekly meeting so that you can touch base regularly. I suggest asking in a way that puts the impetus on you (and not your mentor's lack of mentoring). For example, tell your mentor that you are having trouble developing your ideas efficiently and you're concerned about your progress through the program... and meeting weekly would help you stay on track. 

I don't get the sense that your mentor will be into this idea, but it's worth trying! This is what I did after my first year (I had a similar experience as you did). My mentor was receptive to the idea, and we've been meeting ever since. Good luck!