33.2k views
5 votes
HELP!! FAST!!

Which represents a recursion function?

A. Xn = f(Xn)

B. Xn = f(X0)

C. Xn = f(a1)

D. Xn = f(Xn-1)

(Picture added for more info)

HELP!! FAST!! Which represents a recursion function? A. Xn = f(Xn) B. Xn = f(X0) C-example-1

1 Answer

2 votes

Answer: Choice D


x_n = f(x_(n-1))

This basically says "the nth term is found by computing math, aka evaluating some function, based on the (n-1)th term".

As an example, we could have a function that simply squares the input

Let's say we started at 5. It squares to 25 which in turns squares to 625, and so on. Each new term is based on the old term. Namely, we squared the old n-1 term to get the new nth term.

User Simaofreitas
by
4.4k points