\documentclass[a4paper,12pt]{book}
%%%%%%%%%%%%%برای رنگی کردن شماره section و ....
\usepackage{color}
\usepackage[indentafter]{titlesec}

\definecolor{mycolor}{rgb}{0,0,1}

\titleformat{\chapter}[display]
{\normalfont\huge\bfseries }{\chaptertitlename \  {\color{mycolor}\thechapter}}{20pt}{\Huge}
 
 \titleformat{\section}[block]
{\normalfont \Large \bfseries }{\sectiontitle {\color{mycolor}\thesection}}{1em}{}

 \titleformat{\subsection}[block]
{ \normalfont \large \bfseries }{{\color{mycolor}\thesubsection}}{1em}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{geometry}
\geometry{
   left=25mm,
  right=25mm,
 %  top=45mm, bottom=50mm,
 }
\usepackage{amsmath}\usepackage{mathrsfs}
\usepackage{setspace}\usepackage{amssymb}\usepackage{setspace}
\usepackage{amsthm}\usepackage{fancyhdr}
\usepackage{graphicx}\usepackage[all]{xy}\usepackage{makeidx}
\usepackage{xecolour}\usepackage{xepersian}
%\usepackage{fmultico}\usepackage{fancybox}\usepackage{tocbibind}


\settextfont[Scale=1]{Yas}\setlatintextfont[Scale=1]{XB Zar}
\setdigitfont[Scale=1]{PGaramond}
\doublespacing
\renewcommand{\baselinestretch}{2}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
%برای حذف یک شماره از شماره بندی بخش و زیربخش و ...
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\thesection\@SepMark\arabic{subsection}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\chapter{معرفی نمادهای مجانبی}
\pagestyle{fancy}
\section{نمادهای مجانبی}
ابزارهائی که توسط آنها می توان زمان اجرا و یا حافظه گرفته شده دو یا چند الگوریتم را با هم مقایسه نماییم.
\subsection{نماد $big-O$}
اگر $f:N \to R^+$ باشد آنگاه:
\begin{align*}
& O(f(n))=\{ g: N \to R^+ | \exists c \in R^+, \forall n \in N(g(n) \leq c f(n)\}\\
& f(n) = \left\{ 
\begin{array}{ccc}
n^3 &  &n<1000  \\ 
2n^2 &  & n\geq 100
\end{array} \right.\\
& O(n^2) =\{n^2,n \: lg\: n, f(n), \ldots\}
\end{align*}
در شکل قبل حتی اگر $f_2$ صد برابر شود باز هم از $O(f_1)$ است.
%p1
در شکل بالا اگر $f_1$ در یک ضریب ضرب شود داریم $f_2 \in O(f_1)$، پس چیزی که مهم است ضریب $c$ نیست، مهم درجه است.

$big-O$ همان مفهوم کران بالا را دارد مثلاً برای حافظه مصرفی، $big-O$ کران بالای مصرف حافظه است. پس الگوریتمی مفید است که کران بالایی زمان اجرای آن پایین باشد.
\subsection{نماد $big- \Omega$}
متن
\section{نماد $\theta$}

\section{نماد $small - o$}

\section{نماد $small - \omega$}
اگر $f:N \to R^+$ آنگاه:
\begin{align*}
\omega (f(n)) = \{g: N \to R^+ | \forall c>0 \quad    n \in N \quad g(n) \geq c f(n)\}
\end{align*}
مثال: نشان دهید:
$$\omega (f)n)) \cap o (f(n)) = \emptyset$$
حل: اگر $g(n) \in \omega (f(n)) \cap o(f(n))$ آنگاه برای $d_0 >0$ یک $M_1$ یک $M_1$ چنان موجود است که:
$$\forall n M_1 \quad g(n) \geq d_0 f(n) \quad (g(n) \in \omega (f(n)))$$
حال برای $c_0 = \frac{d_0}{2}$ یک $M_۲$ چنان موجود است که:
\begin{align*}
&\forall n \geq M_2 \quad g(n) \leq c_0 f(n) \quad (g(n) \in o(f(n))) \Rightarrow g(n) \leq \frac{d_0}{2} f(n) \Rightarrow \\
&\forall n \geq  MAX  \{M_1,M_2\} \quad \frac{d_0}{2} f(n) \geq d_0 f(n) \Rightarrow d_0 \geq 2d_0 \Rightarrow d_0 \leq 0
\end{align*}
پس به تناقض رسیدیم، بنابراین حکم ثابت می شود.
\section{قضیه ماکزیمم گیری}

\end{document}