   Chapter 7.1, Problem 27ES ### Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193

#### Solutions

Chapter
Section ### Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193
Textbook Problem
1 views

# Let S be the set of all strings of a ' s  and b ' s . Define f : S → Z as follows: For each string s in S   f ( s ) = { the   number   of   b ' s   to   the   left of   the   left-most   a   in   s 0   if   s   contains   no   a ' s . Find f ( a b a ) ,   f ( b b a b ) , and  f ( b ) . What is the range of f? Define g : S → S as follows: For each string s in S. g ( s ) =  the string obtained by writing the characters of s in reverse order.Find g ( a b a ) ,   g ( b b a b ) , and g ( b ) . What is the range of g?

To determine

(a)

Find f(aba),f(bbab) and f(b). What is the range of f ?

Explanation

Given information:

Find f(aba),f(bbab) and f(b). What is the range of f ?

Concept used:

The range of such a function f is {0}Z+.

Calculation:

f(aba)=0

The leftmost variable in the string is an a, and so it has no b variables on its left.

f(bbab)=2

There is only one a, and so it is the leftmost a

To determine

(b)

Find g(aba),g(bbab),andg(b). What is the range of g ?

To determine

(c)

Find

### Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

#### The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started 