Introduction
When a grammar has choices that start with the same symbols, it can confuse a parser about which path to take. Left factoring helps solve this problem by reorganizing the grammar so the parser can decide the correct choice more easily.
Imagine you are at a restaurant menu where two dishes start with the same first ingredient, like 'Chicken Curry' and 'Chicken Salad'. Instead of listing both fully, the menu groups them under 'Chicken' and then shows the different ways it can be prepared. This helps you quickly see the common part and then choose the variation.
Original Rule:
A → αβ | αγ
Left Factored Rule:
A → αA'
A' → β | γ