Programming in lua

Closed Posted 2 years ago Paid on delivery
Closed Paid on delivery

Programming language is lua, matrix problem

Matrix Multiplication

Matrices are two dimensional arrays of numbers. Matrix dimension are typically listed in row, column order as are their indices. An m × p matrix has m rows and p columns. Two matrices can be multiplied if their inner dimensions match. That is, if matrix A has dimensions m × p, and matrix B has dimensions p × q then the result of their multiplication will have dimension m × q. If the number of columns in A does not match the number of rows in B, the matrices cannot be multiplied.

The multiplication itself is a combination of multiplication and addition. The simplest way to accomplish this multiplication is via an O(n3

) algorithm as shown:

C = new matrix of size [login to view URL], [login to view URL] Set all entries in C to zero For i = 1 to [login to view URL] For j = 1 to [login to view URL] For k = 1 to [login to view URL] C[i,j] = C[i,j] + A[i,k] * B[k,j]

End For End For End For

Note that the above assumes that the for loops include both the beginning and end of their range, and that the arrays have an index beginning at 1 (as is standard mathematics notation). Also C[i,j] refers to the entry at row i column j in matrix C.

Your program should ask for the dimensions of A followed by the variables in A. It should then follow suit for B. If the two arrays are not compatible, your program should indicate that they cannot be multiplied. Otherwise it should carry out the multiplication.

The first example run is of two incompatible matrices: Matrix A ========Rows: 2

Cols: 2

Values:

1 2

3 4

Matrix B

========

Rows: 3

Cols: 1

Values:

1

2

3

Incompatible Dimensions

And here is a run with compatible matrices:

Matrix A

========

Rows: 2

Cols: 2

Values:1 2 3 4

Matrix B ======== Rows: 2 Cols: 3 Values: 1 2 0 0 3 4

A x B = 1 8 8 3 18 16

Note that for the final display, you can do something simple like put tabs in between the numbers. Make it look as neat as possible, but I will not be counting spaces in between for exactness. Note that your matrices should allow for floating point values.

C++ Programming Java Assembly Algorithm Lua

Project ID: #32111530

About the project

10 proposals Remote project Active 2 years ago

10 freelancers are bidding on average $129 for this job

ExpertSoul

Good day, I've complete Phd Software Engineering. I've 5-Year experience in C++ and Lua development and algorithm implementation. My Core Expertise in Java - C++ - C - object-oriented - Data Structure - Swing - OpenGL More

$200 USD in 2 days
(223 Reviews)
7.0
imRaziel

hi. i have some experience with Lua and task sound easy enough. i can do it .

$50 USD in 3 days
(34 Reviews)
5.0
vovakovalkov80

Hi, I am interested in your offer as a developer with 10 years of experience. I wanna do my best to you with my experience and diligent efforts. For a cheap price, you'll get more than you want in a short period of t More

$200 USD in 7 days
(3 Reviews)
4.5
Zohaib748

Hi There...! Note : I give you 25% off on my all services. So grabs this special limited discount offer. Let’s get to the Project. I came to know that your Looking a developer which have rich knowledge about c++ de More

$30 USD in 1 day
(15 Reviews)
4.8
Valuesolutions

Hello, I hope this finds you well. I have just seen your project requiring; Java Algorithm C++ Programming Assembly Lua I believe that my 10-year experience in this field is what you need right away. Avoid the headach More

$200 USD in 7 days
(26 Reviews)
5.9
aliakseidev2

Hello, I read your description in detail. I have experiences at web security and can help you. I am very excited on your project, and I am ready to start work immediately. I have skills: C language and C++ language I More

$200 USD in 7 days
(2 Reviews)
3.6
KolaPeters

Hi there, i have gone through your project description, i'm an experts in this i can help you with your project, kindly send me a message. I'm a senior engineer with rich experience in Python, Java, Algorithm, C++ Pro More

$30 USD in 4 days
(5 Reviews)
4.1
taimoorsdh

Hi There...! Note : I give you 25% off on my all services. So grabs this special limited discount offer. Let’s get to the Project. I came to know that your Looking a developer which have rich knowledge about web an More

$30 USD in 1 day
(0 Reviews)
1.0
aleksandernejfe

Hi,I carefully read your bid description and i know your intension. I am mathematicians and partition in algorithm competition such as codechef I have sufficient experience in algorithm development that you want. I am More

$150 USD in 1 day
(0 Reviews)
0.0