3. Determine regular languages 1. Let $L_1 = \{a^mb^n \mid m$ is an even number and $n$ is an odd number\}. Is $L_1$ regular? Prove that your answer is correct. 2. Let $L_2 = \{a^mb^n \mid 3m = 2n\}$. Is $L_2$ regular? Prove that your answer is correct.
Added by Kayla C.
Close
Step 1
To determine if L1 is regular, we can try to construct a regular expression or a finite automaton that recognizes it. First, let's analyze the language L1. It consists of strings that have an even number of 'a's followed by an odd number of 'b's. To construct a Show more…
Show all steps
Your feedback will help us improve your experience
Oswaldo Jiménez and 76 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Problem 2. Prove ∀n, m ∈ Z, [ n³ + m³ odd ⟹ [n odd ∨ m odd] ] Hint: [P ⟹ [Q1 ∨ Q2] ] = [ [P ∧ (~ Q1)] ⟹ Q2] ]. Note (n³ + m³) - n³ = m³ and combine it with problem 1 - and think of what happens when you subtract (or add) 2 integers with different parity.
Adi S.
Give two proofs that if n is a natural number, then n^2 + n + 3 is odd. Use two cases for the first proof. Use the following two propositions as supporting lemmas for the second. Lemma 1.1: For x, y ∈ ℤ, x(x + 1) is even. Lemma 1.2: For x, y, z ∈ ℤ, if x is even and y is odd, then x + y is odd.
Vincenzo Z.
Let S1, S2, S3,... be the sequence of sets defined by S1 = {1}, S2 = {2} and Si = Si-2 U (Si-1 Δ {1, 2, ..., i}) for each integer i ≥ 3. Prove by strong induction that, for all integers n ≥ 1, Sn = {1, 3, 5, ..., n} if n is odd and Sn = {2, 4, 6, ..., n} if n is even. Hint: Consider splitting your induction step into two cases: one for when k is even and the other for when k is odd.
Hoan N.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD