(programming required) Write a pair of functions string->intlist(s, n) and intlist->string(L, n) that convert between strings of characters and a list of elements from Zn. You may do this conversion...




(programming required) Write a pair of functions string->intlist(s, n) and intlist->string(L, n) that convert between strings of characters and a list of elements from Zn. You may do this conversion in many ways, but it must be the case that these operations are inverses of each other: if string->intlist(s ∗ , n) = L ∗ , then intlist->string(L ∗ , n) = s ∗ . (Hint: the easiest way to do this conversion is to view text encoded as a sequence of ASCII symbols, each of which is an element of {0, 1, . . . , 255}. Thus you can view your input text as a number written in base 256. Your output is a number written in base n. Use baseConvert from p. 714.)









May 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here