From 1ea873a64a4660cdadba5ebf4bd5219b0149450b Mon Sep 17 00:00:00 2001 From: "Brady J. Garvin" <bgarvin@cse.unl.edu> Date: Wed, 25 Oct 2023 16:18:35 -0500 Subject: [PATCH] Recorded work from Wednesday. --- monoid-design.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/monoid-design.md b/monoid-design.md index 62689f6..611274a 100644 --- a/monoid-design.md +++ b/monoid-design.md @@ -144,16 +144,16 @@ Problem: Given a list of numbers, compute their total. ## Monoid Identification * Interpretation of input elements as actions: - * … + * An element `a` in the input is an instruction to "add `a` to the total". * Combination of two actions: - * … + * If we add `a` and then add `b`, altogether we add `a + b`. * Representation of actions: - * … + * We can represent any action by storing how much to add to the total. * Identity element: - * … + * Solving `e + x = x + e = x` gives us `e = 0`. * Monoid: - * `A = (…, …, …)` + * `A = (𝐑, +, 0)` -------------------------------------------------------------------------------- @@ -164,16 +164,16 @@ Problem: Given a list of numbers, compute their product. ## Monoid Identification * Interpretation of input elements as actions: - * … + * An element `a` in the input is an instruction to "multiply by `a`". * Combination of two actions: - * … + * If we multiply by `a` and then we multiply by `b`, altogether we multiply by `a*b`. * Representation of actions: - * … + * We can represent any action by storing the number to multiply by. * Identity element: - * … + * Solving `e * x = x * e = x` gives us `e = 1`. * Monoid: - * `P = (…, …, …)` + * `P = (𝐑, *, 1)` -------------------------------------------------------------------------------- -- GitLab