سوال ۷۶ کنکور ارشد مهندسی کامپیوتر ۱۴۰۵
کدامیک از نمودارهای حالت، متناظر با سادهشده جدول حالت زیر است؟
| حالت فعلی | حالت بعدی () | حالت بعدی () | خروجی () | خروجی () |
|---|---|---|---|---|
| a | f | e | 1 | 0 |
| b | f | e | 1 | 0 |
| c | b | c | 1 | 0 |
| d | f | g | 1 | 0 |
| e | a | e | 0 | 1 |
| f | f | e | 0 | 1 |
| g | b | g | 0 | 1 |
پاسخ صحیح: گزینهٔ A — نمودار حالت روی حالتهای ۰۰، ۰۱، ۱۰، ۱۱ با طوقهها (self-loop): ۰۰ با ۱/۱، ۱۰ با ۰/۰ و ۱۱ با ۱/۰ (حالت ۰۱ بدون طوقه).
This is a Mealy machine (the output depends on the present state and the input ). We minimize the 7 states by the partition‑refinement (state‑reduction) procedure and then match the reduced machine to a diagram.
Step 1 — group by output behaviour
Split the states by their output pair :
- output :
- output :
Step 2 — refine by successor blocks
Repeatedly split any block whose members send the two inputs into different blocks. This converges to four equivalence classes:
- all do and — identical behaviour, so they merge.
- both do and — they merge.
- and each behave uniquely and stay alone.
Step 3 — reduced state table
| State | Next () | Next () | Out () | Out () |
|---|---|---|---|---|
| 1 | 0 | |||
| 1 | 0 | |||
| 0 | 1 | |||
| 0 | 1 |
Step 4 — read the self-loops and match
A fast fingerprint of the reduced machine is its self-loops:
- loops on input with output → label
- loops on input with output → label
- loops on input with output → label
- has no self-loop
So the correct diagram must contain exactly the three self-loops and one loop-free state. Only diagram (1) does — with the encoding :
- self-loops (), self-loops (), self-loops (), has no loop ().
- Remaining edges also match: , , , , .
Diagram 2 has self-loops (no ), diagram 3 has (no ), diagram 4 has (no ) — all wrong. The answer is option 1.
Exam trick: After reducing a Mealy machine, you rarely need to match every edge. Fingerprint each reduced state by its self-loop label ; the option whose set of self-loops matches is almost always the unique answer.