Soru

Zorluk: ZorSequential Processes and State Transitions

An automated data-processing system updates two state metrics, XX and YY, through a sequential three-stage pipeline (k=1,2,3k = 1, 2, 3). Starting from an initial state (X0,Y0)(X_0, Y_0), the system updates the state variables at each stage kk according to the following transition rules:

1. Xk=Xk1+2Yk1X_k = X_{k-1} + 2Y_{k-1}
2. If Xk1X_{k-1} is even, Yk=Yk1+kY_k = Y_{k-1} + k; if Xk1X_{k-1} is odd, Yk=Yk1kY_k = Y_{k-1} - k.

Match each initial state configuration (X0,Y0)(X_0, Y_0) on the left to its corresponding final state (X3,Y3)(X_3, Y_3) after Stage 3 on the right.

  • Initial State: (X0,Y0)=(2,3)(X_0, Y_0) = (2, 3)Final State: (X3,Y3)=(28,9)(X_3, Y_3) = (28, 9)
  • Initial State: (X0,Y0)=(3,5)(X_0, Y_0) = (3, 5)Final State: (X3,Y3)=(25,1)(X_3, Y_3) = (25, -1)
  • Initial State: (X0,Y0)=(4,1)(X_0, Y_0) = (4, 1)Final State: (X3,Y3)=(18,7)(X_3, Y_3) = (18, 7)
  • Initial State: (X0,Y0)=(5,2)(X_0, Y_0) = (5, 2)Final State: (X3,Y3)=(9,4)(X_3, Y_3) = (9, -4)

Cevap

Initial State (2,3)(2,3) matches Final State (28,9)(28,9); Initial State (3,5)(3,5) matches Final State (25,1)(25,-1); Initial State (4,1)(4,1) matches Final State (18,7)(18,7); Initial State (5,2)(5,2) matches Final State (9,4)(9,-4).
Each initial state must be tracked through all three stages (k=1,2,3k=1, 2, 3) using the conditional rule based on whether the preceding value of XX is even or odd.

Adım Adım Çözüm

1
Evaluate the state transition for Initial State (2,3)(2,3) across stages k=1,2,3k=1, 2, 3.
Stage 1: (8,4)(8,4), Stage 2: (16,6)(16,6), Stage 3: (28,9)(28,9).
Since XX remains even at every step (28162 \rightarrow 8 \rightarrow 16), YkY_k increases by kk at each stage.
2
Evaluate the state transition for Initial State (3,5)(3,5) across stages k=1,2,3k=1, 2, 3.
Stage 1: (13,4)(13,4), Stage 2: (21,2)(21,2), Stage 3: (25,1)(25,-1).
Since XX remains odd at every step (313213 \rightarrow 13 \rightarrow 21), YkY_k decreases by kk at each stage.
3
Evaluate the state transition for Initial State (4,1)(4,1) across stages k=1,2,3k=1, 2, 3.
Stage 1: (6,2)(6,2), Stage 2: (10,4)(10,4), Stage 3: (18,7)(18,7).
Since XX remains even at every step (46104 \rightarrow 6 \rightarrow 10), YkY_k increases by kk at each stage.
4
Evaluate the state transition for Initial State (5,2)(5,2) across stages k=1,2,3k=1, 2, 3.
Stage 1: (9,1)(9,1), Stage 2: (11,1)(11,-1), Stage 3: (9,4)(9,-4).
Since XX remains odd at every step (59115 \rightarrow 9 \rightarrow 11), YkY_k decreases by kk at each stage.

Anahtar Kavram

Multi-stage recursive state update logic and conditional branch evaluation.
Bu soruyu puanla