\documentclass{beamer}[8pt]
\usepackage{beamerthemesplit}
\usetheme{Warsaw}
%\usepackage{verbatim}
\usepackage{color}
\usepackage{graphicx}
\usepackage{fontspec}
\setmainfont[Script=Devanagari]{Sanskrit 2003}

\newfontfamily \dv[Script=Devanagari]{Sanskrit 2003}

\title{\textcolor{yellow}{Chanda\'{S}{\=a}stra of Pi\.ngala}}
\author{Amba Kulkarni}
\institute{ Department of Sanskrit Studies\\ University of Hyderabad}
\date{22nd February 2018}

\begin{document}
\setbeamertemplate{footline}[frame number]
%===================================slide 1=========================%
\begin{frame}

\titlepage

\end{frame}
%============================================================%
\begin{frame}
\frametitle{introduction}
Prayojanam vin{\=a} na mando'pi pravartate\\

Without any purpose, even a fool does not get initiated.\\

\vspace{0.5cm}
Every knowledge system developed in India was from 'Application point of view'.\\
\vspace{0.5cm}
Knowledge for Knowledge Sake \\
Versus\\
Knowledge for the Benefit of the Society\\
\end{frame}
%============================================================%
\begin{frame}
\frametitle{Chanda\'{s}{\=a}stra}
Chanda = Pleasing, Alluring, Delightful\\
Chanda = Metrical part of Vedas or Poetry\\
\end{frame}
%============================================================%
\begin{frame}
\frametitle{Chanda\'{s}{\=a}stra}
Pi\.ngala: Chanda\'{s}{\=a}stra ( circa 500 BC)\\
Book is in the form of s{\=u}tras.\\
Eight chapters.\\
\end{frame}
%============================================================%
\begin{frame}
\frametitle{Pi\.ngala's Chanda\'{s}{\=a}stra}
Basic Terminology
\begin{itemize}
\item Ak\d{s}ara: Cluster of one vowel with zero or more consonants
\item p{\=a}da (foot): A quarter of a stanza
\end{itemize}
\end{frame}
%============================================================%
\begin{frame}
\frametitle{Pi\.ngala's Chanda\'{s}{\=a}stra}
Meters are of 3 types
\begin{itemize}
\item Syllabic Verse (ak\d{s}arav\d{r}tta)\\
Number of Syllables in a verse are fixed.
\item Syllabo-quantitative verse (ga\d{n}v\d{r}tta)\\
The syllable patterns is fixed.
\item Quantitative verse (m{\=a}tr{\=a}v\d{r}tta)\\
The number of syllables measured in terms of their duration is fixed.
\end{itemize}
\end{frame}
%============================================================%
\begin{frame}
\frametitle{Pi\.ngala's Chanda\'{s}{\=a}stra}
Light and Heavy Syllables (Laghu and Guru ak\d{s}aras)
\begin{itemize}
\item If the vowel is short, and is followed by at most one consonant before another vowel, the syllable is laghu
\item A syllable with an anusv{\=a}ra or visarga is always guru.
\item The last syllable is taken as a guru optionally
\end{itemize}
Laghu syllable counts as one unit and guru syllable counts as two units.
\end{frame}
%============================================================%
\begin{frame}
\frametitle{Example}
{\dv या सृष्टिः स्रष्टुराद्या वहति विधिहुतं या हविर्या च होत्री }\\
{\dv ये द्वे कालं विधत्तः श्रुतिविषयगुणा या  स्थिता व्याप्य विश्वम् }\\
{\dv यामाहुः सर्वबीजप्रकृतिरिति यया प्राणिनः प्राणवन्तः }\\
{\dv प्रत्यक्षाभिः प्रसन्नस्तनुभिरवतु वस्ताभिरष्टाभिरीशः }\\
\vspace{0.5cm}
G GG GLGG LLL LLLG G LGG L GG\\
(GGG GLG GLL LLL LGG LGG LGG)\\
\end{frame}
%============================================================%
\begin{frame}
\frametitle{Pi\.ngala's Chanda\'{s}{\=a}stra}
Ga\d{n}a: A Triplet of laghu-guru \\
\vspace{0.5cm}
\begin{table}
\begin{tabular}{|l|l|} \hline
ga\d{n}a & pattern \\ \hline
m{\=a} & GGG \\
ya & LGG \\
r{\=a} & GLG \\
sa & LLG \\
t{\=a} & GGL \\
ja & LGL \\
bh{\=a} & GLL\\
na & LLL \\
la & L\\
gu & G\\ \hline
\end{tabular}
\end{table}
\end{frame}
%============================================================%
\begin{frame}
\frametitle{Pi\.ngala's Chanda\'{s}{\=a}stra}
{\dv आदिमध्यावसानेषु यरता यान्ति लाघवम्}\\
{\dv भजसा गौरवं यान्ति मनौ तु गुरुलाघवम्}\\
\vspace{0.5cm} 
ya  LGG \\
ra  GLG \\
ta  GGL \\
\vspace{0.5cm} 
bha  GLL\\
ja  LGL \\
sa  LLG \\
\vspace{0.5cm} 
ma  GGG \\
na  LLL 
\end{frame}
%============================================================%
\begin{frame}
\frametitle{Pi\.ngala's Chanda\'{s}{\=a}stra}
{\dv म्रभ्नैर्यानां त्रयेण त्रिमुनियतियुता स्रग्धरा कीर्तितेय्म }\\

ma ra bha na ya ya ya\\
\vspace{0.5cm} 
GGG GLG GLL LLL LGG LGG LGG\\
\vspace{0.5cm} 
ya  LGG \\
ra  GLG \\
ta  GGL \\
\vspace{0.5cm} 
bha  GLL\\
ja  LGL \\
sa  LLG \\
\vspace{0.5cm} 
ma  GGG \\
na  LLL 
\end{frame}
%============================================================%
\begin{frame}
\frametitle{Example}
{\dv या सृष्टिः स्रष्टुराद्या वहति विधिहुतं या हविर्या च होत्री }\\
\vspace{0.5cm}
GGG GLG GLL LLL LGG LGG LGG\\
\vspace{0.5cm} 
ma ra bha na ya ya ya\\
\vspace{0.5cm} 
ya  LGG \\
ra  GLG \\
ta  GGL \\
\vspace{0.5cm} 
bha  GLL\\
ja  LGL \\
sa  LLG \\
\vspace{0.5cm} 
ma  GGG \\
na  LLL \\
\end{frame}
%============================================================%
\begin{frame}
\frametitle{De Bruijn Sequence}
Ga\d{n}a: A Triplet of laghu-guru\\
\vspace{0.5cm}
\begin{table}
\begin{tabular}{|l|l|l|} \hline
ga\d{n}a & pattern & mnemonic\\ \hline
ya & LGG & yam{\=a}t{\=a}\\
m{\=a} & GGG & m{\=a}t{\=a}r{\=a}\\
t{\=a} & GGL & t{\=a}r{\=a}ja\\
r{\=a} & GLG & r{\=a}jabh{\=a}\\
ja & LGL & jabh{\=a}na\\
bh{\=a} & GLL& bh{\=a}nasa\\
na & LLL & nasala\\
sa & LLG & salag{\=a}\\
la & L&\\
gu & G&\\ \hline
\end{tabular}
\end{table}
yam{\=a}t{\=a}r{\=a}jabh{\=a}nasalag{\=a}\\
LGGGLGLLLGLG
\end{frame}
%============================================================%
\begin{frame}
\frametitle{De Bruijn Sequence}
De Bruijn cyclic sequence of length 3\\
10001011\\
\vspace{0.5cm}
De Bruijn sequence of length 4\\
1000011110110010\\
\vspace{0.5cm}
Total such Binary sequences of length n: $2^{2^{(n-1)}-n}$\\
For n=3; $2^(2^2-3)$ = $2^1$ = 2 \\
For n=4; $2^(2^3-4)$ = $2^4$ = 16 \\
\vspace{0.5cm}
Use of this code: Digital Door Locks
\end{frame}
%============================================================%
%\begin{frame}
%\frametitle{Pi\.{n}gala}
%In the eighth chapter of Chanda\'{s}{\=a}stra \textit{Pi\.nga\d{l}a} describes
%algorithms for several operations called as pratyayas. All these algorithms are recursive in nature.\\
%
%In the later work of \textit{Ked\=ar} \textit{Bha\d{t}\d{t}a}'s V\d{r}ttaratn{\=a}kara, all these algorithms were described in iterative manner.\\
%\end{frame}
%%============================================================%
%\begin{frame}[fragile]
%\frametitle{Recursion Versus Iteration}
%
%\textbf{Recursion}\\
%\begin{verbatim}
%let rec fact n =
% if n = 1 then 1
% else n * fact (n-1)
%;;
%\end{verbatim}
%
%\vspace{0.5cm}
%\textbf{Iteration}\\
%\begin{verbatim}
%let factorial n =
%  let result = ref 1 in
%  for i = 1 to n do
%    result := !result * i
%  done;
%  !result 
%\end{verbatim}

%\end{frame}
%============================================================%
\end{document}
