ITPEC FE Morning April 2022 Question 5

The table below shows state transition for character string inspection. During the inspection, if the state changes to E, the string under inspection is rejected. Which of the following is rejected in this inspection? Here, state A is the initial state, strings are inspected from left to right, and symbol △ indicates a blank character.

CharacterBlankNumberSignRadix pointOtherCurrent stateAABCDEBABEDECEBEDEDAEEEE

Explanation

12.2 — after a radix point the inspection is in state D, and a number in state D leads to E.

Trace each string from state A, one character at a time:

  • •(a) +0010: A →(sign) C →(0) B → B → B → B: never reaches E, accepted
  • •(b) −1: A →(sign) C →(1) B: accepted
  • •(c) 12.2: A →(1) B →(2) B →(.) D →(2) E: rejected
  • •(d) 9.△: A →(9) B →(.) D →(blank) A: accepted

Answer (c)

Why not others:

  • •(a) — a sign in state A goes to C, and every digit after that stays in B
  • •(b) — a sign followed by one digit ends in B, a valid state
  • •(d) — state D accepts a blank, which returns to A; only a digit, sign, radix point or other character after the point is rejected

Key rule: Trace every character, including signs and blanks, and read the next state from the row of the current state, not of the starting one.

Basic Theory · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.