Process and evaluate individual loops

Overview

// typedefs

typedef struct vrna_mx_pf_aux_el_s* vrna_mx_pf_aux_el_t
typedef struct vrna_mx_pf_aux_ml_s* vrna_mx_pf_aux_ml_t

// global functions

int vrna_E_ext_stem (
    unsigned int type,
    int n5d,
    int n3d,
    vrna_param_t* p
    )

FLT_OR_DBL vrna_exp_E_ext_stem (
    unsigned int type,
    int n5d,
    int n3d,
    vrna_exp_param_t* p
    )

int vrna_E_ext_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )

int vrna_E_ext_loop_5 (vrna_fold_compound_t* vc)

int vrna_E_ext_loop_3 (
    vrna_fold_compound_t* fc,
    int i
    )

int vrna_BT_ext_loop_f5 (
    vrna_fold_compound_t* vc,
    int* k,
    int* i,
    int* j,
    vrna_bp_stack_t* bp_stack,
    int* stack_count
    )

int vrna_BT_ext_loop_f3 (
    vrna_fold_compound_t* vc,
    int* k,
    int maxdist,
    int* i,
    int* j,
    vrna_bp_stack_t* bp_stack,
    int* stack_count
    )

int vrna_BT_ext_loop_f3_pp (
    vrna_fold_compound_t* fc,
    int* i,
    int maxdist
    )

struct vrna_mx_pf_aux_el_s* vrna_exp_E_ext_fast_init (vrna_fold_compound_t* vc)
void vrna_exp_E_ext_fast_rotate (struct vrna_mx_pf_aux_el_s* aux_mx)
void vrna_exp_E_ext_fast_free (struct vrna_mx_pf_aux_el_s* aux_mx)

FLT_OR_DBL vrna_exp_E_ext_fast (
    vrna_fold_compound_t* vc,
    int i,
    int j,
    struct vrna_mx_pf_aux_el_s* aux_mx
    )

void vrna_exp_E_ext_fast_update (
    vrna_fold_compound_t* fc,
    int j,
    struct vrna_mx_pf_aux_el_s* aux_mx
    )

int E_Stem (
    int type,
    int si1,
    int sj1,
    int extLoop,
    vrna_param_t* P
    )

int E_ExtLoop (
    int type,
    int si1,
    int sj1,
    vrna_param_t* P
    )

FLT_OR_DBL exp_E_ExtLoop (
    int type,
    int si1,
    int sj1,
    vrna_exp_param_t* P
    )

FLT_OR_DBL exp_E_Stem (
    int type,
    int si1,
    int sj1,
    int extLoop,
    vrna_exp_param_t* P
    )

PRIVATE int E_Hairpin (
    int size,
    int type,
    int si1,
    int sj1,
    const char* string,
    vrna_param_t* P
    )

PRIVATE FLT_OR_DBL exp_E_Hairpin (
    int u,
    int type,
    short si1,
    short sj1,
    const char* string,
    vrna_exp_param_t* P
    )

int vrna_E_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )

int vrna_E_ext_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )

int vrna_eval_ext_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )

int vrna_eval_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )

FLT_OR_DBL vrna_exp_E_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )

int vrna_BT_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j,
    int en,
    vrna_bp_stack_t* bp_stack,
    int* stack_count
    )

PRIVATE int E_IntLoop (
    int n1,
    int n2,
    int type,
    int type_2,
    int si1,
    int sj1,
    int sp1,
    int sq1,
    vrna_param_t* P
    )

PRIVATE FLT_OR_DBL exp_E_IntLoop (
    int u1,
    int u2,
    int type,
    int type2,
    short si1,
    short sj1,
    short sp1,
    short sq1,
    vrna_exp_param_t* P
    )

PRIVATE int E_IntLoop_Co (
    int type,
    int type_2,
    int i,
    int j,
    int p,
    int q,
    int cutpoint,
    short si1,
    short sj1,
    short sp1,
    short sq1,
    int dangles,
    vrna_param_t* P
    )

