# Questions tagged [programming]

For mathematical questions related to programming, and questions where a computer-aided solution is strongly suggested. A strong connection with a mathematical topic is needed to make programming questions on-topic. This should not be the only tag. Consider also using the tags (algorithms), (numerical-methods), or (linear-programming).

501 questions
Filter by
Sorted by
Tagged with
42 views

### Is there a word to represent the Domain and the Range of a function?

Is there a word that represents both the domain and the range of a function? I am looking for a good variable name for a program we are creating and we need a word that encompasses both of these ...
50 views

### Algorithm that finds all the recurring substrings in a string [closed]

I need to find all the recurring substrings in a string without considering the "overlapping" recurring substrings. For example if I have ABCDABCDACCACCACCABDC, here the recurring substrings ...
53 views

### How to create variations of a function that have the same start/end point?

I need to create some fake data that sort of conforms to the slow start, randomness in the middle, then a slow finish. I've screwed around with a graphing calculator and normalized this simple ...
51 views

### Why does consecutive averaging not lead to a good solution to a linear system?

I have been working on a program which requires me to get a solution for a huge system of linear equations (3,132 variables and 3030 equations). I was having trouble finding a previous implementation ...
40 views

### Slope of the bisector given 3 points

Diagram: You have 3 points: A, B, C and there are 2 lines: AB and AC that form an angle in the triangle. Then the bisector line of those 2 lines goes through A. I want the slope of that bisector. I ...
23 views

### How to define the shapes and orientations of orbitals mathematically in a cartesian coordinate system?

I am not able to match the $d$ and $f$ orbitals in atomic structure worksheet given as homework in Science (see the attached image). I was able to match the $p_{x}$ , $p_{y}$ , and $p_{z}$ orbitals. ...
40 views

### How to find all the lines which passes through n number of bars.

This is a geometry question, a generalized form of another problem i am trying to solve. The data sets given are as follows Every bar on Y axis has a two coordinates given (starting and ending) the ...
24 views

### Stuck solving a minimum problem

I was doing some studying to improve my chances for an upcoming programming test, and I came across this problem. Trying to understand this leaves me quite confused about the correct answer and ...
73 views

### GAP on Jupyter Notebook

I wanted to learn GAP as it is certain that it will be helpful in the future for my research. I wanted to try GAP in Jupyter notebook in GitHub. I have tried following the step i.e. launch binder and ...
16 views

123 views

### How helpful is learning Python to mathematicians? [closed]

How helpful is learning Python to mathematicians, may it be pure or applied mathematicians? I'm interested to pursue a career in mathematics. If I learn Python will it be helpful?
168 views

96 views

### How to for loop in Math like C? [closed]

In C, we can for loop easily. But I don't know how we can loop in Math like C. For example, I want to loop in Math like this C code: ...
31 views

### Roll four 6D. Ignore the largest result. Will the sum of the remaining results be less than 8?

I thought I could make an overview of possible outcomes when rolling four dice. So look at possible sums when rolling four dice, 4-24, and which combinations that give these sums. Then one can exclude ...
30 views

### Two points weighting formula

This has maybe an obvious answer, but I think I will ask it here since I don't have enough math to compensate for solving this problem. I'm creating recommendation systems and wants to assign weights ...
32 views

### Convert a range of integers to another range of integers while keeping an even distribution

I have a random integer x in the range [A, B] (inclusive). Is it always possible to convert x...
29 views

### Accept reject sampling for univariate pdf

I am working on generating near uniform samples from an arbitrary univariate truncated pdf (from $[x_1, x_2]$) using Python, the form of the unnormalized pdf is $\sqrt{P(x)}$, where P(x) is a ...
22 views

### Solving PDE and simulating in R

I'd like to simulate the following PDE in R, but I'm rather new to this topic and don't know how to do it or which package to use. The PDE is about a process $u_t(x)$ and originates from a diffusion ...
26 views

### How to deal with Statistical outliers in Rstudio

I have some outliers in a data set that I would like to deal with. After doing some reading into the topic I came to the conclusion that the trimmed mean function and the boxplot (in rstudio) function ...
21 views

### Parameterise a line represented by n points

I'm trying to write a program where I draw points at constant increments, regardless of how curvy a road is. For example, a straight line of length 10 and increment 2 would have 5 points spaced 2 ...
Okay, so this is what the textbook says: "The user will input n points in $R^2$, the program needs to determine wether or not this is a n-angle polygon and if so calculate the area and perimeter ...