AQA A Level · Computer Science 7517

Regular languages:練習問題

その場で採点される選択問題 5 問と、解説つきの記述問題 5 問。すべて「Regular languages」からの出題です。

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 秒で採点します。

同じような問題をもっと解きたい?このトピックの新しい問題を、解きながら採点。

練習を始める