PRIVATE int ubf_eval_int_loop (
    int i,
    int j,
    int p,
    int q,
    int i1,
    int j1,
    int p1,
    int q1,
    short si,
    short sj,
    short sp,
    short sq,
    unsigned char type,
    unsigned char type_2,
    int* rtype,
    int ij,
    int cp,
    vrna_param_t* P,
    vrna_sc_t* sc
    )

PRIVATE int ubf_eval_int_loop2 (
    int i,
    int j,
    int p,
    int q,
    int i1,
    int j1,
    int p1,
    int q1,
    short si,
    short sj,
    short sp,
    short sq,
    unsigned char type,
    unsigned char type_2,
    int* rtype,
    int ij,
    unsigned int* sn,
    unsigned int* ss,
    vrna_param_t* P,
    vrna_sc_t* sc
    )

PRIVATE int ubf_eval_ext_int_loop (
    int i,
    int j,
    int p,
    int q,
    int i1,
    int j1,
    int p1,
    int q1,
    short si,
    short sj,
    short sp,
    short sq,
    unsigned char type,
    unsigned char type_2,
    int length,
    vrna_param_t* P,
    vrna_sc_t* sc
    )

int vrna_E_int_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )

int vrna_eval_int_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j,
    int k,
    int l
    )

FLT_OR_DBL vrna_exp_E_int_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )

FLT_OR_DBL vrna_exp_E_interior_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j,
    int k,
    int l
    )

int vrna_E_ext_int_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j,
    int* ip,
    int* iq
    )

int vrna_E_stack (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )

int vrna_BT_stack (
    vrna_fold_compound_t* vc,
    int* i,
    int* j,
    int* en,
    vrna_bp_stack_t* bp_stack,
    int* stack_count
    )

int vrna_BT_int_loop (
    vrna_fold_compound_t* vc,
    int* i,
    int* j,
    int en,
    vrna_bp_stack_t* bp_stack,
    int* stack_count
    )

int vrna_E_mb_loop_stack (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )

int vrna_BT_mb_loop (
    vrna_fold_compound_t* vc,
    int* i,
    int* j,
    int* k,
    int en,
    int* component1,
    int* component2
    )

int vrna_E_mb_loop_fast (
    vrna_fold_compound_t* vc,
    int i,
    int j,
    int* dmli1,
    int* dmli2
    )

int E_ml_rightmost_stem (
    int i,
    int j,
    vrna_fold_compound_t* vc
    )

int vrna_E_ml_stems_fast (
    vrna_fold_compound_t* vc,
    int i,
    int j,
    int* fmi,
    int* dmli
    )

FLT_OR_DBL vrna_exp_E_mb_loop_fast (
    vrna_fold_compound_t* vc,
    int i,
    int j,
    vrna_mx_pf_aux_ml_t aux_mx
    )

vrna_mx_pf_aux_ml_t vrna_exp_E_ml_fast_init (vrna_fold_compound_t* vc)
void vrna_exp_E_ml_fast_rotate (vrna_mx_pf_aux_ml_t aux_mx)
void vrna_exp_E_ml_fast_free (vrna_mx_pf_aux_ml_t aux_mx)
const FLT_OR_DBL* vrna_exp_E_ml_fast_qqm (struct vrna_mx_pf_aux_ml_s* aux_mx)
const FLT_OR_DBL* vrna_exp_E_ml_fast_qqm1 (struct vrna_mx_pf_aux_ml_s* aux_mx)

FLT_OR_DBL vrna_exp_E_ml_fast (
    vrna_fold_compound_t* vc,
    int i,
    int j,
    vrna_mx_pf_aux_ml_t aux_mx
    )

int vrna_BT_mb_loop_fake (
    vrna_fold_compound_t* vc,
    int* u,
    int* i,
    int* j,
    vrna_bp_stack_t* bp_stack,
    int* stack_count
    )

int vrna_BT_mb_loop_split (
    vrna_fold_compound_t* vc,
    int* i,
    int* j,
    int* k,
    int* l,
    int* component1,
    int* component2,
    vrna_bp_stack_t* bp_stack,
    int* stack_count
    )

