1~4の番号をもつ四つの状態がある。四つの状態は図のようにつながれており,時計回りや反時計回りに状態を遷移することができる。 図:四つの状態が環状に並んでおり,上に「1」,右に「2」,下に「3」,左に「4」が配置され,隣り合う状態どうしが両方向の矢印で結ばれている。時計回りは 1→2→3→4→1,反時計回りは 1→4→3→2→1 の向きである。 現在,状態1にいて,次の手順を2回実施した後はどの状態にいるか。 〔手順〕 今いる状態の番号を11倍し,それを3で割った余りによって次の処理を行う。 ・余りが0の場合:時計回りに一つ次の状態に遷移する。 ・余りが1の場合:反時計回りに一つ次の状態に遷移する。 ・余りが2の場合:時計回りに二つ次の状態に遷移する。
平成23年度 秋期 ITパスポート試験 問64
This question's explanation and your answers so far.
問 64
Incorrectア
State 1 is the starting point, not where you are after performing the procedure twice. You end up at 1 only if, in round 2, you mistake the remainder of 33÷3 as 2 instead of 0, apply «transition clockwise to the state two steps ahead», and move two steps 3→4→1. Since 33 is divisible by 3 the remainder is 0, so you correctly move just one step and stop at state 4.
Incorrectイ
You arrive at state 2 only if you swap the rules for remainder 0 and remainder 1. After correctly reaching state 3 in round 1, applying remainder 0 as «transition counterclockwise to the next state» gives 3→2 and lands you on 2. In the procedure remainder 0 means clockwise and remainder 1 means counterclockwise, so the direction is reversed.
Incorrectウ
State 3 is where you are at the end of round 1, not after performing the procedure twice as the question asks. You stay at 3 if you stop after only one round, or if you misread remainder 0 as «stay in the current state». The procedure offers no «stay put» option; even when the remainder is 0 you move one step clockwise, so the final position is 4, not 3.
- エ
正解 The correct answer is エ (state 4). In the figure the ring runs clockwise from the top as 1→2→3→4→1, and neighbouring states can be moved between in both directions. Simply follow the procedure twice, step by step. [Round 1] You are in state 1. Multiply the number by 11: 1×11=11. Divide it by 3: 11÷3=3 remainder 2. The remainder is 2, so you transition clockwise to the state two steps ahead, moving 1→2→3, which puts you in state 3. [Round 2] You are now in state 3. 3×11=33. 33÷3=11 remainder 0 (33 is divisible by 3). The remainder is 0, so you transition clockwise to the next state, moving 3→4, which puts you in state 4. After the procedure has been performed twice you are in state 4, so エ is correct. Two things matter: in each round you must recalculate using the number of the state you are in at that moment (round 2 uses 33, not the 11 from round 1), and you must get right that the remainder of 33÷3 is 0, not 2.
- For procedure-based state-transition questions, write out for each round «the number of the current state → the specified calculation → the action for that remainder → the state after moving» and trace it one step at a time. Keeping to the specified number of rounds (two here), neither stopping early nor doing extra, is what decides whether you score the mark.
- Compute the remainder (the remainder on division by 3) accurately. Since 11≡2 (mod 3), the remainder of 11×n divided by 3 equals the remainder of 2n divided by 3: it is 2 when n=1 and 0 when n=3 (33 is divisible by 3). Do not confuse the quotient (33÷3=11) with the remainder (0).
- Position arithmetic on four states arranged in a ring. Clockwise it cycles 1→2→3→4→1, and the state after 4 wraps back to 1. «Two steps ahead» means passing over the intermediate state and advancing by two.