For brevity I removed some of the details. Here are some examples of recent ones:
Company A (a startup company):
Using C or C++ implement a thread-safe hash table which can resize as needed. Genericity (not bound to specific types) is preferred. The runtime must not exceed 1.0s, and please include a Makefile. The program must be thoroughly tested using CppUnit and documented.
Company B (a physics research facility):
Using a programming language and visualization library of your choice, implement a simple, but relevant, cellular automata simulation (e.g. forest fire, traffic system). Include a README that describes how to run your simulation. Finally, in Latex, write a short 2-3 page description, with appropriate sections as defined in Physical Review Letters, describing what you've built and some applications of it in academia and/or industry (please compile it to a PDF entitled "report.pdf").
These problems are non trivial but also not extremely difficult, but they will take quite some time to make sure everything is working correctly. I'm guessing half a day on each problem, at least.
It would be a different case entirely if I've already interviewed with these companies, but the issue here is that they want me to do these super long problems as a pre-requisite to even a phone conversation. I've done long pre-interview problems in the past and my application did not all progress afterwards, which is a real bummer since I spend a lot of time on these assignments.
Is it reasonable to ask for compensation for my time in solving the above? If not should I just flat out refuse to do these, especially since I'm not guaranteed to get an interview in the first place?