Chris A.

asked • 01/14/20

Need definition of domain and co domain

Give a recursive definition of the max function whose input is a sequence of integers and whose output is the maximum value in the sequence. Include a description of the domain and codomain of the function, along with the basis step and the recursive step of the function definition.


heres the given

Consider n = 5. Define the following functions whose inputs are ordered pairs of 5-tuples each of whose components comes from the set {−1, 0, 1}

d1,5( (x1, x2, x3, x4, x5), (y1, y2, y3, y4, y5) ) = max |xi − yi| 1≤i≤5

􏰃􏰂 5

d2,5( (x1, x2, x3, x4, x5), (y1, y2, y3, y4, y5) ) = 􏰂􏰁􏰀(xi − yi)2

i=1

1 Expert Answer

By:

Patrick B. answered • 08/03/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.