码迷,mamicode.com
首页 > 其他好文 > 详细

1.3.46

时间:2018-05-26 15:58:25      阅读:214      评论:0      收藏:0      [点我收藏+]

标签: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.

 

1.3.46

标签:http   only   target   and   tar   block   question   htm   therefore   

原文地址:https://www.cnblogs.com/w-j-c/p/9093050.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!