Skip to content

Instantly share code, notes, and snippets.

@meysampg
Created August 30, 2023 17:47
Show Gist options
  • Save meysampg/121ce112186bf71d761a35300d6d995d to your computer and use it in GitHub Desktop.
Save meysampg/121ce112186bf71d761a35300d6d995d to your computer and use it in GitHub Desktop.
Property Group Monoid Semigroup
Closure Closed under binary operation Closed under binary operation Closed under binary operation
Associativity Operation is associative Operation is associative Operation is associative
Identity Exists an identity element Exists an identity element Identity might not be present
Inverse Each element has an inverse Inverses might not be present Inverses might not be present

Examples:

  • Group:

    • Integers with addition
    • Symmetric group (S_n)
  • Monoid:

    • Natural numbers with addition
    • Non-negative integers with multiplication
  • Semigroup:

    • Strings with concatenation
    • Matrices with multiplication
@meysampg
Copy link
Author

Property Group Monoid Semigroup
Closure Yes Yes Yes
Associativity Yes Yes Yes
Identity Element Yes Yes No
Inverse Elements Yes (for every elem.) No No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment