The purpose of the project is to explore vector fields and related definitions on the discrete graphs in comparison to definitions on the smooth manifolds. In particular we investigate defining vector fields and scalar fields on graphs programmatically, as well as taking discrete derivations of scalar fields along vector fields and computationally check the relation
f
∇
x
g+g
∇
x
f+
∇
x
f
∇
x
g==
∇
x
(fg)
.

Code


Exploring Vector Fields and Derivations on a Grid

We consider experimenting with the following definitions on the graph:
Definition (Vector Field)
​We define vector field on the graph
X:V->V
, such that X(v) = w for (v, w) ∈ E thus we have X(v) in the neighborhood of the vertex v, X(v)∈ δ(v). The vertex field assigns each vertex to an outgoing edge.
For example,
In[]:=
g1=GridGraph[{2,2},VertexLabels->Automatic,EdgeLabels->{1<->2->"X",1<->3->"Y"},ImageSize->100]
Out[]=
Thus we have
X(
v
1
)
v
2
,
Y(
v
1
)
v
3
Definition (Function)
​Assume we consider a graph G over a field K. Define function on the graph
f:VK
.
For example,
In[]:=
g2=GridGraph[{2,2},​​VertexLabels->{1->1,2->3,3->8,4->4},EdgeLabels->{1<->2->"X",1<->3->"Y"},​​ImageSize->100]
Out[]=
We thus have
f(
v
1
)1
,
f(
v
2
)4
,
f(
v
3
)8
,
f(
v
4
)2
.
f(X(
v
1
))f(
v
2
)3
,
f(Y(
v
1
))f(
v
3
)8.
Definition (Weight Derivation)
​The weighted derivation on the graph satisfies
​
D(f·g)fD(g)+D(f)g+D(f)·D(g)
For example, consider
D
Δ
X
, for X in the above graph, which is the derivation with respect to vector field
X
satisfies
Δ
X
(f)(v)f(X(v))-f(v)
,
Δ
x
(f)(
v
1
)f(X(
v
1
))-f(
v
1
)f(
v
2
)-f(
v
1
)3-12
;
​
Δ
Y
(f)(
v
2
)f(Y(
v
1
))-f(
v
1
)f(
v
3
)-f(
v
1
)8-1-7
.
We can show that this satisfies the condition
​
Δ
X
(f·g)f
Δ
X
(g)+
Δ
X
(f)g+
Δ
X
(f)
Δ
X
(g)
.
For example,
Show[GridGraph[{2,2},​​VertexLabels->{1->1,2->3,3->8,4->4},​​EdgeLabels->{1<->2->"X",1<->3->"Y"},​​ImageSize->100],​​Graphics[Text[Style["f",14],Scaled[{0.5,0.5}]]]]​​​​Show[GridGraph[{2,2},​​VertexLabels->{1->3,2->2,3->4,4->6},​​EdgeLabels->{1<->2->"X",1<->3->"Y"},​​ImageSize->100],​​Graphics[Text[Style["g",14],Scaled[{0.5,0.5}]]]]​​​​Show[GridGraph[{2,2},​​VertexLabels->{1->3,2->6,3->32,4->24},​​EdgeLabels->{1<->2->"X",1<->3->"Y"},​​ImageSize->100],​​Graphics[Text[Style["f
·
g",14],Scaled[{0.5,0.5}]]]]
Out[]=
Out[]=
Out[]=
Thus we have
Δ
X
(f)(
v
1
)f(X(
v
1
))-f(
v
1
)3-12
,
Δ
X
(g)(
v
1
)g(X(
v
1
))-g(
v
1
)2-3-1
.
​
Δ
X
(f·g)(
v
1
)(f·g)(X(
v
1
))-(f·g)(
v
1
)6-33
​
​
f(
v
1
)·
Δ
X
(g)(
v
1
)+
Δ
X
(f)(
v
1
)·f(
v
1
)+
Δ
X
(f)(
v
1
)·
Δ
X
(g)(
v
1
)1(-1)+23+2(-1)-1+6-23
​
Thus
Δ
X
(f·g)f
Δ
X
(g)+
Δ
X
(f)g+
Δ
X
(f)
Δ
X
(g)3.
We can find derivation-preserving operator. For
D
1
,
D
2
∈Der(A)
, we have
D
1
+
D
2
+
D
1
D
2
∈Der(A)
. For
D
1

Δ
X
,
D
2

Δ
Y
, we have
D
1
+
D
2
+
D
1
D
2

Δ
X
+
Δ
Y
+
Δ
X
Δ
Y
.
​We thus have
(
Δ
X
+
Δ
Y
+
Δ
X
Δ
Y
)(f)(v)f(X(v))-f(v)+f(Y(v))-f(v)+
Δ
x
(f(Y(v))-f(v))f(X(v))-f(v)+f(Y(v))-f(v)+f(X(Y(v)))-f(Y(v))-f(X(v))+f(v)f(X(Y(v)))-f(v)
.Thus we
(
Δ
X
+
Δ
Y
+
Δ
X
Δ
Y
)(f)(v)
Δ
X◦Y
. For example, consider the same graph as before,​
(
Δ
X
+
Δ
Y
+
Δ
X
Δ
Y
)(f)(
v
1
)f(X(Y(
v
1
))-f(
v
1
)f(
v
4
)-f(
v
1
)4-13
.
Suppose we have a graph as below
In[]:=
Show[Graph[{1<->2,1<->3,1<->4,2<->4,3<->4},VertexLabels->Automatic,EdgeLabels->{1<->2->"Y",2<->4->"X",1<->4->"Z",3<->4->"W",1<->3->"V"},GraphLayout->"GridEmbedding",ImageSize->100],Graphics[Text[Style["",14],Scaled[{0.5,0.5}]]]]
Out[]=
Then we have
X◦YZ
, which
X,Y,Z:VV
are all vertex fields of the above graph. Thus we have
Δ
X
+
Δ
Y
+
Δ
X
Δ
Y

Δ
X◦Y

Δ
Z
is another derivation over the vector field in the graph.
If we have a complete graph, such that for any two pairs of vertices in
V
, there are an edge between them,
Show[Graph[{1<->2,1<->3,1<->4,2<->4,3<->4,2<->3},GraphLayout->"GridEmbedding",ImageSize->100],Graphics[Text[Style["",14],Scaled[{0.5,0.5}]]]]
Out[]=
For any vector field
X,Y∈Vect(G)
we can find
X◦YZ∈Vect(G)
. Thus we have
Vect(G)≅Der({f:VK}).
​
Thus for any we can assign each vertices to any elements in
K
. Thus the equivalent of smooth functions on the graph is
n
K
for graph with
n
vertices, and
4
K
in this case above.
However, when our graph is not complete,
Ψ:Vect(G)Der({f:VK})
is no longer surjective.
Again consider the graph below:
Show[Graph[{1<->2,1<->3,1<->4,2<->4,3<->4},VertexLabels->Automatic,EdgeLabels->{1<->2->"Y",2<->4->"X",1<->4->"Z",3<->4->"W",1<->3->"U"},GraphLayout->"GridEmbedding",ImageSize->100],Graphics[Text[Style["",14],Scaled[{0.5,0.5}]]]]
Out[]=
When consider
X◦Y,W◦U
, we can assign any element in
K
in for
Ψ
to be surjective.
However, we do not have much option considering
Y◦U,X◦W
.
Suppose there is
FY◦U
,
Δ
Y◦U

Δ
F
, and thus
f(Y◦U(
v
3
))-f(
v
3
)f(F(
v
3
))-f(
v
3
)
,
f(Y◦U(
v
3
))f(F(
v
3
))
. The only vector fields in the neighborhood of
v
3
are
U,W,0:VV
.
Suppose
Y◦U0
, then we have
f(
v
2
)f(
v
3
).
We have
X◦W
also satisfies the condition, and
f(
v
1
),f(
v
2
)
can be any value in
K
. In this case,
dimV
3
K
. In case, we can consider that are folding the grid the vector field
z
ax an axis.
In[]:=
Show[Graph[{1<->2,1<->3,1<->4,2<->4,3<->4},VertexLabels->{1->b,2->a,3->a,4->c},EdgeLabels->{1<->2->"Y",2<->4->"X",1<->4->"Z",3<->4->"W",1<->3->"U"},GraphLayout->"GridEmbedding",ImageSize->100],Graphics[Text[Style["",14],Scaled[{0.5,0.5}]]]]
Out[]=
Suppose
Y◦UU
. Then we have
f(
v
2
)f(
v
1
)
, which we have
X◦WU
, or
f(
v
1
)f(
v
3
)
, which we have
X◦WY.
Suppose
Y◦UW
. Then we have
f(
v
2
)f(
v
4
)
, which we have
X◦WW
, or
f(
v
4
)f(
v
3
)
, which we have
X◦WX.
​In this cases, we are “shrinking “ an edge of the square to form a triangle which is a completed graph.
5
3
K
-5
2
K
+3
1
K
?
We can then consider pentagon with extra edges
In[]:=
Show[Graph[{1<->2,2<->3,3<->4,4<->5,5<->1,1<->3},(*Pentagonedges*)VertexLabels->Automatic,EdgeLabels->{1<->2->"X",2<->3->"Y",3<->4->"Z",4<->5->"W",5<->1->"U",1<->3->"A"},GraphLayout->{"CircularEmbedding"},(*Ensurespentagonshape*)ImageSize->200],Graphics[Text[Style["",14,Bold],Scaled[{0.5,0.9}]]]]
Out[]=
To understand vector fields on smooth manifolds, we aim to further examine a mesh, allowing us to approximate the continuous case. In the mesh, locally, we can see n-gon with an extra vertex in the middle with edges connect to each of the vertices of the n-gon like the following:
This is similar to a (n+1)-gon with some vertices not connected by edges like the following:

Example of RandomGraphVectorField and SmoothGraphVectorField

On a Pentagon with a vertex in the middle connecting with all vertices on the pentagon

On a Complete Graph with 5 Vertices

Computing Vector Fields and Derivations on a Discretized Mesh

Generate Graph for a Discretized Mesh

Plot Random Vector Field

This random graph does not closely mimic continuous space. For instance, multiple vector fields of neighboring vertices point directly opposite to one another, highlighting inconsistencies. As a result, we want to smooth it out to better mimic continuous space with our discrete graphs.

Smooth Vector Field on Graph

Compared to the vector field on the graph, we can see that after a few steps of smoothing, the vector field in the vertex in the center is comparatively much more aligned with the direction of the vector field associated to its neighboring vertices. We can see that it mimic the continuous space much better.
Compared to the vector field on the graph, we can see that after a few steps of smoothing the vector field graph, the vector field in the vertex in the center is comparatively much more aligned with the direction of the vector field associated to its neighboring vertices. We can see that it mimic the continuous space much better.

Derivations

On a Pentagon with a vertex in the middle connecting with all vertices on the pentagon

On a Mesh

Acknowledgment

I am profoundly thankful to Dugan Hammock and Utkarsh Bajaj for setting up the topics and examples, guiding me through the project, and patiently answering my questions. I am also deeply grateful to Xerxes Arsiwalla for providing valuable suggestions to prepare for the winter school, recommending directions for the topics, and helping improve the project. I deeply appreciate Stephen Wolfram and all the speakers for their inspiring talks and discussions during the winter school. Finally, I am immensely grateful to the winter school staff for their efforts in making this an incredible opportunity for learning and exploration!

CITE THIS NOTEBOOK

Exploring vector fields on graphs and their derivations​
by Michelle Jing Dong​
Wolfram Community, STAFF PICKS, January 16, 2025
​https://community.wolfram.com/groups/-/m/t/3358302