# 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 with generators, 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 with generators, variables.

Routine "arranges" len generators and 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

 Word Equation::theEquation [private]

the presentation of the equation

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

• if then is the corresponding generator of the group
• if then is a variable with index raised in the power depending on the sign of .

Definition at line 126 of file Equation.h.

Referenced by getTheEquation().

 int Equation::theNumberOfGenerators [private]

the number of the generators of the group

Definition at line 116 of file Equation.h.

Referenced by getTheNumberOfGenerators().

 int Equation::theNumberOfVariables [private]

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:

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