PRIVATE int E_MLstem (
    int type,
    int si1,
    int sj1,
    vrna_param_t* P
    )

PRIVATE FLT_OR_DBL exp_E_MLstem (
    int type,
    int si1,
    int sj1,
    vrna_exp_param_t* P
    )

Detailed Documentation

Typedefs

typedef struct vrna_mx_pf_aux_el_s* vrna_mx_pf_aux_el_t
Auxiliary helper arrays for fast exterior loop computations.
typedef struct vrna_mx_pf_aux_ml_s* vrna_mx_pf_aux_ml_t
Auxiliary helper arrays for fast exterior loop computations.

Global Functions

int vrna_E_ext_stem (
    unsigned int type,
    int n5d,
    int n3d,
    vrna_param_t* p
    )
Evaluate a stem branching off the exterior loop.

Given a base pair \((i,j)\) encoded by type , compute the energy contribution including dangling-end/terminal-mismatch contributions. Instead of returning the energy contribution per-se, this function returns the corresponding Boltzmann factor. If either of the adjacent nucleotides \((i - 1)\) and \((j+1)\) must not contribute stacking energy, the corresponding encoding must be \(-1\) .

Parameters:

type The base pair encoding
n5d The encoded nucleotide directly adjacent at the 5’ side of the base pair (may be -1)
n3d The encoded nucleotide directly adjacent at the 3’ side of the base pair (may be -1)
p The pre-computed energy parameters

Returns:

The energy contribution of the introduced exterior-loop stem

See also:

vrna_E_exp_stem()

FLT_OR_DBL vrna_exp_E_ext_stem (
    unsigned int type,
    int n5d,
    int n3d,
    vrna_exp_param_t* p
    )
Evaluate a stem branching off the exterior loop (Boltzmann factor version)

Given a base pair \((i,j)\) encoded by type , compute the energy contribution including dangling-end/terminal-mismatch contributions. Instead of returning the energy contribution per-se, this function returns the corresponding Boltzmann factor. If either of the adjacent nucleotides \((i - 1)\) and \((j+1)\) must not contribute stacking energy, the corresponding encoding must be \(-1\) .

Parameters:

type The base pair encoding
n5d The encoded nucleotide directly adjacent at the 5’ side of the base pair (may be -1)
n3d The encoded nucleotide directly adjacent at the 3’ side of the base pair (may be -1)
p The pre-computed energy parameters (Boltzmann factor version)

Returns:

The Boltzmann weighted energy contribution of the introduced exterior-loop stem

See also:

vrna_E_ext_stem()

int vrna_E_ext_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )
Evaluate the free energy of a base pair in the exterior loop.

Evalue the free energy of a base pair connecting two nucleotides in the exterior loop and take hard constraints into account.

Typically, this is simply dangling end contributions of the adjacent nucleotides, potentially a terminal A-U mismatch penalty, and maybe some generic soft constraint contribution for that decomposition.

Parameters:

fc Fold compound to work on (defines the model and parameters)
i 5’ position of the base pair
j 3’ position of the base pair

Returns:

Free energy contribution that arises when this pair is formed in the exterior loop

Note

For dangles == 1 || 3 this function also evaluates the three additional pairs (i + 1, j), (i, j - 1), and (i + 1, j - 1) and returns the minimum for all four possibilities in total.

int E_Stem (
    int type,
    int si1,
    int sj1,
    int extLoop,
    vrna_param_t* P
    )
Compute the energy contribution of a stem branching off a loop-region.

This function computes the energy contribution of a stem that branches off a loop region. This can be the case in multiloops, when a stem branching off increases the degree of the loop but also immediately interior base pairs of an exterior loop contribute free energy. To switch the behavior of the function according to the evaluation of a multiloop- or exterior-loop-stem, you pass the flag ‘extLoop’. The returned energy contribution consists of a TerminalAU penalty if the pair type is greater than 2, dangling end contributions of mismatching nucleotides adjacent to the stem if only one of the si1, sj1 parameters is greater than 0 and mismatch energies if both mismatching nucleotides are positive values. Thus, to avoid incorporating dangling end or mismatch energies just pass a negative number, e.g. -1 to the mismatch argument.

