Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Let S be the set of all strings in a ' s and b ' s , and define C: S - > S by

Let S be the set of all strings in a's and b's, and define
C: S -> S
by
C(s)= as,
for each
s in S.
(C is called concatenation by a on the left.)
(a)
Is C one-to-one?
To answer this question, suppose
s1
and
s2
are strings in S such that
C(s1)= C(s2).
Use the definition of C to write this equation in terms of a,
s1,
and
s2
as follows.
as1=
Correct: Your answer is correct.
Now strings are finite sequences of characters, and since the strings on both sides of the above equation are equal, for each integer
n >=0,
the nth character from the left in the left-hand string
equals
Changed: Your submitted answer was incorrect. Your current answer has not been submitted.
the nth character from the
left
Correct: Your answer is correct.
in the right-hand string. It follows that for each integer
n >=0,
the nth character from the left in
s1
equals
Changed: Your submitted answer was incorrect. Your current answer has not been submitted.
the nth character from the
left
Correct: Your answer is correct.
in
s2.
Hence,
s1
=
Correct: Your answer is correct.
s2,
and so C
is
Correct: Your answer is correct.
one-to-one.
(b)
Show that C is not onto.
Counterexample: The string
Incorrect: Your answer is incorrect.
is in S but is not equal to
C(s)
for
any
Correct: Your answer is correct.
string s because
every string in the range of C starts
Correct: Your answer is correct.
with
Incorrect: Your answer is incorrect.
.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions