I have a quick question about determining a function based on finite sequences. I would really appreciate your help with the approach to these questions. I have put my initial answers in parentheses :
Determine if the given procedure is or is not a function from X to Y.
2. Let X be the set of (finite) non-empty sequences of nonnegative integers and let Y be the set of nonnegative integers.
(a) The procedure that, given a finite sequence, outputs y if and only if y is the seventh term of the sequence. (Yes, is a function)
(b) The procedure that outputs n if and only if n is twice the length of the sequence. (No, is not a function)
(c) The procedure that outputs Y if and only if Y is greater than the last term of the sequence. (Yes, is a function)
(d) The procedure that outputs the number 17 regardless of the input. (Yes, is a function)