Current location - Training Enrollment Network - Mathematics courses - A math problem is very interesting.
A math problem is very interesting.
B, m, E 1, E2, N 1, N2, j, and f respectively represent father, mother, two sons, two daughters, a policeman and a prisoner, and () and [] respectively represent states on both sides of the river:

Initial state (b, m, E 1, E2, N 1, N2, j, f), []

1,(B,M,E 1,E2,N 1,N2,)JF→[J,F]

2,(B,M,E 1,E2,N 1,N2,J),J↓[F]

3,(B,M,E2,N 1,N2,)JE 1→[E 1,J,F]

(B,M,E2,N 1,N2,J,F),JF

5,(M,N 1,N2,J,F),BE2→[B,E 1,E2]

(B,M,N 1,N2,J,F),B↓[e 1,E2]

7,(N 1,N2,J,F),BM→[B,M,E 1,E2]

(M,N 1,N2,J,F),M↓[B,E 1,E2]

9,(M,N 1,N2),JF→[B,E 1,E2,J,F]

10,(B,M,N 1,N2),B↓[e 1,E2,J,F]

1 1,(N 1,N2),BM→[B,M,E 1,E2,J,F]

12,(M,N 1,N2),M↓[B,E 1,E2,J,F]

13,(N2),MN 1→[B,M,E 1,E2,N 1,J,F]

14,(N2,J,F),JF

15,(F),JN2→[B,M,E 1,E2,N 1,N2,J]

16,(J,F),J←[B,M,E 1,E2,N 1,N2]

17,(),JF→[B,M,E 1,E2,N 1,N2,J,F]