Current location - Training Enrollment Network - Mathematics courses - Mathematical model problem: people cross the river with cats, chickens and rice.
Mathematical model problem: people cross the river with cats, chickens and rice.
People, cats, chickens and rice are marked as I = 1, 2, 3 and 4 respectively, and xi= 1 when I am on this shore, otherwise xi=0, then the state of this shore can be represented by s=(x 1, x2, x3, x4). The inversion state of S is marked as S. = (1-x 1, 1-x2, 1-x3, 1-x4), and the allowed state set is S = {( 1,/kloc). 1, 0, 1), (1, 0, 1, 1) (1, 0, 1, 0) and its five inverses.

The decision is to take a boat, marked as d =(u 1, u2, u3, u4). When I am on the ship, it is marked as ui= 1, otherwise it is marked as ui=0, and the allowed decision set is d = {( 1, 1, 0), (1).

I still remember that the state before crossing the river for the k time is sk, and the decision to cross the river for the k time is dk, so the state transition law is sk+ 1=sk+(- 1)kdk, and the design of safe crossing the river comes down to the decision sequence d 1, d2, …, dn? D, make the state sn? According to the state transition law, S reaches Sn+1 = (0, 0, 0, 0) from the initial state S 1, 1. A feasible scheme is as follows:

k 1 2 3 4 5 6 7 8

Sand King

dk ( 1, 1, 1, 1)

( 1,0, 1,0) (0, 1,0, 1)

( 1,0,0,0) ( 1, 1,0, 1)

( 1,0,0, 1) (0, 1,0,0)

( 1,0, 1,0) ( 1, 1, 1,0)

( 1, 1,0,0) (0,0, 1,0)

( 1,0,0,0) ( 1,0, 1,0)

( 1,0, 1,0) (0,0,0,0)