An open API service indexing awesome lists of open source software.

https://github.com/valinet/ssa

ssa (String Search Algorithms) is a homework I had for my Algorithms Analysis course during my 2nd year in uni.
https://github.com/valinet/ssa

Last synced: 28 days ago
JSON representation

ssa (String Search Algorithms) is a homework I had for my Algorithms Analysis course during my 2nd year in uni.

Awesome Lists containing this project

README

          

# ssa
ssa (String Search Algorithms) implements various substring search algorithms; I chose to do it in C and x86 (IA-32) assembly, in order to do comparisons between the two implementations, and also across the different algorithms.

The algorithms contained are:

* Knuth-Morris-Pratt (KMP)
* Rabin-Karp (RK)
* Aho-Corasick (AC)

At the moment, it compiles as is in a Linux environment. Available options are:

* Navigate to a folder containing an algorithm (for e.g., cd KMP)
* 'make all' will compile/assemble & link everything
* 'make runc' compiles and runs the C variant of the algorithm
* 'make runasm' assembles and runs the x86 Intel-flavored nasm assembly version of the algorithm
* 'make clean' cleans off binaries generated by the above commands

The makefile is set to compile the code as 32-bit, in order to do a fair comparison against the assembly version (install gcc-multilib for compiling x86 C, and nasm for assembling).

More documentation is available at "docs/Raport.pdf" (in Romanian).

Example of invoking the resulting executables: `echo Hello world | KMP/c/kmp ll` (will highlight *ll* in *Hello world*).

The work is compatible with the Aho-Corasick problem on Infoarena: https://www.infoarena.ro/problema/ahocorasick.

The implementation has been coded as homework for my Algorithms Analysis course during my 2nd year as bachelor, Faculty of Automatic Control and Computer Science, University POLITEHNICA of Bucharest.