This is an illustration of how the energy contribution is assembled:

      3'  5'
      |   |
      X - Y
5'-si1     sj1-3'

Here, (X,Y) is the base pair that closes the stem that branches off a loop region. The nucleotides si1 and sj1 are the 5’- and 3’- mismatches, respectively. If the base pair type of (X,Y) is greater than 2 (i.e. an A-U or G-U pair, the TerminalAU penalty will be included in the energy contribution returned. If si1 and sj1 are both nonnegative numbers, mismatch energies will also be included. If one of si1 or sj1 is a negative value, only 5’ or 3’ dangling end contributions are taken into account. To prohibit any of these mismatch contributions to be incorporated, just pass a negative number to both, si1 and sj1. In case the argument extLoop is 0, the returned energy contribution also includes the internal-loop-penalty of a multiloop stem with closing pair type.

Parameters:

type The pair type of the first base pair un the stem
si1 The 5’-mismatching nucleotide
sj1 The 3’-mismatching nucleotide
extLoop A flag that indicates whether the contribution reflects the one of an exterior loop or not
P The data structure containing scaled energy parameters

Returns:

The Free energy of the branch off the loop in dcal/mol

Note

This function is threadsafe

FLT_OR_DBL exp_E_ExtLoop (
    int type,
    int si1,
    int sj1,
    vrna_exp_param_t* P
    )

This is the partition function variant of E_ExtLoop() Deprecated Use vrna_exp_E_ext_stem() instead!

Returns:

The Boltzmann weighted energy contribution of the introduced exterior-loop stem

See also:

E_ExtLoop()

FLT_OR_DBL exp_E_Stem (
    int type,
    int si1,
    int sj1,
    int extLoop,
    vrna_exp_param_t* P
    )

Compute the Boltzmann weighted energy contribution of a stem branching off a loop-region

This is the partition function variant of E_Stem()

Returns:

The Boltzmann weighted energy contribution of the branch off the loop

Note

This function is threadsafe

See also:

E_Stem()

PRIVATE int E_Hairpin (
    int size,
    int type,
    int si1,
    int sj1,
    const char* string,
    vrna_param_t* P
    )
Compute the Energy of a hairpin-loop.

To evaluate the free energy of a hairpin-loop, several parameters have to be known. A general hairpin-loop has this structure:

  a3 a4
a2     a5
a1     a6
  X - Y
  |   |
  5'  3'

where X-Y marks the closing pair [e.g. a (G,C) pair]. The length of this loop is 6 as there are six unpaired nucleotides (a1-a6) enclosed by (X,Y). The 5’ mismatching nucleotide is a1 while the 3’ mismatch is a6. The nucleotide sequence of this loop is “a1.a2.a3.a4.a5.a6”

Parameters:

size The size of the loop (number of unpaired nucleotides)
type The pair type of the base pair closing the hairpin
si1 The 5’-mismatching nucleotide
sj1 The 3’-mismatching nucleotide
string The sequence of the loop
P The datastructure containing scaled energy parameters

Returns:

The Free energy of the Hairpin-loop in dcal/mol

Note

The parameter sequence should contain the sequence of the loop in capital letters of the nucleic acid alphabet if the loop size is below 7. This is useful for unusually stable tri-, tetra- and hexa-loops which are treated differently (based on experimental data) if they are tabulated.

Warning

Not (really) thread safe! A threadsafe implementation will replace this function in a future release!

Energy evaluation may change due to updates in global variable “tetra_loop”

PRIVATE FLT_OR_DBL exp_E_Hairpin (
    int u,
    int type,
    short si1,
    short sj1,
    const char* string,
    vrna_exp_param_t* P
    )
Compute Boltzmann weight :math:`e^{-Delta G/kT} ` of a hairpin loop.

multiply by scale[u+2]

Parameters:

u The size of the loop (number of unpaired nucleotides)
type The pair type of the base pair closing the hairpin
si1 The 5’-mismatching nucleotide
sj1 The 3’-mismatching nucleotide
string The sequence of the loop
P The datastructure containing scaled Boltzmann weights of the energy parameters

Returns:

The Boltzmann weight of the Hairpin-loop

Warning

Not (really) thread safe! A threadsafe implementation will replace this function in a future release!

Energy evaluation may change due to updates in global variable “tetra_loop”

int vrna_E_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )
Evaluate the free energy of a hairpin loop and consider hard constraints if they apply.

