Skip to content

srikanthmandula/GF2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GF2

Program “GF2.java” to implement the second type of finite field GF(pn) where p is a prime number and n is a positive integer, and four operations “+”, “-”, “*”, and “/”, respectively. Specifically, program will read parameters and polynomials from a file named “input.txt” and then creates a file named “output.txt” by writing the results to “output.txt”. In “input.txt”: 1. First line is the prime number p. 2. Second line is the degree n of the irreducible polynomial m(x) over Zp, which can be any positive integer. 3. Third line is the coefficients of m(x), from the leading coefficient to the constant term, separated by one blank space. 4. Fourth line is the degree u of f(x) over Zp, where u can be any integer satisfying 0 <= u < n. 5. Fifth line is the coefficients of f(x), from the leading coefficient to the constant term, separated by one blank space. 6. Sixth line is the degree v of g(x) over Zp, where v can be any integer satisfying 0 <= v < n. 7. Seventh line is the coefficients of g(x), from the leading coefficient to the constant term, separated by one blank space. In “output.txt”: 1. First line is the coefficients of f(x) + g(x) in GF(pn), from the leading coefficient to the constant term, separated by one blank space. 2. Second line is the coefficients of f(x) - g(x) in GF(pn), from the leading coefficient to the constant term, separated by one blank space. 3. Third line is the coefficients of f(x) * g(x) in GF(pn), from the leading coefficient to the constant term, separated by one blank space. 4. Fourth line is the coefficients of f(x) / g(x) in GF(pn), from the leading coefficient to the constant term, separated by one blank space

About

Program “GF2.java” to implement the second type of finite field GF(pn) where p is a prime number and n is a positive integer, and four operations “+”, “-”, “*”, and “/”, respectively. Specifically, program will read parameters and polynomials from a file named “input.txt” and then creates a file named “output.txt” by writing the results to “outp…

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages