Coursework repository for ECE216 Algorithms. It contains C implementations for problem-set exercises, LaTeX notes for the first problem set, and graph-algorithm project implementations in Java and Python.
| Path | Description |
|---|---|
ProblemSet1/ |
Problem-set 1 LaTeX write-up and C implementations for selected exercises. |
recursive_tester.c |
Small standalone C helper used for recursive-algorithm testing. |
Project/Java-Project/ |
Original Java implementation for the graph project. |
Project/Java-Project-better/ |
Revised Java implementation using JGraphT and a progress-bar dependency. |
Project/Python-Project/ |
Python implementation, graph input files, plotting scripts, and generated result plots. |
For the C exercises:
- GCC or another C compiler
For the Java project:
- JDK 17+
- Maven or another way to resolve the dependencies listed in
Project/Java-Project-better/pom.xml
For the Python project:
- Python 3
python-igraphforsrc/main.pymatplotlibfor the plotting scripts
Compile the standalone problem-set implementations into /tmp:
gcc -std=c11 -Wall -Wextra ProblemSet1/implementations/ask5.c -o /tmp/ece216-ask5
gcc -std=c11 -Wall -Wextra ProblemSet1/implementations/ask8.c -o /tmp/ece216-ask8
gcc -std=c11 -Wall -Wextra ProblemSet1/implementations/ask10.c -o /tmp/ece216-ask10
gcc -std=c11 -Wall -Wextra ProblemSet1/implementations/ask11.c -o /tmp/ece216-ask11
gcc -std=c11 -Wall -Wextra ProblemSet1/implementations/ask9.c ProblemSet1/implementations/hashset.c -lm -o /tmp/ece216-ask9Compile the original Java project without writing build artifacts into the repository:
mkdir -p /tmp/ece216-java
javac -d /tmp/ece216-java $(find Project/Java-Project/src/main/dev -name '*.java')The revised Java project has external dependencies in pom.xml; build it from inside its project directory when Maven is available:
cd Project/Java-Project-better
mvn packageRun the Python graph splitter on one of the sample graphs:
cd Project/Python-Project
python3 src/main.py graphs/graph1.txtPlotting scripts read generated logs and produce PNG figures. The existing plots/ directory contains saved outputs from previous runs.