Conceptual ML02 Questions

Ace your homework & exams now with Quizwiz!

Given the following: Formula1: p→q Formula2: ┐ p V q How many different Boolean combinations can be assigned to variables p and q so that both the propositional logic formulas yield the same value. (Hint: Write the truth tables)

4

The minimum number of states in a DFA (with ∑ = {0,1}) that are required to accept all strings ending with 001 is:

4

Given the following: ( p→q) V ( ┐ q Ʌ (p V q)) Which answer best reflects the above expression

Tautology

(i > =1) → (j < 5) = (i< 1) V(j <5)

true

A->B = ¬A V B

true

Every regular grammar is also a context free grammar, because the rule forms used for defining regular grammars are a subset of the rule forms required for context free grammars.

true

In proof by contradition, you prove a statement by assuming its negation and obtaining a contradiction

true

R->R|T T->lambda is an ambiguous grammar

true

¬ ∀x ( P(x) Λ Q(x)) = ∃x (¬P(x) V ¬ Q(x))

true

¬ ∀x P(x) = ∃ x ¬ P(x)

true

Set-1 consists of 10 elements. How many possible subsets of Set-1 are possible?

2^10

Set-1 consists of 10 elements. What is the total number of ways in which elements from S1 can be arranged in a line?

10!

Set-1 and Set-2 are two sets consisting of 10 and 12 elements respectively. If a function mapping is defined from each element of Set-2 to each element of Set-1, how many possible functions are possible?

10^12

A CFG is ambiguous if A) It has more than one rightmost derivations on the same string B) It has more than one leftmost derivations on the same string C) No parse tree can be generated for the CFG on a string D) Two different parse trees can be described on the same string

A, B, D

Which of the following statement is correct?A) All Regular grammar are context free but not vice versaB) All context free grammar are regular grammar but not vice versaC) Regular grammar and context free grammar are the same entityD) None of the mentioned

All Regular grammar are context free but not vice versa

Set-1 and Set-2 are two sets consisting of 10 and 12 elements respectively. In how many ways can 5 elements be selected from Set-1?

C(10, 5)

In a proof by counterexample, you disprove a statement by giving a situation where the statement is false

TRUE

if a language is accepted by a PDA (pushdown automata) you can say for certain it is accepted by...

LBA, Turing Maching

If a language is accepted by a turing machine, you can say for certain it is accepted by

NONE of the above

In proof by example,

NONE of the above bc proof by example is not a thing

Set-1 and Set-2 are two sets consisting of 10 and 12 elements respectively. In how many ways can 4 elements be selected from Set-1 and Set-2?

None of the above

The following is a grammar over alphabet {a,b}. S -> aSb | bSa | b Which of the following strings can be derived which makes the grammar ambiguous

None of the above as the grammar is ambiguous

Which of the rules are valid for a context free grammar I) Sab ⟶ ba II) A ⟶S III) S ⟶ AB IV) A⟶ a V) B ⟶ b VI) S ⟶ AB VII) AB ⟶ abc VIII) S ⟶ aB

all except 1 and 7

Which accurately describes the comparison in terms of the computational power of an automata I) NPDA > DPDA II) NFA > DFA III) LBA > DFA IV) LBA > DPDA V) LBA < General Turing Machine VI) Turing Machine > LBA > NPDA > NFA

all except 2

Which of the following pairs have DIFFERENT expressive power? A. Deterministic context-free grammars and non-deterministic context-free grammarsB. All linear grammars and left linear grammar

both

Which of the statements are true: A. Nondeterministic pushdown automata (npda) accept precisely the class of all context-free languages.B. Deterministic pushdown automata (dpda) just accept a subset of context-free languages.

both

Given the grammar S → λ S → aSb S → bSa which type of grammar is it?

context free, linear

Which of the following is an real-world programming language ambiguity?A) dangling else problemB) matching parenthesis problem C) maze problemD) none of the mentioned

dangling else

A v (B ^ C) = (A ^ B) v(A ^ C)

false

A->B = B->A

false

¬ (A ^ B) =( ¬ A) ^ ( ¬B)

false

¬ ∃x P(x) = ∀x P(x)

false

¬((i > 2) Λ(j <= 3)) = (i<= 2) V(j <3)

false

¬∃x ( P(x) -> Q(x)) = ∀ x ( P(x) ^ Q(x))

false

Which of the following statements are true about the languages accepted by a DFA?

language can be finite or infinite


Related study sets

Section 4 - Visualization, 3D Modeling & Animation

View Set

Final Exam Study Guide Acute Med/Surg

View Set

PrepU Vsim-Pediatric Case: Sabina Vasquez (Core) Pre/Post

View Set

Basic Aspects of Aging: Lesson 1

View Set

PSYO 111: Chapter 7 practice quiz

View Set