(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 9.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 157, 7] NotebookDataLength[ 57437, 1601] NotebookOptionsPosition[ 52399, 1500] NotebookOutlinePosition[ 53000, 1522] CellTagsIndexPosition[ 52957, 1519] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Anexo: algunos programas en ", StyleBox["Mathematica", FontSlant->"Italic"] }], "Title", CellChangeTimes->{{3.760182959033902*^9, 3.760182973390052*^9}, { 3.760183384923944*^9, 3.76018338656424*^9}}, TextAlignment->Center,ExpressionUUID->"746b09ce-737d-4514-a76b-3b5cef9acae9"], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Funci\[OAcute]n ", FontWeight->"Bold"], StyleBox["matgencaniter", IgnoreSpellCheck->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(r,m)", FontWeight->"Bold"], ". Dados dos enteros r y m tales que 0 \[LessEqual] r \[LessEqual] m, \ devuelve la matriz generadora de ", StyleBox["RM", FontFamily->"Informal Roman", FontWeight->"Bold"], "(r,m) calculada a trav\[EAcute]s de la ", StyleBox["Proposici\[OAcute]n 9", FontWeight->"Bold"], " para el orden can\[OAcute]nico de ", Cell[BoxData[ FormBox[ SubsuperscriptBox[ StyleBox["F", FontWeight->"Bold"], "2", "m"], TraditionalForm]],ExpressionUUID-> "984289b3-c0c3-464c-8b15-5843102f19fa"], "." }], "Text", CellDingbat->"\[FilledCircle]", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{{3.601715260734375*^9, 3.6017153046875*^9}, { 3.60171539971875*^9, 3.6017154305*^9}, 3.60171550903125*^9, { 3.601715596921875*^9, 3.601715600671875*^9}, {3.601716811828125*^9, 3.60171682790625*^9}, {3.622264774703125*^9, 3.62226477553125*^9}, 3.622444166484375*^9, {3.623398110125*^9, 3.6233981141875*^9}, { 3.6545010916470423`*^9, 3.6545011227312655`*^9}, {3.7601721782797747`*^9, 3.760172338616649*^9}, {3.760172398722166*^9, 3.7601724015494347`*^9}, 3.7601725734893785`*^9, 3.760177345810381*^9, {3.760182699939526*^9, 3.760182700361501*^9}},ExpressionUUID->"f8d70a73-11ac-4f60-9691-\ dbdf23788098"], Cell[BoxData[ RowBox[{ RowBox[{"matgencaniter", "[", RowBox[{"r_", ",", "m_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"lista", "=", RowBox[{"{", "}"}]}], ",", "i", ",", "j"}], "}"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "0"}], ",", RowBox[{"i", "\[LessEqual]", "m"}], ",", RowBox[{"i", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "0"}], ",", RowBox[{"j", "\[LessEqual]", "i"}], ",", RowBox[{"j", "++"}], ",", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"j", "\[Equal]", "0"}], ",", RowBox[{"lista", "=", RowBox[{"AppendTo", "[", RowBox[{"lista", ",", RowBox[{"Tuples", "[", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"2", "^", "i"}]}], "]"}]}], "]"}]}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"i", "\[Equal]", "j"}], ",", RowBox[{ RowBox[{"lista", "=", RowBox[{"AppendTo", "[", RowBox[{"lista", ",", RowBox[{"Join", "[", RowBox[{ RowBox[{"lista", "[", RowBox[{"[", RowBox[{"-", "1"}], "]"}], "]"}], ",", RowBox[{"Join", "[", RowBox[{ RowBox[{"Tuples", "[", RowBox[{ RowBox[{"{", "0", "}"}], ",", RowBox[{ RowBox[{"2", "^", "i"}], "-", "1"}]}], "]"}], ",", RowBox[{"{", RowBox[{"{", "1", "}"}], "}"}], ",", "2"}], "]"}]}], "]"}]}], "]"}]}], ";", RowBox[{"lista", "=", RowBox[{"Delete", "[", RowBox[{"lista", ",", "1"}], "]"}]}]}], ",", RowBox[{ RowBox[{"lista", "=", RowBox[{"AppendTo", "[", RowBox[{"lista", ",", RowBox[{"Join", "[", RowBox[{ RowBox[{"Join", "[", RowBox[{ RowBox[{"lista", "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{ RowBox[{"Length", "[", RowBox[{"lista", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], ",", RowBox[{"Length", "[", RowBox[{ RowBox[{"lista", "[", RowBox[{"[", "2", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "}"}]}], "]"}]}], "]"}], ",", RowBox[{"Join", "[", RowBox[{ RowBox[{"lista", "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"lista", "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ",", "2"}], "]"}]}], "]"}]}], ";", RowBox[{"lista", "=", RowBox[{"Delete", "[", RowBox[{"lista", ",", "1"}], "]"}]}]}]}], "]"}]}], "]"}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"i", "\[Equal]", "m"}], " ", "&&", " ", RowBox[{"j", "\[Equal]", "r"}]}], ",", RowBox[{"Return", "[", RowBox[{"lista", "[", RowBox[{"[", RowBox[{"-", "1"}], "]"}], "]"}], "]"}]}], "]"}]}]}], "]"}]}], "]"}]}], "]"}]}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{{3.601715445921875*^9, 3.60171550109375*^9}, { 3.601715536390625*^9, 3.601715588921875*^9}, {3.601715625234375*^9, 3.601715732125*^9}, {3.601715796140625*^9, 3.601715796140625*^9}, { 3.601715893015625*^9, 3.601715907109375*^9}, {3.60171596603125*^9, 3.601716090515625*^9}, {3.601716219453125*^9, 3.601716236109375*^9}, { 3.60171628384375*^9, 3.601716350671875*^9}, {3.601716835671875*^9, 3.6017170519375*^9}, {3.6017171228125*^9, 3.60171713003125*^9}, { 3.60171794503125*^9, 3.60171796125*^9}, {3.60171814325*^9, 3.601718181859375*^9}, 3.601718654640625*^9, 3.6018883147459493`*^9, 3.7601726077322707`*^9, 3.760177345810381*^9}, CellLabel->"In[1]:=",ExpressionUUID->"950c0c83-9b48-483d-a5ba-a4c0455382fa"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Funci\[OAcute]n ", FontWeight->"Bold"], StyleBox["fostandar", IgnoreSpellCheck->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(r,m)", FontWeight->"Bold"], ". Dados dos enteros r y m tales que 0 \[LessEqual] r \[LessEqual] m, \ devuelve la forma est\[AAcute]ndar de la matriz obtenida comenzando con la \ que genera ", StyleBox[" ", FontWeight->"Bold"], StyleBox["matgencaniter", IgnoreSpellCheck->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(r,m)", FontWeight->"Bold"], ", siguiendo los pasos dados en la ", StyleBox["Proposici\[OAcute]n 13", FontWeight->"Bold"], ", as\[IAcute] como el orden est\[AAcute]ndar de ", Cell[BoxData[ FormBox[ SubsuperscriptBox[ StyleBox["F", FontWeight->"Bold"], "2", "m"], TraditionalForm]],ExpressionUUID-> "330786e1-9c32-482e-a157-ca029474e37e"], " correspondiente. " }], "Text", CellDingbat->"\[FilledCircle]", CellGroupingRules->{"GroupTogetherGrouping", 10001.}, CellChangeTimes->{{3.60171657875*^9, 3.60171666509375*^9}, { 3.601716696734375*^9, 3.60171673296875*^9}, {3.601717088984375*^9, 3.60171709553125*^9}, 3.601717147078125*^9, {3.601718680921875*^9, 3.601718705125*^9}, {3.60171878846875*^9, 3.601718973171875*^9}, { 3.6017190534375*^9, 3.60171912003125*^9}, {3.601719216796875*^9, 3.601719232421875*^9}, {3.601799530296875*^9, 3.60179955378125*^9}, { 3.621931564953125*^9, 3.621931567546875*^9}, {3.7601726164645834`*^9, 3.7601728750932217`*^9}, 3.760177074314283*^9, 3.7601773579949474`*^9, { 3.7601827035167956`*^9, 3.7601827039073257`*^9}},ExpressionUUID->"963a6ca1-b6f3-4948-a434-\ 9ae14e6bf8dd"], Cell[BoxData[ RowBox[{ RowBox[{"formordstandar", "[", RowBox[{"r_", ",", "m_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"G", "=", RowBox[{"matgencaniter", "[", RowBox[{"r", ",", "m"}], "]"}]}], ",", "n", ",", "s", ",", RowBox[{"i", "=", "1"}], ",", "j", ",", "k", ",", "H", ",", "aux", ",", "A", ",", "lista"}], "}"}], ",", RowBox[{ RowBox[{"n", "=", RowBox[{"Length", "[", RowBox[{"G", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}]}], ";", RowBox[{"s", "=", RowBox[{"Length", "[", "G", "]"}]}], ";", RowBox[{"A", "=", "G"}], ";", RowBox[{"lista", "=", RowBox[{"Tuples", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"Log", "[", RowBox[{"2", ",", "n"}], "]"}]}], "]"}]}], ";", RowBox[{"While", "[", RowBox[{ RowBox[{"i", "\[LessEqual]", "s"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"i", ",", "i"}], "]"}], "]"}], "\[Equal]", "1"}], ",", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "s"}], ",", RowBox[{"j", "++"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"j", ",", "i"}], "]"}], "]"}], "\[Equal]", "1"}], " ", "&&", " ", RowBox[{"i", "\[NotEqual]", "j"}]}], ",", RowBox[{ RowBox[{"A", "[", RowBox[{"[", "j", "]"}], "]"}], "=", RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{"A", "[", RowBox[{"[", "j", "]"}], "]"}], "-", RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}]}], ",", "2"}], "]"}]}]}], "]"}]}], "]"}], ";", RowBox[{"i", "++"}]}], ",", RowBox[{ RowBox[{"H", "=", RowBox[{"Transpose", "[", "A", "]"}]}], ";", RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "i"}], ",", RowBox[{"k", "\[LessEqual]", "n"}], " ", ",", RowBox[{"k", "++"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"i", ",", "k"}], "]"}], "]"}], "\[Equal]", "1"}], ",", RowBox[{ RowBox[{"aux", "=", RowBox[{"H", "[", RowBox[{"[", "k", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"H", "[", RowBox[{"[", "k", "]"}], "]"}], "=", RowBox[{"H", "[", RowBox[{"[", "i", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"H", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "aux"}], ";", RowBox[{"aux", "=", RowBox[{"lista", "[", RowBox[{"[", "k", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"lista", "[", RowBox[{"[", "k", "]"}], "]"}], "=", RowBox[{"lista", "[", RowBox[{"[", "i", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"lista", "[", RowBox[{"[", "i", "]"}], "]"}], "=", "aux"}], ";", RowBox[{"A", "=", RowBox[{"Transpose", "[", "H", "]"}]}], ";", RowBox[{"k", "=", RowBox[{"n", "+", "1"}]}]}]}], "]"}]}], "]"}]}]}], "]"}]}], "]"}], ";", RowBox[{"Return", "[", RowBox[{"{", RowBox[{"A", ",", "lista"}], "}"}], "]"}]}]}], "]"}]}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10001.}, CellChangeTimes->{ 3.601719237515625*^9, 3.601888322932873*^9, 3.760172780953766*^9, { 3.7601756845386376`*^9, 3.7601757078299713`*^9}, {3.760177080703346*^9, 3.760177081203364*^9}, 3.7601773579949474`*^9}, CellLabel->"In[2]:=",ExpressionUUID->"6fe4c9b7-347a-4699-be2e-ef16ae6e1a02"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Funci\[OAcute]n ", FontWeight->"Bold"], StyleBox["codificar", FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(x,r,m)", FontWeight->"Bold"], ". Dados dos enteros r y m tales que 0 \[LessEqual] r \[LessEqual] m, as\ \[IAcute] como la palabra binaria ", StyleBox["x", FontWeight->"Bold"], " a codificar mediante el c\[OAcute]digo ", StyleBox["RM", FontFamily->"Informal Roman", FontWeight->"Bold"], "(r,m) de longitud ", StyleBox["dim", IgnoreSpellCheck->True], "(", StyleBox["RM", FontFamily->"Informal Roman", FontWeight->"Bold"], "(r,m)) = ", Cell[BoxData[ FormBox[ RowBox[{ StyleBox[ UnderoverscriptBox["\[Sum]", RowBox[{"k", "=", "0"}], "r"], FontSize->12], StyleBox[ RowBox[{"(", GridBox[{ {"m"}, {"k"} }], ")"}], FontSize->7]}], TraditionalForm]], FontSize->5,ExpressionUUID->"307109bc-44af-4bf9-bc57-970c07aee496"], StyleBox[" ", FontSize->5], ", devuelve su codificaci\[OAcute]n usando la matriz generadora dada en \ forma est\[AAcute]ndar de ", StyleBox["RM", FontFamily->"Informal Roman", FontWeight->"Bold"], "(r,m) generada por ", StyleBox["fostandar", IgnoreSpellCheck->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(r,m)", FontWeight->"Bold"], "." }], "Text", CellDingbat->"\[FilledCircle]", CellGroupingRules->{"GroupTogetherGrouping", 10002.}, CellChangeTimes->{{3.601727595421875*^9, 3.60172765728125*^9}, { 3.601727777453125*^9, 3.60172781684375*^9}, {3.622264787859375*^9, 3.622264797015625*^9}, {3.76017292323598*^9, 3.760172948740759*^9}, { 3.7601729838599443`*^9, 3.760173088493043*^9}, {3.760173123446903*^9, 3.760173160425114*^9}, 3.7601773692578573`*^9, {3.760182707734541*^9, 3.760182708156316*^9}},ExpressionUUID->"47f0032c-6d58-4c3d-bce6-\ 62cdc66342e2"], Cell[BoxData[ RowBox[{ RowBox[{"codificar", "[", RowBox[{"x_", ",", "G_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"Return", "[", RowBox[{"Mod", "[", RowBox[{ RowBox[{"Dot", "[", RowBox[{"x", ",", "G"}], "]"}], ",", "2"}], "]"}], "]"}]}], "]"}]}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10002.}, CellChangeTimes->{{3.6017276388125*^9, 3.60172764003125*^9}, 3.601888318792539*^9, 3.76017290821002*^9, 3.7601773692578573`*^9}, CellLabel->"In[3]:=",ExpressionUUID->"0b687aeb-63b9-43aa-98ee-497fa3397700"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["El objetivo es dise\[NTilde]ar el ", FontSize->16, FontColor->GrayLevel[0]], StyleBox["algoritmo de ", FontSize->16, FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox["Reed", IgnoreSpellCheck->True, FontSize->16, FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[" en su versi\[OAcute]n m\[AAcute]s sencilla. ", FontSize->16, FontColor->GrayLevel[0]], StyleBox["Fijados m un entero positivo arbitrario", FontSize->16, FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[", as\[IAcute] como un orden para los elementos de la geometr\ \[IAcute]a finita ", FontSize->16, FontColor->GrayLevel[0]], StyleBox["EG", FontSize->16, FontSlant->"Italic", FontColor->GrayLevel[0]], StyleBox["(m,2) (en la pr\[AAcute]ctica, se toma el orden est\[AAcute]ndar \ devuelto por ", FontSize->16, FontColor->GrayLevel[0]], StyleBox["fostandar", IgnoreSpellCheck->True, FontSize->16, FontWeight->"Bold", FontSlant->"Italic", FontColor->GrayLevel[0]], StyleBox["(r,m)", FontSize->16, FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[", se trata de realizar un programa que devuelva la ", FontSize->16, FontColor->GrayLevel[0]], StyleBox["\[UAcute]nica decodificaci\[OAcute]n", FontSize->16, FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[" de una palabra binaria a trav\[EAcute]s del c\[OAcute]digo de ", FontSize->16, FontColor->GrayLevel[0]], StyleBox["Reed", IgnoreSpellCheck->True, FontSize->16, FontColor->GrayLevel[0]], StyleBox["-Muller binario ", FontSize->16, FontColor->GrayLevel[0]], StyleBox["RM", FontFamily->"Informal Roman", FontSize->16, FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox["(1,m). Para que el proceso funcione, esta debe tener a lo sumo ", FontSize->16, FontColor->GrayLevel[0]], Cell[BoxData[ FormBox[ SuperscriptBox["2", RowBox[{"m", "-", "2"}]], TraditionalForm]], FontSize->16, FontColor->GrayLevel[0],ExpressionUUID-> "0bb1dd93-0c57-457e-8a28-ccaa750dded5"], StyleBox["-1 errores. Son necesarias las subrutinas siguientes:", FontSize->16, FontColor->GrayLevel[0]] }], "Subtitle", CellChangeTimes->{{3.760177641410096*^9, 3.7601776781761093`*^9}, { 3.760177997317144*^9, 3.7601780378988686`*^9}},ExpressionUUID->"52e251e4-4433-424c-a089-\ 2615eaf5f3da"], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Funci\[OAcute]n ", FontWeight->"Bold"], StyleBox["palabrasociada", IgnoreSpellCheck->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(orden,", FontWeight->"Bold"], StyleBox["S", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[")", FontWeight->"Bold"], ". Dados un orden para los elementos de la geometr\[IAcute]a finita ", StyleBox["EG", FontSlant->"Italic"], "(m,2) y ", StyleBox["S", FontSlant->"Italic"], " una variedad af\[IAcute]n de esta, devuelve la palabra asociada a ", StyleBox["S", FontSlant->"Italic"], " para el orden dado." }], "Text", CellDingbat->"\[EmptySmallCircle]", CellGroupingRules->{"GroupTogetherGrouping", 10004.}, CellChangeTimes->{{3.601712973671875*^9, 3.601713084515625*^9}, { 3.601713134578125*^9, 3.60171317784375*^9}, {3.601713271890625*^9, 3.601713311375*^9}, {3.60171505634375*^9, 3.601715126609375*^9}, 3.6017154355625*^9, 3.601727631828125*^9, {3.601727802859375*^9, 3.60172780371875*^9}, {3.621931624375*^9, 3.6219316265*^9}, { 3.7601734880666714`*^9, 3.7601735303967805`*^9}, {3.760173652730437*^9, 3.760173653527055*^9}, 3.760177380134788*^9, 3.7601775902174187`*^9, 3.7601776267729635`*^9},ExpressionUUID->"b08fd24b-13ee-4d43-9ef4-\ 425101c93a59"], Cell[BoxData[ RowBox[{ RowBox[{"palabrasociada", "[", RowBox[{"orden_", ",", "S_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"n", "=", RowBox[{"Length", "[", "S", "]"}]}], ",", RowBox[{"l", "=", RowBox[{"Length", "[", "orden", "]"}]}], ",", "i", ",", "j", ",", RowBox[{"palabra", "=", RowBox[{"{", "}"}]}], ",", RowBox[{"verificar", "=", "0"}]}], "}"}], ",", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "l"}], ",", RowBox[{"j", "++"}], ",", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"orden", "[", RowBox[{"[", "j", "]"}], "]"}], "\[Equal]", RowBox[{"S", "[", RowBox[{"[", "i", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"palabra", "=", RowBox[{"AppendTo", "[", RowBox[{"palabra", ",", "1"}], "]"}]}], ";", RowBox[{"i", "=", RowBox[{"n", "+", "1"}]}], ";", RowBox[{"verificar", "=", "1"}]}]}], "]"}]}], "]"}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"verificar", "\[Equal]", "0"}], ",", RowBox[{"palabra", "=", RowBox[{"AppendTo", "[", RowBox[{"palabra", ",", "0"}], "]"}]}], ",", RowBox[{"verificar", "=", "0"}]}], "]"}]}]}], "]"}], ";", RowBox[{"Return", "[", "palabra", "]"}]}]}], "]"}]}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10004.}, CellChangeTimes->{{3.601713091984375*^9, 3.60171312234375*^9}, { 3.601713331578125*^9, 3.601713421015625*^9}, {3.601713472*^9, 3.601713585578125*^9}, 3.601713717*^9, {3.601714295265625*^9, 3.601714330703125*^9}, {3.601714385296875*^9, 3.601714589640625*^9}, { 3.601714663390625*^9, 3.60171468909375*^9}, {3.60171472721875*^9, 3.601714837890625*^9}, 3.601715044546875*^9, {3.6017281578125*^9, 3.601728158875*^9}, 3.601801523140625*^9, 3.601888326791976*^9, 3.760173674147001*^9, 3.760177380134788*^9, 3.7601775902174187`*^9, 3.7601776267729635`*^9}, CellLabel->"In[4]:=",ExpressionUUID->"b1c7bc47-f9a9-4ff5-92c6-311ab285dece"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Funci\[OAcute]n ", FontWeight->"Bold"], StyleBox["subvariedad", IgnoreSpellCheck->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(", FontWeight->"Bold"], StyleBox["S", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[",", FontWeight->"Bold"], StyleBox["T", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[")", FontWeight->"Bold"], ". Dadas ", StyleBox["S", FontSlant->"Italic"], " y ", StyleBox["T", FontSlant->"Italic"], " variedades afines, determina si ", StyleBox["S", FontSlant->"Italic"], " es ", StyleBox["subvariedad", IgnoreSpellCheck->True], " para ", StyleBox["T", FontSlant->"Italic"], "." }], "Text", CellDingbat->"\[EmptySmallCircle]", CellGroupingRules->{"GroupTogetherGrouping", 10005.}, CellChangeTimes->{{3.601713803796875*^9, 3.601713877359375*^9}, { 3.601715156890625*^9, 3.60171516278125*^9}, {3.6017187141875*^9, 3.601718778515625*^9}, {3.60171882228125*^9, 3.60171882284375*^9}, 3.601719242921875*^9, 3.601719273953125*^9, {3.601726296140625*^9, 3.601726313625*^9}, 3.601727633078125*^9, 3.601801698296875*^9, { 3.622264817015625*^9, 3.62226481784375*^9}, {3.760173699462524*^9, 3.7601737444703646`*^9}, 3.7601773891639423`*^9, 3.7601775902174187`*^9, 3.760177763399721*^9},ExpressionUUID->"c51d50fc-dad3-4264-9008-\ 79753621ef32"], Cell[BoxData[ RowBox[{ RowBox[{"subvariedad", "[", RowBox[{"S_", ",", "T_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"n", "=", RowBox[{"Length", "[", "S", "]"}]}], ",", RowBox[{"s", "=", RowBox[{"Length", "[", "T", "]"}]}], ",", "i", ",", "j", ",", RowBox[{"verificar", "=", "0"}]}], "}"}], ",", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "s"}], ",", RowBox[{"j", "++"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"S", "[", RowBox[{"[", "i", "]"}], "]"}], "\[Equal]", RowBox[{"T", "[", RowBox[{"[", "j", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"j", "=", RowBox[{"s", "+", "1"}]}], ";", RowBox[{"verificar", "=", "1"}]}]}], "]"}]}], "]"}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"verificar", "\[Equal]", "0"}], ",", RowBox[{"Return", "[", "False", "]"}], ",", RowBox[{"verificar", "=", "0"}]}], "]"}]}]}], "]"}], ";", RowBox[{"Return", "[", "True", "]"}]}]}], "]"}]}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10005.}, CellChangeTimes->{ 3.601726318921875*^9, 3.601888328838707*^9, 3.7601737790993567`*^9, 3.7601773891639423`*^9, 3.7601775902174187`*^9, {3.760177752324299*^9, 3.760177763399721*^9}}, CellLabel->"In[5]:=",ExpressionUUID->"e0e52e7b-8920-48ed-b3eb-826cd6d05914"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Funci\[OAcute]n ", FontWeight->"Bold"], StyleBox["pesopalabra", IgnoreSpellCheck->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(x)", FontWeight->"Bold"], ". Dada la palabra ", StyleBox["x", FontWeight->"Bold"], " binaria, devuelve su peso." }], "Text", CellDingbat->"\[EmptySmallCircle]", CellGroupingRules->{"GroupTogetherGrouping", 10006.}, CellChangeTimes->{{3.6017995839375*^9, 3.601799674953125*^9}, 3.621931629578125*^9, {3.7601738045366583`*^9, 3.7601738342795362`*^9}, 3.760177406831604*^9, 3.7601775902174187`*^9, {3.760177752324299*^9, 3.760177776865307*^9}},ExpressionUUID->"d1f2abe0-5aca-489f-b137-\ 970de8c732fb"], Cell[BoxData[ RowBox[{ RowBox[{"pesopalabra", "[", "palabra_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"cont", "=", "0"}], ",", "i", ",", RowBox[{"longitud", "=", RowBox[{"Length", "[", "palabra", "]"}]}]}], "}"}], ",", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "0"}], ",", RowBox[{"i", "<", "longitud"}], ",", RowBox[{ RowBox[{"i", "++"}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"palabra", "[", RowBox[{"[", "i", "]"}], "]"}], "\[NotEqual]", "0"}], ",", RowBox[{"cont", "++"}]}], "]"}]}]}], "]"}], ";", RowBox[{"Return", "[", "cont", "]"}]}]}], "]"}]}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10006.}, CellChangeTimes->{ 3.601801578140625*^9, {3.601801879640625*^9, 3.601801880125*^9}, 3.6018883325103235`*^9, 3.760173865459371*^9, 3.760177406831604*^9, 3.7601775902174187`*^9, 3.760177776865307*^9}, CellLabel->"In[6]:=",ExpressionUUID->"0aadc316-3489-413e-8fb2-b275c76f54df"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Funci\[OAcute]n ", FontWeight->"Bold"], StyleBox["paridadbase", IgnoreSpellCheck->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(x,orden,", FontWeight->"Bold"], StyleBox["S", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[")", FontWeight->"Bold"], ". Dadas la palabra ", StyleBox["x", FontWeight->"Bold"], " binaria a decodificar, un orden para las palabras de la geometr\[IAcute]a \ finita ", StyleBox["EG", FontSlant->"Italic"], "(m,2) y ", StyleBox["S ", FontSlant->"Italic"], "un ", StyleBox["plano af\[IAcute]n", FontWeight->"Bold"], " de esta, devuelve su paridad respecto de ", StyleBox["x", FontWeight->"Bold"], " para el orden dado, calculada usando la ", StyleBox["Proposici\[OAcute]n 15", FontWeight->"Bold"], "." }], "Text", CellDingbat->"\[EmptySmallCircle]", CellGroupingRules->{"GroupTogetherGrouping", 10007.}, CellChangeTimes->{{3.601801713046875*^9, 3.6018017159375*^9}, { 3.60180237278125*^9, 3.6018023776875*^9}, {3.6018024146875*^9, 3.60180242128125*^9}, {3.622264820984375*^9, 3.62226482140625*^9}, { 3.7601740826351476`*^9, 3.760174157210125*^9}, 3.760177419668494*^9, 3.7601777882540483`*^9},ExpressionUUID->"d276b6e1-66e3-4ac7-8635-\ 5d835e7905d9"], Cell[BoxData[ RowBox[{ RowBox[{"paridadbase", "[", RowBox[{"x_", ",", "S_", ",", "orden_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"palabra", "=", RowBox[{"palabrasociada", "[", RowBox[{"orden", ",", "S"}], "]"}]}], ",", "peso"}], "}"}], ",", RowBox[{ RowBox[{"peso", "=", RowBox[{"pesopalabra", "[", RowBox[{"x", "*", "palabra"}], "]"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{"peso", ",", "2"}], "]"}], "\[Equal]", "0"}], ",", RowBox[{"Return", "[", "\"\\"", "]"}], ",", RowBox[{"Return", "[", "\"\\"", "]"}]}], "]"}]}]}], "]"}]}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10007.}, CellChangeTimes->{3.601801728015625*^9, 3.6018883345883017`*^9, 3.760173909039257*^9, 3.760177419668494*^9, 3.7601777882540483`*^9}, CellLabel->"In[7]:=",ExpressionUUID->"b108b929-c445-4709-bf41-51d1b105f9c5"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Funci\[OAcute]n ", FontWeight->"Bold"], StyleBox["casobase", IgnoreSpellCheck->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(x,orden,", FontWeight->"Bold"], StyleBox["variedadesmaximas", IgnoreSpellCheck->True, FontWeight->"Bold"], StyleBox[")", FontWeight->"Bold"], ". Dadas la palabra ", StyleBox["x", FontWeight->"Bold"], " binaria a decodificar, un orden para los elementos de la geometr\[IAcute]a \ finita ", StyleBox["EG", FontSlant->"Italic"], "(m,2) y un ", StyleBox["conjunto formado por planos afines ", FontWeight->"Bold"], "de esta, devuelve un listado con las paridades de todos estos, obtenidas \ mediante la subrutina", StyleBox[" ", FontWeight->"Bold"], StyleBox["paridadbase", IgnoreSpellCheck->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(x,orden,", FontWeight->"Bold"], StyleBox["S", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[")", FontWeight->"Bold"], " anterior para cada plano af\[IAcute]n ", StyleBox["S", FontSlant->"Italic"], "." }], "Text", CellDingbat->"\[EmptySmallCircle]", CellGroupingRules->{"GroupTogetherGrouping", 10008.}, CellChangeTimes->{{3.601801767453125*^9, 3.601801804453125*^9}, 3.62193163109375*^9, {3.7601742006570396`*^9, 3.7601743057571692`*^9}, 3.7601774313376417`*^9, 3.7601775902174187`*^9, 3.7601777993136883`*^9},ExpressionUUID->"385a66ca-a0c2-4f53-b417-\ 04f24d6331ca"], Cell[BoxData[ RowBox[{ RowBox[{"casobase", "[", RowBox[{"x_", ",", "orden_", ",", "variedadesmaximas_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"n", ",", "i", ",", RowBox[{"P", "=", RowBox[{"{", "}"}]}]}], "}"}], ",", RowBox[{ RowBox[{"n", "=", RowBox[{"Length", "[", "variedadesmaximas", "]"}]}], ";", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", RowBox[{"P", "=", RowBox[{"AppendTo", "[", RowBox[{"P", ",", RowBox[{"{", RowBox[{ RowBox[{"variedadesmaximas", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"paridadbase", "[", RowBox[{"x", ",", RowBox[{"variedadesmaximas", "[", RowBox[{"[", "i", "]"}], "]"}], ",", "orden"}], "]"}]}], "}"}]}], "]"}]}]}], "]"}], ";", RowBox[{"Return", "[", "P", "]"}]}]}], "]"}]}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10008.}, CellChangeTimes->{{3.601801829578125*^9, 3.601801917046875*^9}, { 3.6018885696655016`*^9, 3.6018885746495256`*^9}, 3.760173919052435*^9, 3.7601774313376417`*^9, 3.7601775902174187`*^9, 3.7601777993136883`*^9}, CellLabel->"In[8]:=",ExpressionUUID->"a7267164-9b27-445c-b559-97599169bf71"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Funci\[OAcute]n ", FontWeight->"Bold"], StyleBox["casogeneral", IgnoreSpellCheck->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(x,orden,variedades,", FontWeight->"Bold"], StyleBox["variedadesparidad", IgnoreSpellCheck->True, FontWeight->"Bold"], StyleBox[")", FontWeight->"Bold"], ". Dadas la palabra ", StyleBox["x", FontWeight->"Bold"], " binaria a decodificar, un orden para los elementos de la geometr\[IAcute]a \ finita ", StyleBox["EG", FontSlant->"Italic"], "(m,2) y dos conjuntos, uno con todas las variedades afines de ", StyleBox["EG", FontSlant->"Italic"], "(m,2) de una cierta dimensi\[OAcute]n, y otro con todas las variedades \ afines de ", StyleBox["EG", FontSlant->"Italic"], "(m,2) que tengan dimensi\[OAcute]n una unidad m\[AAcute]s, junto sus \ respectivas paridades respecto de ", StyleBox["x", FontWeight->"Bold"], " para el orden dado, devuelve las paridades del primero de estos conjuntos \ respecto de ", StyleBox["x", FontWeight->"Bold"], " para el or", StyleBox["den da", IgnoreSpellCheck->True], "do, calculadas mediante el ", StyleBox["CLM", FontWeight->"Bold"], "." }], "Text", CellDingbat->"\[EmptySmallCircle]", CellGroupingRules->{"GroupTogetherGrouping", 10009.}, CellChangeTimes->{{3.601802435296875*^9, 3.60180249046875*^9}, { 3.601802547546875*^9, 3.601802590484375*^9}, {3.601803111578125*^9, 3.601803190390625*^9}, {3.7601743318679495`*^9, 3.7601744490983086`*^9}, 3.760177447599383*^9, 3.7601775902174187`*^9, 3.7601778076087914`*^9},ExpressionUUID->"18f793c5-0b13-4677-bd7d-\ 6218a9b7c3b3"], Cell[BoxData[ RowBox[{ RowBox[{"casogeneral", "[", RowBox[{ "x_", ",", "orden_", ",", "variedades_", ",", "variedadesparidad_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"n", "=", RowBox[{"Length", "[", "variedades", "]"}]}], ",", RowBox[{"s", "=", RowBox[{"Length", "[", "variedadesparidad", "]"}]}], ",", "i", ",", "j", ",", "T", ",", RowBox[{"P", "=", RowBox[{"{", "}"}]}]}], "}"}], ",", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", RowBox[{ RowBox[{"T", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "s"}], ",", RowBox[{"j", "++"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"subvariedad", "[", RowBox[{ RowBox[{"variedades", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"variedadesparidad", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}]}], "]"}], ",", RowBox[{"T", "=", RowBox[{"AppendTo", "[", RowBox[{"T", ",", RowBox[{"variedadesparidad", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}]}], "]"}]}]}], "]"}]}], "]"}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Count", "[", RowBox[{"T", ",", "\"\\""}], "]"}], ">", RowBox[{"Count", "[", RowBox[{"T", ",", "\"\\""}], "]"}]}], ",", RowBox[{"P", "=", RowBox[{"AppendTo", "[", RowBox[{"P", ",", RowBox[{"{", RowBox[{ RowBox[{"variedades", "[", RowBox[{"[", "i", "]"}], "]"}], ",", "\"\\""}], "}"}]}], "]"}]}], ",", RowBox[{"P", "=", RowBox[{"AppendTo", "[", RowBox[{"P", ",", RowBox[{"{", RowBox[{ RowBox[{"variedades", "[", RowBox[{"[", "i", "]"}], "]"}], ",", "\"\\""}], "}"}]}], "]"}]}]}], "]"}]}]}], "]"}], ";", RowBox[{"Return", "[", "P", "]"}]}]}], "]"}]}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10009.}, CellChangeTimes->{3.601879714453125*^9, 3.601888576774376*^9, 3.760173927691205*^9, 3.760177447599383*^9, 3.7601775902174187`*^9, 3.7601778076087914`*^9}, CellLabel->"In[9]:=",ExpressionUUID->"692d230e-4cd8-4d01-9631-6ab26a659505"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Ahora, ", StyleBox["necesitamos determinar todos los planos y rectas afines", FontWeight->"Bold"], ", as\[IAcute] como ", StyleBox["puntos", FontWeight->"Bold"], ", de ", StyleBox["EG", FontSlant->"Italic"], "(m,2); definiendo funciones que determinan las correspondientes variedades \ afines. Una vez hecho esto, con la ayuda de estas, podemos generar el \ siguiente ", StyleBox["conjunto que posee todos los planos, rectas y puntos", FontWeight->"Bold"], " (estos \[UAcute]ltimos vistos como 0-variedades) ", StyleBox["afines ", FontWeight->"Bold"], "de ", StyleBox["EG", FontSlant->"Italic"], "(m,2), en dicho orden." }], "Text", CellGroupingRules->{"GroupTogetherGrouping", 10010.}, CellChangeTimes->{{3.601886622439384*^9, 3.6018866248922577`*^9}, { 3.6018866660442934`*^9, 3.601886773502039*^9}, {3.601886810373263*^9, 3.601886870023404*^9}, {3.601886928423673*^9, 3.601886951546305*^9}, { 3.601887216584489*^9, 3.6018872602683544`*^9}, {3.621931308171875*^9, 3.62193131684375*^9}, {3.622264840859375*^9, 3.622264850265625*^9}, { 3.622264967125*^9, 3.6222649818125*^9}, {3.760174469799631*^9, 3.760174491363312*^9}, {3.760177230784839*^9, 3.760177282166354*^9}, { 3.7601774660669575`*^9, 3.760177472737238*^9}, 3.7601775902174187`*^9, { 3.7601781169923096`*^9, 3.7601781451936107`*^9}, {3.760182287934871*^9, 3.760182296417444*^9}},ExpressionUUID->"88435ab9-44b7-4a31-8d6b-\ 66ec16c4c44a"], Cell[BoxData[{ RowBox[{ RowBox[{"m", " ", "=", " ", "5"}], ";", " ", RowBox[{"r", " ", "=", " ", "1"}], ";", RowBox[{"puntos", " ", ":=", " ", RowBox[{"Tuples", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", " ", "1"}], "}"}], ",", " ", "m"}], "]"}]}]}], "\n", RowBox[{ RowBox[{"puntosvar", "[", "i_", "]"}], " ", ":=", " ", RowBox[{"{", RowBox[{"Mod", "[", RowBox[{ RowBox[{"puntos", "[", RowBox[{"[", "i", "]"}], "]"}], ",", " ", "2"}], "]"}], "}"}]}], "\n", RowBox[{ RowBox[{"recta", "[", RowBox[{"i_", ",", " ", "j_"}], "]"}], " ", ":=", " ", RowBox[{"Union", "[", RowBox[{"Mod", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"puntos", "[", RowBox[{"[", "i", "]"}], "]"}], " ", "+", " ", RowBox[{"l", " ", RowBox[{"(", RowBox[{ RowBox[{"puntos", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "-", " ", RowBox[{"puntos", "[", RowBox[{"[", "i", "]"}], "]"}]}], ")"}]}]}], ",", " ", RowBox[{"{", RowBox[{"l", ",", " ", "0", ",", " ", "1"}], "}"}]}], "]"}], ",", " ", "2"}], "]"}], "]"}]}], "\n", RowBox[{ RowBox[{"plano", "[", RowBox[{"i_", ",", " ", "j_", ",", " ", "h_"}], "]"}], " ", ":=", " ", RowBox[{"Union", "[", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"puntos", "[", RowBox[{"[", "i", "]"}], "]"}], " ", "+", " ", RowBox[{"l", " ", RowBox[{"(", RowBox[{ RowBox[{"puntos", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "-", " ", RowBox[{"puntos", "[", RowBox[{"[", "i", "]"}], "]"}]}], ")"}]}], " ", "+", " ", RowBox[{"k", " ", RowBox[{"(", RowBox[{ RowBox[{"puntos", "[", RowBox[{"[", "h", "]"}], "]"}], " ", "-", " ", RowBox[{"puntos", "[", RowBox[{"[", "i", "]"}], "]"}]}], ")"}]}]}], ",", " ", RowBox[{"{", RowBox[{"k", ",", " ", "0", ",", " ", "1"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"l", ",", " ", "0", ",", " ", "1"}], "}"}]}], "]"}], ",", " ", "2"}], "]"}], ",", " ", "1"}], "]"}], "]"}]}]}], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10010.}, CellChangeTimes->{{3.601886629766759*^9, 3.601886630813526*^9}, 3.6018869888549843`*^9, {3.6018870260386763`*^9, 3.6018872050073276`*^9}, { 3.6018874292542934`*^9, 3.6018874333320794`*^9}, {3.6018875706019077`*^9, 3.6018875830071254`*^9}, 3.6018885833051662`*^9, {3.760173941250275*^9, 3.760173987367247*^9}, {3.7601774660669575`*^9, 3.760177472737238*^9}, 3.7601775902174187`*^9, {3.760177862508957*^9, 3.7601778773333263`*^9}, 3.7601781451936107`*^9, {3.760182422124266*^9, 3.7601824480116043`*^9}}, CellLabel->"In[10]:=",ExpressionUUID->"02f55bc6-dbe2-498d-a618-8b942fc79ac8"], Cell[BoxData[ RowBox[{ RowBox[{"variedades", "=", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"Union", "[", RowBox[{"Select", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"plano", "[", RowBox[{"i", ",", "j", ",", "h"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{ RowBox[{"2", "^", "m"}], "-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"i", "+", "1"}], ",", RowBox[{ RowBox[{"2", "^", "m"}], "-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"h", ",", RowBox[{"i", "+", "2"}], ",", RowBox[{"2", "^", "m"}]}], "}"}]}], "]"}], ",", "2"}], "]"}], ",", RowBox[{ RowBox[{ RowBox[{"Length", "[", "#", "]"}], "\[Equal]", RowBox[{"2", "^", "2"}]}], "&"}]}], "]"}], "]"}], ",", RowBox[{"Union", "[", RowBox[{"Select", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"recta", "[", RowBox[{"i", ",", "j"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{ RowBox[{"2", "^", "m"}], "-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"i", "+", "1"}], ",", RowBox[{"2", "^", "m"}]}], "}"}]}], "]"}], ",", "1"}], "]"}], ",", RowBox[{ RowBox[{ RowBox[{"Length", "[", "#", "]"}], "\[Equal]", "2"}], "&"}]}], "]"}], "]"}], ",", RowBox[{"Union", "[", RowBox[{"Select", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"puntosvar", "[", "i", "]"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"2", "^", "m"}]}], "}"}]}], "]"}], ",", RowBox[{ RowBox[{ RowBox[{"Length", "[", "#", "]"}], "\[Equal]", "1"}], "&"}]}], "]"}], "]"}]}], "}"}]}], ";"}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10010.}, CellChangeTimes->{3.6018882896852136`*^9, 3.6018885879923363`*^9, 3.760173989210559*^9, 3.7601774660669575`*^9, 3.7601775902174187`*^9, 3.76017785043394*^9, 3.7601781451936107`*^9}, CellLabel->"In[14]:=",ExpressionUUID->"a6de08a4-fd63-4b0f-8fa3-4369c9bdd9fd"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Hecho esto, estamos en condiciones de dar la ", StyleBox["subrutina clave de este algoritmo", FontWeight->"Bold"], ", que llamaremos ", StyleBox["decodificarReed", FontWeight->"Bold", FontSlant->"Italic"], StyleBox["(x,orden,", FontWeight->"Bold"], StyleBox["var", IgnoreSpellCheck->True, FontWeight->"Bold"], StyleBox[")", FontWeight->"Bold"], ". Esta, recibiendo la palabra ", StyleBox["x", FontWeight->"Bold"], " binaria a decodificar, un orden para los elementos de la geometr\[IAcute]a \ finita ", StyleBox["EG", FontSlant->"Italic"], "(m,2) y un ", StyleBox["conjunto con las variedades necesarias", FontWeight->"Bold"], " para realizar la decodificaci\[OAcute]n (el que acabamos de construir), \ devuelve la decodificaci\[OAcute]n de ", StyleBox["x", FontWeight->"Bold"], " a trav\[EAcute]s del c\[OAcute]digo de ", StyleBox["Reed", IgnoreSpellCheck->True], "-Muller binario ", StyleBox["RM", FontFamily->"Informal Roman", FontWeight->"Bold"], "(1,m) empleando el ", StyleBox["algoritmo de ", FontWeight->"Bold"], StyleBox["Reed", IgnoreSpellCheck->True, FontWeight->"Bold"], "." }], "Text", CellGroupingRules->{"GroupTogetherGrouping", 10005.}, CellChangeTimes->{{3.60188729601538*^9, 3.6018873126858683`*^9}, { 3.601887442925031*^9, 3.601887451127474*^9}, {3.601887717902151*^9, 3.6018878171438937`*^9}, {3.6018882299081717`*^9, 3.6018882685304527`*^9}, {3.7601745575932417`*^9, 3.7601746788316107`*^9}, 3.7601775107861867`*^9, 3.7601775507946615`*^9, 3.7601775902174187`*^9, 3.7601778937982006`*^9, {3.760182323554981*^9, 3.760182348348201*^9}, 3.7601828398737936`*^9},ExpressionUUID->"42f756ec-5aa3-4c23-bda3-\ fe45d07b9dd0"], Cell[BoxData[ RowBox[{ RowBox[{"decodificarReed", "[", RowBox[{"x_", ",", "orden_", ",", "var_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"n", "=", RowBox[{"Length", "[", "var", "]"}]}], ",", RowBox[{"S", "=", RowBox[{"casobase", "[", RowBox[{"x", ",", "orden", ",", RowBox[{"var", "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}]}], ",", RowBox[{"s", "=", "2"}], ",", RowBox[{"l", "=", RowBox[{"Length", "[", "x", "]"}]}], ",", "i", ",", RowBox[{"y", "=", RowBox[{"{", "}"}]}], ",", "j"}], "}"}], ",", RowBox[{ RowBox[{"While", "[", RowBox[{ RowBox[{"s", "\[NotEqual]", RowBox[{"n", "+", "1"}]}], ",", RowBox[{ RowBox[{"S", "=", RowBox[{"casogeneral", "[", RowBox[{"x", ",", "orden", ",", RowBox[{"var", "[", RowBox[{"[", "s", "]"}], "]"}], ",", "S"}], "]"}]}], ";", RowBox[{"s", "++"}]}]}], "]"}], ";", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "l"}], ",", RowBox[{"i", "++"}], ",", RowBox[{ RowBox[{"j", "=", RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"Union", "[", "orden", "]"}], ",", RowBox[{"orden", "[", RowBox[{"[", "i", "]"}], "]"}]}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"S", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}], "\[Equal]", "\"\\""}], ",", RowBox[{"y", "=", RowBox[{"AppendTo", "[", RowBox[{"y", ",", RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"[", "i", "]"}], "]"}], "+", "1"}], ",", "2"}], "]"}]}], "]"}]}], ",", RowBox[{"y", "=", RowBox[{"AppendTo", "[", RowBox[{"y", ",", RowBox[{"x", "[", RowBox[{"[", "i", "]"}], "]"}]}], "]"}]}]}], "]"}]}]}], "]"}], ";", RowBox[{"Return", "[", "y", "]"}]}]}], "]"}]}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10005.}, CellChangeTimes->{3.6018882896852136`*^9, 3.6018885879923363`*^9, 3.7601740026166844`*^9, 3.7601775107861867`*^9, 3.7601775507946615`*^9, 3.7601775902174187`*^9, 3.7601778937982006`*^9}, CellLabel->"In[15]:=",ExpressionUUID->"65c2f753-1c5b-47d6-9c8a-38a4a62a6e71"] }, Closed]], Cell[TextData[{ StyleBox["NOTA", FontWeight->"Bold", FontVariations->{"Underline"->True}], ": Los programas presentados son v\[AAcute]lidos para cualquier \ c\[OAcute]digo de ", StyleBox["Reed", IgnoreSpellCheck->True], "-Muller binario ", StyleBox["RM", FontFamily->"Informal Roman", FontWeight->"Bold"], "(r,m) con 0 \[LessEqual] r \[LessEqual] m arbitrarios; salvo el \ correspondiente al ", StyleBox["algoritmo de ", FontWeight->"Bold"], StyleBox["Reed", IgnoreSpellCheck->True, FontWeight->"Bold"], " que, como se ha dise\[NTilde]ado, solo es v\[AAcute]lido para \ r\[DotEqual]1. Este puede generalizarse a cualquier entero r en las \ condiciones usuales si se definen las correspondientes funciones para \ determinar las variedades afines de la geometr\[IAcute]a finita ", StyleBox["EG", FontSlant->"Italic"], "(m,2) con dimensi\[OAcute]n superior a 2 en orden ascendente. Basta incluir \ estas, por delante, en el conjunto que se define para guardar las variedades \ afines seg\[UAcute]n su dimensi\[OAcute]n." }], "Text", CellGroupingRules->{"GroupTogetherGrouping", 10003.}, CellChangeTimes->{{3.60188729601538*^9, 3.6018873126858683`*^9}, { 3.601887442925031*^9, 3.601887451127474*^9}, {3.601887717902151*^9, 3.6018878171438937`*^9}, {3.6018882299081717`*^9, 3.6018882685304527`*^9}, {3.760174703154051*^9, 3.7601747049817085`*^9}, { 3.7601747364122143`*^9, 3.760174829456792*^9}, {3.7601758989240828`*^9, 3.760175908171911*^9}, 3.7601775213615694`*^9, 3.7601775902174187`*^9, { 3.7601825701397614`*^9, 3.7601826079407544`*^9}, {3.7601827275110683`*^9, 3.760182767713951*^9}, {3.7601828600765276`*^9, 3.760182891053509*^9}},ExpressionUUID->"393b0a3a-e97a-425a-9bff-\ d03bc1d9b9e2"], Cell[CellGroupData[{ Cell[TextData[{ "Para terminar, se incluyen aqu\[IAcute] las l\[IAcute]neas de \ c\[OAcute]digo necesarias para ejecutar el ", StyleBox["Ejemplo 10", FontWeight->"Bold"], "." }], "Text", CellGroupingRules->{"GroupTogetherGrouping", 10004.}, CellChangeTimes->{{3.7601748412350435`*^9, 3.7601748794278126`*^9}, { 3.760177567306548*^9, 3.7601775902174187`*^9}, 3.7601779073178735`*^9},ExpressionUUID->"11944ed5-04fa-4443-8e77-\ 11ba0d463249"], Cell[BoxData[{ RowBox[{ RowBox[{"G", "=", RowBox[{"matgencaniter", "[", RowBox[{"1", ",", "5"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"G", "//", "MatrixForm"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lista", "=", RowBox[{"formordstandar", "[", RowBox[{"1", ",", "5"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"orden", "=", RowBox[{"lista", "[", RowBox[{"[", "2", "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"y", "=", RowBox[{"{", RowBox[{ "1", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1"}], "}"}]}], ";"}], "\n", RowBox[{"decodificarReed", "[", RowBox[{"y", ",", "orden", ",", "variedades"}], "]"}]}], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10004.}, CellChangeTimes->{ 3.6018882896852136`*^9, 3.6018885879923363`*^9, {3.7601740026166844`*^9, 3.760174028029002*^9}, {3.760174911302355*^9, 3.760174949918622*^9}, 3.7601749909487066`*^9, 3.7601770695653744`*^9, {3.760177567306548*^9, 3.7601775902174187`*^9}, 3.7601779073178735`*^9, 3.7601820481826677`*^9, { 3.760182089271839*^9, 3.7601821550990505`*^9}, {3.7601915723515077`*^9, 3.760191576350445*^9}, {3.7601916770283413`*^9, 3.7601916827924023`*^9}, { 3.7601917504553366`*^9, 3.7601917683571434`*^9}},ExpressionUUID->"344bec7c-b205-466f-8446-\ ee7b444a35ae"] }, Open ]] }, Open ]] }, Open ]] }, Evaluator->"Local", WindowSize->{1264, 661}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{32000, 32000}, PrintingOptions->{"Magnification"->1., "PaperOrientation"->"Portrait", "PaperSize"->{595.3199999999999, 841.92}}, FrontEndVersion->"11.3 para Microsoft Windows (64-bit) (March 6, 2018)", StyleDefinitions->FrontEnd`FileName[{"Report"}, "StandardReport.nb", CharacterEncoding -> "UTF-8"] ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[579, 22, 302, 7, 95, "Title",ExpressionUUID->"746b09ce-737d-4514-a76b-3b5cef9acae9"], Cell[CellGroupData[{ Cell[906, 33, 1469, 37, 55, "Text",ExpressionUUID->"f8d70a73-11ac-4f60-9691-dbdf23788098", CellGroupingRules->{"GroupTogetherGrouping", 10000.}], Cell[2378, 72, 4668, 110, 334, "Input",ExpressionUUID->"950c0c83-9b48-483d-a5ba-a4c0455382fa", CellGroupingRules->{"GroupTogetherGrouping", 10000.}] }, Closed]], Cell[CellGroupData[{ Cell[7083, 187, 1682, 44, 52, "Text",ExpressionUUID->"963a6ca1-b6f3-4948-a434-9ae14e6bf8dd", CellGroupingRules->{"GroupTogetherGrouping", 10001.}], Cell[8768, 233, 4405, 115, 448, "Input",ExpressionUUID->"6fe4c9b7-347a-4699-be2e-ef16ae6e1a02", CellGroupingRules->{"GroupTogetherGrouping", 10001.}] }, Closed]], Cell[CellGroupData[{ Cell[13210, 353, 1864, 62, 55, "Text",ExpressionUUID->"47f0032c-6d58-4c3d-bce6-62cdc66342e2", CellGroupingRules->{"GroupTogetherGrouping", 10002.}], Cell[15077, 417, 619, 16, 56, "Input",ExpressionUUID->"0b687aeb-63b9-43aa-98ee-497fa3397700", CellGroupingRules->{"GroupTogetherGrouping", 10002.}] }, Closed]], Cell[CellGroupData[{ Cell[15733, 438, 2363, 81, 64, "Subtitle",ExpressionUUID->"52e251e4-4433-424c-a089-2615eaf5f3da"], Cell[CellGroupData[{ Cell[18121, 523, 1289, 35, 55, "Text",ExpressionUUID->"b08fd24b-13ee-4d43-9ef4-425101c93a59", CellGroupingRules->{"GroupTogetherGrouping", 10004.}], Cell[19413, 560, 2483, 59, 205, "Input",ExpressionUUID->"b1c7bc47-f9a9-4ff5-92c6-311ab285dece", CellGroupingRules->{"GroupTogetherGrouping", 10004.}] }, Closed]], Cell[CellGroupData[{ Cell[21933, 624, 1375, 46, 30, "Text",ExpressionUUID->"c51d50fc-dad3-4264-9008-79753621ef32", CellGroupingRules->{"GroupTogetherGrouping", 10005.}], Cell[23311, 672, 1798, 47, 149, "Input",ExpressionUUID->"e0e52e7b-8920-48ed-b3eb-826cd6d05914", CellGroupingRules->{"GroupTogetherGrouping", 10005.}] }, Closed]], Cell[CellGroupData[{ Cell[25146, 724, 698, 20, 30, "Text",ExpressionUUID->"d1f2abe0-5aca-489f-b137-970de8c732fb", CellGroupingRules->{"GroupTogetherGrouping", 10006.}], Cell[25847, 746, 1126, 29, 130, "Input",ExpressionUUID->"0aadc316-3489-413e-8fb2-b275c76f54df", CellGroupingRules->{"GroupTogetherGrouping", 10006.}] }, Closed]], Cell[CellGroupData[{ Cell[27010, 780, 1278, 42, 52, "Text",ExpressionUUID->"d276b6e1-66e3-4ac7-8635-5d835e7905d9", CellGroupingRules->{"GroupTogetherGrouping", 10007.}], Cell[28291, 824, 1027, 26, 93, "Input",ExpressionUUID->"b108b929-c445-4709-bf41-51d1b105f9c5", CellGroupingRules->{"GroupTogetherGrouping", 10007.}] }, Closed]], Cell[CellGroupData[{ Cell[29355, 855, 1457, 50, 52, "Text",ExpressionUUID->"385a66ca-a0c2-4f53-b417-04f24d6331ca", CellGroupingRules->{"GroupTogetherGrouping", 10008.}], Cell[30815, 907, 1432, 35, 130, "Input",ExpressionUUID->"a7267164-9b27-445c-b559-97599169bf71", CellGroupingRules->{"GroupTogetherGrouping", 10008.}] }, Closed]], Cell[CellGroupData[{ Cell[32284, 947, 1641, 51, 74, "Text",ExpressionUUID->"18f793c5-0b13-4677-bd7d-6218a9b7c3b3", CellGroupingRules->{"GroupTogetherGrouping", 10009.}], Cell[33928, 1000, 2813, 75, 186, "Input",ExpressionUUID->"692d230e-4cd8-4d01-9631-6ab26a659505", CellGroupingRules->{"GroupTogetherGrouping", 10009.}] }, Closed]], Cell[CellGroupData[{ Cell[36778, 1080, 1470, 34, 74, "Text",ExpressionUUID->"88435ab9-44b7-4a31-8d6b-66ec16c4c44a", CellGroupingRules->{"GroupTogetherGrouping", 10010.}], Cell[38251, 1116, 3090, 77, 167, "Input",ExpressionUUID->"02f55bc6-dbe2-498d-a618-8b942fc79ac8", CellGroupingRules->{"GroupTogetherGrouping", 10010.}], Cell[41344, 1195, 2589, 71, 112, "Input",ExpressionUUID->"a6de08a4-fd63-4b0f-8fa3-4369c9bdd9fd", CellGroupingRules->{"GroupTogetherGrouping", 10010.}] }, Closed]], Cell[CellGroupData[{ Cell[43970, 1271, 1735, 52, 74, "Text",ExpressionUUID->"42f756ec-5aa3-4c23-bda3-fe45d07b9dd0", CellGroupingRules->{"GroupTogetherGrouping", 10005.}], Cell[45708, 1325, 2729, 74, 223, "Input",ExpressionUUID->"65c2f753-1c5b-47d6-9c8a-38a4a62a6e71", CellGroupingRules->{"GroupTogetherGrouping", 10005.}] }, Closed]], Cell[48452, 1402, 1751, 39, 96, "Text",ExpressionUUID->"393b0a3a-e97a-425a-9bff-d03bc1d9b9e2", CellGroupingRules->{"GroupTogetherGrouping", 10003.}], Cell[CellGroupData[{ Cell[50228, 1445, 453, 11, 33, "Text",ExpressionUUID->"11944ed5-04fa-4443-8e77-11ba0d463249", CellGroupingRules->{"GroupTogetherGrouping", 10004.}], Cell[50684, 1458, 1675, 37, 172, "Input",ExpressionUUID->"344bec7c-b205-466f-8446-ee7b444a35ae", CellGroupingRules->{"GroupTogetherGrouping", 10004.}] }, Open ]] }, Open ]] }, Open ]] } ] *)