Simple implementation of these algorithms in Java in a controlled environment for educational purposes.
This project is classwork for "Data Structures & Algorithms II" course at Univerisdad Siglo 21 to demonstrate our knowledge in developing complex algorithms in Java.
The project aim was to design and implement two separate programs.
- Implement Huffman's Algorithm in Java a. The program must allow reading text of variable character length. b. A data structure must be used to add new nodes based on the length of the entered character string. c. The program must display the obtained encoding, along with the original message after applying the Huffman algorithm.
- Implement an algorithm in Java that simulates a real Genetic Algorithm.
a. The program must use a random function that generates random numbers between 0 and 1 for the starting string, and the string dimension must be 20 characters.
b. The number of iterations and crossovers necessary to reach the desired result must be controlled.
c. The program must display each string that were necessary to reach the optimal solution on the console.
d. The fitness function that evaluates individuals in the population must be
H(x) = Σ x*2. e. The fitness target isH(x) = 40. This means every character in the string must be a 1.
For further understanding on how we implemented the design patterns mentioned above, along with UML diagrams and examples, you can download the PDF document Download PDF with further explanation of the project
- Develop the project as a team using online tools that allows sync coding like Replit.
- Team work and communication.
- Development of encoding and optimization algorithms.
- Understanding how this algorithms might be applied in a real world scenario.
- Documentation and explanation of the project in a word document following APA format style.
- Download this project as zip and extract it.
- Import it your preferred IDE.
- Run the program
- Enter '1' in the console to showcase the Huffman Algorithm or '2' to showcase the Genetic Algorithm.
Authors:
- Tomas Temporelli
- Alejandro Zdut
- Nicolas Luccatto