0

Show that P and NP are closed under Kleene star. I found possible solutions to these problems, more specifically:

  1. P - finding all subwords from a giving word and looking if there is a connection between them (idea: https://louis.jachiet.com/lfcc/final_solutions.pdf)
  2. NP - non-deterministically dividing word for m subwords and looking if all of them will be accepted (idea: https://homes.cs.aau.dk/~srba/courses/tutorials-CC-10/t13-sol.pdf)

but i still miss why it works. I mean, the idea of ​​P seems clear to me, but things get complicated with NP. Suppose one of the subswords was rejected by TM M1, so the entire program will return rejection. But it is fully dependent on our nondeterministic choice of m (and nondeterministic division!). Why can't we try to select a different m and try to restart it? Probably because if we try to change m too many times, our algorithm to check if our input word w is in L* will cease to be verifiable in polynomial time. At the same time, it seems very incomprehensible to me that we will reject a word that is, maybe, in L*, because m was not the good one. Also, I'm not sure why we can't use the same idea of ​​checking P in NP. Is it because in the proof P we run TM M1 on the subword and check if it is rejected or accepted (so we run a program that decides in polynomial time), but in the proof NP we run TM M2 which checks only, does the word belong to L?

genus
  • 1
  • 1
  • 1
    I suspect you are unfamiliar with how non-deterministic Turing machines work and that basic concept. I suggest you study that material before trying to understand this specific situation. Your textbook should have a good explanation of how non-determinism works. Alternatively, read the first link you give, which doesn't use any non-determinism. – D.W. Jun 12 '22 at 04:48
  • I read the first link proof for NP, but I still don't get it. Maybe it doesn't use non-determinism outright, but k is selected in non-deterministic way, so it's still the same case. The rest of the proof is very similar to the one from the second link, because the input word is divided to some smaller parts and then are checked whether they belong to V. Maybe it Is caused by my unfamiliarity with NTM, but I think that I understand well basic concepts. Do we assume that we are always choosing the good dividing way? – genus Jun 12 '22 at 11:18
  • Your question about what to assume is perhaps the central thing to understand about non-determinism, so if you don't understand that, you don't understand non-deterministic Turing machines well yet. I suggest studying non-deterministic Turing machines to see if you can figure that out on your own, and if not, ask a new question about that conceptual question. I suggest trying that and see if that helps... P.S. And welcome to CS.SE, by the way. – D.W. Jun 12 '22 at 21:46
  • Relevant: https://cs.stackexchange.com/q/80563/755, https://cs.stackexchange.com/q/5008/755, https://cstheory.stackexchange.com/q/632/5038, https://en.wikipedia.org/wiki/Nondeterministic_Turing_machine#Resolution_of_multiple_rules, https://cs.stackexchange.com/q/1243/755. You should be able to find more references there and in any good textbook on computational complexity. – D.W. Jun 12 '22 at 21:52

0 Answers0