#3: Use GRC(q,n,d) with q=2, d=3,5,7, and 5 ≤ n ≤20, for each case find the cardinality of the code (what's called M in the book). Also find the Sphere-Packing Bound. How far are they in each case? * i accidentally put a -1 in the print statements, please ignore* temp := GRC(2, 5, 3); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1; -1; 1;'); SPB(2, 5, 1); temp := GRC(2, 6, 3); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1; -1; 1;'); SPB(2, 6, 1); temp := GRC(2, 7, 3); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1; -1; 1;'); SPB(2, 7, 1); temp := GRC(2, 8, 3); print('calculated; 1;'); nops(temp); print('best; 1;'); SPB(2, 8, 1); temp := GRC(2, 9, 3); print('calculated'); nops(temp); print('best'); SPB(2, 9, 1); temp := GRC(2, 10, 3); print('calculated'); nops(temp); print('best'); SPB(2, 10, 1); temp := GRC(2, 11, 3); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1;'); SPB(2, 11, 1); temp := GRC(2, 12, 3); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1;'); SPB(2, 12, 1); temp := GRC(2, 13, 3); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1;'); SPB(2, 13, 1); temp := GRC(2, 14, 3); print('calculated'); nops(temp); print('best; 1;'); SPB(2, 14, 1); temp := GRC(2, 15, 3); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1;'); SPB(2, 15, 1); temp := GRC(2, 16, 3); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1;'); SPB(2, 16, 1); calculated; 1; -1; 1; 4 best; 1; -1; 1; 5 calculated; 1; -1; 1; 8 best; 1; -1; 1; 9 calculated; 1; -1; 1; 16 best; 1; -1; 1; 16 calculated; 1; 16 best; 1; 28 calculated 32 best 51 calculated 64 best 93 calculated; 1; -1; 1; 128 best; 1; 170 calculated; 1; -1; 1; 256 best; 1; 315 calculated; 1; -1; 1; 512 best; 1; 585 calculated 1024 best; 1; 1092 calculated; 1; -1; 1; 2048 best; 1; 2048 calculated; 1; -1; 1; 2048 best; 1; 3855 temp := GRC(2, 5, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 5, 2); calculated; -1; 2 best; -1; 2 temp := GRC(2, 6, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 6, 2); calculated; -1; 2 best; -1; 2 temp := GRC(2, 7, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 7, 2); calculated; -1; 2 best; -1; 4 temp := GRC(2, 8, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 8, 2); calculated; -1; 4 best; -1; 6 temp := GRC(2, 9, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 9, 2); calculated; -1; 4 best; -1; 11 temp := GRC(2, 10, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 10, 2); calculated; -1; 8 best; -1; 18 temp := GRC(2, 11, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 11, 2); calculated; -1; 16 best; -1; 30 temp := GRC(2, 12, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 12, 2); calculated; -1; 16 best; -1; 51 temp := GRC(2, 13, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 13, 2); calculated; -1; 32 best; -1; 89 temp := GRC(2, 14, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 14, 2); calculated; -1; 64 best; -1; 154 temp := GRC(2, 15, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 15, 2); calculated; -1; 128 best; -1; 270 temp := GRC(2, 16, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 16, 2); calculated; -1; 256 best; -1; 478 temp := GRC(2, 17, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 17, 2); calculated; -1; 512 best; -1; 851 temp := GRC(2, 18, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 18, 2); calculated; -1; 512 best; -1; 1524 temp := GRC(2, 19, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 19, 2); calculated; -1; 1024 best; -1; 2744 temp := GRC(2, 20, 5); print('calculated; -1;'); nops(temp); print('best; -1;'); SPB(2, 20, 2); calculated; -1; 2048 best; -1; 4969 temp := GRC(2, 5, 7); print('calculated'); nops(temp); print('best; 1; -1; 1;'); SPB(2, 5, 3); temp := GRC(2, 6, 7); print('calculated; 1;'); nops(temp); print('best; 1; -1; 1;'); SPB(2, 6, 3); temp := GRC(2, 7, 7); print('calculated; 1;'); nops(temp); print('best; 1; -1; 1;'); SPB(2, 7, 3); temp := GRC(2, 8, 7); print('calculated; 1;'); nops(temp); print('best; 1;'); SPB(2, 8, 3); temp := GRC(2, 9, 7); print('calculated'); nops(temp); print('best'); SPB(2, 9, 3); temp := GRC(2, 10, 7); print('calculated'); nops(temp); print('best'); SPB(2, 10, 3); temp := GRC(2, 11, 7); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1;'); SPB(2, 11, 3); temp := GRC(2, 12, 7); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1;'); SPB(2, 12, 3); temp := GRC(2, 13, 7); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1;'); SPB(2, 13, 3); temp := GRC(2, 14, 7); print('calculated'); nops(temp); print('best; 1;'); SPB(2, 14, 3); temp := GRC(2, 15, 7); print('calculated; 1; -1; 1;'); nops(temp); print('best; 1;'); SPB(2, 15, 3); temp := GRC(2, 16, 7); print('calculated; 1;'); nops(temp); print('best; 1;'); SPB(2, 16, 3); calculated 1 best; 1; -1; 1; 1 calculated; 1; 1 best; 1; -1; 1; 1 calculated; 1; 2 best; 1; -1; 1; 2 calculated; 1; 2 best; 1; 2 calculated 2 best 3 calculated 2 best 5 calculated; 1; -1; 1; 4 best; 1; 8 calculated; 1; -1; 1; 4 best; 1; 13 calculated; 1; -1; 1; 8 best; 1; 21 calculated 16 best; 1; 34 calculated; 1; -1; 1; 32 best; 1; 56 calculated; 1; 32 best; 94 #4: Use GRC(q,n,d) with q=3, d=3,5,7, and 5 ≤ n ≤10, for each case find the cardinality of the code (what's called M in the book). Also find the Sphere-Packing Bound. How far are they in each case? GRCval := GRC(3, 5, 3); M := nops(GRCval); SPB(3, 5, 1); GRCval := GRC(3, 6, 3); M := nops(GRCval); SPB(3, 6, 1); GRCval := GRC(3, 7, 3); M := nops(GRCval); SPB(3, 7, 1); GRCval := GRC(3, 8, 3); M := nops(GRCval); SPB(3, 8, 1); GRCval := GRC(3, 9, 3); M := nops(GRCval); SPB(3, 9, 1); GRCval := GRC(3, 10, 3); M := nops(GRCval); SPB(3, 10, 1); M := 9 22 M := 24 56 M := 72 145 M := 198 385 M := 519 1035 M := 1390 2811 GRCval := GRC(3, 5, 5); M := nops(GRCval); SPB(3, 5, 2); GRCval := GRC(3, 6, 5); M := nops(GRCval); SPB(3, 6, 2); GRCval := GRC(3, 7, 5); M := nops(GRCval); SPB(3, 7, 2); GRCval := GRC(3, 8, 5); M := nops(GRCval); SPB(3, 8, 2); GRCval := GRC(3, 9, 5); M := nops(GRCval); SPB(3, 9, 2); GRCval := GRC(3, 10, 5); M := nops(GRCval); SPB(3, 10, 2); M := 3 4 M := 3 9 M := 8 22 M := 18 50 M := 39 120 M := 83 293 GRCval := GRC(3, 5, 7); M := nops(GRCval); SPB(3, 5, 3); GRCval := GRC(3, 6, 7); M := nops(GRCval); SPB(3, 6, 3); GRCval := GRC(3, 7, 7); M := nops(GRCval); SPB(3, 7, 3); GRCval := GRC(3, 8, 7); M := nops(GRCval); SPB(3, 8, 3); GRCval := GRC(3, 9, 7); M := nops(GRCval); SPB(3, 9, 3); GRCval := GRC(3, 10, 7); M := nops(GRCval); SPB(3, 10, 3); M := 1 1 M := 1 3 M := 3 5 M := 3 11 M := 3 23 M := 9 50 #5: USe GRC(q,n,d) with q=5, d=3,5,7, and 5 ≤ n ≤7, for each case find the cardinality of the code (what's called M in the book). Also find the Sphere-Packing Bound. How far are they in each case? GRCval := GRC(5, 5, 3): M := nops(GRCval); SPB(5, 5, 1); GRCval := GRC(5,6, 3): M := nops(GRCval); SPB(5, 6, 1); GRCval := GRC(5, 7, 3): M := nops(GRCval); SPB(5, 7, 1); print('next set'): GRCval := GRC(5, 5, 5): M := nops(GRCval); SPB(5, 5, 2); GRCval := GRC(5,6, 5): M := nops(GRCval); SPB(5, 6, 2); GRCval := GRC(5, 7, 5): M := nops(GRCval); SPB(5, 7, 2); print('next set'): GRCval := GRC(5, 5, 7): M := nops(GRCval); SPB(5, 5, 3); GRCval := GRC(5,6, 7): M := nops(GRCval); SPB(5, 6, 3); GRCval := GRC(5, 7, 7): M := nops(GRCval); SPB(5, 7, 3); M := 74 148 M := 265 625 M := 1113 2693 *(next, set) M := 5 17 M := 13 58 M := 39 214 *(next, set) M := 1 3 M := 1 10 M := 5 29 #7: PlotkinBound:=proc(n,d) local m: if d mod 2 = 0 then if 2 * d >n then m:= 2*floor(d/(2*d - n)): else m:=4*d: fi: else if 2*d+1 >n then m:= 2*floor((d+1)/(2*d+1-n)): else m:= 4*d+4: fi: fi: m: end: