Write a Haskell function that generates all binary trees with empty leaves of size n

Ολοκληρωμένο Αναρτήθηκε Πριν 7 χρόνια Πληρώθηκε κατά την παράδοση
Ολοκληρωμένο Πληρώθηκε κατά την παράδοση

Write a Haskell function that generates all binary trees with empty leaves of size n.

Then, given a binary tree, write a function that counts the number of leaves and another function that the number of internal nodes.

What do you observe about the two results? Write a short proof by induction as a comment added to your program stating that your observation applies to binary trees of any size.

The uploaded file is a similar concept of what the function should be like.

Haskell Programming

Ταυτότητα Εργασίας: #12007838

Σχετικά με την εργασία

3 προτάσεις Απομακρυσμένη εργασία Ενεργό Πριν 7 χρόνια

Ανατέθηκε στον:

user318

Hi. I can help you with this task. I have experience of writing not too complex programs in Haskell - different algorithms, data structures examples, etc. Already helped one guy with Haskell here some time ago.

$20 USD σε 2 μέρες
(2 Αξιολογήσεις)
1.9

3 freelancers κάνουν προσφορές κατά μέσο όρο $28 για αυτή τη δουλειά

ahmsak

Hello Sir, I am a computer science tutor, I teach (among others) Haskell, Functional Programming and Algorithms. I have done many projects like this, and I'm one of the top Haskell developers, and you can check for r Περισσότερα

$40 USD σε 1 μέρα
(47 Αξιολογήσεις)
5.9
jaescalante02

I'm computer scientist from Venezuela. I took a advanced functional programming course in Haskell.

$23 USD σε 1 μέρα
(0 Αξιολογήσεις)
0.0