标签:http only target and tar block question htm therefore
question;
Forbidden triple for stack generability. Prove that a permutation can be generated by a stack (as in the previous question ) if and only if it has no forbidden triple (a,b,c) such that a < b < c with c first, a second, and b third (possibly with other intervening integers between c and a and between a and b).
answer:
//感觉就像是对上一题中generated()的解释
Partial solution: Suppose that there is a forbidden triple(a,b,c). Item c is popped before a and b, but a and b are pushed before c. Thus, when c is pushed, both a and b are on the stack. Therefore, a cannot be popped before b.
标签:http only target and tar block question htm therefore
原文地址:https://www.cnblogs.com/w-j-c/p/9093050.html