All questions of Propositional Logic for Computer Science Engineering (CSE) Exam

1 Crore+ students have signed up on EduRev. Have you? Download the App

Let Q(x) be the statement “x < 5.” What is the truth value of the quantification ∀xQ(x), having domains as real numbers.
  • a)
    True
  • b)
    False
Correct answer is option 'B'. Can you explain this answer?

Sanya Agarwal answered
Clarification: Q(x) is not true for every real number x, because, for instance, Q(6) is false. That is, x = 6 is a counterexample for the statement ∀xQ(x). This is false.

Full form of DNF is -?
  • a)
    Disjoining Normal Form
  • b)
    Disjunctive Normal Form
  • c)
    Divisional Normal Form
  • d)
    Dividend Normal Form
Correct answer is option 'B'. Can you explain this answer?

Poulomi Patel answered
Understanding DNF: Disjunctive Normal Form
Disjunctive Normal Form (DNF) is a standard way of structuring logical expressions in Boolean algebra. It is essential in various fields, including computer science, digital logic design, and civil engineering when analyzing logical systems.

Definition of DNF
- DNF is a canonical form of a logical formula.
- It is defined as a disjunction (OR operation) of one or more conjunctions (AND operations) of literals.

Components of DNF
- **Literals**: These are the basic variables or their negations.
- **Conjunctions**: Groups of literals combined using the AND operator.
- **Disjunctions**: The overall expression combines multiple conjunctions using the OR operator.

Characteristics of DNF
- **Clarity**: DNF allows for a clear and systematic representation of logical expressions.
- **Simplicity**: It simplifies the process of evaluating logical statements.
- **Versatility**: DNF can represent any Boolean function, making it a universal format.

Example of DNF
Consider the logical expression:
- A AND B OR C AND D.
This expression is in DNF because it is a sum of products, where:
- (A AND B) and (C AND D) are conjunctions, and they are combined by the OR operator.

Applications in Civil Engineering
In civil engineering, DNF can be used in:
- **Decision Analysis**: Analyzing various project outcomes based on different conditions.
- **Logic Circuits**: Designing digital circuits that require specific logical functions.
In summary, Disjunctive Normal Form is a fundamental concept in logic and engineering disciplines, providing a clear and structured way to handle logical expressions.

Given the following two statements:
S1: Every table with two single-valued attributes is in 1NF, 2NF, 3NF and BCNF.
S2: AB → C, D → E, E → C is a minimal cover for the set of functional dependencies AB → C, D → E, AB → E, E → C.
Which one of the following is CORRECT?
  • a)
    S1 is TRUE and S2 is FALSE
  • b)
    Both S1 and S2 are TRUE.
  • c)
    S1 is FALSE and S2 is TRUE
  • d)
    Both S1 and S2 are FALSE
Correct answer is option 'A'. Can you explain this answer?

Sanya Agarwal answered
Statement 1: TRUE
BCNF (Boyce Codd Normal Form):
A relation R is in BCNF whenever a non – trivial functional dependency X → A holds in R, where X is the super-key of R.
A binary relation is always in BCNF. A binary relation contains only two attributes.
Functional dependency that is possible from a binary relation is one.
Example:
Consider R(A, B), in this only one functional dependency is possible either A → B or B → A
In both the cases, left hand side will be the super key. In this way R(A, B) is always in BCNF.
If a relation is in BCNF then it is in 1NF, 2 NF and 3 NF
Statement 2: FALSE
Set 1 = {AB → C, D → E, AB → E, E→ C}
Set 2 = {AB → C, D → E, E → C}
Set 2 cannot derive   AB → E since in set 2 (AB)+ = {A, B, C}
The two sets of functional dependencies are not the same and hence one cannot be minimal of other.

Given a relation schema R(ABCDEFGH) in first normal form. For the set of dependencies
F= { A → B, A → C, CG → H, B → H, G → F}, which dependency is logically implied?
AC → H
  • a)
    AC → H
  • b)
    C → H
  • c)
    G → H
  • d)
    A → H