This function evaluates the free energy of a hairpin loop

In case the base pair is not allowed due to a constraint conflict, this function returns INF .

Parameters:

vc The vrna_fold_compound_t that stores all relevant model settings
i The 5’ nucleotide of the base pair (3’ to evaluate the pair as exterior hairpin loop)
j The 3’ nucleotide of the base pair (5’ to evaluate the pair as exterior hairpin loop)

Returns:

The free energy of the hairpin loop in 10cal/mol

Note

This function is polymorphic! The provided vrna_fold_compound_t may be of type VRNA_FC_TYPE_SINGLE or VRNA_FC_TYPE_COMPARATIVE

int vrna_E_ext_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )
Evaluate the free energy of an exterior hairpin loop and consider possible hard constraints.

Note

This function is polymorphic! The provided vrna_fold_compound_t may be of type VRNA_FC_TYPE_SINGLE or VRNA_FC_TYPE_COMPARATIVE

int vrna_eval_ext_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )
Evaluate free energy of an exterior hairpin loop.
int vrna_eval_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )
Evaluate free energy of a hairpin loop.

SWIG Wrapper Notes This function is attached as method eval_hp_loop() to objects of type fold_compound

Parameters:

vc The vrna_fold_compound_t for the particular energy evaluation
i 5’-position of the base pair
j 3’-position of the base pair

Returns:

Free energy of the hairpin loop closed by :math:` (i,j) ` in deka-kal/mol

Note

This function is polymorphic! The provided vrna_fold_compound_t may be of type VRNA_FC_TYPE_SINGLE or VRNA_FC_TYPE_COMPARATIVE

FLT_OR_DBL vrna_exp_E_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )
High-Level function for hairpin loop energy evaluation (partition function variant)

Note

This function is polymorphic! The provided vrna_fold_compound_t may be of type VRNA_FC_TYPE_SINGLE or VRNA_FC_TYPE_COMPARATIVE

See also:

vrna_E_hp_loop() for it’s free energy counterpart

int vrna_BT_hp_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j,
    int en,
    vrna_bp_stack_t* bp_stack,
    int* stack_count
    )
Backtrack a hairpin loop closed by :math:` (i,j) ` .

Note

This function is polymorphic! The provided vrna_fold_compound_t may be of type VRNA_FC_TYPE_SINGLE or VRNA_FC_TYPE_COMPARATIVE

PRIVATE int E_IntLoop (
    int n1,
    int n2,
    int type,
    int type_2,
    int si1,
    int sj1,
    int sp1,
    int sq1,
    vrna_param_t* P
    )

Compute the Energy of an interior-loop

This function computes the free energy \(\Delta G\) of an interior-loop with the following structure:

    3'  5'
    |   |
    U - V
a_n       b_1
 .        .
 .        .
 .        .
a_1       b_m
    X - Y
    |   |
    5'  3'

This general structure depicts an interior-loop that is closed by the base pair (X,Y). The enclosed base pair is (V,U) which leaves the unpaired bases a_1-a_n and b_1-b_n that constitute the loop. In this example, the length of the interior-loop is \((n+m)\) where n or m may be 0 resulting in a bulge-loop or base pair stack. The mismatching nucleotides for the closing pair (X,Y) are:

5’-mismatch: a_1

3’-mismatch: b_m

and for the enclosed base pair (V,U):

5’-mismatch: b_1

3’-mismatch: a_n

Parameters:

