Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please answer the following three questions. Let = {a, b, c). Prove that B-LwcwR

ID: 3588303 • Letter: P

Question

Please answer the following three questions.

Let = {a, b, c). Prove that B-LwcwR 1 w {a, b}*) (note wR is w reverse) is not regular. Examples are: aca, bacab, abcba, aabbcbbaa, aababcbabaa. In English try civic, level, rotator, rotor, kayak, reviver, and racecar or "I prefer pi." Let {"[", "}"). Prove that C-LX 1 x e {"[“, “}',)" and in x every "(" is matched later in x to a “)', } is not regular. This is the language of matching parentheses. Examples are: 0, H),iM0 Let = {"[“, “)''). Prove that D-Lx | x {"[“, “}")" and x has an even number of"" and an even number of "Y is regulat. Examples are:,l also and

Explanation / Answer

class Array2DWrapper { int *ptr; public: Array2DWrapper(int *ptr) : ptr(ptr) {} int * operator[](int i) { return ptr + i*N; } }; // USAGE: void exampleFunction(int *arrPtr) { Array2DWrapper arr { arrPtr }; ... arr[i][j]; ... }