[VicPiMakers Projects] Fwd: Programming Challenge

Mark G. vpm at palaceofretention.ca
Thu Oct 8 13:53:31 EDT 2020


Hi Murray,

I've been working on a program, in C, to complete your matrix
challenge.  There are a couple of issues that I'll point out:

1. The matrix A has 24 rows, which is correct, but the
number of columns in each row is less than 24, and is actually
21.  This is likely due to the process of converting the
matrix to CSV and having left off the last few columns
because they were 'empty'.  In any event, the CSV file for
A should have at least two more commas at the end of each row.

2. The PDF depiction of matrix A is 24 rows by 23 columns.

3. The PDF depiction of the transpose of A is very inaccurate,
in that is has only 21 rows and 24 columns.

Matrices I and B are fine in terms of dimensions.

Mark



On 2020-09-27 10:23 a.m., Murray Strome wrote:
> -------------------------------------------------
> 
> The challenge is described in the attached PDF file. The input data for 
> the sample are:
> 
> n=24
> and the text for the .csv file is:
> ,,,,,,,,,,,,,,,,,,,,,
> 1,,,,,,,,,,,,,,,,,,,,,
> 1,1,,,,,,,,,,,,,,,,,,,,
> 1,1,1,,,,,,,,,,,,,,,,,,,
> ,,,,,,,,,,,,,,,,,,,,,
> 1,1,1,1,,,,,,,,,,,,,,,,,,
> 1,1,1,1,,,,,,,,,,,,,,,,,,
> 1,1,1,1,,1,1,,,,,,,,,,,,,,,
> 1,1,1,,,1,1,1,,,,,,,,,,,,,,
> 1,1,1,1,,1,1,1,,,,,,,,,,,,,,
> 1,1,1,1,,1,1,1,1,,,,,,,,,,,,,
> 1,1,1,1,,,1,1,1,1,,,,,,,,,,,,
> ,1,1,1,,1,1,1,1,1,1,,,,,,,,,,,
> 1,,1,1,,1,1,,1,1,1,1,,,,,,,,,,
> 1,1,,1,,1,1,1,1,1,,1,,,,,,,,,,
> 1,1,1,1,,1,1,,1,1,1,1,,1,,,,,,,,
> ,1,1,1,,1,1,,1,1,1,1,1,1,1,,,,,,,
> 1,1,1,1,,1,,1,1,1,1,,,1,1,1,,,,,,
> 1,1,,1,,1,1,1,1,1,,,,1,1,1,1,,,,,
> 1,1,,1,,1,1,1,1,1,1,1,1,1,,1,1,1,,,,
> ,,,,,,1,1,,,1,1,,1,1,1,1,1,1,,,
> 1,1,1,1,,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,,
> ,1,1,1,,,1,,1,1,1,1,1,1,,1,1,1,1,,,
> 1,,1,1,,1,1,,,1,1,1,1,1,1,,,1,1,1,1,1
> 
> That file is also attached. The output will be a similar text file with 
> the extension ".csv" and is attached.
> 
> The output text for the .csv file for this example is:
> 1,1,1,1,,1,1,1,1,1,1,1,,1,1,1,,1,1,1,,1,,1
> 1,1,1,1,,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,,1,1,
> 1,1,1,1,,1,1,1,1,1,1,1,1,1,,1,1,1,,,1,1,1,1
> 1,1,1,1,,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,,1,1,1
> ,,,,,,,,,,,,,,,,,,,,,,,
> 1,1,1,1,,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,,1,,1
> 1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1
> 1,1,1,1,,1,1,1,1,1,1,1,1,,1,,,1,1,1,1,1,,
> 1,1,1,,,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,,,1,
> 1,1,1,1,,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,,1,1,1
> 1,1,1,1,,1,1,1,1,1,1,1,1,1,,1,1,1,,1,1,1,1,1
> 1,1,1,1,,,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1
> ,1,1,1,,1,1,1,1,1,1,1,1,,1,,1,,,1,,1,1,1
> 1,,1,1,,1,1,,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1
> 1,1,,1,,1,1,1,1,1,,1,1,1,1,1,1,1,1,,1,1,,1
> 1,1,1,1,,1,1,,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,
> ,1,1,1,,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
> 1,1,1,1,,1,,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1
>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