(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

We have a problem set on my Discrete Mathematics class:

Let X be the set of strings over {a,b} of length 4 and let Y be the set of the strings over {a,b} of length 3. Define function f from X to Y by the rule:

f(alpha) = string consisting of the first three characters of alpha.

Is f one-to-one? is f onto?

3. The attempt at a solution

I don't know where to start but what I understand on the problem is that X is a set with {aaaa,bbbb,aaab...etc} and Y has {aaa,bbb,aab...etc}. Do I need to list all the elements of the sets? I was also confused by the alpha variable. Hoping for your answers. Thanks.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: How to define a function involving strings?

**Physics Forums | Science Articles, Homework Help, Discussion**