Skip to contents

Every ordered pair of symbols must occur exactly once when the two are superimposed. BOTH squares are validated first: orthogonality is a statement about Latin squares, and the pair condition can hold on a grid that is not one, where the claim would be meaningless.

Usage

morie_are_orthogonal(square_a, square_b)

Arguments

square_a, square_b

Two squares of the same order.

Value

A list with orthogonal, pair_condition_holds, both_are_latin, pairs_seen.

Details

Euler conjectured in 1782 that no pair exists for \(n \equiv 2 \pmod 4\). He was right at \(n = 2\) and \(n = 6\), and wrong for every larger such \(n\) – Bose, Shrikhande and Parker constructed a pair of order 10 in 1960, 178 years later.

Examples

morie_are_orthogonal(square_a = 5L, square_b = 5L)
#> $orthogonal
#> [1] TRUE
#> 
#> $pair_condition_holds
#> [1] TRUE
#> 
#> $both_are_latin
#> [1] TRUE
#> 
#> $first_is_latin
#> [1] TRUE
#> 
#> $second_is_latin
#> [1] TRUE
#> 
#> $pairs_seen
#> [1] 1
#> 
#> $pairs_needed
#> [1] 1
#> 
#> $order
#> [1] 1
#>