Giter VIP home page Giter VIP logo

tumgad's Introduction

TUMGAD

Exercise generator for the course Introduction to Algorithms and Data Structures. Developed by students from the Technical University of Munich primarily for fellow students.

Some of the Exercises TUMGAD can generate:

  • AVL-Trees
  • (a,b)-Trees
  • Binomial Heaps
  • Dijkstra's Algorithm
  • ...

You can check the generator status (which exercises is TUMGAD capable of generating) here

About

TUMGAD is a tool for anyone wanting to learn about some the most famous Algorithms and Data Structures, though it was mainly developed for Students of the Technical University of Munich.

Furthermore, it was created using Lecture Resources of the TUM provided in the summer semester of 2019 as well as the Book Algorithms and Data Structures: The Basic Toolbox. Hence there may be different definitions in this project than you are used to.

Please be aware that this is still very much a work in progress.

How it works

In the source code of TUMGAD all the data structures and algorithms are already implemented, as well as a method that takes the products of these components and visualizes them using LaTeX, whereby the placeholders in the LaTeX templates will be replaced with the generated structures.

Easy example: The implementation for QuickSort generates a random array and converts it to a string (simple enough) and then that string replaces the placeholder $INITARRAY$ in the exercise template. Later, the LaTeX will be compiled and the output written to two PDFs, one with the exercise, the other with the solutions.

For a complete example, you can look at these PDFs

How to Use

For a detailed setup and usage guide, have a look at this.

You can generate exercises and their solutions by executing the main method in the src/Tumgad.java file. For this, the only prerequisite is a working version of pdflatex added to your PATH (However you can work around this by manually compiling docs/Exercises.tex and docs/Solutions.tex).

Please note: For now, the exercise generator is optimized for IDE, if you want to use it in your command line, you will likely have to make some small adjustments.

Visit ossner.github.io/TUMGAD/

Contributing

If you spot an issue you can report it here

If you have an idea for a feature you can submit it here

Or just submit a pull request if you're familiar with GitHub. Contributing guidelines can be found here

tumgad's People

Contributors

kruegerdaniel avatar ossner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tumgad's Issues

Wrong answer in AVL-Tree exercise

Describe the bug
The type of rotation after specific action in solutions.pdf is false, although the tree is correct.

To Reproduce
0. Seed = 4.

  1. Go to "AVL-Trees", part with delete(17).
  2. Execute all inserts/deletes before delete(17).
  3. Execute delete(17).
  4. Open solutions.pdf, there will be "l-r rotation" instead of "no rotation".

Expected behavior
"No rotation" is expected.

Screenshots
Task itself :
image

AVL-Tree before delete(17) :
image

Solution (after delete(17)) in solutions.pdf :
image

Solution path (used https://www.cs.usfca.edu/~galles/visualization/AVLtree.html) :
https://gyazo.com/e05859c74b19c312d042c142966c4fb8

Desktop (please complete the following information):

  • IDE IntelliJ
  • Java 11

Additional context
Add any other context about the problem here.

Bitte ordnerstruktur fixen und build script hinzufügen

Sehr geile sache, aber bitte die standard ordnerstruktur einhalten und ein gradle build script hinzufügen. Ich wollte das ganze in der konsole ausführen und habe deswegen probleme gehabt. Die ordnerstruktur einzuhalten ist in java wichtig, sonst findet es die files teilweise nicht desegen musste ich ein paar pfade manuell im code ändern

pdfTex can't find icons in Eclipse

Describe the bug
When compiling the final document in Eclipse, pdfTex can't find the "faviconRed.png" and the "favicon.png".

To Reproduce
Clone and import to Eclipse and run Tumgad.java

Expected behavior
Should compile the exercise and solution pdfs.

Screenshots
image

image

Desktop (please complete the following information):

  • IDE Eclipse
  • Java 14

Solution
It can be fixed by adding "docs/" in front of favicon.png/faviconRed.png in ExerciseTemplate.tex/SolutionTemplate.tex:

\includegraphics[scale=0.25]{docs/favicon.png}

\includegraphics[scale=0.25]{docs/faviconRed.png}

Dijkstra's Algorithm rogue node in final path

Describe the bug
In the solution path for Dijkstra's algorithm, it can happen that there appears a node that should not appear in the shortest path.

To Reproduce
Steps to reproduce the behavior (If generation issue, please provide the seed stated on the first page):

  1. Random seed: 410964038
  2. Go to Dijkstra Solution

Screenshots
image

image

Desktop:

  • IDE: IntelliJ IDEA

Additional context
Note that the final path length was not influenced by the K node, so if you encounter this, you could just think about whether or not it makes sense.

AVL Tree Solution showing the wrong number to be deleted

Describe the bug
The exercise says that the 12 should be deleted, but when you scroll down to that step, it shows that the 11 should be deleted.
image
The 12 does actually get deleted and replaced with its predecessor, it's just saying that the 11 is the one that gets deleted. Everything else is correct, the next one is 16 as stated in the exercise head.
image

To Reproduce
Seed: 565237840

  1. Generate:
  • Hashing w/ Chaining
  • (a,b) Trees
  • Floyd Warshall
  • Double Hashing
  • Binary Heaps
  • AVL Trees
  • BFS & DFS
  • Dijkstra
  1. Scroll down to AVL Trees and that specific step

Expected behavior
It should say 12

Desktop (please complete the following information):

  • IDE Eclipse
  • Java 14
  • OS: Ubuntu 20.04

Minor bug in creating collision table (double hashing)

Describe the bug
The number of rows in the collision table is always in 1 more than the number of values i need to add to that table.

To Reproduce
Steps to reproduce the behavior (If generation issue, please provide the seed stated on the first page):
0. Any seed

  1. Create .pdf with "double hashing" exercise
  2. Open exercises.pdf
  3. Scroll down to "double hashing"
  4. Look at the rows in the table

Expected behavior
Number of rows = number of values to add.

Screenshots
Pic from exercises.pdf (additional / not requested row is marked with blue arrow) :
image
Solution of the exercise :
image

Desktop (please complete the following information):

  • IDE IntelliJ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.