Code used for my Bachelor's Thesis
Go to file
Knyffen c6b6329134 Abstrack simple string matching to a process
The process contains the fingerprinting function along with a queue
representing the sliding window. This means that the user no longer
needs to remember the outgoing character when streaming the text.
2021-11-14 16:19:11 +01:00
books Init (add codebase) 2021-11-14 14:35:05 +01:00
helper_code A bit of cleanup 2021-11-14 14:48:58 +01:00
to_be_rewritten_bin A bit of cleanup 2021-11-14 14:48:58 +01:00
V1 Abstrack simple string matching to a process 2021-11-14 16:19:11 +01:00
.gitignore Initial commit 2021-11-14 12:58:08 +00:00
compare_fingerprint_false_positive_probabilities.sage Init (add codebase) 2021-11-14 14:35:05 +01:00
general_library.cpp Init (add codebase) 2021-11-14 14:35:05 +01:00
general_library.hpp Init (add codebase) 2021-11-14 14:35:05 +01:00
Makefile Abstrack simple string matching to a process 2021-11-14 16:19:11 +01:00
processes.cpp Abstrack simple string matching to a process 2021-11-14 16:19:11 +01:00
processes.hpp Abstrack simple string matching to a process 2021-11-14 16:19:11 +01:00
Rabin_fingerprint.cpp Init (add codebase) 2021-11-14 14:35:05 +01:00
Rabin_fingerprint.hpp Abstrack simple string matching to a process 2021-11-14 16:19:11 +01:00
README.md Init (add codebase) 2021-11-14 14:35:05 +01:00
simple_string_matching Abstrack simple string matching to a process 2021-11-14 16:19:11 +01:00
simple_string_matching.cpp Abstrack simple string matching to a process 2021-11-14 16:19:11 +01:00
test_rabin_fingerprint.sage Init (add codebase) 2021-11-14 14:35:05 +01:00

Bachelor's_Thesis_Code

Code used for my Bachelor's Thesis

Versions

Current Version

Compared to V1, this current state generate_initial_irreducible_polynomials.sage, generate_random_irreducible_polynomial.sage, and multiply_polynomials_modulo_polynomial.sage have been removed from the main folder, as they have already been used for implementing their corresponding features in general_library.cpp. They will be preserved in the V1 folder.

This version also contains code relating to Porat-Porat and other random code stumps. This code is going to be completely reimplemented, but is preserved for now to avoid redoing work.

V1

general_library.cpp

  • Exports functions for:
    • Generating a random irreducible polynomial of degree up to 31.
  • Contains code for:
    • Contains code to multiply polynomials modulo another polynomial.
    • Doesn't contain code to initially calculate modulo a polynomial. It requires the initial polynomials to all be at most of the same degree as the polynomial that you use for modulo.
    • A very custom version of calculating Reduced Row Echelon Form assuming all values are in Z2.

generate_initial_irreducible_polynomials.sage

  • Generates a list of irreducible polynomials, one of each degree. The polynomials are printed in a format that can be copy-pasted directly into general_library.cpp.

generate_random_irreducible_polynomial.sage

  • Contains an general template of how general_library.cpp should implement generating a random irreducible polynomial. The output of this program can also be used for debugging, since it uses many (correctly implemented) built-in sagemath functions that have to manually implemented in general_library.cpp.

multiply_polynomials_modulo_polynomial.sage

  • Contains a general template of how general_library.cpp should implement multiplying polynomials modulo a polynomial in Z2.

compare_fingerprint_false_positive_probabilities.sage

  • Contains initial (i.e. very rouch) code, which compares the upper bounds of a false match occuring of the Rabin fingerprint and the fingerprint used in Karp-Rabin.

test_rabin_fingerprint.sage

  • Contains initial (i.e. very rough) code which debunks my theory that modulo a prime is somewhat equivalent to modulo an irreducible polynomial.