Skip to content
Snippets Groups Projects
Commit 1ea873a6 authored by Brady James Garvin's avatar Brady James Garvin
Browse files

Recorded work from Wednesday.

parent ffa48e4c
No related branches found
No related tags found
No related merge requests found
...@@ -144,16 +144,16 @@ Problem: Given a list of numbers, compute their total. ...@@ -144,16 +144,16 @@ Problem: Given a list of numbers, compute their total.
## Monoid Identification ## Monoid Identification
* Interpretation of input elements as actions: * 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: * Combination of two actions:
* * If we add `a` and then add `b`, altogether we add `a + b`.
* Representation of actions: * Representation of actions:
* * We can represent any action by storing how much to add to the total.
* Identity element: * Identity element:
* * Solving `e + x = x + e = x` gives us `e = 0`.
* Monoid: * Monoid:
* `A = (, , )` * `A = (𝐑, +, 0)`
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
...@@ -164,16 +164,16 @@ Problem: Given a list of numbers, compute their product. ...@@ -164,16 +164,16 @@ Problem: Given a list of numbers, compute their product.
## Monoid Identification ## Monoid Identification
* Interpretation of input elements as actions: * Interpretation of input elements as actions:
* * An element `a` in the input is an instruction to "multiply by `a`".
* Combination of two actions: * Combination of two actions:
* * If we multiply by `a` and then we multiply by `b`, altogether we multiply by `a*b`.
* Representation of actions: * Representation of actions:
* * We can represent any action by storing the number to multiply by.
* Identity element: * Identity element:
* * Solving `e * x = x * e = x` gives us `e = 1`.
* Monoid: * Monoid:
* `P = (, , )` * `P = (𝐑, *, 1)`
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment