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
-2
votes
1 answer

Middle point of weighted X Y

I'm trying to get the middle point of X Y and Weight values, but I didn't found the correct formula to get that. For example in the picture I've added a few points with a few weights and I need to found the middle point base on the weights.
Sebas Bejenaru
  • 129
  • 1
  • 1
  • 10
-2
votes
1 answer

VBA Sigma Formula With Factorial

Need to count sigma with x = 0.7 Thats my version of code, but it doesnt work properly, need help: Private Sub UserForm_Click() Dim k As Long Dim Numerator As Double Dim Result As Double x = 0.7 For k = 0 To infinity Step 1 Numerator = 0 …
xktg
  • 41
  • 5
-2
votes
2 answers

Using Python, how can I multiply all matching integers in a list and then add the remaining integers

I am working to recreate a dice game known as Knucklebones in Python as a fun personal project. For the game logic, I need to multiply all matching values in a list and then add the remaining values. Example 1: numbers = [3, 3, 2] This list should…
Christian Gentry
  • 811
  • 3
  • 10
  • 15
-2
votes
2 answers

How can I evaluate an expression string containing variables?

In Unity I'm trying to make it so you enter an expression and then it outputs a value but I want to use variables like: x = 10 "x + x * 10" ^ outputs 200
-2
votes
1 answer

What the meaning of AB+C?

I want to know that what is the truth table and logic circuit gate for following Boolean expression. (A+B).(AB+C) I have a doubt in what the meaning of AB+C please, I want some help to get through this. It's important to my ICT examination.
-2
votes
1 answer

How do I let the program understand the input

I'm making a calculator that can add, subtract, multiply, and divide algebraic terms. I've already made a class that can "make" the algebraic terms, and as of now I want the computer to ask me for an algebraic expression, read it, then register it…
-2
votes
1 answer

Negative one to the power of two question - i.e. (-1)**2

Can someone explain the difference between these two expressions in Python: (-1)**2 == 1 -1**2 == -1 Why do the parentheses change the outcome?
-2
votes
1 answer

How do you find outer points in a circle from a point mathematically?

Trying to find a set of points that would allow a point to seemingly connect to a circle, like the image below however there is no overlap and it lines up with the edge of the circle. Apologies if this is hard to understand it is hard to explain.
-2
votes
1 answer

Python: I write a code to find value of, x, y or (x+y)2, if given any two parameters among them. That is running fine, until either x or y is float

I edited code here to assign variables to float. It is not working. This code is to find value of either factor in (x+y)^2 = x^2 + 2xy + y^2 There are three factors, x, y and result. Value must be available for any two. The only problem here is, you…
-2
votes
1 answer

Program to verify if the quadratic equation has roots or not

I am solving a problem to Express a number as the sum of consecutive numbers. So I figured out if we get the roots of quadratic equation form with the formula n((n+1)//2), we can do it o(1) time complexity. Suppose if we have any number x, if the…
-2
votes
1 answer

how to find the angle of reflection of the beam from the line

I have a line (x1, y1) (x2, y2) and a ray at an angle “a”, I need to find the angle of reflection of the ray from this line, as in the picture below. Thanks
Lesti001
  • 19
  • 2
-2
votes
1 answer

Check If Digits in Input Different

I need to check if all digits in number are different. I.e: 123 - would be spotted as "different", but 121 wouldn't as the first item is equal to the last item. Here's what I come up with : n = int(input("Enter number of elements : ")) a =…
Yan
  • 1
  • 3
-2
votes
4 answers

Mo' Money- Making an "algorithm" to solve two variable algebra problems

A cash drawer contains 160 bills, all 10s and 50s. The total value of the 10s and 50s is $1,760. How many of each type of bill are in the drawer? You can figure this out by trial and error (or by doing algebra with pencil and paper), but try…
-2
votes
1 answer

How do I find the amount of levels in an Octree if I have N nodes?

If the octree level is 0, then I have 8 nodes. Now, if the octree level is 1, then I have 72 nodes. But if I have (for example) 500 nodes, how do I calculate what the level would be?
Merry
  • 3
  • 2
-2
votes
1 answer

Solve least squares regression and force through 0 intercept in java

I am trying to get the slope for the best first line: SimpleRegression simpleRegression = new SimpleRegression(); simpleRegression.addData(...); ... simpleRegression.getSlope() simpleRegression.getIntercept() I am trying to get it to force through…
Tim Nuwin
  • 2,775
  • 2
  • 29
  • 63