%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%% file:      v1.tex                                                        %%%
%%% author:    Ján Komara                                                    %%%
%%% email:     komara@fmph.uniba.sk                                          %%%
%%% copyright: public domain                                                 %%%
%%% version:   2017/10/10                                                    %%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[12pt,a4paper]{article}

\usepackage[slovak]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{lmodern}
\usepackage{indentfirst}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Vzorový príklad pre 1. domácu úlohu}

\author{Ján Komara}

%\date{}
\date{\today}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section*{Príklad}

Spočítajte, koľko celočíselných riešení má rovnica
%%%
\begin{align}
x_1 + x_2 + x_3 + x_4 = 15
,
\label{eq15}
\end{align}
%%%
ak $x_1 \geq 1$, $x_2 \geq 2$, $x_3 \geq 3$ a $x_4 \geq 4$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection*{Riešenie}

Rovnica \eqref{eq15} je ekvivalentná rovnici
%%%
\begin{align}
x_1 - 1 + x_2 - 2 + x_3 - 3 + x_4 - 4 = 15 - 1 - 2 - 3 - 4 = 5
,
\label{eq5}
\end{align}
%%%
pričom $x_1 - 1 \geq 0$, $x_2 - 2 \geq 0$, $x_3 - 3 \geq 0$ a $x_4 - 4 \geq 0$.

Počet celočíselných riešení rovnice \eqref{eq5} s uvedenými ohraničeniami je
ten istý ako počet celočíselných riešení rovnice
%%%
\begin{align*}
y_1 + y_2 + y_3 + y_4 = 5
,
\end{align*}
%%%
kde $y_i \geq 0$ pre každé $i = 1,2,3,4$.
Ale ten je rovný
počtu kombinácií s opakovaním 5 prvkov zo 4 druhov:
%%%
\begin{align*}
C'(4,5) =  \binom{5 + 4 - 1}{4 - 1} = \binom{8}{3} = 
\frac{8 \times 7 \times 6}{3 \times 2} = 56
.
\end{align*}
%%%
A to je hľadaný počet riešení rovnice \eqref{eq15}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                                                                          %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
