{VERSION 4 0 "SUN SPARC SOLARIS" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 95 " These two functions allow us to take a list of numbers and produce a Vector that will be input " }}{PARA 0 "" 0 "" {TEXT -1 272 "to a cryptosystem. Parse_ngraphs() \+ takes as input the list of numbers, p_nums, the base, and the numbe r of digits, n, in which the vector components are to be written. We assume that the entries in p_nums are positive integers less than ba se. It outputs a Vector ." }}{PARA 0 "" 0 "" {TEXT -1 178 "The revers e function is Decompose_ngraphs() which takes a vector--whose componen ts are positive integers less than b^n-- and returns a list of positiv e integers all less than b. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 370 "Parse_ngraphs := proc (p_nums, base, n) \nlocal i, j, k, len, p _vec, new_digit; \n\nlen := ceil(nops(p_nums)/n); \np_vec := Vector(le n); \nk := 0; \nfor i to len do \n k := (i-1)*n; \n for j to n do \+ \n if k+j <= nops(p_nums) then \n new_digit := p_nums[k+j] \+ \n else new_digit := 0 end if; \n p_vec[i] := p_vec[i]*base+new_ digit \n od; \nod;\nRETURN(p_vec); \nend;" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%.Parse_ngraphsGR6%%'p_numsG%%baseG%\"nG6(%\"iG%\"jG% \"kG%$lenG%&p_vecG%*new_digitG6\"F1C'>8'-%%ceilG6#*&-%%nopsG6#9$\"\"\" 9&!\"\">8(-%'VectorG6#F4>8&\"\"!?(8$F=F=F4%%trueGC$>FF*&,&FIF=F=F?F=F> F=?(8%F=F=F>FJC$@%1,&FFF=FPF=F9>8)&F<6#FT>FVFG>&FA6#FI,&*&FenF=9%F=F=F VF=-%'RETURNG6#FAF1F1F1" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 375 "Decompose_ngraphs := proc (d_vec, base, n) \nlocal i, j, temp_list, d _nums, temp; \n\nd_nums := []; \ntemp_list := [seq(0,i = 1 .. n)]; \nf or i to LinearAlgebra[Dimension](d_vec) do \n temp := d_vec[i]; \n \+ for j from 0 to n-1 do \n temp_list[n-j] := irem(temp,base); \n \+ temp := iquo(temp,base);\n od; \n d_nums := [op(d_nums), op( temp_list)];\nod;\nRETURN(d_nums);\nend;" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%2Decompose_ngraphsGR6%%&d_vecG%%baseG%\"nG6'%\"iG%\"jG%*temp_l istG%'d_numsG%%tempG6\"F0C&>8'7\">8&7#-%$seqG6$\"\"!/8$;\"\"\"9&?(F=F? F?-&%.LinearAlgebraG6#%*DimensionG6#9$%%trueGC%>8(&FH6#F=?(8%F;F?,&F@F ?F?!\"\"FIC$>&F66#,&F@F?FPFR-%%iremG6$FL9%>FL-%%iquoGFZ>F37$-%#opG6#F3 -F\\o6#F6-%'RETURNGF]oF0F0F0" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "h:=[12, 3, 12, 43, 54, 66, 54, 67, 82, 45,12];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"hG7-\"#7\"\"$F&\"#V\"#a\"#mF)\"#n\"##)\"#XF&" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "Parse_ngraphs(h, 100,2);" } }{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'RTABLEG6$\"(#*eR$-%'MATRIXG6#7(7# \"%.77#\"%V77#\"%ma7#\"%na7#\"%X#)7#\"%+7" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 27 "Decompose_ngraphs(%,100,2);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7.\"#7\"\"$F$\"#V\"#a\"#mF'\"#n\"##)\"#XF$\"\"!" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "save Parse_ngraphs, Decompos e_ngraphs, Ngraphs;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "save `Ngraph s.m`;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "8 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }{RTABLE_HANDLES 3395892 } {RTABLE M6R0 I4RTABLE_SAVE/3395892X*%)anythingG6"6"\[[[[[t'"'"%.7"%V7"%ma"%na"%X#)"%+7F& }