Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Bài tập về nhà buổi 6

\documentclass[a4paper,12pt]{article}

\usepackage[utf8]{vietnam}

\usepackage[left=2cm, right=3cm, bottom=2cm, top=2cm]{geometry}

\usepackage{graphicx}

\usepackage{amsfonts, amssymb, amsthm}

\usepackage{mathtools}

\usepackage[margin=1.5in]{geometry}

\usepackage{algorithm}

\usepackage{listings}

\usepackage[noend]{algpseudocode}

\usepackage{xcolor}

\title{ Bài tập về nhà buổi 6}

\author{ Nguyễn Tiến Đạt - 20233307}

\begin{document}

\maketitle

\textbf{Bài 1 :}

\begin{align*}

x^2+y^2+z^2=0 &\tag I

\end{align*}

\textbf{Bài 2}

\begin{multline}

F= \{ F_x \in F_c : (|S| > |C|) \cap \\


(MinPixcels<|S|< maxPixcels) \cap \\

(|Sconnected| > |S| - e \}

\end{multline}

\textbf{ Bài 3}

\begin{align*}

x &= 1 & xy &=2 & xyz &=3\\

xy &=23 & xyz &=3 & x &=11\\

xyz &=345 & x &=1 & xyz&=22

\end{align*}

\textbf{Bài 4}

\begin{align*}

\Aboxed{x_1 x_2 x_3 = \cfrac{-d}{a}} & \tag {[2]}\\

x_1 x_2 + x_2 x_3 + x_3 x+1= \cfrac{c}{a} & \tag{3} \\

x_1 + x_2 + x_3 = \cfrac{-b}{a} & \tag 4

\end{align*}

\textbf{ Bài 5}

\begin{equation}

\overbrace{ A+ B + A^{B^{C^2}} + \frac{\omega}{\Phi}}^{ \text{Vế trái}} = \underbrace{A + B +12\


frac{A^{B}}{C} + \frac{\Omega}{\varphi}}_{\text{Vế phải}}\\

\tag{pt.5}

\end{equation}
\textbf{ Bài 6}

\begin{equation}

\frac{\sqrt{3}+\sqrt{2}}{\sqrt{5}-\sqrt{7}}=\frac{\splitdfrac{(\sqrt{3}+\sqrt{2})(\sqrt{5}+\sqrt{7})}{(\
sqrt{5}+\sqrt{7})}}{\splitfrac{(\sqrt{5}-\sqrt{7})(\sqrt{5}+\sqrt{7}))}

{(\sqrt{5}+\sqrt{7})}}

\tag{2}

\end{equation}

\textbf{Bài 7}

\lstdefinestyle{style_so_1}

{language=Python,

backgroundcolor=\color{cyan!20!},

numberstyle=\color{black},

basicstyle=\ttfamily\small,

keywordstyle=\color{blue},

commentstyle=\color{black},

numberstyle=\tiny\color{black},

frame=single,

breaklines=true,

breakatwhitespace=true,

tabsize=10,

captionpos=t}

\lstset{style=style_so_1}

\begin{lstlisting}[language=Python, caption={Mã nguồn Python}, label={lst:python-code}]

def factorial(n):
if n == 0 or n == 1:

return 1

else:

return n * factorial (n-1)

num = 5

result = factorial (num)

print(f"The factorial of {num} is {result}.")

\end{lstlisting}

\begin{algorithm}

\caption{QuickSort}

\begin{algorithmic}[1]

\Procedure{QUICKSORT}{$arr,low, high$}

\If{$low<high$}

\State $pivot \leftarrow PARTITION(arr,low,high)$

\State $ QUICKSORT(arr,low,pivot-1)$

\State $ QUICKSORT(arr,pivot+1,high)$

\EndIf

\EndProcedure

\Procedure{PARTITION}{$arr,low,high$}

\State $\ pivot \leftarrow arr[high] $

\State $i \leftarrow low - 1 $

\For {$i \leftarrow low$ To $high - 1$}

\If{$ arr[j] \leq pivot $}

\State $ i \leftarrow i+1 $


\State \textbf{Swap} arr[i] \textbf{and} arr[j]

\EndIf

\EndFor

\State \textbf{Swap} arr[i+1] \textbf{and} arr[high]\\

\Return $i+1$

\end{algorithmic}

\end{algorithm}

\\

\begin{equation}

\begin{split}

\sum_{j=1}^n (x_j - \mu)' \Sigma ^ {-1} (x_j - \mu) &= \sum_{j=1}^n tr[(x_j - \mu)'\Sigma ^ {-1} (x_j -
\mu) ] \\

&= \sum_{j=1}^n tr[\Sigma ^{-1} (x_j - \mu) (x_j - \mu)' ] \\

&= tr \Big[\Sigma ^{-1} \Big(\sum_{j=1}^n (x_j - \mu) (x_j - \mu)'\Big) \Big]

\end{split}

\end{equation}
\end{document}

You might also like