This project implements the generation and embedding (expansion) of Cover-Free Families (CFFs) using constructions based on polynomials over finite fields. The code is written in C and optimized for performance.
Cover-Free Families (CFFs) are combinatorial structures which can be represented as binary matrices. This matrix is considered a
They have important applications in:
- Group Testing
- Cryptography and key distribution
- Digital signatures
The project focuses on algebraic construction using polynomials over finite fields (
In this construction, matrix rows are indexed by pairs of elements
The Monotone construction is a variation designed for embedding operations. During expansion, rows are indexed by pairs
Naive generation of polynomial CFFs can be computationally expensive due to the need to evaluate many polynomials at many points.
To optimize this process, this project uses Hash Tables (GHashTable from GLib) to create an inverted index of evaluations:
- Instead of repeatedly recalculating
$P(x)$ , we precompute and store which polynomials yield a value$y$ for a given$x$ . - This transforms the search into an average constant-time
$O(1)$ operation for filling the matrix, drastically speeding up the generation of large instances.
To compile this project, you will need the following libraries installed on your system:
- GCC or Clang
- Make
- FLINT 3.3.1 (Fast Library for Number Theory)
- GMP (GNU Multiple Precision Arithmetic Library)
- GLib 2.0
- OpenMP (libomp)
This project supports Linux and macOS. The Makefile automatically detects the operating system and configures the appropriate compiler flags.
| Platform | Compiler | Notes |
|---|---|---|
| Linux | GCC | Standard configuration |
| macOS | Clang | Requires Homebrew for dependencies |
Linux (Ubuntu/Debian):
sudo apt-get install build-essential libgmp-dev libglib2.0-dev libomp-dev
# FLINT 3.3.1 must be compiled from source (see flintlib.org)macOS (Homebrew):
brew install gmp glib libomp flintUse the provided Makefile to compile the project:
makeThe generate_cff executable supports different operation modes. Arguments vary according to the construction type (p for initial and embedding CFFs, m for monotone CFFs) and action (f to generate initial CFF, g for embedding/expansion).
General Syntax:
./generate_cff <type> <action> [parameters...]
Block Size Option (Initial or Embedding CFFs only):
-
m- Minimum block size, calculated as:$(dk+1)q$ -
f- Full block size, calculated as:$q^2$
Note: When
-
Generate an initial CFF from scratch (
p f):- Parameters:
<m|f>(block size),d(target$d$ ),q(target$q$ ),k(target$k$ ).
./generate_cff p f m 2 3 1
- Parameters:
-
Embedding CFF (Expansion) (
p g):- Expands an existing CFF to a larger field.
- Parameters:
<m|f>(block size),cff_file,d(target$d$ ),q(target$q$ ),k(target$k$ ).
./generate_cff p g m CFFs/cff_input.txt 2 9 1
-
Monotone CFF (Expansion) (
m g):- Parameters:
cff_file,d(fixed$d$ ),q(target$q$ ),k(fixed$k$ ).
./generate_cff m g CFFs/cff_input.txt 2 9 1
- Parameters:
Output files will be generated in the CFFs/ folder.
The project includes an automated benchmark system to measure the execution time of CFF generation. The benchmarks measure two metrics:
- Time 1: Total time for inverted index + CFF generation (+ concatenation for embedding)
- Time 2: Time for CFF matrix generation + concatenation only
cd benchmark
make
./run_benchmarks.shFor more details on how to run the benchmarks, configure iterations, and interpret results, see the benchmark/README.md.
This research is being supervised by Professor Thaís Bardini Idalino (Website, Google Scholar).
This project is licensed under the MIT License - see the LICENSE file for details.