Write a procedure that will take as input a positive


Problem

1. Write a procedure that will take as input a positive integer n and whose output will be the list [c[0], c[1], . . . , c[10]] where c[i] is the number of times that i appears in the list genseq(n) where genseq is as described in Problem 3. Test the procedure for n = 100, 1000 and 10000. Do the numbers 0, 1, . . ., 10 appear to be equally distributed?

2. In the procedure genseq replace 7*i mod 11 by 8*i mod 22. Then repeat the instructions in part (a) with [c[0], c[1], . . . , c[10]] replaced by [c[0], c[1], . . . , c[21]]. Do the numbers 0, 1, . . ., 21 appear to be equally distributed?

problem 3 as mentioned:

genseq:=proc(N)
local i, L;
L := NULL;
for i from 1 to N do
L := L, (7 * i) mod 11;
end do;
return [L];
end proc:
genseq(110);genseq(11);

Request for Solution File

Ask an Expert for Answer!!
Business Management: Write a procedure that will take as input a positive
Reference No:- TGS02780933

Expected delivery within 24 Hours