Correct answer is option 'D'. Can you explain this answer?

Sanya Agarwal answered
Concept:
If A → B and B → C then A → C is logically implied to A → B and B → C FDs this is nothing but transitivity rule.
Explanation:
A → B
B → H
Then we can say that A->H which is logically implied by above both FDs
So option 4 is the correct answer.

Consider the following two statements.
S1: If a candidate is known to be corrupt, then he will not be elected
S2: If a candidate is kind, he will be elected
Which one of the following statements follows from S1 and S2 as per sound inference rules of logic?
  • a)
    If a person is known to be corrupt, he is kind
  • b)
    If a person is not known to be corrupt, he is not kind
  • c)
    If a person is kind, he is not known to be corrupt
  • d)
    If a person is not kind, he is not known to be corrupt
Correct answer is option 'C'. Can you explain this answer?

Pallabi Bajaj answered
Given Statements:
S1: If a candidate is known to be corrupt, then he will not be elected
S2: If a candidate is kind, he will be elected

To find:
Which one of the following statements follows from S1 and S2 as per sound inference rules of logic?

Answer:
The given statements can be represented as follows:
S1: Corrupt ⟹ ¬Elected (If a candidate is known to be corrupt, then he will not be elected)
S2: Kind ⟹ Elected (If a candidate is kind, he will be elected)

We need to find a statement that follows from both S1 and S2.

Explanation:
To find the statement that follows from both S1 and S2, we need to combine the given statements using logical operators.

If we take the contrapositive of S1, we get:
¬¬Elected ⟹ ¬Corrupt (If a candidate is elected, then he is not known to be corrupt)

Combining the contrapositive of S1 with S2, we get:
If a candidate is elected, then he is not known to be corrupt and is kind.

This statement can be written as:
Elected ⟹ (¬Corrupt ∧ Kind)

So, the correct answer is option C:
If a person is kind, he is not known to be corrupt.

This can be further explained by considering the following cases:
- If a person is corrupt, according to S1, he will not be elected. So, he cannot be kind.
- If a person is kind, according to S2, he will be elected. So, he cannot be known to be corrupt.

Hence, option C is the correct answer.

If p = a number from {8, 9, 10, 11, 12}
q = not a composite number
r = a square number
s = a prime number
then what is the value of ~((p → ~q)∧(~r ∨~S) )
  • a)
    8, 9, 10, 11, 12
  • b)
    8, 9, 10
  • c)
    11, 12
  • d)
    11
Correct answer is option 'D'. Can you explain this answer?

Sanya Agarwal answered
Given that, If p = a number from {8, 9, 10, 11, 12}
q = not a composite number
r = a square number
s = a prime number
~((p→~ q)∧(~r ∨~S) )
¬((p→¬q)∧(¬r∨¬S))
¬(¬p∨¬q)∨¬(¬r∨¬S)
(p∧q)∨(r∧s)
p∧ q = {8, 9, 10, 11, 12} ∧  {11 } = {11}
(r ∧ s) = { a square number }∧{ a prime number}
(r ∧ s) = {9} ∧ {11} = { }
(p∧ q) ∨ (r ∧ s)= {11} ∨ { } = {11}
Hence the correct answer is 11.

Which of the following is correct?
F: (p ↔ q)∧(¬ p ↔ q)
F2 : (p∨¬q)∧(¬ p∨q) ∧(¬ p∨¬q)
  • a)
    F1 is satisfiable, F2 is valid
  • b)
    F1 is unsatisfiable, F2 is satisfiable
  • c)
    F1 is unsatisfiable, F2 is valid
  • d)
    F1 and F2 both are unsatisfiable
Correct answer is option 'B'. Can you explain this answer?

Asha Nambiar answered
Explanation:

