A collection of W of strings of symbols is defined recursively by
1) a, b, and c belong to W
2) If X belongs to W, so does a(X)c
Which of the following belong to W?
a. a(b)c
b. a(a(b)c)c
c. a(abc)c
d. a(a(a(a)c)c)c
e. a(aacc)c
PLEASE EXPLAIN YOUR WORK! It can be multiple from the following not just one.
1) a, b, and c belong to W
2) If X belongs to W, so does a(X)c
ANSWERS
a. a(b)c
b. a(a(b)c)c
d. a(a(a(a)c)c)c
EXPLANATION
Strings that are in W
-> a
-> b
-> c
Now, goes into the recursive rule
a is in W, so will be a(a)c
b is in W, so will be a(b)c
c is in W, so will be a(b)c
-> a(a)c
-> a(b)c
-> a(c)c
a(a)c is in W, so will be a(a(a)c)c
a(b)c is in W, so will be a(a(b)c)c
a(c)c is in W, so will be a(a(c)c)c
-> a(a(c)c)c
-> a(a(b)c)c
-> a(a(c)c)c
And they go on.
So, the language consists of n number of a's and n number of c's with parenthesis having a/b/c in the middle.
INCORRECT BECAUSE
c. a(abc)c is not in, because it has (abc) in the middle
e. a(aacc)c and it has (aacc) in the middle
1) a, b, and c belong to W
2) If X belongs to W, so does a(X)c
ANSWERS
a. a(b)c
b. a(a(b)c)c
d. a(a(a(a)c)c)c
EXPLANATION
Strings that are in W
-> a
-> b
-> c
Now, goes into the recursive rule
a is in W, so will be a(a)c
b is in W, so will be a(b)c
c is in W, so will be a(b)c
-> a(a)c
-> a(b)c
-> a(c)c
a(a)c is in W, so will be a(a(a)c)c
a(b)c is in W, so will be a(a(b)c)c
a(c)c is in W, so will be a(a(c)c)c
-> a(a(c)c)c
-> a(a(b)c)c
-> a(a(c)c)c
And they go on.
So, the language consists of n number of a's and n number of c's with parenthesis having a/b/c in the middle.
INCORRECT BECAUSE
c. a(abc)c is not in, because it has (abc) in the middle
e. a(aacc)c and it has (aacc) in the middle
-- Please up vote or comment if you have any doubts.
Happy Learning!
A collection of W of strings of symbols is defined recursively by 1) a, b, and...
discrete math. Structural Induction: Please write and
explain clearly. Thank you.
Let S be the set of binary strings defined recursively as follows: Basis step: 0ES Recursive step: If r ES then 1rl E S and 0x0ES (I#x and y are binary strings then ry is the concatenation of and y. For instance, if 011 and y 101, then ry 011101.) (a) List the elements of S produced by te first 2 applications of the recursive definition. Find So, Si...
Suppose that the following subset T of binary strings is defined recursively: • Basis: 1 is in T • Recursively, if the binary string s is in T, then so are the strings Os, so, 181, 11s and s11 1. Carefully show why the string 011001 must be in the set T. 2. Provide an argument that shows that if s is a string in T of length n and s has an odd number of 1s, then all strings...
String digit sums. Consider strings over the alphabet 2= {0,1,2,3,4,5,6,7,8,9). We will recursively define the digsum function as follows: • digsum(€)=0 • digsum(ax)=a + digsum(x), where a e is interpreted as the numeric value of the digit. Just can't even. Consider a language Lodd defined as follows: • a € Lodd for a € {1,3,5,7,9} • ax e Lodd for a € {0,2,4,6,8) and x € Lodd • axb e Lodd for a, b € {1,3,5,7,9) and x € Lodd...
Suppose the language L ? {a, b}? is defined recursively as
follows:
? L; for every x ? L, both ax and axb are
elements of L.
Show that L = L0 , where L0 =
{aibj | i ? j }. To show that L ? L 0
you
can use structural induction, based on the recursive definition of
L. In the other direction, use strong induction on the length of a
string in L0.
1.60. Suppose the language...
Can you please thoroughly explain part B?
Let Σ {0,1} be an alphabet. Suppose the language Ly is the set of all strings that start with a 1 and L2 is the set of all strings that end in a 1. Describe Lj U L2 and (L1 UL2)* using English. b) Decide if the given strings belong to the language defined by the given regular expression. If it does not belong, then explain why. 0(1|€)10(e|0)*11 , strings: 0110011, 0100011001111
(5) Describe the strings in the set S of strings over the alphabet Σ = a, b, c defined recursively by (1) c E S and (2) if x є S then za E S and zb є S and cr є S. Hint: Your description should be a sentence that provides an euasy test to check if a given string is in the set or not. An example of such a description is: S consists of all strings of...
Lewis Diagrams and Formal Charges 1. Based on the following Lewis symbols, predict to which group in the periodic table element X belongs X (4) 2. Write the Lewis dot diagram of the following elements. b. Aluminum Al a, Sulfur S . Nitrogon N d. Phosphonus P e. Xenon Xe e. Barjum Ba 3. Complete the following table. MOLECULE LEIS POLARS FORMAL CHARGE ON THE MOLECULAR CEOMETRY DINGRAMI CENTRAL ATOM MOLECULES OBEING OCTET RULE a. HO b. PCI Ppared by...
26. A sequence is defined recursively by the formula b, -4,4-2, with h -1 and b, = 3. What is the value Show the work that leads to your answer. or 27. The recursive formula to describe a sequence is represented by -2 la=1+3a. Determine the first four terms of this sequence. Can this sequence be represented using an explicit geometric formula? Justify your answer. 28. A small jet has an airspeed (the rate in still air) of 300 mi/h....
roblem 18 [15 points Consider the Turing M (Q,E, T,6,4, F), such that 16 g transition set (d) Write a regular expresion that defitves L. fsuch a regular expression does mot exist, prove it Answer: E, N,t,1, R (M has an one-way infinite tape (infinite to the right only.) B is the designated blank symbol. M accepts by final state.) Let L be the set of strings which M accepts Let LR be the set of strings which M rejects....
1. Consider the sequence defined recursively by ao = ], Ant1 = V4 an – An, n > 1. (a) Compute ai, a2, and a3. (b) For f(x) = V 4x – x, find all solutions of f(x) = x and list all intervals where: i. f(x) > x ii. f(x) < x iii. f(x) is increasing iv. f(x) is deceasing (c) Using induction, show that an € [0, 1] for all n. (d) Show that an is an increasing...