AQA A Level · Computer Science 7517

正規語言:練習題

5 條多項選擇題即時批改,另有 5 條文字題附完整解題步驟,全部圍繞「正規語言」。

10 條題目29 免費,無需登記
第 1 題
1

Which of the following describes a regular language based on the formal definitions in the syllabus?

第 2 題
1

Consider the set difference operation. Given the sets \(A = \{x | x \in \mathbb{N} \wedge x < 5\}\) and \(B = \{2, 4, 6\}\), what is the result of the operation \(A \setminus B\)?

第 3 題
1

Which regular expression correctly represents the language over the alphabet \( \{a, b\} \) that accepts strings containing at least one 'a' followed by zero or more 'b's, where the entire sequence can then be repeated any number of times?

第 4 題
1

Which regular expression metacharacter is used to signify zero or more repetitions of the preceding element?

第 5 題
1

Consider a Finite State Machine designed to accept any string that ends with the suffix "101" over the alphabet \(\{0, 1\}\). Which regular expression correctly defines the same language?

第 6 題
2

Which specific regular expression metacharacter is used to indicate that the preceding element must appear one or more times?

先自己寫一次答案,再對照解題步驟。

第 7 題
3

A Deterministic Finite Automaton (DFA) is constructed to recognize the language defined by the regular expression \( (0|1)*1 \). Describe the final state of this machine after processing the input string "1010" and explain if it is an accepting state.

先自己寫一次答案,再對照解題步驟。

第 8 題
6

Given the set \( S = \{0, 1\} \), calculate the cardinality of the Cartesian product \( S \times S \times S \) and list the resulting elements.

先自己寫一次答案,再對照解題步驟。

第 9 題
8

A language is considered regular if it can be represented by a regular expression or accepted by a Finite State Machine (FSM). Consider the alphabet \( \Sigma = \{0, 1\} \).

(a) Write a regular expression for a language that accepts all strings where every '0' is immediately followed by at least two '1's. Strings may also consist of '1's only or be the empty string.

(b) Draw the state transition table for a Deterministic Finite Automaton (DFA) that recognizes the language described in part (a). Clearly label your states, the start state, and the accepting state(s).

(c) A student claims that the set \( L = \{0^n 1^n | n \ge 1\} \) is a regular language because it can be described using the compact notation shown in set theory. Explain, with reference to the properties of regular languages and FSMs, why this claim is incorrect.

(d) Simplify the regular expression \( (1|0|1)^* \) and describe the language it represents in plain English.

先自己寫一次答案,再對照解題步驟。

第 10 題
5

A regular language is defineable by a regular expression or a finite state machine. Consider the alphabet \( \Sigma = \{a, b\} \).

(a) Construct a regular expression that defines all strings which contain at least one 'a' and end with exactly two 'b's.

(b) Explain the difference between a subset and a proper subset in the context of the set of all strings in this language compared to the set of all strings over the alphabet \( \Sigma \).

(c) Calculate the cardinality of the set of strings in this language that have a length of exactly 4.

先自己寫一次答案,再對照解題步驟。

* thinka提供的內容由AI生成,可能並非總是準確或最新。請將其用作輔助資源,並與官方材料進行核實。

你已看過標準答案,接下來輪到批改你的答案。

這一頁可以告訴你好答案的樣子,卻無法指出你的答案欠缺什麼。thinka 按真實評分準則批改你的文字答案,約 15 秒完成。

想多做幾條同類題目?立即開始練習呢個課題,即做即批改。

立即練習