That probably depends on how much time and effort they expended to assist you (and the complexity or sophistication of assistance), how much extra time would you have spent if they did not, and - realistically - whether they expect you to give them author credit and whether you are going to need similar assistance in the future. I think it's good to be generous with author credit provided the person actually did something of a relevant technical nature that made the paper possible. On the other hand, giving someone credit because they are famous and willing to have their name on the paper as a favor to you is "questionable."