Proving Injectivity & Surjectivity of f: Palindromes over X

  • Thread starter Thread starter cilla
  • Start date Start date
  • Tags Tags
    functions
Click For Summary
SUMMARY

The function f: X* → Palindromes defined by f(α) = ααR is proven to be injective and surjective. For injectivity, if f(α) = f(β), then α must equal β, as shown by reversing both sides of the equation. For surjectivity, every palindrome β can be expressed as ααR for some α in X*, confirming that the codomain matches the range of the function. Thus, f is both one-to-one and onto.

PREREQUISITES
  • Understanding of palindromes and their properties
  • Familiarity with functions and mappings in set theory
  • Knowledge of string manipulation and reversal
  • Basic concepts of cardinality in mathematics
NEXT STEPS
  • Study the properties of injective and surjective functions in detail
  • Explore the concept of string reversal and its applications in algorithms
  • Investigate the relationship between cardinality and function mappings
  • Learn about formal proofs in set theory and their structure
USEFUL FOR

Students in mathematics, computer science, or anyone interested in formal proofs related to functions and palindromes.

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|##.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
Replies
3
Views
1K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
20
Views
5K
Replies
1
Views
2K
Replies
7
Views
2K