Results 1 to 11 of 11
Like Tree2Thanks
  • 1 Post By romsek

Thread: functions question N/A

  1. #1
    Banned
    Joined
    Nov 2016
    From
    Las Vegas
    Posts
    2

    functions question N/A

    Recall that N is the set of natural numbers, i.e., N = {0, 1, 2, . . .}.
    1. Consider the set W of words over the alphabet {a, b, c}, i.e., the set ofall finite non-empty sequences of letters chosen among a, b and c forexample, aa, babb and bbc are all elements of W.
    Let counta be the function from W to N that counts the number oftimes the letter a occurs, i.e., given w ∈ W, counta(w) is the numberof times a occurs in w.


    (a) Calculate counta(aa) and counta(bbc).


    (b) Is counta injective? Justify your answer.


    (c) Is counta surjective? Justify your answer.


    ANY HELP WOULD BE GREATLY APPRECIATED, I'M STRUGGLING.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    5,401
    Thanks
    2290

    Re: functions question N/A

    Quote Originally Posted by Libya View Post
    Recall that N is the set of natural numbers, i.e., N = {0, 1, 2, . . .}.
    1. Consider the set W of words over the alphabet {a, b, c}, i.e., the set ofall finite non-empty sequences of letters chosen among a, b and c forexample, aa, babb and bbc are all elements of W.
    Let counta be the function from W to N that counts the number oftimes the letter a occurs, i.e., given w ∈ W, counta(w) is the numberof times a occurs in w.


    (a) Calculate counta(aa) and counta(bbc).


    (b) Is counta injective? Justify your answer.


    (c) Is counta surjective? Justify your answer.


    ANY HELP WOULD BE GREATLY APPRECIATED, I'M STRUGGLING.
    surely you can do (a)

    (b) injective means one to one. $counta(aaa)=3$, $counta(baaa)=3$, so clearly $counta()$ is not injective

    (c) surjective here would mean that every $n \in \mathbb{N}$ has some word $w \in W$ such that $counta(w)= n$

    For any given $n$ the word $w$ consisting of $n$ $a$'s is such that $counta(w)=n$ so $counta()$ is surjective
    Thanks from topsquark
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor

    Joined
    Aug 2006
    Posts
    20,738
    Thanks
    2459
    Awards
    1

    Re: functions question N/A

    Quote Originally Posted by romsek View Post
    surely you can do (a)

    (b) injective means one to one. $counta(aaa)=3$, $counta(baaa)=3$, so clearly $counta()$ is not injective

    (c) surjective here would mean that every $n \in \mathbb{N}$ has some word $w \in W$ such that $counta(w)= n$

    For any given $n$ the word $w$ consisting of $n$ $a$'s is such that $counta(w)=n$ so $counta()$ is surjective
    If that is a correct reading, then as I said this is a childish trivial question.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    5,401
    Thanks
    2290

    Re: functions question N/A

    Quote Originally Posted by Plato View Post
    If that is a correct reading, then as I said this is a childish trivial question.
    as you said where?
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor

    Joined
    Aug 2006
    Posts
    20,738
    Thanks
    2459
    Awards
    1

    Re: functions question N/A

    Quote Originally Posted by romsek View Post
    as you said where?
    In the first reply;
    Quote Originally Posted by Plato View Post
    I confess that I am also confused. Either this is a totally trivial question or the worst worded.

    Is this the way anyone else understands how the function works?
    $\text{counta}(bbb)=0 $
    $\text{counta}(babcc)= 1$
    $\text{counta}(abcab)=2~????? $

    If not, please correct me
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    5,401
    Thanks
    2290

    Re: functions question N/A

    Quote Originally Posted by Plato View Post
    In the first reply;
    odd, I'm not seeing that post.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor

    Joined
    Aug 2006
    Posts
    20,738
    Thanks
    2459
    Awards
    1

    Re: functions question N/A

    Quote Originally Posted by romsek View Post
    odd, I'm not seeing that post.
    Thank you, I will tell Ted. We are having real trouble with a spam filter.
    Do you agree that it is trivial under that reading?
    Follow Math Help Forum on Facebook and Google+

  8. #8
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    5,401
    Thanks
    2290

    Re: functions question N/A

    Quote Originally Posted by Plato View Post
    Thank you, I will tell Ted. We are having real trouble with a spam filter.
    Do you agree that it is trivial under that reading?
    I suppose it's a pretty remedial intro to injection and surjection so not entirely trivial but the function itself is pretty trivial
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Banned
    Joined
    Nov 2016
    From
    Las Vegas
    Posts
    2

    Re: functions question N/A

    lmao you guys are saying this question is trivial this question represents my life, i suck at discrete maths. how are you guys so smart?
    Follow Math Help Forum on Facebook and Google+

  10. #10
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    5,401
    Thanks
    2290

    Re: functions question N/A

    Quote Originally Posted by Libya View Post
    lmao you guys are saying this question is trivial this question represents my life, i suck at discrete maths. how are you guys so smart?
    being able to count the number of a's in a word does not make one so smart.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    MHF Contributor

    Joined
    Apr 2005
    Posts
    18,760
    Thanks
    2676

    Re: functions question N/A

    Quote Originally Posted by Libya View Post
    lmao you guys are saying this question is trivial this question represents my life, i suck at discrete maths. how are you guys so smart?
    Do you understand that this problem is asking you to count?

    My experience is that people who are "not good at maths" simply do not grasp the definitions- often trying to read more into the definitions than they should.

    "Calculate counta(aa)". Can you count to 2?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 6
    Last Post: Oct 17th 2009, 07:16 PM
  2. Functions question - 2
    Posted in the Pre-Calculus Forum
    Replies: 0
    Last Post: Mar 12th 2009, 03:35 AM
  3. Question about functions and a identity Question
    Posted in the Trigonometry Forum
    Replies: 2
    Last Post: Sep 8th 2008, 10:03 PM
  4. Need help with 1 question on functions
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: Mar 11th 2008, 04:47 AM
  5. functions question
    Posted in the Pre-Calculus Forum
    Replies: 3
    Last Post: Mar 1st 2007, 05:55 PM

/mathhelpforum @mathhelpforum