GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

A right-aligned expression tree representing the expression: (1000 - (100 - (10 - 1))). Nodes, from top-to-bottom: "-" joins "1000" (L) and "-" (R). That "-" joins "100" (L) and "-" (R). Finally, the remaining "-" joins "10" (L) and "1" (R)

Download link

https://mediacdn.aus.social/media_attachments/files/114/639/161/337/523/151/original/3cceb24c434ee1dd.png

Notices where this attachment appears

  1. Embed this notice
    Matt Cengia (mattcen@aus.social)'s status on Saturday, 07-Jun-2025 09:52:56 JST Matt Cengia Matt Cengia
    in reply to

    Mathematical expressions can be represented as binary trees. For example, (1 + 2) can be represented with a peak node "+", linked to exactly 2 child nodes, "1" and "2".
    In a slightly more complex example, (3 - (1 + 2)) can be represented by a peak node "-", which has 2 child nodes: a left child node of "3", and a right child node of "+". "+" also has 2 child nodes: "1" on the left, "2" on on the right.
    In this way, every operator (plus, minus, times, divide, etc.) is a node with two children, and each value, or operand, is a leaf node (i.e. has no children).
    Below are three expression trees.

    In conversation about 4 months ago from gnusocial.jp permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.