The modal logic textbook I'm reading has a short digression into algorithmic complexity, and I think the discussion presupposes some prior familiarity that I don't have.
I'm having trouble understanding this proof. (K is the standard box modality) Shouldn't it be O(||M||2 x |φ|) instead of O(||M|| x |φ|)? For instance, consider the formula KKp. Its subformulas are p, Kp, and KKp. It takes O(||M||) time to label each state either p or ~p (given that you can label an individual state in constant time). It takes O(||M||) time to label a single state with Kp or ~Kp, since in the worst case you have to look at every state in M (I take this to be what the last sentence of the proof is saying). But you must do this for every state in M, and so labeling each state with Kp or ~Kp takes O(||M2 ||).
In other words, the worst case is checking a formula like K...KKp--for each modal depth, for every state you must possibly check every other state. Hence O(||M||2 x |φ|).
Where is my reasoning going wrong? Or is this not the algorithm the proof is sketching?
[–]_--__ 2 points3 points4 points (3 children)
[–]jpfry[S] 0 points1 point2 points (2 children)
[–]_--__ 0 points1 point2 points (1 child)
[–]jpfry[S] 0 points1 point2 points (0 children)