Question: States: S 0 ( Initial ) : The initial state where the ' go ' flag is not set and 'done' flag is false.S 1
States:
SInitial: The initial state where the go flag is not set and 'done' flag is false.SGo: The state where go flag is set.SCompare: The state where m and n are compared to check if they are equal.SM N: The state where m is greater than nSM N: The state where m is less than nSGCD: The state where the GCD is calculated and 'done' flag is set to true.
Transitions:
S to S: When the go flag becomes true.S to S: When go flag is true and 'done' flag is false.S to S: When m is greater than nS to S: When m is less than nS to S: When m is greater than n and 'done' flag is false.S to S: When m is less than n and 'done' flag is false.S to S: When m is equal to n
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
