Graph has vertices labelled with an integer that describes how much snow on it, avalanche occurs if this number is > degree

33 Views Asked by At

Context of problem (too long for title): A graph has vertices, each labelled with an integer that describes how much snow is at that point. If the amount of snow is greater than its degree, an avalanche occurs and 1 unit of snow rolls down to all adjacent vertices.

The problem description is above (I didn't include the actual prompt because after doing some reading I'd like to actually apply it here). It's a computer science question I am doing for practice, and I am wondering if there is a math topic related to this sort of labelled graph thing. Specifically, since part of the problem requires me to calculate the amount of snow on each vertex after some amount of time, I am wondering whether there is a shortcut to this, maybe if the states of the vertices repeat. It would be helpful if anyone knew what this topic was called so I could research a bit about it.

Update: just to clarify, the graph can have any edges as long as it is connected.