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

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

A balanced expression tree representing the expression: ((1000 - 100) - (10 - 1)). Nodes, from top-to-bottom: "-" at the peak, joining two "-" on the left and right. The left "-" joins "1000" and "100", the right "-" joins "10" and "1"

Download link

https://mediacdn.aus.social/media_attachments/files/114/639/161/398/690/117/original/5d10f642e5703a9d.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.