Based on results by Brugallé and Mikhalkin, Fomin and Mikhalkin give formulas for computing classical Severi degrees Nd,δ using long-edge graphs. In 2012, Block, Colley and Kennedy considered the logarithmic version of a special function associated to long-edge graphs which appeared in Fomin–Mikhalkin's formula, and conjectured it to be linear. They have since proved their conjecture. At the same time, motivated by their conjecture, we consider a special multivariate function associated to long-edge graphs that generalizes their function. The main result of this paper is that the multivariate function we define is always linear. A special case of our result gives an independent proof of Block–Colley–Kennedy's conjecture.The first application of our linearity result is that by applying it to classical Severi degrees, we recover quadraticity of Qd,δ and a bound δ for the threshold of polynomiality of Nd,δ. Next, in separate joint work with Osserman, we apply the linearity result to a special family of toric surfaces and obtain universal polynomial results having connections to the Göttsche–Yau–Zaslow formula. As a result, we provide combinatorial formulas for the two unidentified power series B1(q) and B2(q) appearing in the Göttsche–Yau–Zaslow formula.The proof of our linearity result is completely combinatorial. We define τ-graphs which generalize long-edge graphs, and a closely related family of combinatorial objects we call (τ,n)-words. By introducing height functions and a concept of irreducibility, we describe ways to decompose certain families of (τ,n)-words into irreducible words, which leads to the desired results.