Questions tagged [computer-algebra]

56 questions
15
votes
7 answers

How can a computer deal with real numbers

Computers are an exceptionally powerful tool for various computations, but they don't excel at storing decimal numbers. However, people have managed to overcome these issues: not storing the number in a decimal format, which is limited to very few…
Robert
  • 185
  • 1
  • 5
15
votes
2 answers

Complexity of computing matrix powers

I am interested in calculating the $n$'th power of a $n\times n$ matrix $A$. Suppose we have an algorithm for matrix multiplication which runs in $\mathcal{O}(M(n))$ time. Then, one can easily calculate $A^n$ in $\mathcal{O}(M(n)\log(n))$ time. Is…
11
votes
3 answers

Decidability of a problem concerning polynomials

I have come across the following interesting problem: let $p,q$ be polynomials over the field of real numbers, and let us suppose that their coefficients are all integer (that is, there is a finite exact representation of these polynomials). If…
042
  • 706
  • 4
  • 10
11
votes
2 answers

Decidability of checking an antiderivative?

Let's suppose I have two functions $F$ and $G$ and I'm interested in determining whether $$F(x) = \int G(x)dx.$$ Let's suppose that my functions are composed of elementary functions (polynomials, exponentials, logs, and trigonometric functions), but…
11
votes
0 answers

Does Automatic Differentiation handle conditional branches, if yes how?

I'm trying to understand how Automatic Differentiation (AD) works. For simple algebraic operation, I get the chain rule thing. But, when the code contains conditional statement like 1: test_sign = x*y < 0 2: if test_sign : 3: biggest =…
user10018
8
votes
4 answers

Constructing a data structure for a computer algebra system

In thinking about how to approach this problem I think several things will be required, some tivial: An expression tree where non-leaf node is an operation (not sure if that part is redundant), but not every node has just two children. All nodes…
soandos
  • 1,143
  • 2
  • 10
  • 23
8
votes
0 answers

Complexity of computer algebra for systems of trigonometric equations

As discussed in this question, I drafted a spec algorithm that hinges on finding a specific root of a system of trigonometric equations satisfying the following recurrence: $\qquad f_{p_0} = 0\\ \qquad p_0 = 2\\ \qquad \displaystyle f_{p_n}(x) =…
6
votes
1 answer

cannot construct the infinite type

I am trying to learn haskell and could not configure it out, why following code snippet can not get compiled: *Uncurry> applyTwice f x = f f x :14:20: error: • Occurs check: cannot construct the infinite type: t ~ t -> t2…
zero_coding
  • 357
  • 4
  • 11
5
votes
1 answer

How to calculate sum of binomial coefficients efficiently?

I want to compute the sum $$\binom{n}{0}+\binom{n}{2}+\binom{n}{4}+\binom{n}{6}+\dots+\binom{n}{k} \bmod 10^9+7$$ where $n$ and $k$ can be up to $10^{14}$ and $k\le n$. I found several links on stack overflow to calculate sum of binomial…
srd091
  • 61
  • 4
5
votes
2 answers

Constant problem for discrete functions

Is there an algorithm to decide whether a closed-form expression over integer variables using, say, $\{+,-,\times,\div,\text{^},\lfloor\text{lg}\rfloor,!,()\}$, or some other useful set of operators, is everywhere zero? For example, is $(jk)^2…
5
votes
1 answer

Abstract algebra and programming languages

Quite often, I stumble upon abstract algebra concepts like initial algebra, free algebra, and similar while reading papers on programming languages. For instance, in papers on algebraic data types, monads, separation logic, models of polymorphic…
5
votes
4 answers

Using a computer algebra system to optimize mathematical expressions

This is something I've been wondering for years. Software like Mathematica is great at manipulating expressions into simplified, factorized, and other forms. I'm wondering if there's a way, theoretically and/or practically, to find the form that has…
Brent
  • 2,583
  • 3
  • 16
  • 23
4
votes
4 answers

Computer Algebra: Algorithms for solving equations symbolically

As a hobby, I have written a basic computer algebra system. My CAS handles expressions as trees. I have advanced it to the point where it can simplify expressions symbolically (i.e., sin(pi/2) returns 1), and all expressions can be reduced to a…
4
votes
2 answers

Using Brzozowski's derivatives method to construct a minimal DFA

so I am currently learning about dfa and nfa and i came across the following question which requires me to use Brzozowski's derivatives method to construct a minimal DFA recognizing the language defined by the rational expression below. I am having…
4
votes
1 answer

How does mathematical software evaluate symbolic sums?

Wolfram alpha is able to compute this sum: $$ \sum_{j=1}^n \binom{j}{2} = \frac{1}{6}(n-1)n(n+1). $$ How can Wolfram alpha do it? What kind of algorithm does it use?
张 源
  • 159
  • 3
1
2 3 4