Reasoning

Logic and Fallacies

1,716 Questions

Understand the fundamentals of propositional logic, logical inference rules, and paradoxes. This set includes identifying logical fallacies, including those found in classical Nyaya logic. Strong grasp of these concepts is crucial for scoring well in the reasoning sections of competitive tests.

Propositional logic modelsLogical inference rulesTypes of logical fallaciesParadoxes and contingent truthsNyaya logic concepts

Logic and Fallacies Questions

Multiple choice technology programming languages
  1. pre conditions

  2. post conditions

  3. exceptions

  4. class invariants

Reveal answer Fill a bubble to check yourself
A,B,D Correct answer
Explanation

Assertions in Java are used to enforce internal correctness checks: preconditions (requirements before method execution), postconditions (guarantees after method execution), and class invariants (conditions that must always hold true). They are not for exception handling - that's what try-catch blocks are for. Assertions can be disabled at runtime, unlike normal exception handling.

Multiple choice technology testing
  1. Statement Coverage

  2. Pole Coverage

  3. Condition Coverage

  4. Path Coverage

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Statement Coverage, Condition Coverage, and Path Coverage are all valid logic coverage techniques used in white-box testing. 'Pole Coverage' is not a standard term in software testing - it appears to be a made-up or misspelled term. The correct terms are Statement Coverage (each statement executed), Condition Coverage (each condition true/false evaluated), and Path Coverage (all possible paths taken).

Multiple choice
  1. P(x) = True for all x $\epsilon$S such that x $\ne$b
  2. P(x) = False for all x $\epsilon$S such that x $\ne$a and x $\ne$c
  3. P(x) = False for all x $\epsilon$S such that b $\le$x and x $\ne$c
  4. P(x) = False for all x $\epsilon$S such that a $\le$x and b $\le$x
Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

rder=0>P(y) If P(x) then P(y) and a, y $\epsilon$S, satisfies x $\le$ y So, -P (a) = True, p(b) = false $\Rightarrow$False $\cup$False $\Rightarrow$False So, P(x) = False for all x $\epsilon$S, such that b $\le$ x and x $\ne$c.

Multiple choice
  1. $(\forall x) [(\exists y) [B(x,y) \land C(y)] \Rightarrow A(x)] \land \neg (\exists x)[B(x,x)]$
  2. $(\forall x) [(\forall y) [B(x,y) \land C(y)] \Rightarrow A(x)] \land \neg (\exists x)[B(x,x)]$
  3. $(\forall x) [(\exists y) [B(x,y) \land C(y)] \Rightarrow A(x)] \vee \neg (\exists x)[B(x,x)]$
  4. $(\forall x) [(\forall y) [B(x,y) \land C(y)] \Rightarrow A(x)] \land (\exists x)[B(x,x)]$
Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The logic program has two rules: A(x) if B(x,y) and C(y) (with existential quantification on y), and a constraint that ¬B(x,x) for all x. In first-order logic: (∀x)[(∃y)(B(x,y) ∧ C(y)) ⇒ A(x)] represents the first rule (existential y in body becomes existential in antecedent of implication). The constraint ¬(∃x)B(x,x) represents the second rule. These are connected by ∨ (disjunction) because in logic programs, rules are implicitly disjunctive.

Multiple choice
  1. ((P $\lor$ R) $\land$ (Q $\lor$ $\neg$R)) _ (P $\lor$ Q) is logically valid
  2. (P $\lor$ Q) $\Rightarrow$ ((P $\lor$ R) $\land$ (Q $\lor$ $\neg$R)) is logically valid
  3. (P $\lor$ Q) is satisfiable if and only if (P $\lor$ R) Ù (Q $\lor$ $\neg$R) is satisfiable
  4. (P $\lor$ Q) $\Rightarrow$ FALSE if and only if both P and Q are unsatisfiable
Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

