Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(b) Let . t: such that . (c) For is the number of times ' ' occurs in the string For example because the string

(b) Let . t: such that . (c) For is the number of times \' \' occurs in the string For example because the string \'01\" occurs twice in \"01101\". The first occurrence starts at the first bit. The second occurrence starts in at the fourth bit. Solution (d) . For is the number of is that occurin . For example , because there ate three 1 \'s in the string \"01101\". (e) . For is obtained by replacing the last bit with 1. For example (f) Let . where (a) Let where (hi)

(i) Let .

Sol112:

(a) Let A={1,2,3}. f:AA?Z where f(x,y)=xy

The function f takes pairs of elements from A and maps them to their product in Z. For example, f(1,2)=2 and f(3,3)=9.

(b) Let A={2,3,4,5}. t: A?Z such that f(x)=x^2.

The function t takes elements from A and maps them to their square in Z. For example, t(3)=9 and t(5)=25.

(c) t:(0,1)^5?Z. For x?{0,1}^5,f(x) is the number of times \'01\' occurs in the string.

The function t takes binary strings of length 5 and maps them to the number of times the substring \'01\' appears in the string. For example, t(01101)=2 and t(11111)=0.

(d) t:(0,1)^5?Z. For x?(0,1)^5, f(x) is the number of 1\'s that occur in x.

The function t takes binary strings of length 5 that do not start with 0 and maps them to the number of 1\'s in the string. For example, t(11111)=5 and t(01010)=2.

(e) f:(0,1)^3?{0,1}^3. For x?{0,1}^3, f(x) is obtained by replacing the last bit with 1.

The function f takes binary strings of length 3 and maps them to another binary string of length 3 by replacing the last bit with 1. For example, f(001)=011 and f(110)=111.

(f) Let A={2,3,4,5). f:AA?Z where f(x,y)=x+y.

The function f takes pairs of elements from A and maps them to their sum in Z. For example, f(2,4)=6 and f(5,3)=8.

(g) Let A={1,2,3}. f:A?Z where f(x)=2x+1.

The function f takes elements from A and maps them to twice their value plus 1 in Z. For example, f(1)=3 and f(3)=7.

(h) Let A={1,2,3}. f:AA?Z where f(x,y)=(y,x).

The function f takes pairs of elements from A and maps them to a new pair where the first element is the second element of the original pair and the second element is the first element of the original pair. For example, f(1,2)=(2,1) and f(3,1)=(1,3).

(i) Let A={1,2,3}. f:AA?ZZ, where f(x,y)=(xy+1).

The function f takes pairs of elements from A and maps them to a new pair in ZZ where the first element is the product of the original pair plus 1 and the second element is 0. For example, f(1,2)=(3,0) and f(3,3)=(10,0).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Design Operation And Evaluation Of Mobile Communications

Authors: Gavriel Salvendy ,June Wei

1st Edition

3030770249, 978-3030770242

More Books

Students also viewed these Programming questions

Question

Given and find P(AB). If, further, are A and B independent?

Answered: 1 week ago