# Processing properties of nodes hierarchically in a DAG

**URL:** <https://igraph.discourse.group/t/processing-properties-of-nodes-hierarchically-in-a-dag/846>\
**Category:** Usage\
**Tags:** Mathematica\
**Created:** [7 September 2021 01:58 UTC](https://igraph.discourse.group/t/processing-properties-of-nodes-hierarchically-in-a-dag/846 "2021-09-07T01:58:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Lyke](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/james_lyke/32/560_2.png) [@James\_Lyke](https://igraph.discourse.group/u/James_Lyke)\
**Post date:** [7 September 2021 01:58 UTC](https://igraph.discourse.group/t/processing-properties-of-nodes-hierarchically-in-a-dag/846/1 "2021-09-07T01:58:51Z")

</div>

Can I add arbitrary properties to nodes and then perform operations (like sum, but sometimes more complex) operations ascending the DAG towards the root node? One example use case is defining a system like spacecraft, which is hierarchically decomposed into components, and those components are “systems” which can be further decomposed. This is contrived of an example, but say I defined M\_Be as the mass of beryllium and M\_Fe as the mass of iron in the leaf nodes. I might want to find the mass of beryllium in the spacecraft or the mass of iron. The mass examples are trivial cases, and I feel this is a very mundane problem compared to almost any posting I have seen in this forum.

---

<div class="post-metadata">

**Author:** ![szhorvat](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/szhorvat/32/3_2.png) [@szhorvat](https://igraph.discourse.group/u/szhorvat)\
**Post date:** [7 September 2021 06:03 UTC](https://igraph.discourse.group/t/processing-properties-of-nodes-hierarchically-in-a-dag/846/2 "2021-09-07T06:03:16Z")

</div>

IGraph/M does not bring its own graph data structure. Instead, it uses Mathematica’s built-in `Graph`, which is responsible for storing properties (see `Property/Annotation`, `PropertyValue/AnnotationValue`, etc.) . Thus you can do this with Mathematica’s built-in functions, so this question is better for StackExchange, where you have already posted it:

> <https://mathematica.stackexchange.com/questions/255270/representing-and-extracting-properties-of-a-system-product-breakdown-structure>

---

<div class="post-metadata">

**Author:** ![James\_Lyke](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/james_lyke/32/560_2.png) [@James\_Lyke](https://igraph.discourse.group/u/James_Lyke)\
**Post date:** [7 September 2021 18:17 UTC](https://igraph.discourse.group/t/processing-properties-of-nodes-hierarchically-in-a-dag/846/3 "2021-09-07T18:17:03Z")

</div>

Thank you kindly. I appreciate your response. I need to understand this annotation feature much more deeply.
