This repository contains the homework assignments for the "Distributed Systems" course, held in the fall of 2021 at the University of Tehran.
The repository is structured as follows:
HW*.tex: These are the main LaTeX source files for the homework assignments.neurips.sty: A LaTeX style file used for formatting the documents.Photos/: A directory containing images and diagrams included in the assignments.*.ttf: Font files required to compile the documents, specifically the "XB Yas" font family.
The following homework assignments are included:
HW1.tex: Covers the CAP Theorem and the relationship between shared memory and message passing systems.HW2.tex: Discusses Logical Clocks, including Vector Clocks and the Network Time Protocol (NTP).HW3.tex: Focuses on the Leader Election problem in distributed systems.HW4.tex: Explores a randomized version of the Coordinated Attack problem to achieve consensus.HW5.tex: Deals with the Consensus problem, particularly in the presence of Byzantine failures.HW7.tex: Covers algorithms for Mutual Exclusion in distributed systems, such as Maekawa's and Raymond's algorithms.
To compile the .tex files into PDF documents, you will need a working LaTeX distribution that includes the xelatex engine, as these documents are written in Persian and use the xepersian package.
- LaTeX Distribution: Make sure you have a distribution like TeX Live, MiKTeX, or MacTeX installed.
- XePersian Package: This package is essential for compiling Persian LaTeX documents. It is included in major distributions like TeX Live.
- Fonts: The required "XB Yas" fonts are included in this repository. Your LaTeX distribution must be able to find them, which is usually automatic if they are in the same directory as the
.texfile.
Open a terminal or command prompt, navigate to the repository's root directory, and run the following command to compile a homework file (e.g., HW1.tex):
xelatex HW1.texThis will generate a HW1.pdf file in the same directory. You may need to run the command twice to ensure all cross-references are correctly updated.
The user request included adding docstrings to all functions and methods. This repository contains LaTeX documents for academic assignments, not source code with functions or classes. Therefore, traditional code documentation such as docstrings is not applicable. This updated README serves as the main documentation for the repository, explaining its purpose, structure, and usage for any new developer or user.