Radio Number

Author

Eric W. Weisstein
July 28, 2022

This notebook downloaded from http://mathworld.wolfram.com/notebooks/GraphTheory/RadioNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/RadioNumber.html.

©2022 Wolfram Research, Inc. except for portions noted otherwise

Sources

http://www.idr.iitkgp.ac.in/jspui/bitstream/123456789/901/4/NB14314_Introduction.pdf

Counts by node

Totals of radio numbers on n nodes

A340538

Table[Total[GraphData[#,"RadioNumber"]&/@GraphData["Connected",n]],{n,9}]

MapIndexed[(#/._Missing:>#2[[1]])&,%]

Minimum

Table[Min[GraphData[#,"RadioNumber"]&/@GraphData["Connected",n]],{n,9}]

Maximum

A340528

Table[Max[GraphData[#,"RadioNumber"]&/@GraphData["Connected",n]],{n,9}]

Parametrized families table

GraphDataCountTable["RadioNumber",{"CocktailParty"->016777,"Complete"->001477,"CompleteBipartite"->103517,"CompleteTripartite"->016777,"Cycle"->340448,"CycleComplement"->000027,"Dipyramid"->000027,"Path"->340528,"PathComplement"->000027,"Star"->184985,"Wheel"->000027}]

Parametrized families

Andrasfai

seq=Table[GraphData[{"Andrasfai",n},"RadioNumber"],{n,10}]

Antelope m×n

DeleteCases[Sort[Flatten[Table[{{m,n},XXX,GraphData[{"Antelope",{m,n}},"RadioNumber"]},{n,2,10},{m,2,n}],1]],{_,x_,x_}]

GraphData[{"Empty",27},"StandardNames"]

Antelope n×n

seq=Table[GraphData[{"Antelope",{n,n}},"RadioNumber"],{n,15}]

Antiprism

Entity["Graph",{"Antiprism",n}]["RadioNumber"]

seq=Table[GraphData[{"Antiprism",n},"RadioNumber"],{n,3,25}]

FindSequenceFunction[DeleteMissing@seq,n-2]//Factor

Apollonian

seq=Table[GraphData[{"Apollonian",n},"RadioNumber"],{n,6}]

FindSequenceFunction[DeleteMissing@seq,n]//FullSimplify

Barbell

seq=Table[GraphData[{"Barbell",n},"RadioNumber"],{n,3,20}]

Bishop m×n

DeleteCases[Sort[Flatten[Table[{{m,n},0,GraphData[{"Bishop",{m,n}},"RadioNumber"]},{n,10},{m,n}],1]],{_,x_,x_}]

Bishop n×n

seq=Table[GraphData[{"Bishop",{n,n}},"RadioNumber"],{n,10}]

BlackBishop m×n

DeleteCases[Sort[Flatten[Table[{{m,n},Piecewise[XXX,XXX],GraphData[{"BlackBishop",{m,n}},"RadioNumber"]},{n,10},{m,n}],1]],{_,x_,x_}]

BlackBishop n×n

seq=Table[GraphData[{"BlackBishop",{n,n}},"RadioNumber"],{n,10}]

Book

seq=Table[GraphData[{"Book",n},"RadioNumber"],{n,20}]

Bruhat

seq=Table[GraphData[{"Bruhat",n},"RadioNumber"],{n,6}]

Table[n!,{n,6}]

Centipede

seq=Table[GraphData[{"Centipede",n},"RadioNumber"],{n,10}]

CocktailParty

Known from being complete k-partite:

"CompleteKPartite"/.Table[GraphData[{"CocktailParty",n},"NotationRules"],{n,3,5}]

Factor[2n+n-2]

seq=Table[GraphData[{"CocktailParty",n},"RadioNumber"],{n,20}]

FindSequenceFunction[Rest@seq,n-1]//Factor

Complete

Entity["Graph",{"Complete",n}]["RadioNumber"]

http://www.idr.iitkgp.ac.in/jspui/bitstream/123456789/901/4/NB14314_Introduction.pdf

The above uses 1-offset instead of 0-offset for labelings, so subtract 1:

seq=Table[GraphData[{"Complete",n},"RadioNumber"],{n,20}]

Table[n-1,{n,20}]

CompleteBipartite m×n

Entity["Graph",{"CompleteBipartite",{m,n}}]["RadioNumber"]

Sort@DeleteCases[Flatten[Table[{{m,n},Piecewise[{{1,m==n==1}},m+n],GraphData[{"CompleteBipartite",{m,n}},"RadioNumber"]},{n,20},{m,n}],1],{_,x_,x_}]

CompleteBipartite n×n

Entity["Graph",{"CompleteBipartite",{n,n}}]["RadioNumber"]

seq=Table[GraphData[{"CompleteBipartite",{n,n}},"RadioNumber"],{n,20}]

Table[Piecewise[{{1,n==1}},2n],{n,20}]

CompleteTripartite k×m×n

Entity["Graph",{"CompleteTripartite",{k,m,n}}]["RadioNumber"]

DeleteCases[Flatten[Table[
{{k,m,n},
Piecewise[{{2,k==m==n==1}},k+m+n+1],
GraphData[{"CompleteTripartite",{k,m,n}},"RadioNumber"]
},{n,10},{m,n},{k,m}],2],{_,x_,x_}]

CompleteTripartite n×n×n

Entity["Graph",{"CompleteTripartite",{n,n,n}}]["RadioNumber"]

seq=Table[GraphData[{"CompleteTripartite",{n,n,n}},"RadioNumber"],{n,10}]

Table[Piecewise[{{2,n==1}},3n+1],{n,10}]

CrossedPrism

seq=Table[GraphData[{"CrossedPrism",2n},"RadioNumber"],{n,2,10}]

Crown

seq=Table[GraphData[{"Crown",n},"RadioNumber"],{n,3,20}]

CubeConnectedCycle

Entity["Graph",{"CubeConnectedCycle",n}]["RadioNumber"]

seq=Table[GraphData[{"CubeConnectedCycle",n},"RadioNumber"],{n,3,8}]

Cycle

Entity["Graph",{"Cycle",n}]["RadioNumber"]

seq=Table[GraphData[{"Cycle",n},"RadioNumber"],{n,3,20}]

A340448

Citations
From References: 38
From Reviews: 3
MR2191283 (2006i:05142) Reviewed 
Liu, Daphne Der-Fen (1-CASLA); Zhu, Xuding (RC-SYS-AM)
Multilevel distance labelings for paths and cycles. (English summary) 
SIAM J. Discrete Math. 19 (2005), no. 3, 610–621.

Solve[4k+1==n,k]

(1/4) (-1+n)+1//Simplify

Solve[4k+r==n,k]

phi[n_]:=Piecewise[{{(n+3)/4,Mod[n,4]==1}},((n-Mod[n,4])/4)+2]

Table[Piecewise[{{(n-2)/2phi[n]+1,Mod[n,2]==0},{(n-1)/2phi[n],Mod[n,2]==1}}],{n,3,20}]

PiecewiseExpand[Piecewise[{{(n-2)/2Piecewise[{{(n+3)/4,Mod[n,4]==1}},((n-Mod[n,4])/4)+2]+1,Mod[n,2]==0},{(n-1)/2Piecewise[{{(n+3)/4,Mod[n,4]==1}},((n-Mod[n,4])/4)+2],Mod[n,2]==1}}]]//FullSimplify

seq=Table[Piecewise[{{(n-2)/2Floor[n/4]+n-1,Mod[n,2]==0},{(n+3)(n-1)/8,Mod[n,4]==1},{(n-1)/2(Floor[n/4]+2),Mod[n,2]==1}}],{n,70}]

DiagonalIntersection

seq=Table[GraphData[{"DiagonalIntersection",n},"RadioNumber"],{n,3,14}]

Dipyramid

seq=Table[GraphData[{"Dipyramid",n},"RadioNumber"],{n,3,20}]

Empty

Entity["Graph",{"Empty",n}]["RadioNumber"]

seq=Table[GraphData[{"Empty",n},"RadioNumber"],{n,30}]

FibonacciCube

seq=Table[GraphData[{"FibonacciCube",n},"RadioNumber"],{n,15}]

Fiveleaper m×n

DeleteCases[Sort[Flatten[Table[{{m,n},0,GraphData[{"Fiveleaper",{m,n}},"RadioNumber"]},{n,10},{m,n}],1]],{_,x_,x_}]

Fiveleaper n×n

seq=Table[GraphData[{"Fiveleaper",{n,n}},"RadioNumber"],{n,10}]

FoldedCube

seq=Table[GraphData[{"FoldedCube",n},"RadioNumber"],{n,2,10}]

Gear

http://www.idr.iitkgp.ac.in/jspui/bitstream/123456789/901/4/NB14314_Introduction.pdf

The above uses 1-offset instead of 0-offset for labelings, so subtract 1 (the definition of n-wheel as a graph with n-cycle corresponds to the definition of gear graph, so no need to adjust for definition of a wheel graph):

GraphData[{"Gear",3},"#"]

GraphData[{"Gear",5}]

GraphData[{"Gear",4},"V"]

GraphData[{"Gear",3},"RadioNumber"]

GraphData[{"Gear",4},"RadioNumber"]

l=Table[{GraphData[{"Gear",n},"#"],{0,4n+1}},{n,4,20}]

seq=Table[GraphData[{"Gear",n},"RadioNumber"],{n,3,20}]

Grid m×n

Entity["Graph",{"Grid",{m,n}}]["RadioNumber"]

DeleteCases[Flatten[Table[{{m,n},Piecewise[{{0,m==n==1},{Max[m,n]-2,Min[m,n]==1},{3n-4,Min[m,n]==2}},4],GraphData[{"Grid",{m,n}},"RadioNumber"]},{n,10},{m,n}],1],{_,x_,x_}]

seq=Table[GraphData[{"Grid",{2,n}},"RadioNumber"],{n,2,10}]

FindSequenceFunction[seq,n-1]//Factor

Grid n×n

Entity["Graph",{"Grid",{n,n}}]["RadioNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"RadioNumber"],{n,10}]

Grid k×m×n

Entity["Graph",{"Grid",{k,m,n}}]["RadioNumber"]

DeleteCases[Flatten[Table[{{k,m,n},
Piecewise[{
{0,k==m==n==1||k m n==2},
{2,k m n==4},
{3,k m n==5},
{1,k m n==Max[k,m,n]},
{5,Min[k,m,n]==1&&Max[k,m,n]==3&&k m n==6},
{8,Min[k,m,n]>1||(Min[k,m,n]==1&&Max[k,m,n]==4&&k m n==8)},
{11,Min[k,m,n]==1&&Max[k,m,n]==5&&k m n==10}},4],GraphData[{"Grid",{k,m,n}},"RadioNumber"]},{n,5},{m,n},{k,m}],2],{_,x_,x_}]

Grid n×n×n

Entity["Graph",{"Grid",{n,n,n}}]["RadioNumber"]

seq=Table[GraphData[{"Grid",{n,n,n}},"RadioNumber"],{n,10}]

HalvedCube

seq=Table[GraphData[{"HalvedCube",n},"RadioNumber"],{n,10}]

Hanoi

seq=Table[GraphData[{"Hanoi",n},"RadioNumber"],{n,5}]

FindSequenceFunction[DeleteMissing@seq,n]

Helm

seq=Table[GraphData[{"Helm",n},"RadioNumber"],{n,3,20}]

HexagonalGrid n×n×n

seq=Table[GraphData[{"HexagonalGrid",{n,n,n}},"RadioNumber"],{n,5}]

Hypercube

Entity["Graph",{"Hypercube",n}]["RadioNumber"]

seq=Table[GraphData[{"Hypercube",n},"RadioNumber"],{n,0,10}]

Keller

Entity["Graph",{"Keller",n}]["RadioNumber"]

seq=Table[GraphData[{"Keller",n},"RadioNumber"],{n,5}]

King m×n

DeleteCases[Sort[Flatten[Table[{{m,n},XXX,GraphData[{"King",{m,n}},"RadioNumber"]},{n,10},{m,n}],1]],{_,x_,x_}]

King n×n

seq=Table[GraphData[{"King",{n,n}},"RadioNumber"],{n,10}]

Knight m×n

Entity["Graph",{"Knight",{m,n}}]["RadioNumber"]

DeleteCases[Sort[Flatten[Table[{{m,n},Piecewise[XXX,XXX],GraphData[{"Knight",{m,n}},"RadioNumber"]},{n,10},{m,n}],1]],{_,x_,x_}]

Knight n×n

Entity["Graph",{"Knight",{n,n}}]["RadioNumber"]

seq=Table[GraphData[{"Knight",{n,n}},"RadioNumber"],{n,20}]

Ladder

Entity["Graph",{"Ladder",n}]["RadioNumber"]

seq=Table[GraphData[{"Ladder",n},"RadioNumber"],{n,20}]

LadderRung

seq=Table[GraphData[{"LadderRung",n},"RadioNumber"],{n,20}]

MengerSponge

seq=Table[GraphData[{"MengerSponge",n},"RadioNumber"],{n,3}]

MoebiusLadder

Entity["Graph",{"MoebiusLadder",n}]["RadioNumber"]

seq=Table[GraphData[{"MoebiusLadder",n},"RadioNumber"],{n,3,25}]

Mycielski

Entity["Graph",{"Mycielski",n}]["RadioNumber"]

seq=Table[GraphData[{"Mycielski",n},"RadioNumber"],{n,11}]

Odd

Entity["Graph",{"Odd",n}]["RadioNumber"]

seq=Table[GraphData[{"Odd",n},"RadioNumber"],{n,7}]

Pan

seq=Table[GraphData[{"Pan",n},"RadioNumber"],{n,3,20}]

Path

Entity["Graph",{"Path",n}]["RadioNumber"]

seq=Table[GraphData[{"Path",n},"RadioNumber"],{n,20}]

A340528

Citations
From References: 38
From Reviews: 3
MR2191283 (2006i:05142) Reviewed 
Liu, Daphne Der-Fen (1-CASLA); Zhu, Xuding (RC-SYS-AM)
Multilevel distance labelings for paths and cycles. (English summary) 
SIAM J. Discrete Math. 19 (2005), no. 3, 610–621.

Solve[2k+1==n,k]

Table[Piecewise[{{2((((1/2) (-1+n)))^2)+2,Mod[n,2]==1},{n(n/2-1)+1,Mod[n,2]==0}}],{n,20}]

Table[(5+3*(-1)^n+2*n^2)/4,{n,0,20}]

Table[Piecewise[{{0,n==1},{3,n==3},{(n-2)n/2+1,Mod[n,2]==0},{(n-3)(n+1)/2+4,Mod[n,2]==1}}],{n,100}]

l=Table[{{"Path",n},{0,Piecewise[{{0,n==1},{3,n==3},{(n-2)n/2+1,Mod[n,2]==0},{(n-3)(n+1)/2+4,Mod[n,2]==1}}]}},{n,20}]

seq=Table[GraphData[{"Path",n},"RadioNumber"],{n,20}]

Table[Piecewise[{{(n-2)n/2+1,Mod[n,2]==0},{(n-3)(n+1)/2+4,Mod[n,2]==1}}],{n,40}]

seq=Table[Piecewise[{{0,n==1},{3,n==3},{(n-2)n/2+1,Mod[n,2]==0},{(n-3)(n+1)/2+4,Mod[n,2]==1}}],{n,40}]

gf=x FindGeneratingFunction[seq,x]//Factor

SeriesCoefficient[gf,{x,0,n}]//FullSimplify

CoefficientList[SeriesCoefficient[-(((x^2) (1+(x^2)) (1+x-2 (x^2)+(x^3)))/((((-1+x))^3) (1+x))),{x,0,10}],n]

PathComplement

seq=Table[GraphData[{"PathComplement",n},"RadioNumber"],{n,20}]

Prism

Entity["Graph",{"Prism",n}]["RadioNumber"]

seq=Table[GraphData[{"Prism",n},"RadioNumber"],{n,3,25}]

Queen m×n

DeleteCases[Sort[Flatten[Table[{
{m,n},
Piecewise[XXX,XXX],
GraphData[{"Queen",{m,n}},"RadioNumber"]},{n,10},{m,n}],1]],{_,x_,x_}]

Queen n×n

seq=Table[GraphData[{"Queen",{n,n}},"RadioNumber"],{n,10}]

Rook m×n

DeleteCases[Sort[Flatten[Table[{{m,n},Piecewise[{{0,Min[m,n]==1},{(2^n)-2,Min[m,n]==2}},m n],GraphData[{"Rook",{m,n}},"RadioNumber"]},{n,10},{m,n}],1]],{_,x_,x_}]

Rook n×n

seq=Table[GraphData[{"Rook",{n,n}},"RadioNumber"],{n,10}]

RookComplement m×n

DeleteCases[Sort[Flatten[Table[{{m,n},Piecewise[{{0,Min[m,n]==1||m==n==2},{9,Min[m,n]==2&&Max[m,n]==3}},Max[m,n]Min[m,n]],GraphData[{"RookComplement",{m,n}},"RadioNumber"]},{n,10},{m,n}],1]],{_,x_,x_}]

RookComplement n×n

seq=Table[GraphData[{"RookComplement",{n,n}},"RadioNumber"],{n,10}]

SierpinskiCarpet

seq=Table[GraphData[{"SierpinskiCarpet",n},"RadioNumber"],{n,4}]

SierpinskiSieve

seq=Table[GraphData[{"SierpinskiSieve",n},"RadioNumber"],{n,5}]

SierpinskiTetrahedron

seq=Table[GraphData[{"SierpinskiTetrahedron",n},"RadioNumber"],{n,4}]

StackedBook n×n

seq=Table[GraphData[{"StackedBook",{n,n}},"RadioNumber"],{n,10}]

StackedPrism n×n

seq=Table[GraphData[{"StackedPrism",{n,n}},"RadioNumber"],{n,3,5}]

Star

Entity["Graph",{"Star",n}]["RadioNumber"]

seq=Table[GraphData[{"Star",n},"RadioNumber"],{n,25}]

Sun

seq=Table[GraphData[{"Sun",n},"RadioNumber"],{n,3,20}]

Sunlet

seq=Table[GraphData[{"Sunlet",n},"RadioNumber"],{n,3,20}]

Tetrahedral

seq=Table[GraphData[{"Tetrahedral",n},"RadioNumber"],{n,6,10}]

TorusGrid m×n

DeleteCases[Sort[Flatten[Table[{{m,n},m n,GraphData[{"TorusGrid",{m,n}},"RadioNumber"]},{n,3,10},{m,3,n}],1]],{_,x_,x_}]

TorusGrid n×n

seq=Table[GraphData[{"TorusGrid",{n,n}},"RadioNumber"],{n,3,10}]

Transposition

Entity["Graph",{"Transposition",n}]["RadioNumber"]

seq=Table[GraphData[{"Transposition",n},"RadioNumber"],{n,6}]

Triangular

seq=Table[GraphData[{"Triangular",n},"RadioNumber"],{n,2,10}]

TriangularGrid

seq=Table[GraphData[{"TriangularGrid",n},"RadioNumber"],{n,10}]

TriangularHoneycombAcuteKnight

seq=Table[GraphData[{"TriangularHoneycombAcuteKnight",n},"RadioNumber"],{n,20}]

TriangularHoneycombBishop

seq=Table[GraphData[{"TriangularHoneycombBishop",n},"RadioNumber"],{n,9}]

TriangularHoneycombKing

seq=Table[GraphData[{"TriangularHoneycombKing",n},"RadioNumber"],{n,11}]

TriangularHoneycombObtuseKnight

seq=Table[GraphData[{"TriangularHoneycombObtuseKnight",n},"RadioNumber"],{n,20}]

TriangularHoneycombQueen

seq=Table[GraphData[{"TriangularHoneycombQueen",n},"RadioNumber"],{n,10}]

TriangularHoneycombRook

seq=Table[GraphData[{"TriangularHoneycombRook",n},"RadioNumber"],{n,10}]

TriangularSnake

seq=Table[GraphData[{"TriangularSnake",n},"RadioNumber"],{n,1,20,2}]

Turan

http://www.idr.iitkgp.ac.in/jspui/bitstream/123456789/901/4/NB14314_Introduction.pdf

Probably can be figured out from being complete k-partite:

{#,
turan="Turan"/.GraphData[#,"NotationRules"],
"CompleteKPartite"/.GraphData[#,"NotationRules"],
Table[Divide@@turan,turan[[2]]]
}&/@GraphData["Turan"]

Web

seq=Table[GraphData[{"Web",n},"RadioNumber"],{n,3,20}]

Wheel

Entity["Graph",{"Wheel",n}]["RadioNumber"]

http://www.idr.iitkgp.ac.in/jspui/bitstream/123456789/901/4/NB14314_Introduction.pdf

The above uses 1-offset instead of 0-offset for labelings, so subtract 1, and definition of the wheel graph uses (Subscript[W, n])as the graph on n+1 nodes, so subtract another 1:

seq=Table[GraphData[{"Wheel",n},"RadioNumber"],{n,4,20}]

WhiteBishop m×n

DeleteCases[Sort[Flatten[Table[{{m,n},XXX,GraphData[{"WhiteBishop",{m,n}},"RadioNumber"]},{n,2,10},{m,2,n}],1]],{_,x_,x_}]

WhiteBishop n×n

seq=Table[GraphData[{"WhiteBishop",{n,n}},"RadioNumber"],{n,2,10}]

Algorithm

{"Cycle", n}

Table[Piecewise[{{(n-2)/2Floor[n/4]+n-1,Mod[n,2]==0},{(n+3)(n-1)/8,Mod[n,4]==1},{(n-1)/2(Floor[n/4]+2),Mod[n,2]==1}}],{n,3,10}]

Table[RadioNumber[CycleGraph[n]],{n,3,7}]

{"Cycle", 3}

GraphData["C3","Graph","Labeled"]

RadioNumberLabelings[GraphData[{"Cycle",3}]]

RadioNumberLabelings[GraphData[{"Cycle",3}]]

GracefulLabelingsReduce[GraphData[{"Cycle",3}],RadioNumberLabelings[GraphData[{"Cycle",3}]]]

GracefulLabelingsReduce[GraphData[{"Cycle",3}],RadioNumberLabelings[GraphData[{"Cycle",3}]]]

GracefulLabelingsReduce[GraphData["C3"],%]

d=GraphDistanceMatrix[GraphData[{"Cycle",3}]]

diam=Max[d]

verts=List@@@GraphData["C3","EdgeList"]

rn = 2

subs=Subsets[Range[3],{2}]

perms=Permutations[Range[0,2],{3}]

data=Flatten[Table[
{#,val1=d[[Sequence@@#]],lab,lab[[#]],val2=Abs[Subtract@@lab[[#]]],val1+val2,diam+1}&/@subs,{lab,perms}],1];

TextGrid[Prepend[data,{"u,v","d(u,v)","lab","lab(u,v)","abs(diff)","d(u,v)+abs(diff)","diam+1"}],Dividers->{Automatic,{Thick,{Thick,Sequence@@Table[True,Length[subs]-1]}}},Background->{Automatic,Prepend[If[#[[-2]]≥#[[-1]],LightYellow,Automatic]&/@data,LightBlue]}]

{"Cycle", 4}

RadioNumber[GraphData["C4"]]

RadioNumberLabelings[GraphData[{"Cycle",4}]]

GraphData["C4","Graph","Labeled"]

RadioNumberLabelings[GraphData[{"Cycle",4}]]

GracefulLabelingsReduce[GraphData["C4"],%]

d=GraphDistanceMatrix[GraphData[{"Cycle",4}]]

diam=Max[d]

verts=List@@@GraphData["C4","EdgeList"]

rn = 3

subs=Subsets[Range[4],{2}]

perms=Permutations[Range[0,3],{4}]

data=Flatten[Table[
{#,val1=d[[Sequence@@#]],lab,lab[[#]],val2=Abs[Subtract@@lab[[#]]],val1+val2,diam+1}&/@subs,{lab,perms}],1];

TextGrid[Prepend[data,{"u,v","d(u,v)","lab","lab(u,v)","abs(diff)","d(u,v)+abs(diff)","diam+1"}],Dividers->{Automatic,{Thick,{Thick,Sequence@@Table[True,Length[subs]-1]}}},Background->{Automatic,Prepend[If[#[[-2]]≥#[[-1]],LightYellow,Automatic]&/@data,LightBlue]}]

{"Path", n}

{\[Placeholder],\[Placeholder],4,5,10,13,20,25,34,41,52,61,74,85,100,113,130,145,164,181}

Table[Piecewise[{{(n-2)n/2+1,Mod[n,2]==0},{(n-3)(n+1)/2+4,Mod[n,2]==1}}],{n,20}]

Table[RadioNumber[PathGraph[Range[n]]],{n,6}]

Do[Print[{n,RadioNumberLabelings[PathGraph[Range[n]]]//Timing}],{n,6}]

{"Path", 3}

RadioNumberLabelings[GraphData[{"Path",3}]]

GraphData["P3","Graph","Labeled"]

d=GraphDistanceMatrix[GraphData["P3"]]

diam=Max[d]

verts=List@@@GraphData["P3","EdgeList"]

rn = 2

should be rn((Subscript[P, 3]))==4

verts=Subsets[Range[3],{2}]

perms=Permutations[Range[0,2],{3}]

data=Flatten[Table[
{#,val1=d[[Sequence@@#]],lab,lab[[#]],val2=Abs[Subtract@@lab[[#]]],val1+val2,diam+1}&/@verts,{lab,perms}],1];

TextGrid[Prepend[data,{"u,v","d(u,v)","lab","lab(u,v)","abs(diff)","d(u,v)+abs(diff)","diam+1"}],Dividers->{Automatic,{Thick,{Thick,Sequence@@Table[True,Length[verts]-1]}}},Background->{Automatic,Prepend[If[#[[-2]]≥#[[-1]],LightYellow,Automatic]&/@data,LightBlue]}]

rn = 3

<<MathWorld`Graphs`

RadioNumberLabelings[GraphData[{"Path",3}]]

GracefulLabelingsReduce[GraphData["P3"],%139]

should be rn((Subscript[P, 3]))==4

RadioNumber[GraphData["P3"]]

RadioLabelingQ[GraphData["P3"],{0,2,1}]

verts=Subsets[Range[3],{2}]

perms=Permutations[Range[0,3],{3}]

data=Flatten[Table[
{#,val1=d[[Sequence@@#]],lab,lab[[#]],val2=Abs[Subtract@@lab[[#]]],val1+val2,diam+1}&/@verts,{lab,perms}],1];

RadioLabelingQ[GraphData["P3"],{0,3,1}]

RadioLabelingQ[GraphData["P3"],{1,3,0}]

RadioLabelingQ[GraphData["P3"],{0,1,2}]

TextGrid[Prepend[data,{"u,v","d(u,v)","lab","lab(u,v)","abs(diff)","d(u,v)+abs(diff)","diam+1"}],Dividers->{Automatic,{Thick,{Thick,Sequence@@Table[True,Length[verts]-1]}}},Background->{Automatic,Prepend[If[#[[-2]]≥#[[-1]],LightYellow,Automatic]&/@data,LightBlue]}]

{"Path", 4}

RadioNumberLabelings[GraphData[{"Path",4}]]

{"Path", 5}

RadioNumberLabelings[GraphData[{"Path",5}]]