Viable prefix : The prefixes of right sentential forms that can appear on the stack of a shift-reduce parser are called viable prefixes.
Simple design LR(1) DFA. then u get the ans. Ans will be d and b respectively.
follow this : http://www.cs.cornell.edu/courses/cs412/2007sp/lectures/lec09.pdf
@Mk Utkarsh please help.
Utkarsh i'm confused too :(