Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECE216 — Algorithms

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.

Contents

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.

Requirements

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-igraph for src/main.py
  • matplotlib for the plotting scripts

C examples

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-ask9

Java examples

Compile 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 package

Python examples

Run the Python graph splitter on one of the sample graphs:

cd Project/Python-Project
python3 src/main.py graphs/graph1.txt

Plotting scripts read generated logs and produce PNG figures. The existing plots/ directory contains saved outputs from previous runs.

About

ECE216 Algorithms coursework: C problem-set implementations and graph-algorithm projects in Java and Python.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages