Skip to content

Instantly share code, notes, and snippets.

@programulya
Last active August 29, 2015 14:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save programulya/659481e897de02408d57 to your computer and use it in GitHub Desktop.
Save programulya/659481e897de02408d57 to your computer and use it in GitHub Desktop.
Algo task for new cats
ENG
Solve the system of linear equations using Gaussian elimination (also known as row reduction) with the general element.
Calculate the X vector and vector of errors (E = B-A*X):
1*x2 + 3*x3 + 2*x4 = -1;
1000*x1 + 3*x2 + x3 - 5*x4 = -2;
-3*x1 + 4*x2 + x3 + 4*x4 = -1;
4*x1 - 2*x3 - 3*x4 = 4.
The program should contain:
1. Displaying the input data (via tables that user allows to modify);
2. Displaying the intermediate solutions;
3. Displaying the X and E vectors;
3. Unit tests for happy and unhappy paths.
Additional:
- Result should be reachable via URL (hosted on GitHub pages, deployed to Heroku/Nodejitsu/DigitalOcean, your own private server etc.);
- Source code should be published on your GitHub account and link should be provided to us via e-mail.
УКР
Розв'язати СЛАР (систему лінійних алгебраїчних рівнянь) методом Гаусса з вибором головного елементу.
Вивести вектор розв'язку і вектор нев'язок (E = B-A*X):
1*x2 + 3*x3 + 2*x4 = -1;
1000*x1 + 3*x2 + x3 - 5*x4 = -2;
-3*x1 + 4*x2 + x3 + 4*x4 = -1;
4*x1 - 2*x3 - 3*x4 = 4.
Програма має містити в собі:
1. Вивід вхідних даних (за допомогою таблиць, які користувач може редагувати);
2. Вивід проміжних результатів;
3. Вивід векторів X і E;
3. Тести для успішних/неуспішних сценарієв.
Додатково:
- Результат роботи програми повинен бути доступний по лінці (використовуючи GitHub pages, Heroku/Nodejitsu/DigitalOcean, ваш приватний сервер тощо);
- Програмний код повинен бути опублікований в вашому GitHub акаунті і лінка повинна бути відіслана нам по e-mail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment