Discrete Mathematics with Applications 4th Edition

Published by Cengage Learning
ISBN 10: 0-49539-132-8
ISBN 13: 978-0-49539-132-6

Chapter 7 - Functions - Exercise Set 7.2 - Page 415: 21

Answer

a-L is not one-to-one b-L is onto

Work Step by Step

$l:S\rightarrow \mathbb{Z}^{nonneg} (S\,is\,the\,set\,all\,strings\,of\,0\,s\,and\,1\,s)\\ l(s) =\,the\,length\,of\,\,s,\,\,for\,\,all\,\,strings\,s\,in\,S.\\ a-\\ A\,function\,\,l: S \rightarrow \mathbb{Z}^{nonneg}\,is\,not\,\,\,one-to-one\,\Leftrightarrow \\ \exists \,\,x_{1}\,and\,x_{2}\,\,in\,\,S\,\,such\,that\,\, l(x_{1}) = l(x_{2})\,\,and x_{1} \neq x_{2}.\\ we\,can\,see\,that\,l(000)=l(111)=3\,\,and\,000\neq 111 \\ so\,l\,is\,not\,one-to-one\\ b-\\ l: S \rightarrow \mathbb{Z}^{nonneg}\,\,is\,\,onto\,\Leftrightarrow \,\\ \forall y\,in\,\mathbb{Z}^{nonneg} ,\exists x \in S\,such\,that\, l(x) = y.\\ proof:\\ if\,y=0\,there\,is\,\xi (empty\,string)\,such\,that\,l(\xi )=0\\ if\,y=n> 0\\ let\,s=1111...1\,(n\,times.)\,such\,that\,l(1111...1 )=n \\ so\,l\,is\,onto $
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.