Unsatisfiability of F1:
- F1 can be simplified as (p ↔ q) ∧ (¬ p ↔ q), which can be further simplified as (¬ p ∨ q) ∧ (p ∨ q) (since p ↔ q ≡ (p ∧ q) ∨ (¬ p ∧ ¬ q))
- The simplified form becomes a contradiction as both (¬ p ∨ q) and (p ∨ q) cannot be true at the same time.
- Therefore, F1 is unsatisfiable.

Satisfiability of F2:
- F2 can be simplified as (p ∨ ¬ q) ∧ (¬ p ∨ q) ∧ (¬ p ∨ ¬ q).
- This form is satisfiable as it is possible for at least one of the clauses to be true.
- Therefore, F2 is satisfiable.
Therefore, the correct answer is option 'b) F1 is unsatisfiable, F2 is satisfiable'.

Consider a relational table R that is in 3NF, but not in BCNF, Which one of the following statements is TRUE?
  • a)
    R has a nontrivial functional dependency X → A, where X is not a superkey and A is a prime attribute.
  • b)
    R has a nontrivial functional dependency X → A, where X is not a superkey and A is a non-prime attribute and X is not a proper subset of any key.
  • c)
    R has a nontrivial functional dependency X → A, where X is not a superkey and A is a non-prime attribute and X is a proper subset of some key.
  • d)
    A cell in R holds a set instead of an atomic value.
Correct answer is option 'A'. Can you explain this answer?

Subham Unni answered
B)R has a candidate key that is a proper subset of some other candidate key.

c)R has a transitive dependency that is not in BCNF.

d)R has a nontrivial functional dependency that is not in BCNF.

The correct answer is c) R has a transitive dependency that is not in BCNF.

3NF guarantees that there are no nontrivial transitive dependencies in the table, but it does not guarantee that there are no nontrivial functional dependencies. BCNF, on the other hand, guarantees that there are no nontrivial functional dependencies. So, if a table is in 3NF but not in BCNF, it must have a transitive dependency that is not in BCNF.

Consider a relation R (A, B, C, D, E, F, G, H), where each attribute is atomic, and following functional dependencies exist.
CH → G
A → BC
B → CFH
E → A
F → EG
The relation R is ______.
  • a)
    in 1NF but not in 2NF
  • b)
    in 2NF but not in 3NF
  • c)
    in 3NF but not in BCNF
  • d)
    in BCNF
Correct answer is option 'A'. Can you explain this answer?

Sanvi Kapoor answered
Since attribute D is not a part of any FD, it must be a part of the candidate key.
AD+ = {ABCDEFGH}
BD+ = {ABCDEFGH}
ED+ = {ABCDEFGH}
FD+ = {ABCDEFGH}
CD+, GD+, and HD+ do not all the attributes. So, they can not be candidate keys.
Candidate keys are AD, BD, ED, and FD.
A → BC, B → CFH, and F → EG are partial dependencies. So, the relation is not in 2NF.
Hence the relation is in 1NF but not in 2NF.

“If X, then Y unless Z” is represented by which of the following formulae in propositional logic?
(“¬” is negation “^” is conjunction, and “→” is implication)
  • a)
     (X ^ ¬ Z) → Y
  • b)
     (X ^ Y) → ¬ Z
  • c)
     (X → (Y ^ ¬ Z)
  • d)
     (X → Y(^ ¬ Z)
Correct answer is option 'A'. Can you explain this answer?

Sanya Agarwal answered
The statement “If X then Y unless Z” means, if Z doesn’t occur, X implies Y i.e. ¬Z→(X→Y), which is equivalent to Z ∨ (X→Y)
(since P→Q ≡ ¬P ∨ Q), which is then equivalent to Z ∨ (¬X ∨ Y). Now we can look into options which one matches with this.
So option (a) is (X∧¬Z)→Y = ¬( (X∧¬Z) ) ∨ Y = (¬X∨Z) ∨ Y, which matches our expression. So option (A) is correct.

Consider the relation schema: Singer(singerName, songName). What is the highest normal form satisfied by the "Singer" relation schema?
  • a)
    1NF
  • b)
    2NF
  • c)
    BCNF
  • d)
    3NF
