in reply to What??? You wanna learn math?
If you're encountering O(log(n)), you need to read an introductory computer algorithms book, or take a course in the same. Textbooks on the subject are guaranteed to be in your local uni. library. Graph theory should be covered in those same books, and is also worth studying.