n1 The size of the ‘left’-loop (number of unpaired nucleotides)
n2 The size of the ‘right’-loop (number of unpaired nucleotides)
type The pair type of the base pair closing the interior loop
type_2 The pair type of the enclosed base pair
si1 The 5’-mismatching nucleotide of the closing pair
sj1 The 3’-mismatching nucleotide of the closing pair
sp1 The 3’-mismatching nucleotide of the enclosed pair
sq1 The 5’-mismatching nucleotide of the enclosed pair
P The datastructure containing scaled energy parameters

Returns:

The Free energy of the Interior-loop in dcal/mol

Note

Base pairs are always denoted in 5’->3’ direction. Thus the enclosed base pair must be ‘turned arround’ when evaluating the free energy of the interior-loop

This function is threadsafe

PRIVATE FLT_OR_DBL exp_E_IntLoop (
    int u1,
    int u2,
    int type,
    int type2,
    short si1,
    short sj1,
    short sp1,
    short sq1,
    vrna_exp_param_t* P
    )

Compute Boltzmann weight :math:`e^{-Delta G/kT} ` of interior loop

multiply by scale[u1+u2+2] for scaling

Parameters:

u1 The size of the ‘left’-loop (number of unpaired nucleotides)
u2 The size of the ‘right’-loop (number of unpaired nucleotides)
type The pair type of the base pair closing the interior loop
type2 The pair type of the enclosed base pair
si1 The 5’-mismatching nucleotide of the closing pair
sj1 The 3’-mismatching nucleotide of the closing pair
sp1 The 3’-mismatching nucleotide of the enclosed pair
sq1 The 5’-mismatching nucleotide of the enclosed pair
P The datastructure containing scaled Boltzmann weights of the energy parameters

Returns:

The Boltzmann weight of the Interior-loop

Note

This function is threadsafe

int vrna_eval_int_loop (
    vrna_fold_compound_t* vc,
    int i,
    int j,
    int k,
    int l
    )
Evaluate the free energy contribution of an interior loop with delimiting base pairs \((i,j)\) and \((k,l)\) .

SWIG Wrapper Notes This function is attached as method eval_int_loop() to objects of type fold_compound

Note

This function is polymorphic, i.e. it accepts vrna_fold_compound_t of type VRNA_FC_TYPE_SINGLE as well as VRNA_FC_TYPE_COMPARATIVE

int vrna_BT_stack (
    vrna_fold_compound_t* vc,
    int* i,
    int* j,
    int* en,
    vrna_bp_stack_t* bp_stack,
    int* stack_count
    )
Backtrack a stacked pair closed by :math:` (i,j) ` .
int vrna_BT_int_loop (
    vrna_fold_compound_t* vc,
    int* i,
    int* j,
    int en,
    vrna_bp_stack_t* bp_stack,
    int* stack_count
    )
Backtrack an interior loop closed by :math:` (i,j) ` .
int vrna_E_mb_loop_stack (
    vrna_fold_compound_t* vc,
    int i,
    int j
    )
Evaluate energy of a multi branch helices stacking onto closing pair (i,j)
Computes total free energy for coaxial stacking of (i.j) with (i+1.k) or (k+1.j-1)
int vrna_BT_mb_loop (
    vrna_fold_compound_t* vc,
    int* i,
    int* j,
    int* k,
    int en,
    int* component1,
    int* component2
    )
Backtrack the decomposition of a multi branch loop closed by :math:` (i,j) ` .

Parameters:

vc The vrna_fold_compound_t filled with all relevant data for backtracking
i 5’ position of base pair closing the loop (will be set to 5’ position of leftmost decomposed block upon successful backtracking)
j 3’ position of base pair closing the loop (will be set to 3’ position of rightmost decomposed block upon successful backtracking)
k Split position that delimits leftmost from rightmost block, [i,k] and [k+1, j], respectively. (Will be set upon successful backtracking)
en The energy contribution of the substructure enclosed by :math:` (i,j) `
component1 Type of leftmost block (1 = ML, 2 = C)
component2 Type of rightmost block (1 = ML, 2 = C)

Returns:

1, if backtracking succeeded, 0 otherwise.