\documentclass[10pt]{article}

\usepackage{fontspec}
\setmainfont[Script=Devanagari]{Sanskrit 2003}

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

\title{Assignment 1 \\ FN204 \\ Algorithms in Ancient India}

\begin{document}
\maketitle

Instructions:\\
\begin{itemize}
\item Due date for submission: $6^{th}$ March 2018.
\item Attempt all questions from Part A OR any 3 from Part B.
\item Numbers to the right of each question indicate the marks.
\item In case of Part B, a soft copy of the code along with the sample input and output should be submitted.
\item In case of Part B, modularity, and documentation will carry 10 marks.
\end{itemize}
\center{\textbf{PART A}}
\begin{enumerate}
\item Write the krama p{\=a}\d{t}ha and Ganap{\=a}\d{t}ha for the following string of a mantra.  (10)\\
{\dv दस्रा युवाकवः नासत्या पृक्तबर्हिषः}
\item Classify each ak\d{s}ara in the following \'{s}loka into laghu and guru.\\
{\dv प्रत्यादिष्टं समरशिरसः कान्दीशीभूयनष्टं} (5)
\item Explain Kedar Bhatt's procedure for prast{\=a}ra for generating all combinations of 4 aksharas, explaining at each step how it is arrived at from the previous one.	(10)
\item  Explain why Kedar Bhatt did not need any algorithm for Na\d{s}\d{t}a. (5)
\item  Explain the algorithm to get the positions of chandas with 1 laghu, 2 laghus, etc. in a prast{\=a}ra of 4 syllables	(10)
\end{enumerate}

\center{\textbf{PART B}}
\begin{enumerate}
\item Write a programme to generate the Ghanap{\=a}\d{t}ha of a mantra.\\
Test it with the following string of a Mantra.\\
{\dv दस्रा युवाकवः नासत्या पृक्तबर्हिषः}\\
For the purpose of input, instead of Devanagari, use the following roman transliterated string.\\
dasrA yuvAkavaH nAsatyA pqktabarhiRaH\\
(Note: We have used lower case letters for short vowels and upper case for long vowels. Also note the use of 'q'  and 'R'.)
\item Write a programme to classify a given string of ak\d{s}aras into laghu guru.\\
Assume that the input is in WX notation. (https://en.wikipedia.org/wiki/WX\_notation)
\item Write a programme to generate the sequence of binary numbers of n bits recursively following Pi\.ngala's algorithm.
\item Write a programme to generate the sequence of binary numbers of n bits following Kedara's algorithm.
\item Write a programme that implements Pi\.ngala's algorithm to calculate $2^{n}$.
\end{enumerate}
\end{document}
