[Math] Function with a continuous domain but a discrete range

functions

Does it makes sense for a function to have a discrete range even though the range is continuous? If yes how is it defined, and is it called something specific?

To explain what I mean if one had to model time against whether the light is on or off (to indicate when light goes on and light goes off). The range will just be 0 and 1, nothing in between, while the domain is a continuous value, time.

Best Answer

It makes sense and your example is a good one. A function is required to return a single value for each element of the domain, but doesn't have to be continuous. A couple other example of functions on $\Bbb R$ are $\lfloor x \rfloor$ and the function that is $1$ if $x$ is rational and $0$ otherwise.

Related Question