Consider the following grammar: $S \rightarrow A$ $S \rightarrow xb$ $A \rightarrow aAb$ $A \rightarrow B$ $B \rightarrow x$ The average length of the stack used while parsing the string "axb$" using LR(1) parser is _________. I am getting 5, but answer is 2.5.

According to my understanding, we LALR is constructed by reducing LR(1) automaton states. So I think it should be LR(1) However, we construct SLR(1) items from the LR(0) automaton, and we say with surety that number of states in SLR(...) is equal to number of states in LALR(...), how can this be?