\chyph

\hoffset=-1cm \voffset=-1.2cm \hsize=18cm

\ifx\pdfoutput\undefined \else
\pdfpagewidth=21cm
\pdfpageheight=15cm
\fi


\headline={\setfonts[/10]\rm\hfill [\the\pageno]}
\footline={}

\input ofs [a35]  %\def\fomenc{CM}  

%\showfonts \end
%\displayfontmessages
\setfonts[NewCentury/17]  \setmath[17/12/8]  
\baselineskip=22pt \normalbaselineskip=\baselineskip

\message{\fontname\tenit}

\medskipamount=9pt
\let\ms=\medskip

\parskip=\medskipamount

\def\n#1\par{\vfill\break}

\def\g#1\par{{\null \vskip-31pt \baselineskip=30pt\setfonts[/23]\bf #1\par}\medskip}
\def\gg#1\par{{\setfonts[/55]\bf #1}\medskip}
\def\hb{\hfil\break}

\def\emerge{{\emergencystretch=2em\par}}

\parindent=0pt

\catcode`\*=13 
\def* {\par \hangindent=15pt \hangafter=1 
   \noindent \hbox to\hangindent {$\bullet$\hss}}

\let\em=\it

\def\C{{\bf C}}
\def\R{{\bf R}}
\def\Q{{\bf Q}}
\def\a{{A}}
\def\A{{\bf A}}
\def\B{{\bf B}}
\def\D{{\bf D}}
\def\E{{\bf E}}
\def\G{{\bf G}}
\def\H{{\bf H}}
\def\P{{\bf P}}
\def\L{{\bf L}}
\def\U{{\bf U}}
\def\X{{\bf X}}
\def\Z{{\bf Z}}
\def\Circ{\mathbin{\raise.1em\hbox{$\scriptscriptstyle\bigcirc$}}}
\def\ker{\mathop{\rm Ker}}
\def\st{\mathop{\rm St}}
\def\hod{\mathop{\rm hod}}
\def\vecc #1_#2{\vec#1_1, \vec#1_2, \ldots, \vec#1_{#2}}
\def\lob<#1>{\langle #1\rangle}
\def\|{||}

% ===============================================================

\vglue .5cm

\gg T�leso Z2

\bigskip\bigskip

* $Z_2=\{0,1\}$ se s��t�n�m \uv{modulo} a obvykl�m n�soben�m

* Uspo��dan� $n$-tice prvk� ze $Z_2$ tvo�� line�rn� prostor


\n ---------------------------------------------------------------


\g T�leso

* je mo�ina $T$ prvk�, na kter� jsou definov�ny operace 
  $+$ a $\cdot$, kter� spl�uj�
  obvykl� vlastnosti, jako operace $+$ a $\cdot$ s re�ln�mi ��sly.

*  Jmenovit� pro v�echna $a,b,c\in T$ plat�:

* Asociativn� z�kon:\quad  $(a+b)+c = a+(b+c)$,\quad $(a\cdot b)\cdot
  c=a\cdot(b\cdot c)$

* Existence \uv{neutr�ln�ho prvku}:\quad  $a+0=a$, \quad $a\cdot1=1\cdot a=a$.

* Pro v�echna $a\in T$ existuje $b\in T$ tak, �e $a+b=0$ (opa�n� prvek).

* Pro v�echna $a\in T{\setminus}\{0\}$ ex. $b\in T$ tak, �e $a\cdot b=1$
  (inverzn� prvek).

* Komutativn� z�kon pro operaci $+$:\quad  $a+b=b+a$.

* Plat�-li nav�c komutativn� z�kon pro operaci $\cdot$:\quad $a\cdot
  b=b\cdot a$, ��k�me mno�in� $T$ {\em komutativn� t�leso}.

\n -------------------------------------------------------

\g Z2

 Mno�ina $\Z_2=\{0,1\}$ s operacemi $+$ a $\cdot$:

* $0+0=0$, $0+1=1+0=1$, $1+1=0$,  

* $0\cdot0=0\cdot1=1\cdot0=0$, $1\cdot1=1$

 tvo�� t�leso.

* Operace $\cdot$ je obvykl� a v operaci $+$ je jedna v�jimka. Nebo
  jin� pohled: $+$ pracuje jako XOR, $\cdot$ jako AND, nebo jin�
  pohled: v�sledek operace je pot�eba upravit \uv{modulo dv�ma},
  nebo jin� pohled: 0 zna�� sud� ��sla a 1 lich� ��sla a operace
  pracuj� s t�mito mno�inami.


\n -----------------------------------------------------

\g Line�rn� prostor \uv{nad t�lesem}

Nahrad�me-li v definici line�rn�ho prostoru mno�inu $\R$ re�ln�ch
��sel mno�inou $T$, kter� je libovoln�m t�lesem, dost�v�me
{\em line�rn� prostor nad t�lesem $T$}.

Ve�ker� pojmy line�rn� algebry (line�rn� z�vislost, b�ze, 
line�rn� obaly, podprostory) \uv{funguj�} stejn� v line�rn�m prostoru
nad t�lesem $T$. 

{\bf P��klad}: Mno�ina uspo��dan�ch $n$-tic prvk� z $T$ s operacemi:

* $(a_1,a_2,\cdots,a_n)+(b_1,b_2,\cdots,b_n)\ = \
   (a_1+b_1,a_2+b_2,\cdots,a_n+b_n)$

* $\alpha\cdot(a_1,a_2,\cdots,a_n)\ = \
   (\alpha\cdot a_1,\alpha\cdot a_2,\cdots,\alpha\cdot a_n)$

kde $a_i\in T$, $b_i\in T$, $\alpha\in T$, je line�rn� prostor nad~$T$.
Tento line�rn� prostor zna��me $T^n$.

\n -----------------------------------------------------

\g Line�rn� prostor $\setsimplemath n$-tic z t�lesa Z2

Je konkretizac� p�edchoz�ho p��kladu pro $T=\Z_2$,
Tento line�rn� prostor zna��me symbolem $\Z_2^n$.

{\bf P��klad}: Nech� $\vec x=(0,1,1,0,0)$, $\vec y=(1,1,0,1,0)$ jsou dva
vektory line�rn�ho prostoru $Z_2^5$. Pak

* $\vec x+\vec y=(0,1,1,0,0)+(1,1,0,1,0)=(1,0,1,1,0)$

* $\lob<\vec x,\vec y> = \{0\vec x+0\vec y,\ 1\vec x+0\vec y,\
  0\vec x+1\vec y,\ 1\vec x+1\vec y\}$ = \hfil\break
  = $\{\vec o, \vec x, \vec y, \vec x+\vec y\}$ = \hfil\break
  = $\{(0,0,0,0,0),\ (0,1,1,0,0),\ (1,1,0,1,0),\ (1,0,1,1,0)\}$.

{\bf Zna�en�}: Vektory z line�rn�ho prostoru $\Z_2^n$ p��eme �asto
zkr�cen� bez ��rek mezi slo�kami a bez z�vorek. Tak�e line�rn� obal 
z~p�edchoz�ho p��kladu zap��eme:

$ \lob<01100,11010> = \{00000, 01100,11010,10110\}$  


\n -----------------------------------------------------

\g Z�kladn� vlastnosti line�rn�ho prostoru $\setsimplemath\Z_2^n$

* Pro $\vec x\in \Z_2$ je $1\cdot \vec x=\vec x,\ 0\cdot\vec x=\vec o$.
  $\vec x+\vec x=\vec o$,  $\vec x = -\vec x$.

* Celkov� po�et prvk� v line�rm�m prostoru $\Z_2^n$ je $2^n$
  a jeho dimenze je $n$. 

* Line�rn� podprostor dimenze $k$ m� $2^k$ prvk�.


\n --------------------------------------------------

\g P��klad: soustava line�rn�ch rovnic v Z2

Vy�e��me soustavu line�rn�ch rovnic v $\Z_2$ s matic�:

$$
  \def\|{\hfill\kern8pt\vrule height1.1em depth.3em\kern-5pt}
  \def\c{\cr\noalign{\vskip-2pt}}
  \pmatrix{1&1&0&1&0&1\|&1\c 1&0&1&1&0&0\|&1\c 0&1&0&0&1&1\|&1\c
           1&0&0&1&1&0\|&0\c 1&1&1&0&0&1\|&1} \sim
  \pmatrix{1&1&0&1&0&1\|&1\c 0&1&1&0&0&1\|&0\c 0&0&1&0&1&0\|&1\c
           0&0&0&1&1&0\|&1}
$$

B�ze mno�iny �e�en� p�idru�en� homogenn� soustavy je:
$$
  B = \{011110, 010001\}
$$
Partikul�rn� �e�en� je: $111100$ a v�echna �e�en� soustavy zap��eme ve
tvaru
$$
  M\ =\ 111100+\lob<B>\ =\ \{111100, 100010, 101101, 110011\}
$$

\end
