Let S be the set of all strings in 0’s and 1’s, and define a function g: S ?? Z as follows: for each string s in S,

g(s) = the number of 1’s in s minus the number of 0’s in s.
(a) What is g(101011)? g(00100)?
(b) Is g one-to-one? Prove or give a counterexample.
(c) Is g onto? Prove or give a counterexample.


Mathematics

You might also like to view...

Solve. If necessary, round percents to the nearest tenth, dollar amounts to the nearest cent, and all other numbers to the nearest whole.The marketing division of a company predicts that 78% of the 450 special promotional sale items will sell on the first day of sale. What percent of the promotional items should be available after the first day of sale? How many special promotional items should be available after the first day of sale?

A. 78%; 351 items B. 22%; 99 items C. 22%; 351 items D. 78%; 99 items

Mathematics

Solve the problem.Find the equation of the sphere with center = (-9, -4, -1) and radius = .

A. (x - 9)2 + (y + 4)2 + (z + 1)2 =  
B. (x + 9)2 + (y - 4)2 + (z + 1)2 =  
C. (x + 9)2 - (y + 4)2 - (z + 1)2 =  
D. (x + 9)2 + (y + 4)2 + (z + 1)2 =  

Mathematics

Express the vector as a product of its length and direction.- i - j

A. ( -i - j)
B.
C.
D.

Mathematics

Provide an appropriate response.Several government agencies insure the repayment of first mortgage loans, including:

A. Veterans Administration B. Federal Housing Administration C. both the Federal Housing Administration and the Veterans Administration D. Social Security Administration

Mathematics