Quantum Algorithms for Graph and Algebra Problems