Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do (a) and (b) and any of the remaining parts. This is related to recursion and induction. You may use 'base case', 'step case'.

Please do (a) and (b) and any of the remaining parts. This is related to recursion and induction. You may use 'base case', 'step case'. Thank you so much!

image text in transcribed

CExercise 123. Assume we have a function f:S +T. (a) Recursively define a function map f that takes a binary tree with labels from S to a binary tree with labels from T, that is map f: FB Treess + FBTreest. Hint: Consider the map function for lists as an example. (b) For the function f:N - N n + 2n apply the function map f you defined in part (a) step by step to the following tree. tree17(tree5 (tree 3, tree 19), tree25 (tree 19, tree 27)) (c) Show that for every such function f, and every tree t in the set FBTreess, we have hght((map f)t) = hght t. (d) Show that for every such function f and every tree t in the set FB Treess we have no((map f)t) = not. (e) Assume that N is a set of numbers between N and R. Show that for the function k: N + N n+1 we have for all binary trees t that not = sum((map k)t). CExercise 123. Assume we have a function f:S +T. (a) Recursively define a function map f that takes a binary tree with labels from S to a binary tree with labels from T, that is map f: FB Treess + FBTreest. Hint: Consider the map function for lists as an example. (b) For the function f:N - N n + 2n apply the function map f you defined in part (a) step by step to the following tree. tree17(tree5 (tree 3, tree 19), tree25 (tree 19, tree 27)) (c) Show that for every such function f, and every tree t in the set FBTreess, we have hght((map f)t) = hght t. (d) Show that for every such function f and every tree t in the set FB Treess we have no((map f)t) = not. (e) Assume that N is a set of numbers between N and R. Show that for the function k: N + N n+1 we have for all binary trees t that not = sum((map k)t)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions

Question

Does talking equal effective communication?

Answered: 1 week ago

Question

Define line and staff authority

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

Which personal relationships influenced you the most?

Answered: 1 week ago