instruction
stringlengths
48
114
answer
stringlengths
1
28
Graph: H->B, A->B, D->C, D->E, F->G, E->D, C->D, B->C, E->F, G->H, D->H; Query: Path from A to B
A->B
Graph: G->H, A->B, I->J, B->C, F->G, H->J, E->F, D->E, C->D, H->I; Query: Path from D to J
D->E->F->G->H->I->J
Graph: A->B, B->C, C->B; Query: Path from B to B
B
Graph: D->F, D->E, B->C, A->B, C->F, E->G, E->F, C->D, F->G; Query: Path from F to B
No path exists
Graph: A->B, B->C, C->B; Query: Path from B to B
B
Graph: G->H, E->F, F->G, H->C, A->B, C->A, D->E, E->C, C->D, E->H, B->C; Query: Path from F to A
F->G->H->C->A
Graph: A->B, C->B, B->C; Query: Path from C to A
No path exists
Graph: C->B, A->B, B->C; Query: Path from A to B
A->B
Graph: A->B, C->D, B->C, C->D, D->B; Query: Path from C to A
No path exists
Graph: C->B, F->G, D->E, C->D, B->C, E->G, E->F, A->B; Query: Path from D to G
D->E->F->G
Graph: B->C, A->B, H->C, G->H, D->E, C->D, F->G, E->F; Query: Path from C to F
C->D->E->F
Graph: H->B, B->I, H->I, G->H, B->C, E->F, F->G, G->C, C->D, A->B, D->E, E->D; Query: Path from H to E
H->B->C->D->E
Graph: F->G, C->D, D->E, E->F, I->D, B->C, A->B, I->J, D->H, H->I, G->H; Query: Path from G to G
G
Graph: E->F, H->I, C->D, B->C, G->H, D->H, D->E, F->G, A->B; Query: Path from C to C
C
Graph: C->D, A->C, B->C, D->E, A->B; Query: Path from E to A
No path exists
Graph: D->E, E->F, C->F, D->E, C->D, F->G, A->B, B->C, C->G; Query: Path from D to E
D->E
Graph: B->C, G->H, C->D, F->G, E->F, D->E, B->G, A->B; Query: Path from A to B
A->B
Graph: F->G, E->F, B->C, I->J, H->I, C->D, D->E, A->B, G->H, D->C; Query: Path from H to I
H->I
Graph: A->B, D->C, B->C, C->D; Query: Path from D to A
No path exists
Graph: B->C, A->B, C->D, B->A; Query: Path from A to A
A
Graph: A->B, C->D, B->C, B->C, B->A; Query: Path from B to D
B->C->D
Graph: B->C, C->D, B->D, D->B, A->B; Query: Path from D to A
No path exists
Graph: C->B, A->B, C->D, A->D, B->C; Query: Path from C to D
C->D
Graph: D->E, B->C, A->D, C->D, A->B, C->B; Query: Path from C to D
C->D
Graph: C->D, C->A, C->B, B->C, A->B; Query: Path from D to B
No path exists
Graph: A->B, B->C, B->C; Query: Path from A to B
A->B
Graph: F->D, G->H, A->B, C->G, B->C, C->D, D->E, E->C, F->G, E->F, E->D; Query: Path from B to F
B->C->D->E->F
Graph: F->G, J->B, E->F, G->B, B->C, A->B, I->J, C->E, G->H, H->I, C->D, D->E, D->E, A->B; Query: Path from C to E
C->D->E
Graph: F->G, I->J, F->B, B->C, D->E, H->B, A->B, C->D, B->D, G->H, H->I, E->F; Query: Path from H to B
H->B
Graph: A->B, E->G, I->J, C->D, G->H, F->G, H->I, D->E, E->F, B->C; Query: Path from J to I
No path exists
Graph: B->C, A->C, A->B; Query: Path from B to A
No path exists
Graph: D->E, E->D, C->D, H->I, A->B, C->H, E->C, B->C, F->G, G->H, E->F; Query: Path from H to A
No path exists
Graph: D->E, I->J, C->D, H->I, A->B, B->C, E->F, H->D, G->H, D->H, E->F, I->H, F->G, F->H; Query: Path from F to J
F->H->I->J
Graph: B->C, F->D, C->D, A->B, D->E, E->F, F->G, G->H; Query: Path from C to F
C->D->E->F
Graph: C->D, B->C, E->F, F->E, A->B, F->G, D->E, B->D, D->E; Query: Path from B to D
B->D
Graph: G->H, B->E, H->I, A->B, G->C, B->C, F->G, C->D, E->F, E->D, D->E, I->F; Query: Path from E to G
E->F->G
Graph: C->D, B->C, A->B, C->A; Query: Path from A to D
A->B->C->D
Graph: D->A, A->B, E->A, B->C, I->J, C->D, A->I, D->E, E->F, A->I, H->I, G->H, F->G; Query: Path from E to B
E->A->B
Graph: B->C, D->E, F->G, G->H, C->D, A->B, F->D, E->F, E->H; Query: Path from A to D
A->B->C->D
Graph: C->D, E->F, B->C, D->E, E->A, E->F, F->G, A->B, C->A; Query: Path from B to D
B->C->D
Graph: B->D, C->D, A->B, B->C; Query: Path from C to D
C->D
Graph: F->G, G->H, F->B, C->D, A->B, B->C, A->B, D->E, E->F; Query: Path from H to C
No path exists
Graph: A->B, B->A, B->C; Query: Path from B to A
B->A
Graph: A->B, G->H, D->E, C->D, H->I, F->G, A->I, B->G, B->C, D->A, E->F; Query: Path from I to C
No path exists
Graph: A->B, C->D, D->B, H->I, F->G, D->E, B->C, E->F, B->E, H->F, G->F, G->H; Query: Path from G to E
No path exists
Graph: E->A, A->B, D->E, C->D, B->C; Query: Path from C to B
C->D->E->A->B
Graph: B->C, G->C, A->B, B->F, D->E, E->F, C->D, A->E, F->G; Query: Path from F to A
No path exists
Graph: C->D, A->B, B->E, D->E, E->A, B->C; Query: Path from A to E
A->B->C->D->E
Graph: I->F, A->B, G->H, B->G, I->J, F->G, H->I, E->F, C->D, D->A, I->H, B->C, A->B, D->E; Query: Path from H to D
No path exists
Graph: A->B, B->C, C->D, E->G, G->H, F->G, A->D, A->H, F->A, E->F, D->E; Query: Path from F to G
F->A->D->E->G
Graph: C->B, E->F, B->C, F->G, G->H, C->D, D->E, A->B; Query: Path from E to A
No path exists
Graph: B->C, A->B, B->C; Query: Path from A to B
A->B
Graph: C->D, B->C, D->E, F->G, A->B, C->D, E->F; Query: Path from D to G
D->E->F->G
Graph: C->D, A->B, F->G, B->C, B->E, D->B, E->F, D->E, A->B; Query: Path from C to A
No path exists
Graph: G->H, C->D, B->C, D->C, A->B, F->G, D->A, D->E, E->F, F->B; Query: Path from F to E
F->B->C->D->E
Graph: F->G, D->G, H->I, B->C, I->J, G->H, D->E, C->D, E->F, G->H, J->G, B->E, A->B; Query: Path from E to F
E->F
Graph: B->C, B->A, A->B; Query: Path from A to B
A->B
Graph: A->B, E->A, C->D, B->C, D->E, D->C; Query: Path from D to D
D
Graph: C->D, A->B, B->C, E->F, C->E, D->B, D->E; Query: Path from E to A
No path exists
Graph: A->B, D->E, B->C, F->G, F->G, E->F, C->D, F->B; Query: Path from E to G
E->F->G
Graph: E->C, B->D, A->B, E->B, E->F, B->C, C->D, D->E; Query: Path from B to B
B
Graph: B->C, C->D, A->B, D->B; Query: Path from C to C
C
Graph: E->F, F->G, G->H, H->D, A->B, B->F, C->D, E->B, H->D, D->E, B->C; Query: Path from C to D
C->D
Graph: E->G, D->E, G->H, H->G, A->B, B->C, E->F, C->D, A->H, F->G; Query: Path from E to H
E->F->G->H
Graph: B->C, B->D, A->B, C->D, D->A; Query: Path from D to B
D->A->B
Graph: A->B, C->D, B->C, D->E, F->G, E->F, G->B; Query: Path from D to A
No path exists
Graph: C->D, A->B, A->C, A->C, B->C; Query: Path from B to D
B->C->D
Graph: A->B, D->E, C->D, C->H, E->F, F->G, B->C, G->H; Query: Path from H to G
No path exists
Graph: F->G, C->D, B->C, D->E, A->B, F->D, E->F; Query: Path from E to D
E->F->D
Graph: B->C, A->B, A->D, D->E, E->C, C->D; Query: Path from E to C
E->C
Graph: B->C, F->G, G->H, E->F, C->D, D->E, A->B, D->C; Query: Path from C to C
C
Graph: B->C, B->C, E->D, A->B, C->D, D->E; Query: Path from E to B
No path exists
Graph: B->C, E->A, F->G, D->E, E->F, F->G, C->D, G->E, G->H, A->B; Query: Path from H to A
No path exists
Graph: E->F, A->B, C->E, E->D, D->E, C->F, F->G, B->C, C->D; Query: Path from E to D
E->D
Graph: E->A, C->D, B->C, D->E, E->A, A->B; Query: Path from A to C
A->B->C
Graph: F->D, E->F, B->C, C->D, D->E, A->B; Query: Path from C to C
C
Graph: B->C, A->B, C->B; Query: Path from A to A
A
Graph: B->C, B->F, D->E, C->D, E->B, E->F, A->B, G->H, F->G, E->C; Query: Path from B to G
B->F->G
Graph: F->G, B->I, G->E, E->F, C->D, G->H, I->J, D->E, J->E, H->I, E->J, H->J, A->B, B->C; Query: Path from B to E
B->C->D->E
Graph: C->D, A->B, H->I, G->H, B->C, A->D, F->G, D->E, E->F; Query: Path from A to D
A->D
Graph: B->C, A->C, A->B; Query: Path from C to C
C
Graph: D->E, B->C, C->D, E->A, A->B, A->B; Query: Path from C to E
C->D->E
Graph: B->C, D->C, A->B, B->C, C->D; Query: Path from D to D
D
Graph: A->B, C->A, C->D, D->E, B->C, E->D, E->F; Query: Path from C to B
C->A->B
Graph: A->B, C->B, B->C; Query: Path from A to A
A
Graph: A->B, B->C, B->C; Query: Path from B to A
No path exists
Graph: C->A, B->C, A->B; Query: Path from C to C
C
Graph: B->C, B->A, A->B; Query: Path from A to C
A->B->C
Graph: B->C, A->B, B->C; Query: Path from C to A
No path exists
Graph: A->B, B->C, C->D, C->A, A->C; Query: Path from B to B
B
Graph: A->B, F->G, B->C, E->F, D->E, C->D, E->F; Query: Path from A to D
A->B->C->D
Graph: F->G, B->C, G->H, D->E, E->A, A->B, C->D, G->B, E->F; Query: Path from G to E
G->B->C->D->E
Graph: F->D, E->F, C->D, D->E, A->B, B->A, B->C; Query: Path from E to E
E
Graph: A->B, C->D, C->F, E->F, D->E, G->A, G->D, F->G, B->C; Query: Path from A to D
A->B->C->F->G->D
Graph: E->F, F->C, F->G, A->B, D->E, C->D, B->C, G->D; Query: Path from C to A
No path exists
Graph: B->C, A->B, A->D, C->D; Query: Path from B to D
B->C->D
Graph: B->C, E->F, A->D, D->E, C->D, A->D, C->D, A->B; Query: Path from F to C
No path exists
Graph: D->E, A->B, B->F, F->D, C->D, E->F, C->B, B->C, F->G; Query: Path from G to G
G
Graph: A->C, B->C, A->B; Query: Path from A to A
A
Graph: B->C, E->F, C->D, G->F, A->B, F->G, D->E; Query: Path from B to A
No path exists