For example if they wanted you to implement a back-pack solution and it was specifically phrased like that as part of the contract (via perhaps associated requirements) then it might be reasonable to document which one you chose but not provide how you implemented it.
However if you implemented a standard business application and there are no specific contractual (or implicitly contractual requirements because it wasn't explicit) and thus the customer thinks you should give then the source code - then no.
1- Is there a specific contractual obligation
2- How significant is the algorithm in terms of the work product.
3- What is your business relationship with the client? So for example if you expect to get jobs from them for the next 10 years then you might want to give something up. But if you want to sell the product to 10 competitors to the client then probably not.