Correct answer is option 'C'. Can you explain this answer?

Sanya Agarwal answered
Concept:
Normalization: Normalization is a database design technique that reduces data redundancy and eliminates undesirable characteristics like Insertion, Update and Deletion Anomalies.
1NF (First Normal Form):
  • Each table cell should contain a single value.
  • Each record needs to be unique.
2NF (Second Normal Form):
  • It should be in 1NF.
  • Single Column Primary Key that does not functionally dependant on any subset of candidate key relation.
3NF (Third Normal Form):
  • It should be in 2NF.
  • It has no transitive functional dependencies.
Boyce-Codd Normal Form (BCNF):
  • A relation R is in BCNF if R is in Third Normal Form and for every FD, LHS is super key.
  • A relation is in BCNF iff in every non-trivial functional dependency X –> Y, X is a super key.
The given relation schema:
Singer(singerName, songName).
  • Every Binary Relation ( a Relation with only 2 attributes ) is always in BCNF. If a relation is BCNF then it should be in 3NF, 2NF, 1NF.
Hence Singer(singerName, songName) is Boyce-Codd Normal Form (BCNF).
Hence the correct answer is BCNF.

Consider the following logical inferences.
I1: If it rains then the cricket match will not be played.
The cricket match was played.
Inference: There was no rain.
I2: If it rains then the cricket match will not be played.
It did not rain
Inference: The cricket match was played.
Which of the following is TRUE?
  • a)
    Both I1 and I2 are correct inferences
  • b)
    I1 is correct but I2 is not a correct inference
  • c)
    I1 is not correct but I2 is a correct inference
  • d)
    Both I1 and I2 are not correct inferences
Correct answer is option 'B'. Can you explain this answer?

Aniket Pillai answered

Explanation:

I1:
- The given statement is: "If it rains then the cricket match will not be played."
- Inference I1 states: "The cricket match was played."
- From the given statement, we can infer that if it rains, the cricket match will not be played. However, the statement does not provide any information about what happens if it does not rain. Therefore, we cannot definitively conclude that the cricket match was played just because it did not rain. There could be other reasons for the match not being played.

I2:
- The given statement is: "If it rains then the cricket match will not be played."
- Inference I2 states: "It did not rain."
- This inference is correct because the given statement explicitly states that if it rains, the cricket match will not be played. Since it did not rain, we can logically conclude that the cricket match was played.

Therefore, the correct answer is option B. The first inference (I1) is not a correct inference, while the second inference (I2) is a correct inference based on the given statement.

