Questions tagged [algebra]

Algebra is the branch of mathematics concerning the study of the rules of operations and relations, and the constructions and concepts arising from them. Questions about algebra that are not related to programming are off-topic at Stack Overflow.

Together with geometry, analysis, topology, combinatorics, and number theory, algebra is one of the main branches of pure mathematics.

Elementary algebra, often part of the curriculum in secondary education, introduces the concept of variables representing numbers. Statements based on these variables are manipulated using the rules of operations that apply to numbers, such as addition. This can be done for a variety of reasons, including equation solving. Algebra is much broader than elementary algebra and studies what happens when different rules of operations are used and when operations are devised for things other than numbers. Addition and multiplication can be generalized and their precise definitions lead to structures such as groups, rings and fields, studied in the area of mathematics called abstract algebra.

873 questions
4
votes
1 answer

Python Search Algebra Function

I am trying to make a search function to work with algebra problems. I want something like Wolfram Alpha but I am building a python framework for it. It should be able to figure out multiple variables and equations on both sides of the equal sign. I…
user502039
4
votes
4 answers

boolean operations with integers

This is probably pretty basic... but I don't seem to get it: How does (2 & 1) = 0 (3 & 1) = 1 (4 & 1) = 0 etc.. This pattern above seems to help find even numbers or (0 | 1) = 1 (1 | 1) = 1 (2 | 1) = 3 (3 | 1) = 4 (4 | 1) = 5 (5 | 1) = 5 I know…
David Brown
4
votes
1 answer

Is Rabin-Miller primality test algorithm using modular squaring correct?

I have recently come across this piece of code for Rabin-Miller algorithm, as decribed here: from random import randint def _bits_of_n(n): """ Return the list of the bits in the binary representation of n, from LSB to MSB …
michnovka
  • 2,880
  • 3
  • 26
  • 58
4
votes
3 answers

How to move a marker on a straight line between two coordinates in Mapbox.js

Below is some code I found for moving a marker but I want to move a marker on straight path between two coordinates can any one help these are the coordinates [90.40237426757811,23.75015391301012],[88.34930419921875,22.573438264572406] I need the…
Pushpender
  • 193
  • 1
  • 12
4
votes
2 answers

Can systems of multivariate cubic equations be solved in polynomial time in general?

To my knowledge, there exist polynomial-time algorithms for systems of multivariate quadratic equations, i.g., XL(eXtended Linearization). But I don't know if there exists a polynomial-time algorithm for a general system of multivariate cubic…
4
votes
1 answer

Sign of a symbolic algebraic expression

Is there any algorithm that can find the sign of an arbitrary symbolic algebraic expression given in a "Tree - Form"? I know that a general algorithm doesn't exist because the zero recognizion problem is undecidable for an arbitrary expression, but…
Andrei Kh
  • 201
  • 1
  • 5
4
votes
1 answer

Single variable derivative of expression(symbolic)

I have written an HTML code using JavaScript to differentiate a single variable function. My code is here. I have used Mathjax to print the output. But the output produced is not simplified. For example, the derivative of sin(x)/cos(x) is produced…
4
votes
3 answers

Area between two lines inside the square [-1,+1] x [-1,+1]

I'm working on a project in Matlab and need to find the area between two lines inside of the square [-1,+1]x[-1,+1] intersecting in a point (xIntersection,yIntersection). So the idea is to subtract the two lines and integrate between [-1,…
Matteo
  • 7,924
  • 24
  • 84
  • 129
4
votes
0 answers

what is twitter's interest in abstract algebra?

Why would a company like Twitter be interest in algebraic concepts like groups, monoids and rings. https://github.com/twitter/algebird All I could find is: Implementations of Monoids for interesting approximation algorithms, such as Bloom filter,…
john mangual
  • 7,718
  • 13
  • 56
  • 95
4
votes
1 answer

Shapiro Wilks in java

I want to make a function that uses the Shapiro-Wilk test, but I'm not sure how I should go about using the Normal distribution to calculate the constant that is multiplied with the order statistic in the numerator.…
ltsimpso
  • 93
  • 2
  • 8
4
votes
1 answer

what is the method for WolframAlpha to get the integer solution of indeterminate equation?

To input " 1/x+1/y-1/xy^2 = 3/4 " in wolframalpha ,It can get the integer solution Integer solution: x = 2,y = 3 How it get?
yibotg
  • 179
  • 1
  • 7
3
votes
2 answers

How to solve Linear Diophantine equations in programming?

I have read about Linear Diophantine equations such as ax+by=c are called diophantine equations and give an integer solution only if gcd(a,b) divides c. These equations are of great importance in programming contests. I was just searching the…
dark_shadow
  • 3,503
  • 11
  • 56
  • 81
3
votes
1 answer

Adjacent Neighbor Summation

If I am given the numbers [1,2,1] and I want to find the sum of each number with it's adjacent neighbors (in a ring) repeated a number of times. I can use the following formula: base case: [x=1, y=2, z=1] repeat 7 times. staring with index 0 or…
Justin
  • 4,196
  • 4
  • 24
  • 48
3
votes
3 answers

Matrix Algebra Using C++

I'd like to ask about mathematical operations of arrays. I am mainly interested in carrying out operations such as: vector products: C=A+B C=A*B where A and B are arrays (or vectors), and matrix products: D=E*F; where D[m][n], E[m][p],…
Adam Gosztolai
  • 242
  • 1
  • 3
  • 14
3
votes
2 answers

How to calculate the centroid of a matrix?

I have the following 5x5 Matrix A: 1 0 0 0 0 1 1 1 0 0 1 0 1 0 1 0 0 1 1 1 0 0 0 0 1 I am trying to find the centroid in MATLAB so I can find the scatter matrix with: Scatter = A*Centroid*A'
user1077071
  • 901
  • 6
  • 16
  • 29