What level of mathematics are you looking at? When you say discrete math is this an undergrad course for general students, math majors or a grad course?
My experience has been that for undergrad courses for general students it was enough to make sure they DID their homework whether or not they collaborated seemed to make little difference as an indicator of test performance.
For grad courses the problems were usually hard enough that we would collaborate and just each write up our own solution. That again would usually be enough to distinguish between those that actually came up with the solutions vs. those that just listened to them.
I think the trickiest part is math majors. There the problems might be easy enough to be fairly easy to copy while still being hard enough that you want to the students to do more then just write them down.
EDIT In response to clarified/amended OP.
When I TA'd/taught I would grade in a very minimalist way (choose 5 problems and grade them 0/1 add that up and add up to 2 points for neatness and up to 3 points for completeness). In this case I felt that whether or not they collaborated was not particularly important with regards to the homework grade (which would usually comprise at most 20% of their course grade). This is usually appropriate if each problem is fairly easy (derivatives, integrals, combinations, permutations etc.).
If the problems are hard enough to necessitate a decent write up (a page+ in mathematical notation) you can probably get away with letting the students collaborate and insist they write the problems up separately. This works better then you would expect since usually they come up with the solution together, but actually do write them up separately (copy and paste would be obvious and since they've got their notes it's easy enough to write up on their own right? wrong) and that surprisingly gives you more then enough to grade since if they didn't understand the solution properly they will make mistakes in the write up.
I still think there is a middle ground here where the problems aren't quite hard enough for write ups to make a difference yet they are hard enough that just checking they copied it down correctly isn't enough. I admit I don't know what to do then.