简体   繁体   English

您如何证明订购的语言是正常的?

[英]How would you prove an ordered language is regular?

I want to know how to prove a language that has order constraints is regular. 我想知道如何证明具有顺序限制的语言是常规的。 For example if you had that Σ = {1,2,3,4,5} where L (a subset of Σ*) = (a1,a2,...an) such that an+1 was larger than an how would you prove that this is a regular language? 例如,如果您具有Σ= {1,2,3,4,5},其中L(Σ*的子集)=(a1,a2,... an),使得an + 1大于您证明这是一种普通语言吗?

eg α = (1,3,5) would be accepted, however α = (1,4,5,2) would not. 例如,α=(1,3,5)将被接受,但是α=(1,4,5,2)将不被接受。

Any language that can be recognized by a DFA (deterministic finite automaton) is regular. DFA(确定性有限自动机)可以识别的任何语言都是常规的。 To prove that the language you described is regular, you simply have to prove that there exists a DFA that recognizes this particular language. 要证明您所描述的语言是常规语言,您只需证明存在一个可以识别该特定语言的DFA。

Remember that Σ is finite. 请记住,Σ是有限的。 If I understood the constraint of the language properly, one construction that works would have one starting state (accepting or non-accepting depending on whether you want to include ε in your language), one accepting state for each symbol in Σ and one rejecting state. 如果我正确地理解了语言的约束,那么一种有效的构造将具有一种开始状态(接受还是不接受,取决于您是否要在语言中包含ε),每个Σ中的符号的接受状态和一个拒绝状态。 The transition function should result in the state corresponding to the current input symbol if the current state is the starting state or corresponds to a "lesser" symbol, and to the rejecting state otherwise. 如果当前状态是开始状态或对应于“较小”符号,则转换函数将导致与当前输入符号相对应的状态,否则将与拒绝状态相对应。

A shortcut is also available - each finite language is regular, and if I understood the constraint of the language you described properly, it is clearly finite (since Σ is finite). 也可以使用快捷方式-每种有限的语言都是常规的,如果我理解您正确描述的语言的约束,则显然是有限的(因为Σ是有限的)。 This trivially means that the language is also regular. 这琐碎地意味着该语言也是常规的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM