# $Author: saulius $ # $Revision: 9750 $ # $Date: 2022-02-08 06:24:00 +0000 (Tue, 08 Feb 2022) $ Compute the inverse octonion ============================ PROGRAM ======== Write a Perl program that would compute and inverse octonion for each input octonion. Program Name: oinverse Calling the program: oinverse octonions.dat octonions_*. dat When input files are specified, each of their data lines is records one octonion. Input files are optional; if they are not provided, the program must read data from its standard input. ALGEBRA OF THE OCTONIONS ======================== Octonion algebra and its properties are described in Wikipedia [1] and in most algebra textbooks (e.g. [2]). Because octonion algebra is non-associative, there are several multiplications table variants [1]; select multiplication table for the program implementation that coincides with the the table in the source [2] (it should also be the same as the table given in [1]). DATA FORMATS =============== Input format ------------ The input format is a vector format for octonion components, described in general form in the file [3]. Example of input flow: # First line of the file 'octonions.dat'; data: #@ 1 i j k l il jl kl 1 1 1 1 1 1 1 1 1 # Last line of the file 'octonions.dat'. Each line in the file is a single octonion component listed one after the other. Output format ------------- Data must be output to standard output in the same format as data in input files (format described in [1]), indicating one octonion of the result. The first line MUST be a comment listing the SVN of the program used (or other version control systems) Id: # Id: oinverse 1 2011-09-28 07: 41: 19Z author Note that there should be no dollar symbols ('$') around the Id: string, unlike in the SVN keywords (but SVN keywords SHOULD be used to generate the string!) In the second row, the program MUST output a row of column names: #@ 1 i j k l il jl kl Data must be provided below. Each line must contain one octonion, the reverse octonion for the one in the corresponding data row. Example output file: # Id: oinverse 1 2011-09-28 07: 41: 19Z author #@ 1 i j k l il jl kl 0.125 -0.125 -0.125 -0.125 -0.125 -0.125 -0.125 -0.125 REFERENCES ================ 1. Wikipedia (2020) Octonion. https://en.wikipedia.org/wiki/Octonion [last accessed: 2020-02-15 19:33:49 EET] 2. H.-B. Ebbinghaus et al. (1995) Numbers. Springer, ISBN 3-540-97497-0 3. Saulius Gražulis (2020) Hiperkompleksinių skaičių vektorinis formatas. https://saulius.grazulis.lt/~saulius/paskaitos/VU/bioinformatika-III/užduotys-praktikai/1-užduotis/formatai/hiperkompleksinių-skaičių-vektorinis-formatas.txt [last accessed: 2020-02-16 12:37:46 EET]