Here is what it is

If P is true, Q is true, P implies Q = true

If P is true, Q is false, P implies Q = false

If P is False, Q is false, P implies Q = true

If P is False, Q is true, P implies Q = true.

Q: What are these really about? What is implication of logical operation, it isn't mentioned in the book itself.

Implication operation can be constructed ! and l, mentioned by the book. !p l q

Q: What does this really do?

Here is the code

using system; class implication { static void main () { bool p = false; q = false; int i, j; for(i = 0; i <2; i++) { for(j = 0; j < 2; j++){ if(i == 0) p = true; if(i == 1) p = false; if(j == 0) p = true; if(j == 1) p = false; Console.WriteLine("p is " + p + ", q is " q); if(!p l q) Console.WriteLine(p + " implies " + q + " is " + true); Console.WriteLine(); } } } } Here are the outputs p is true, q is true true implies true is true p is true, q is false p is false, q is true false implies true is true p is false, q is false false implies false is true

Q: how does this program work?

Q: Do we really have to initialize

**bool p and q**to false when declared? Because they are reinitialized when they work within the block of code of the

**for loop.**To me they are unnecessary.

Q: How does this block of code work?

for(i = 0; i <2; i++) { for(j = 0; j < 2; j++){ if(i == 0) p = true; if(i == 1) p = false; if(j == 0) p = true; if(j == 1) p = false;