Chapter 9 Flashcards

1
Q

Which of the following is true about a finite-state machine (FSM)?

A) It has infinite memory and states.
B) It processes input strings to transition between states.
C) It can only recognize context-sensitive languages.
D) It halts for undecidable problems.

A

B) It processes input strings to transition between states.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the purpose of a state graph in an FSM?

A) To show the sequence of transitions.
B) To list all possible inputs.
C) To define the output at each state.
D) To identify halting problems.

A

A) To show the sequence of transitions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following represents the same information as a state graph?

A) Quintuple
B) Turing machine tape
C) State table
D) Context-free grammar

A

C) State table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the primary difference between a finite-state machine and a Turing machine?

A) Turing machines have infinite tape; FSMs do not.
B) FSMs have more computational power than Turing machines.
C) Turing machines cannot recognize regular sets.
D) FSMs can recognize undecidable problems.

A

A) Turing machines have infinite tape; FSMs do not.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the quintuple of a Turing machine include?

A) A list of states, transitions, and tape symbols.
B) States, input alphabet, output alphabet, transition functions, and final state.
C) The initial state, final state, input alphabet, output alphabet, and tape.
D) The current state, input symbol, next state, output symbol, and direction of movement.

A

D) The current state, input symbol, next state, output symbol, and direction of movement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A Turing machine recognizes a set if:

A) It halts on every input string.
B) It halts only for strings in the set.
C) It never halts for strings in the set.
D) It computes an infinite loop for the set.

A

B) It halts only for strings in the set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the role of the tape in a Turing machine?

A) To store the input and provide infinite memory.
B) To define transitions between states.
C) To verify the grammar of context-free languages.
D) To enforce type-0 rules on languages.

A

A) To store the input and provide infinite memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The Halting Problem is undecidable because:

A) Turing machines cannot handle infinite loops.
B) There is no general algorithm to determine if a Turing machine will halt for all inputs.
C) Finite-state machines have limited memory.
D) Regular languages do not allow halting transitions.

A

B) There is no general algorithm to determine if a Turing machine will halt for all inputs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which of the following statements about the Halting Problem is true?

A) It is a P problem.
B) It is a problem specific to finite automata.
C) It proves the limits of computational problem-solving.
D) It can be solved using context-free grammars.

A

C) It proves the limits of computational problem-solving.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A problem is in class P if:

A) It can be solved in polynomial time by a deterministic Turing machine.
B) It can only be solved in exponential time.
C) It is verifiable in polynomial time by a deterministic Turing machine.
D) It is not verifiable in any time.

A

A) It can be solved in polynomial time by a deterministic Turing machine.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which of the following is true about NP-complete problems?

A) Every NP-complete problem is also NP-hard.
B) Every NP-hard problem is NP-complete.
C) NP-complete problems cannot be reduced to each other.
D) They are solvable in polynomial time.

A

A) Every NP-complete problem is also NP-hard.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is an example of an NP-complete problem?

A) Sorting a list
B) Traveling Salesperson Problem
C) Matrix multiplication
D) Adding two numbers

A

B) Traveling Salesperson Problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which type of formal language corresponds to regular expressions?

A) Type 0
B) Context-sensitive
C) Context-free
D) Regular

A

D) Regular

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Context-free languages are recognized by:

A) Turing machines
B) Finite-state machines
C) Pushdown automata
D) Context-sensitive grammars

A

C) Pushdown automata

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which of the following is true about Type 0 grammars?

A) They generate only regular languages.
B) They generate all computable languages.
C) They can be parsed using finite automata.
D) They are less powerful than context-sensitive grammars.

A

B) They generate all computable languages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly