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
10
votes
4 answers

I'm curious if Logic Programs can do algebra

I read a brief article about Prolog and Logic Programming. I'm curious if Logic Programs can do algebra. Like would you be able to ask what the Variable of X is in the equation 5+X = 7 and get an answer of -2?
James Scourtos
  • 691
  • 6
  • 7
10
votes
1 answer

Finite Field Linear Algebra Library for Haskell

I'm searching for a finite field linear algebra library for Haskell. Something like FFLAS-FFPACK for Haskell would be great :-). Of course, I checked hmatrix, there seems to be some support for arbitrary matrix element types but I couldn't find any…
Johannes Weiss
  • 52,533
  • 16
  • 102
  • 136
9
votes
4 answers

Determining coefficient of x^m term in (x^2 + x + 1)^n is even or odd

For a given integers n and m, determine that coefficient of x^m term in (x^2+x+1)^n is even or odd? For example, if n=3 and m=4, (x^2+x+1)^3 = x^6 + 3x^5 + [[6x^4]] + 7x^3 + 6x^2 + 3x + 1, so coefficient of x^4 term is 6 (=even). n and m is as…
square1001
  • 1,402
  • 11
  • 26
9
votes
2 answers

Calculus Limits with Java

I wish to calculate limits (calculus) with Java. I have the following class Limit that can calculate limits: package calculus; public final class Limit { private Limit() { } public static final double limit(Function function, double…
hyper-neutrino
  • 5,272
  • 2
  • 29
  • 50
9
votes
2 answers

How to set up quadratic equation for a ray/sphere intersection?

I'm researching the math for a ray tracer, but I'm not following a transition that is made in just about every article I've read on the subject. This is what I have: Formula for a sphere: (X - Cx)^2 + (Y - Cy)^2 + (Z - Cz)^2 - R^2 = 0 Where R is the…
Mike Pateras
  • 14,715
  • 30
  • 97
  • 137
9
votes
5 answers

Books & resources to teach myself Linear Algebra

I'm looking for books and resource to teach myself linear algebra to be used in 3D graphics programming. I prefer practical approaches to teaching over theoretical (even though math is what, 99.99% theory?) ones, so the dream resource for me would…
thr
  • 19,160
  • 23
  • 93
  • 130
8
votes
4 answers

Whats the reverse function of x XOR (x/2)?

Whats the reverse function of x XOR (x/2)? Is there a system of rules for equation solving, similar to algebra, but with logic operators?
fadedbee
  • 42,671
  • 44
  • 178
  • 308
8
votes
2 answers

Can I write a function that carries out symbolic calculations in Python 2.7?

I'm currently transitioning from Java to Python and have taken on the task of trying to create a calculator that can carry out symbolic operations on infix-notated mathematical expressions (without using custom modules like Sympy). Currently, it's…
Edwin
  • 2,074
  • 1
  • 21
  • 40
8
votes
1 answer

Is fromInteger supposed to be a ring homomorphism?

Until today I had the assumption that fromInteger in the Num class was a ring homomorphism. I had assumed this because integer is is coterminal so every ring must have a unique homomorphism from integer, so it made sense that Num, which is…
Wheat Wizard
  • 3,982
  • 14
  • 34
8
votes
4 answers

How can I implement this more efficiently

So I have a function (I'm writing this in a pseudo-functional language, I hope its clear): dampen (lr : Num, x : Num) = x + lr*(1-x) And I wish to apply this n times to a value x. I could implement it recursively: dampenN (0, lr, x) = dampen(lr,…
sanity
  • 35,347
  • 40
  • 135
  • 226
8
votes
6 answers

Algorithm for calculating number of fitting boxes

I've a client selling wine bottles. He uses boxes with space for 6 bottles, 12 bottles, 18 bottles and 21 bottles. But he only wants to accept orders which fit exactly into these boxes. There must not be any empty space inside. E.g. 33 is ok: 1x21…
Marco
  • 3,470
  • 4
  • 23
  • 35
8
votes
3 answers

Scientific Programming with Ruby

I was doing the mathematical calculations with python or octave because of availability of really nice functions and libraries at hand. But recently I gained interest in ruby and I wonder if there is an equivalent in Ruby to the numpy, scipy in…
systemsfault
  • 15,207
  • 12
  • 59
  • 66
8
votes
4 answers

Need a way to parse algebraic expressions in C

I need to parse algebraic expressions for an application I'm working on and am hoping to garnish a bit of collective wisdom before taking a crack at it and, possibly, heading down the wrong road. What I need to do is pretty straight forward: given a…
David
  • 95
  • 1
  • 7
8
votes
1 answer

Simplify algebraic expression

Possible Duplicate: Strategies for simplifying math expressions I have a mathematical expression parser which builds a tree to represent the expression. Say ,for example, I input 2+y+3+y, the internal representation of this would be: Now, we, as…
ErikTJ
  • 2,001
  • 3
  • 21
  • 38
7
votes
2 answers

Solving an overdetermined constraint system

I have n real number variables (don't know, don't really care), let's call them X[n]. I also have m >> n relationships between them let's call them R[m], of the form: X[i] = alpha*X[j], alpha is a nonzero positive real number, i and j are distinct…
Radu Dan
  • 73
  • 1
  • 5
1 2
3
58 59