The document describes programming by demonstration using version space algebra. It discusses how version space algebra allows efficient representation of programs by maintaining a version space of possible programs consistent with user demonstrations. The version space contains hypotheses representing candidate programs. Operators like union, join, and transform are used to combine simple version spaces into more complex ones representing full programs. From user demonstrations, the system updates the version space by refining the least upper and greatest lower bounds to narrow the possible hypotheses. Probabilistic version spaces assign probabilities to hypotheses to incorporate domain knowledge into hypothesis ranking.