To enter PROCESS 3 (as we need to print TGE)
we have wait(b) ~ A down operation ~ b should be atleast 1 initially ~b=1
( b value goes from 1 ~>0 ) b=0
PRINT "T"
Followed by two signal(a) operations ~ a could 0 initially ~ a=0
( a value goes 0~> 1~>2 after two signal operations)
a= 2 , b= 0
To enter PROCESS 1 (as we need to print TGE)
we have wait(a).. ~ A down operation ~ a would be 1 ( a goes from 2~>1 )
a=1 , b=0
PRINT "G"
Followed by two operations
- signal(b) ~ b goes from 0~>1 &
- signal(c) ~ c could be 0 initially ~c=0 ; c values goes from 0~>1
a=1 , b=1 , c= 1
To enter PROCESS 4 (as we need to print TGE)
we have wait(a).. ~ a values goes from 1~>0
we have wait(b).. ~ b value goes from 1~>0
a=0,b=0,c=1
PRINT"E"
Followed by two operations
- signal(b) ~ b value goes from 0~>1 &
- signal(c) ~ c value goes from 1~>2
a=0,b=1,c=2 (final values)
Therefore , minimum values could be a=0 , b=1 , c=0 (intially values) {ANSWER}
Correct me if I am wrong!!