First, in case you dont know, i graduated from UC Berkeley in electrical engineering and computer science. Second, math and algorithm have been with me since high school and I'm an expert on it.
By the time i'm typing this, I already have a pseudo code in mind that I think 100% correct. Proving algorithm problems is my area. By accepting my offer, you already can sit back and relax. I will get back to you in 1 hour.
Best