تم الحل ✓
categoryعلوم الحاسوب
schoolبكالوريوس
event_available2026-07-13
السؤال
Transcribed Image Text:
Construct a finite-state machine that models a newspaper vending
machine that accepts $10 and $20 coins. The machine has a red button (R)
that may bepressed at any stage to cancel the purchase and have all
collected money returned. When $50 or more is deposited, the excess
(over $50) is returned, and the customer may press the green button (G)
to receive that day's newspaper (DP).
By representing the finite-state machine as a state diagram,
Assuming:
1. There are No parallel edges i.e. where more than one transition occurs between two states (and more than one edges could have been drawn), a single edge is
drawn and the multiple input-output labels are placed on that edge
2. Following from the previous point, there are No parallel loops i.e. where more than one transition occurs from a single state (and more than one loops could have
been drawn to the single state), a single loop is drawn and the multiple input-output labels are placed on that loop
State the number of edges (including loops) to be seen within the state diagram where THE OUTPUT Section of the LABEL reflects "n".
Select one:
a. 15
b. 22
c. 23
d. 25
e. 21
Construct a finite-state machine that models a newspaper vending machine that accepts $5, $10 and $20 coins. The machine has an automatic locking door (D)
that is unlocked only after $30 or more have been inserted. Once the door is unlocked the customer opens it and takes a paper, and closes the door. No change is
ever returned no matter how much extra money has been inserted. The next customer starts with no credit. While the door has not been opened, the customer
may press a red cancel button (C) to cancel the purchase and have all collected money returned.
By representing the finite-state machine as a state diagram,
Including the edge from START to the initial state.
Assuming:
1. There are No parallel edges i.e. where more than one transition occurs between two states (and more than one edges could have been drawn), a single edge is
drawn and the multiple input-output labels are placed on that edge
2. Following from the previous point, there are No parallel loops i.e. where more than one transition occurs from a single state (and more than one loops could have
been drawn to the single state), a single loop is drawn and the multiple input-output labels are placed on that loop
State the number of edges (including loops) to be seen within the state diagram where THESE EDGES END AT STATE $5.
Select one:
a. 6
b. 4
c. 5
3
e. 2
check_circle الجواب — حل مفصل خطوة بخطوة
hourglass_top
🔒
الحل الكامل متاح للمشتركين
اشترك في أرشيف الأسئلة لعرض هذا الحل وآلاف الحلول المفصلة خطوة بخطوة من معلمين معتمدين.