<｜begin▁of▁sentence｜>### Instruction:
Given a path graph with edge set [(0, 1), (1, 2), (2, 3)], can you apply the Cuthill-McKee ordering to reduce the bandwidth of its adjacency matrix using NetworkX?
### Response:
import networkx as nx
from networkx.utils import cuthill_mckee_ordering

# Create a path graph
G = nx.path_graph(4)

# Apply the Cuthill-McKee ordering
rcm = list(cuthill_mckee_ordering(G))

# Use the ordering to create an adjacency matrix
A = nx.adjacency_matrix(G, nodelist=rcm)

# Print the Cuthill-Mckee ordering
print('Cuthill-McKee ordering:', rcm)

# Print the adjacency matrix using the ordering
print('Adjacency matrix with Cuthill-McKee ordering:')
print(A.todense())
<|EOT|>
