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
-3
votes
3 answers

how to find consecutive composite numbers in R

I want first 'n' consecutive composite numbers I searched command for finding consecutive composite numbers, but i got the result proving for that thorem. I didn't get any command for that..please help me to slove this problem in R.
aarthi
  • 85
  • 5
-3
votes
1 answer

C# Algebra use in Unity "solve for X"

Hey ill keep this brief since its a basic question, is there anyway to solve for X using C#
Rejnaps
  • 113
  • 2
  • 12
-3
votes
1 answer

How would de Morgan's law apply to ((A.B)`.B)`

I am at the start of my A-level computing course, but I have gotten stuck on de Morgan's law, If we have the expression (pronounced: Not(A And B) And B all Not) How would de Morgan's law apply to that? And can anyone explain me how you handle the…
Jort de Bokx
  • 25
  • 1
  • 6
-3
votes
2 answers

Odd behavior with division in Python

I'm completely stumped dealing with something quite simple. The following lines are a part of a much much larger program. Thing and stuff are two objects on a grid, and I need to find the angle between them, in relation to the y-axis. math.atan…
Asgeir
  • 727
  • 3
  • 9
  • 20
-3
votes
2 answers

Calculate the algebraic expressions in C#

Calculate the algebraic expression Z, for which n is inputted by user. Use 2 for loops to solve the problem. My code so far: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespace…
user2925251
  • 117
  • 1
  • 1
  • 6
-3
votes
5 answers

Multiplying out negated terms in boolean algebra?

I'm just learning boolean algebra at the moment. I read that for XOR we can rearrange the expression (A + B) . ¬(A + B) = A.¬A + A.¬B + B.¬A + B.¬B = A.¬B + B.¬A I can understand this but I'm unsure how I would proceed multiplying out an…
Martin Smith
  • 438,706
  • 87
  • 741
  • 845
-4
votes
1 answer

reverse engineer equation to convert ciphertext to plaintext

I have the following formula: ciphertext[i] = ((plaintext[i] -'a' + k) % 26) + 'a'; I'm trying to solve for plaintext[i] given ciphertext[i]. I'm using a vigenere cipher. If I convert plain text to cipher text shouldn't there be a way to…
DCR
  • 14,737
  • 12
  • 52
  • 115
-4
votes
2 answers

why does this javascript algebraic equation give a result of NaN?

I have this javascript code, and it is supposed to solve for x and y, but the result it gives is NaN. function calculate(x,y){ var firsttrans="1"; var secondtrans="2"; var a=parseInt(firsttrans, 10); …
-4
votes
2 answers

How do the definitions of *, / and % guarantee that a/b * b + a%b == a?

This is true according to Straustrup in PPP, page 68. Using algebra I can reduce it to a/b * b + a%b == a a + a%b == a, // b in numerator and denominator cancel each other But that still doesn't explain the proof.
etonw
  • 9
  • 2
-4
votes
1 answer

What formula solves this equation?

I'm trying to solve the following problem. I have the following data pieces, and am tying to solve for the item selling price: W = net profit, 10% of item cost (X) X = item cost Y = flat rate fee Z = variable fee, 15% of total selling price S =…
bumbles
  • 191
  • 1
  • 1
  • 11
-4
votes
1 answer

finding MAX value with relational algebra?

how do i find a max value in a table of numbers with relational algebra? or how should the relational algebra code be formed?
-4
votes
1 answer

What is 6.280369834735099E-16 in just 3 decimal places? (Like x.xxx)

I just need the answer in 3 decimal places. How much is it? Is the answer 0.628 or should I put 16 zero's before 6, in that case the answer might be 0.000 in 3 decimal places.
Ahmad Ali
  • 1
  • 2
-4
votes
1 answer

Convert loop into mathematical equation

How would I represent this for loop in a mathematical equation? double n = 1; double x = Math.pow(3, n); for(double i = 0; i < n; i++){ x = x + Math.pow(3, i); } Sorry wrote it in Java in a hurry.
-5
votes
1 answer

Quadratic Algebra advice for Array like return function

I have a problem. I want to write a method, which uses the PQ-Formula to calculate Zeros on quadratic algebra. As I see C++ doesn't support Arrays, unlike C#, which I use normally. How do I get either, ZERO, 1 or 2 results returned? Is there any…
Liwu
  • 14
  • 1
  • 6
-5
votes
1 answer

how to solve age problems in algebra maths?

This is an problem regarding age. I don't know how to solve this problem. Please help me. The problem is > A man is 5 times as old as his son. 2 years ago the sum of squares of > their ages was 11, 14. find the present age of son?
user1756650
  • 37
  • 1
  • 5
1 2 3
58
59