The Bar-Hillel construction is a classic result in formal language theory. It shows, by construction, that the intersection between a context-free language and a regular language is itself context-free. However, neither its original formulation (Bar-Hillel et al., 1961) nor its weighted extension (Nederhof and Satta, 2003) can handle automata with $\epsilon$-arcs. In this short note, we generalize the Bar-Hillel construction to correctly compute the intersection even when the automaton contains $\epsilon$-arcs. We further prove that our generalized construction leads to a grammar that encodes the structure of both the input automaton and grammar while retaining the asymptotic size of the original construction.
翻译:Bar-Hillel的构造是正式语言理论的经典结果。 它通过构造表明,无背景语言和普通语言之间的交叉点本身是无背景的。 但是,其原始配方(Bar-Hillel等人,1961年)和加权扩展(Nederhof和Satta,2003年)都无法用$\epsilon$-arcs处理自动输出。 在这个简短的注释中,我们概括了Bar-Hillel的构造,以正确计算交叉点,即使汽车装有$\epsilon$-arcs。 我们还进一步证明,我们的普遍构造导致一种将输入自动配制和语法结构编码起来的语法,同时保留原始构造的微小尺寸。