Notation for graph weights over vertices *and* edges? Consider a graph $G=(V,E)$ in which both vertices and edges have a weight. I define it as a function $\omega$ from $V \cup E$ to the weight set.
This seems fine to me, but some colleagues are disturbed by the fact that $\omega$ takes elements from $V$ and $E$. They see them as two different sets, which is correct, but $V \cup E$ also is a set, and it seems to me that $\omega$ may take elements in it.
May you please tell me if my definition is ok? Is it awkward? Is there a better one?
I would like to avoid having two different weight functions, like for instance $\omega$ and $\omega'$ or $\omega_V$ and $\omega_E$. I find them awful in the expressions I deal with, like:
$$\omega(v) \longleftarrow \sum_{u\in N(v)} \frac{\omega(u,v)}{\sum_{w\in N(u)} \omega(u,w)}\cdot\omega(u)$$
 A: There are two objections to be made.
First, people think of vertices and edges as different types of things, and want the inputs to a function to always be the same type. This is not a distinction set theory makes, but it's a distinction many people's intuition makes, especially when coming from a CS background.
Second, there are some rare, implausible cases where the definition could have unexpected results. Say your graph has three vertices: $a$, $b$, and $\{a,b\}$. If all three possible edges are present, and you think of an edge as a set of two vertices, then the edges are $\{a,b\}$, $\{a, \{a,b\}\}$, and $\{b, \{a,b\}\}$. You'll notice that the last vertex is the same set as the first edge; so your function $\omega : V \cup E \to \mathbb R$ would have to assign the same weight to that vertex and that edge. Again, it is rare for this issue to come up, and most people would not even consider this behavior - but it is inelegant for the definition to depend on what sort of objects the vertices are, or on how exactly the edges are defined.
Anyway, both of these issues are solved if you define two functions, say $\omega : V \to \mathbb R$ and $\omega' : E \to \mathbb R$. Since you do not like this, one compromise is to say:

The graph has two weight functions: a vertex weight function $V \to \mathbb R$ and an edge weight function $E \to \mathbb R$. In a slight abuse of notation, we will use $\omega$ to denote both functions.

This allows you to keep using the notation you wanted for the rest of your write-up.