Let p, q, r, s represents the following propositions.
p: x ∈ {8, 9, 10, 11, 12}
q: x is a composite number
r: x is a perfect square
s: x is a prime number
The integer x ≥ 2 which satisfies ¬ ((p ⇒ q) ∧ (¬ r ∨ ¬ s)) is __________ 
    Correct answer is '11'. Can you explain this answer?

    Sanvi Kapoor answered
    Data:
    p: x ∈ {8, 9, 10, 11, 12}
    q: x is a composite number
    r: x is a perfect square
    s: x is a prime number
    Explanation:
    p ⇒ q means p̅ + q
    As, q is composite number So, p ⇒ results in {8, 9, 10, 12}
    As, r: x is a perfect square, ¬ r results in all the numbers which are not perfect square
    So, ¬ r: {8, 10, 11, 12}
    ¬ s: {8, 9, 10, 12}
    ¬ r ∨ ¬ s = {8, 9, 10, 11, 12}
    Now, (p ⇒ q) ∧ (¬ r ∨ ¬ s) = {8, 9, 10, 12}
    ¬ ((p ⇒ q) ∧ (¬ r ∨ ¬ s)) results in a number which is not present in ((p ⇒ q) ∧ (¬ r ∨ ¬ s))
    ¬ ((p ⇒ q) ∧ (¬ r ∨ ¬s)) will give {11}.

    Let p, q, and r be propositions and the expression (p → q) → r be a contradiction. Then the expression (r → p) → q is
    • a)
      A tautology
    • b)
      A contradiction.
    • c)
      Always TRUE when p is FALSE
    • d)
      Always TRUE when q is TRUE
    Correct answer is option 'D'. Can you explain this answer?

    Sanya Agarwal answered
    (p → q) → r is a contradiction which is possible only when r is false and (p → q) is true.
    Now, from here we can clearly say that option 4 is correct as (r → p) → q means ¬ (r → p) ∨ q.
    Since r is false, (r → p) is true and ¬ (r → p) becomes false.
    So, it becomes (false ∨ q). Now it totally depends on q. Whenever q is true, this value will always be true.
    Alternate Method:
    Let X ≡ p → q, Y ≡ (p → q) → r ≡ X → r,
    Z ≡ r → p and W ≡ (r → p) → q ≡ Z → p
    Using Truth table

    So, from truth table also, it is clear that (r → p) → q is always true when q is true, and Y is false.

    Let the set of functional dependencies F = {QR → S, R → P, S → Q} hold on a relation schema X = (PQRS). X is not in BCNF. Suppose X is decomposed into two schemas Y and Z, where Y = (PR) and Z = (QRS).
    Consider the two statements given below.
    I. Both Y and Z are in BCNF
    II. Decomposition of X into Y and Z is dependency preserving and lossless
    Which of the above statements is/are correct?
    • a)
      Both I and II
    • b)
      I only
    • c)
      II only
    • d)
      Neither I nor II
    Correct answer is option 'C'. Can you explain this answer?

    Sanya Agarwal answered
    X = (PQRS)
    Set of functional dependencies
    F = {QR → S, R → P, S → Q}
    QR → {Q, R, S, P}
    SR → {S, R, P, Q}
    QR and SR are keys of Relation schema X
    R → P …
    part of key (R) → non key(P)
    It is partial dependency and hence not in 2nd normal form and therefore not in BCNF (Given)
    X is decomposed into two schemas Y and Z, where Y = (PR) and Z = (QRS)
    For Y = (PR)
    R → P
    Y is in BCNF because binary attribute (R is a key).
    For Z = (QRS)
    QR → S
    S → Q
    SR → {R, S, Q}
    QR → {R, Q, S}
    QR and SR are keys of Relation schema X
    Z is not in BCNF because
    S → Q and S is not Super key.
    ∴ statement I is incorrect
    Dependency Preserving:
    R → P is in Y
    QR → S in Z
    S → Q is in Z
    Hence, it is dependency preserving.
    Lossless:
    Y ∩ Z = R which is key of Y.
    Therefore, it is Lossless
    Statement II is correct.
    Hence, option 3 is the answer

    Let R (x) denote the statement “x > 2.” What is the truth value of the quantification ∃xR(x), having domain as real numbers?
    • a)
      True
    • b)
      False
    Correct answer is option 'A'. Can you explain this answer?

    Sanya Agarwal answered
    Clarification: Because “x > 2” is sometimes true—for instance, when x = 3–the existential quantification of R(x), which is ∃xR(x), is true.

    Chapter doubts & questions for Propositional Logic - Engineering Mathematics for Computer Science Engineering 2024 is part of Computer Science Engineering (CSE) exam preparation. The chapters have been prepared according to the Computer Science Engineering (CSE) exam syllabus. The Chapter doubts & questions, notes, tests & MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests here.

    Chapter doubts & questions of Propositional Logic - Engineering Mathematics for Computer Science Engineering in English & Hindi are available as part of Computer Science Engineering (CSE) exam. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.

    Top Courses Computer Science Engineering (CSE)

    Signup to see your scores go up within 7 days!

    Study with 1000+ FREE Docs, Videos & Tests
    10M+ students study on EduRev