Proving Injectivity & Surjectivity of f: Palindromes over X

  • Thread starter Thread starter cilla
  • Start date Start date
  • Tags Tags
    functions
cilla
Messages
13
Reaction score
0

Homework Statement


[/B]
Let X = {a,b}.

A palindrome over X is a string α for which α = αR (i.e., a string that reads the same forward and backward). An example of a palindrome over X is bbaabb.

Define a function from X* to the set of palindromes over X as f(α) = ααR.
Is f one-to-one? Is f onto? Prove your answers.

Homework Equations


[/B]
X* = set of all strings over X
αR = α in reverse

so if α = abb, αR = bba, and ααR = abbbba

The Attempt at a Solution



Injection:
Let f(α) = f(β).
Then ααR = ββR.
Show α = β.
We can reverse each side and get αRα = βRβ.
The cardinality of some string is equal to that of itself in reverse: |γ| = |γR|.
Therefore the cardinality of either side of the equation must be equal...

I don't quite know where I'm going with that. I know it is injective because
if [( f(α) = αR ) ∧ ( f(α) = f(β) )] → [ αR = βR ];
reverse both sides, α = β. The above seems to be a logically equivalent extension of that. But how to prove it?

Surjection:
Suppose that β ∈ the set of palindromes over X.
Then the string is a palindrome composed only with characters in {a,b}.
Any substring will therefore rightfully belong to the domain X as well, as the codomain of ƒ is a subset of the domain X... for every β, there is an α... therefore the codomain and the range are equal and the function maps onto the set of palindromes over X... I think it is.
Let ααR = β and solve for α? But if so how?
 
Last edited:
Physics news on Phys.org
Two ideas that might help you organize your thoughts a little better;

Given two strings ##\alpha=\alpha_1\alpha_2\ldots \alpha_n## and ##\beta=\beta_1\beta_2\ldots \beta_m## over ##X##, ##\alpha=\beta## if and only if ##n=m## (i.e. ##|\alpha|=|\beta|##) and ##\alpha_i=\beta_i## for all ##i=1,\ldots,n##.

Given strings ##\alpha## and ##\beta## over ##X##, ##|\alpha\beta|=|\alpha|+|\beta|##.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top