<｜begin▁of▁sentence｜>### Instruction:
Given a graph with nodes 0 through 4 and edges (0, 1), (1, 2), (2, 3), and (3, 4), apply the Reverse Cuthill-McKee ordering to the nodes and present the adjacency matrix using this new node ordering. What is the permutation of the nodes after applying Reverse Cuthill-McKee ordering?
### Response:
from networkx.utils import reverse_cuthill_mckee_ordering
import networkx as nx
# Create a graph
G = nx.Graph()
G.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 4)])
# Apply Reverse Cuthill-Mckee ordering
rcm = list(reverse_cuthill_mckee_ordering(G))
# Get the adjacency matrix using the RCM ordering
A = nx.adjacency_matrix(G, nodelist=rcm)
<|EOT|>
