Question: 8.9 Structural induction 25: S is a set of strings over the alphabet fa, b) and is defined recursively as follows: Basis: ES and bES

 8.9 Structural induction 25: S is a set of strings over

8.9 Structural induction 25: S is a set of strings over the alphabet fa, b) and is defined recursively as follows: Basis: ES and bES Recursive rules: If x is in S, then bxa ES and axbES. Define the function NumB(x) to be the number of occurrences of the character b in the string x For example, NumB(baba) 2. Suppose that xES and u bxa. Select the expression that is correct. a. NumB(u) NumB(x)+1 b. NumB(u) NumB(x)+2 c. NumB(u) 2 NumB(x) d. NumB(u) 2 NumB(x)+1 X. 26: S is a set of strings over the alphabet (a, b) and is defined recursively as follows: Basis: AES and beS Recursive rules: If x is in S, then bxa S and axbES. Define the function NumB(x) to be the number of occurrences of the character b in the string x, and NumA(x) to be the number of occurrences of the character a in the string x. For example NumB(bba) 2 and NumA(bba) 1 Page 6 of 9 HW-6 a. NumB(x) NumA(x)+1 b. NumB(x) S NumA(x) c. 0 s NumB(x) NumA(x) s1 8.9 Structural induction 25: S is a set of strings over the alphabet fa, b) and is defined recursively as follows: Basis: ES and bES Recursive rules: If x is in S, then bxa ES and axbES. Define the function NumB(x) to be the number of occurrences of the character b in the string x For example, NumB(baba) 2. Suppose that xES and u bxa. Select the expression that is correct. a. NumB(u) NumB(x)+1 b. NumB(u) NumB(x)+2 c. NumB(u) 2 NumB(x) d. NumB(u) 2 NumB(x)+1 X. 26: S is a set of strings over the alphabet (a, b) and is defined recursively as follows: Basis: AES and beS Recursive rules: If x is in S, then bxa S and axbES. Define the function NumB(x) to be the number of occurrences of the character b in the string x, and NumA(x) to be the number of occurrences of the character a in the string x. For example NumB(bba) 2 and NumA(bba) 1 Page 6 of 9 HW-6 a. NumB(x) NumA(x)+1 b. NumB(x) S NumA(x) c. 0 s NumB(x) NumA(x) s1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!