Write some Software

Here is the math problem, we want to solve. its necessary that the solution algorithm have a good computational performance (near realtime). the solution should be provided as a c++ software.

Let A be a given matrix of real positive numbers of the size mxn (m rows by n columns) . n >>m.

let J be a vector (Sparse) of size nx1.

let B = A*J (* = dot product). (B size is mx1).

let N, M, K, V be a positive integer numbers. N <<m. V<10.

let S be a positive real number (quants of 0.1). S<3.

let C be a vector (size m-1x1) where C[i] = B[i+1]/B[i] -1.

let D be a vector (size m-1x1) where D=C - V/100.

Given A,N,M,K,V,S find an assignment to the vector J (sparse) where all the following constraints are satisfied (B,C,D are calculated once J is defined):

Variation 1:

1 - Only N members of J are not zero. N << m.

2 - 0 <= J[i] <= M (J has only integers)

3 - B[m-1]/B[0] -1 >= K/100.

4 - Average(D)/StandardDeviation(D) >= S

Variation 2:

1- Only N members of J are not zero. N << m.

2a- 0<= |J[i]| <= M (J can have negative numbers - integers)

3- B[m-1]/B[0] - 1 >= K/100.

4- Average(D)/StandardDeviation(D) >= S

To find J, it is required to use constraint solving package (and not random selection).

We recommend using [url removed, login to view] GECODE constraint solver.

The project will have several continuation based on success in this stage.

We will provide you with A and N,M,K,V,S numbers to test your program and we will have other test cases that we will test once you provide your code.

All rights on the code will belong to us.

we require readable and good software architecture, we will perform code review on the supplied solution.

Habilidades: Programação C++ , Arquitetura de software