Graph problems 1-3

For code review