solvable {cubing} | R Documentation |

## Solved and Solvability Tests for Cube Objects

### Description

Determine if a cube is solved or solvable, and calculate the sign of the corner and edge permutations.

### Usage

```
is.solved(aCube, split = FALSE, co = TRUE, eo = TRUE)
is.solvable(aCube, split = FALSE)
parity(aCube)
```

### Arguments

`aCube` |
Any cube object. |

`split` |
Split output into logical vector? See Details. |

`co` |
If |

`eo` |
If |

### Details

The cubieCube and stickerCube objects contain Rubik's cubes that can
be physically constructed from properly stickered cubies, but they are
not necessarily solvable. These functions test for solved and solvable
cubes. The `parity`

function gives the permuation sign (+1 for even
and -1 for odd) for the corner and edge permuations. For a cube to be
solvable, the two signs must be the same.

For `is.solved`

, a logical value for each separate permutation and
orientation component will be given if `split`

is `TRUE`

.

For `is.solvable`

, logical values corresponding to permuatation
parity, edge orientation and corner orientation will be given if
`split`

is `TRUE`

. The cube is only solvable if all three
values are `TRUE`

. The edge and corner orientation values
correspond to the fact that if all but one edge (or corner) orientation
is known, then the orientation of the final edge (or corner) must
be fixed for the cube to be solvable. More precisely, the sum of the
edge orientation vector must be even, and the sum of the corner
orientation vector must be divisible by three.

### Value

A logical value or vector for `is.solved`

and `is.solvable`

.
A named integer vector of length two for `parity`

.

### See Also

### Examples

```
aCube <- randCube()
is.solvable(aCube)
aCube <- randCube(solvable = FALSE)
is.solvable(aCube)
```

*cubing*version 1.0-5 Index]