2
$\begingroup$

I was having a talk with one of my computer science teachers and he claimed that there are no functions that can return a variable number of parameters in mathematics (outside of extremely abstract fields). I haven't had much experience with these topics, so instead I took this as a challenge and decided to try the following:

f:Z->{Z} f(x)={yϵZ|0<y<x}

Where 'f' should return the set of all integers in between the 0 and 'x' that aren't negative.

I understand that this isn't STRICTLY defining a function with multiple return values (such as a potential function that solves the quadratic equation), but is it still a series of valid mathematical statements that would provide a workaround counterexample?

(also, any information about functions that return variable-size tuples would be helpful)

EDIT: I might've overstated my professor's position on this, so please don't take that so far into consideration...

$\endgroup$
12
  • 2
    $\begingroup$ For the last point: consider a function $f\colon X\to Y$, where $Y= \bigcup_{d=1}^\infty \mathbb{N}^d$. $\endgroup$
    – Clement C.
    Nov 2, 2017 at 17:57
  • 3
    $\begingroup$ Your professor overstated the case. He probably should have said something more like "You don't often see such a function in algebra or calculus." $\endgroup$ Nov 2, 2017 at 17:58
  • 2
    $\begingroup$ In ZFC everything is a set, so all functions return sets. $\endgroup$ Nov 2, 2017 at 18:08
  • 3
    $\begingroup$ Ooh, not really. That has returned one set which is a single parameter. I'd say further than all functions return one parameter. Which intern may be a set of variable elements so... I don't think the professor is being as deep as he thinks he is. I don't want to be cynical or dismissive but I'd say the professors statement is not worth stating. And I think you did a good job showing the statement wasn't that deep or perplexing with thought. Yes, I'd call yours a counter-example to the statement having any significance, but not to it being literally true. $\endgroup$
    – fleablood
    Nov 2, 2017 at 18:30
  • 1
    $\begingroup$ 99 times out of 100, when someone says "mathematics doesn't do X" or "mathematics can't do Y" or something similar, what is actually going on is either (1) "mathematics doesn't do X and Y in the very specific way that I imagined, and I never really put much thought as to how one might do it differently" or (2) "While I'm using the words, I don't mean what they usually mean, or only mean for my assertion to be applied to a narrow setting and I forgot to actually tell you what that setting is". $\endgroup$
    – user14972
    Nov 2, 2017 at 19:30

1 Answer 1

3
$\begingroup$

I think the object that you are trying to describe is called a set-valued function, and they are quite common in, for example, economics (though economists prefer to call them correspondences).

Formally, we have a function

$$ f: X \to 2^Y. $$

Here, $f$ maps each member of $X$ into a subset of $Y$. ($2^Y$ denotes, as usual, the power set of $Y$.) So it is strictly a function that maps $X$ into $2^Y$. Of course, it is not a function from from $X$ into $Y$. (If $f$ were singleton-valued, however, we can make the obvious identification of $f$ with a function from $X$ into $Y$.)

In fact, I think you point out a good example of a set-valued function. Suppose $$ f:\mathbb R\times\mathbb R \times \mathbb R \to 2^{\mathbb C}, $$ where $f$ takes the real numbers $(a,b,c)$ and returns the roots of the quadratic $ax^2 +bx + c = 0$. $f$ is clearly well-defined as a set-valued function on $\mathbb C$, but you'd need to do some extra work if want $f$ to be a classical function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.