To prove that from ( L, M \in P ) it follows that ( \overline{L} \cap M \in P ), ( L \cup M \in P ), and ( L \cdot M \in P ), we proceed as follows:
1. Closure of P under Complement and Intersection:
First, recall that in computational complexity, the class ( P ) is closed under complement. That is, if a language ( L \in P ), then its complement ( \overline{L} = \Sigma^* \setminus L ) is also in ( P ). This is because we can construct a polynomial-time algorithm for ( \overline{L} ) by inverting the acceptance condition of the polynomial-time algorithm for ( L ).
Next, since ( P ) is also closed under intersection, the intersection of two languages in ( P ) is also in ( P ). However, in this case, we are dealing with ( \overline{L} \cap M ). Since both ( \overline{L} ) and ( M ) are in ( P ), their intersection is also in ( P ).
Proof:
Given strings ( x ), to decide if ( x \in \overline{L} \cap M ), we perform the following in polynomial time:
- Use the polynomial-time algorithm for ( L ) to check if ( x \in L ). If yes, then ( x \notin \overline{L} ).
- Use the polynomial-time algorithm for ( M ) to check if ( x \in M ).
- Accept ( x ) if ( x \notin L ) and ( x \in M ).
Since both checks can be done in polynomial time, the entire decision process is polynomial-time, so ( \overline{L} \cap M \in P ).
2. Closure of P under Union:
The class ( P ) is also closed under union. That is, if ( L \in P ) and ( M \in P ), then ( L \cup M \in P ).
Proof:
Given strings ( x ), to decide if ( x \in L \cup M ), we:
- Use the polynomial-time algorithms for ( L ) and ( M ) to check if ( x \in L ) or ( x \in M ).
- Accept ( x ) if either check succeeds.
Since both checks are polynomial-time, the union can be decided in polynomial time, so ( L \cup M \in P ).
3. Closure of P under Concatenation:
For the concatenation ( L \cdot M = { uv \mid u \in L, v \in M } ), we need to decide whether a given string ( x ) can be split into substrings ( u ) and ( v ) such that ( u \in L ) and ( v \in M ).
Proof:
Given a string ( x ) of length ( n ), proceed as follows:
- For each ( i ) from ( 0 ) to ( n ), split ( x ) into ( u = x[1..i] ) and ( v = x[i+1..n] ).
- Use the polynomial-time algorithms for ( L ) and ( M ) to check if ( u \in L ) and ( v \in M ).
- If any split satisfies ( u \in L ) and ( v \in M ), accept ( x ).
Since there are ( n+1 ) possible splits and each check is polynomial-time, the entire process is polynomial-time (polynomial in ( n )).
Conclusion:
Therefore, from ( L, M \in P ), it follows that:
- ( \overline{L} \cap M \in P ),
- ( L \cup M \in P ),
- ( L \cdot M \in P ).
This demonstrates that the class ( P ) is closed under these operations.