linear-equation

How to solve systems of XOR equations?

折月煮酒 提交于 2019-12-01 03:17:46
问题 I have to solve a system that consists of 32 xor equations, each involving 15 of 32 variables. One would look like this: i[0] = p[0] ^ p[4] ^ p[5] ^ p[10] ^ p[11] ^ p[20] ^ p[21] ^ p[22] ^ p[23] ^ p[25] ^ p[26] ^ p[27] ^ p[28] ^ p[30] ^ p[31] i[n] and p[n] being 16 bit integers. So as I understand I would end up with a 32x32 matrix (containing only 1s and 0s) and a 32 result vector. Apparently Gaussian elimination is what I need but I can't wrap my mind around the problem, could someone give

Solving a linear equation

落花浮王杯 提交于 2019-11-26 20:40:32
I need to programmatically solve a system of linear equations in C, Objective C, or (if needed) C++. Here's an example of the equations: -44.3940 = a * 50.0 + b * 37.0 + tx -45.3049 = a * 43.0 + b * 39.0 + tx -44.9594 = a * 52.0 + b * 41.0 + tx From this, I'd like to get the best approximation for a , b , and tx . Cramer's Rule and Gaussian Elimination are two good, general-purpose algorithms (also see Simultaneous Linear Equations ). If you're looking for code, check out GiNaC , Maxima , and SymbolicC++ (depending on your licensing requirements, of course). EDIT: I know you're working in C

Solving a linear equation

百般思念 提交于 2019-11-26 07:42:54
问题 I need to programmatically solve a system of linear equations in C, Objective C, or (if needed) C++. Here\'s an example of the equations: -44.3940 = a * 50.0 + b * 37.0 + tx -45.3049 = a * 43.0 + b * 39.0 + tx -44.9594 = a * 52.0 + b * 41.0 + tx From this, I\'d like to get the best approximation for a , b , and tx . 回答1: Cramer's Rule and Gaussian Elimination are two good, general-purpose algorithms (also see Simultaneous Linear Equations). If you're looking for code, check out GiNaC, Maxima,