I want to know if I am allowed to use dollars, i.e. $, in title to render in there MathJax.
According to my research, I saw on other sites that askers already used MathJax in their title, but not in computer science stack exchange.
I don't think there's an official policy, but I agree with Raphael's answer that Mathjax should 'rather not' be used in titles, mostly for the reason that titles are (automatically) used in a lot of places that don't interpret Mathjax.
Specifically, my advice would be to:
If a title contains 'plaintext formulas', such as
Is O(n^2/2) <= O(n^2)?, do not edit it to replace it by Mathjax (which you should do if this occurs in the body of the question). You may replace it by 'unicode math':
Is O(n²/2) ≤ O(n²)?, or remove the formulas completely
What is the effect of halving in big-O notation?.
If a title already contains 'unicode math' (and is fine otherwise), don't touch it. I've seen people editing to replace unicode math with Mathjax in titles. Stop that.
If a title already contains Mathjax, you may wish to replace it by unicode math or remove the formula as in the first part. Just watch out for people willing to replace it by Mathjax again. Direct them to this answer, if you wish.
These points apply both when authoring a question and editing a question, the only difference is to err on the side of inaction when editing.