Equation Class Reference

#include <Equation.h>

List of all members.

Public Member Functions

 Equation (int nGen, int nVar, const Word &eq)
bool isGenerator (int g) const
 Determine if g is a letter in this equation.
bool isVariable (int g) const
 Determine if g is a variable in this equation.
int getTheNumberOfGenerators () const
 Get the number of the generators of the group.
int getTheNumberOfVariables () const
 Get the number of variables in the formula.
const WordgetTheEquation () const
 Get the word presentation of the equation.
bool isQuadratic () const
 Determine if the equation is quadratic.
bool trivialSolution () const
 Determine if the equation has trivial solution.

Static Public Member Functions

static Equation randomQuadraticEquation (int nGen, int nVar, int len)
 Generate random (strictly) quadratic equation of length $len + 2 \cdot nVars$ with $nGen$ generators, $nVar$ variables.

Private Attributes

int theNumberOfGenerators
 the number of the generators of the group
int theNumberOfVariables
 the number of variables in the formula (the actual number of variables in the equation can be lesser)
Word theEquation
 the presentation of the equation

Friends

ostream & operator<< (ostream &os, const Equation &eq)

Detailed Description

Definition at line 27 of file Equation.h.


Constructor & Destructor Documentation

Equation::Equation ( int  nGen,
int  nVar,
const Word eq 
)

Member Function Documentation

const Word& Equation::getTheEquation (  )  const [inline]

Get the word presentation of the equation.

Definition at line 66 of file Equation.h.

References theEquation.

int Equation::getTheNumberOfGenerators (  )  const [inline]

Get the number of the generators of the group.

Definition at line 58 of file Equation.h.

References theNumberOfGenerators.

int Equation::getTheNumberOfVariables (  )  const [inline]

Get the number of variables in the formula.

Definition at line 62 of file Equation.h.

References theNumberOfVariables.

bool Equation::isGenerator ( int  g  )  const

Determine if g is a letter in this equation.

bool Equation::isQuadratic (  )  const

Determine if the equation is quadratic.

bool Equation::isVariable ( int  g  )  const

Determine if g is a variable in this equation.

static Equation Equation::randomQuadraticEquation ( int  nGen,
int  nVar,
int  len 
) [static]

Generate random (strictly) quadratic equation of length $len + 2 \cdot nVars$ with $nGen$ generators, $nVar$ variables.

Routine "arranges" len generators and $2 \cdot nVars$ variables (each variable twice) into a reduced equation. The distribution is not uniform among equations of this type (even though for large values of len I think it will be close to uniform). For uniform distribution one has to construct a FSA accepting all equations of this type, then assign weights to edges using dynamic programming, and finally choose words from that FSA accoring to the weights.

bool Equation::trivialSolution (  )  const

Determine if the equation has trivial solution.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const Equation eq 
) [friend]

Member Data Documentation

the presentation of the equation

A word theEquation is a sequence of generators. Each generator $g$ is interpreted the following way:

  • if $|g| \le theNumberOfGenerators$ then $g$ is the corresponding generator of the group
  • if $|g| > theNumberOfGenerators$ then $g$ is a variable with index $|g| - theNumberOfGenerators$ raised in the power $\pm 1$ depending on the sign of $g$.

Definition at line 126 of file Equation.h.

Referenced by getTheEquation().

the number of the generators of the group

Definition at line 116 of file Equation.h.

Referenced by getTheNumberOfGenerators().

the number of variables in the formula (the actual number of variables in the equation can be lesser)

Definition at line 118 of file Equation.h.

Referenced by getTheNumberOfVariables().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Mon Sep 26 18:43:46 2011 for CRyptography And Groups (CRAG) by  doxygen 1.6.1