In medicine there are clearly defined rules for authorship, although they are not generally followed. Computer science does not even have such rules, unfortunately.
The International Committee of Medical Journal Editors has an excellen page about this at http://www.icmje.org/recommendations/browse/roles-and-responsibilities/defining-the-role-of-authors-and-contributors.html
- Substantial contributions to the conception or design of the work; or the acquisition, analysis, or interpretation of data for the work; AND
- Drafting the work or revising it critically for important intellectual content; AND
- Final approval of the version to be published; AND
- Agreement to be accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved.
(notice the conjunctions!)
Additionally, anyone who contributed substantially must be listed as author.
I strongly suggest that you ask your professor why they want to be removed as author. Communication needs to be strong between authors!
I know that I once added my professor as a courtesy, and he insisted (rightly so) that his name be removed, as he was not a substantial contributor. I needed to learn to stand on my own academic feet, he said. "Honorary" authors should be avoided at all costs, as they indeed did not contribute to the work or stand behind it.