If P = True, Q = false, R =True Then we find, (T$\cup$F) $\Rightarrow$((T$\cup$T)$\lor$ (F$\cup$F) T $\Rightarrow$((T$\lor$F) T $\Rightarrow$F F$\cup$F = False(is not valid)

Multiple choice
  1. ∀x[(tiger(x) ∧ lion(x)) → {(hungry(x) ∨ threatened(x)) → attacks(x)}]

  2. ∀x[(tiger(x) ∨ lion(x)) → {(hungry(x) ∨ threatened(x)) ∧ attacks(x)}]

  3. ∀x[(tiger(x) ∨ lion(x)) → {attacks(x) → (hungry(x) ∨ threatened(x))}]

  4. ∀x[(tiger(x) ∨ lion(x)) → {(hungry(x) ∨ threatened(x)) → attacks(x)}]

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The given statement can be explained as follows: If x is lion or if it is hungry or it is threatened, x will attack P(x) = lion (x) v tiger (x) Q(x) = hungry (x) v threatened (x) R (x) = attacks (x) P(x) $\rightarrow$ (Q (x) $\rightarrow$ R (x)) Expanding all, ∀x[(lion(x) ∨ tiger(x)) → {(hungry(x) ∨ threatened(x)) → attacks(x)}]

Multiple choice
  1. $\lnot \forall x\, \Bigl ( Graph(x) \implies Connected(x) \Bigr )$
  2. $\exists x\, \Bigl (Graph(x) \land \lnot Connected(x) \Bigr )$
  3. $\lnot \forall x \, \Bigl ( \lnot Graph(x) \lor Connected(x) \Bigr )$
  4. $\forall x \, \Bigl ( Graph(x) \implies \lnot Connected(x) \Bigr )$
Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Vx[ Graph (x) $\Rightarrow$7 connected (x) ] Indicates “for every x if x is a graph, then it is not connected”

Multiple choice
  1. For any formula, there is a truth assignment for which at least half the clauses evaluate to true.

  2. For any formula, there is a truth assignment for which all the clauses evaluate to true.

  3. There is a formula such that for each truth assignment, at most one-fourth of the clauses evaluate to true.

  4. None of the above.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Since all clauses must be true for a formula (in conjunctive Normal Form) to be true, hence at least for one truth assignments all clauses will evaluate to true.

Multiple choice
  1. Only I and II

  2. Only I, II and III

  3. Only I, II and IV

  4. All of I, II III and IV

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

$(P ∧ Q) ∨ (P ∧ \neg Q) ∨ (\neg P ∧ \neg Q)$ = $ P ∨ (Q ∧ \neg Q) ∨ (\neg P ∧ \neg Q)$ = $ P ∨ (\neg P ∧ \neg Q)$ = $ ( P ∨ \neg Q) ∧ ( P ∨ \neg Q)$ = $ ( P ∧ Q)$

Multiple choice
  1. Everyone can fool some person at some time.

  2. No one can fool everyone all the time.

  3. Everyone cannot fool some person all the time.

  4. No one can fool some person at some time.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The formula ∀x∃y∃t(¬F(x,y,t)) reads: For all x (everyone), there exists some y (some person) and some time t such that x cannot fool y at time t. This means No one can fool some person at some time. More colloquially: Every person has at least one other person they cannot fool at at least one moment. Option A says everyone CAN fool someone (wrong - we have ¬F). Option B says no one can fool everyone all the time (different quantifier structure). Option C says everyone cannot fool some person all the time (wrong - says ∀t not ∃t). Option D correctly captures: there's at least one person each of us fails to fool at some point.

Multiple choice
  1. $\exists x (real(x) \lor rational(x))$
  2. $\forall x (real(x) \to rational(x))$
  3. $\exists x (real(x) \wedge rational(x))$
  4. $\exists x (rational(x) \to real(x))$
Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

1: There exists x which is either real or rational and can be both. 2: All real numbers are rational 3: There exists a real number which is rational. 4: There exists some number which is not rational or which is real.