Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in the number of functions when explaining function sets? #77

Open
all-seeing-code opened this issue Jan 28, 2024 · 1 comment
Open

Comments

@all-seeing-code
Copy link

I think there's a typo in https://github.com/hwayne/learntla-v2/blob/master/docs/core/functions.rst?plain=1#L239

IMO it should be 3^2 = 9 functions when calculating functions mapping 2 tasks with 3 CPUs.

@hwayne
Copy link
Owner

hwayne commented Jan 30, 2024

Thanks for bringing this up! I think the unclear bit is here:

In the prior task example, assignments was always a function in the function set [Tasks -> SUBSET CPUs].

If there are 3 CPUs, then S == SUBSET CPUs would have 2^3 = 8 elements. Then #S^#Tasks = 8^2 = 64.

Would I help if I added this to the tip?

.. tip:: A function set of form [A -> B] will have :math:\#B^{\#A} elements in it. If there were two tasks and three CPUs, that would be Cardinality([Tasks -> SUBSET CPUs]) = :math:(2^3)^2 = 64 possible functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants