Skip to main content

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).

1 vote
1 answer
123 views

How to draw more precise of iterations in this type of constructions?

In this question I made this construction Given a non-regular pentagon $A_1B_1C_1D_1E_1$ with no two adjacent angle having a sum of 360 degrees, from the pentagon $A_nB_nC_nD_nE_n$ construct the ...
pie's user avatar
  • 6,332
3 votes
1 answer
78 views

Why can Haskell lists be infinite in length whereas inductively defined sets must contain finite sized elements?

Sets that are defined inductively can only contain elements that finite in size (e.g., length, height, space). This can be intuitively proven by realizing that any element in such a set can be ...
Moonlit's user avatar
  • 33
2 votes
0 answers
49 views

Fractal Subdivision for Procedural Generation

This is my first attempt at creating a thread here, thus I'm not sure how much context I need to provide you. Please leave a commend if you need additional info. With that disclaimer out of the way, ...
James Sarantidis's user avatar
0 votes
1 answer
150 views

Book Recommendations for Learning Python for Mathematics.

Lately, I've been finding that I often need to compute various things and graph some pretty complicated functions. I've realized that learning to program, especially in Python, could be really helpful ...
Mathematics enjoyer's user avatar
0 votes
0 answers
20 views

How to solve a paths optimization problem in node-labeled and weighted graphs

I am having trouble finding a way to optimize this problem in Python. Even if it is not exact, I am trying some heuristics. Let $G = (V,\mathbf{L}, E,\mathbf{W})$ be a graph where $V$ is the set of ...
The Bosco's user avatar
  • 1,965
2 votes
1 answer
29 views

How to Find Closest Average for a set of variables from Multiple Sets of Numbers

I'm working on a problem where I have several sets of numbers and I need to find the closest average for a set of target values by combining numbers from these sets. For example, let's say I want to ...
4DBug's user avatar
  • 21
0 votes
1 answer
32 views

How can I make a vector of the products of the elements $(a_0b_0,a_0b_1,a_1b_0,a_1b_1)$ from the vectors $(a_0,a_1)$, $(b_0,b_1)$?

Given the vectors $$\bar{a}=\left(\begin{array}\\a_0\\a_1\end{array}\right), \hspace{5pt} \bar{b}=\left(\begin{array}\\b_0\\b_1\end{array}\right) \in \mathbb{R}^2,$$ is there any way to get the ...
Truls Henriksson's user avatar
2 votes
2 answers
160 views

Is everything an object in Math, just like in Objected-Oriented Programming? (Tao's Analysis I)

I am reading Tao's Analysis I, and there are a number of passages which seem to suggest an object-oriented point of view of mathematics reminiscent of the object-oriented programming with which I, as ...
Princess Mia's user avatar
  • 2,947
0 votes
0 answers
34 views

Circular Breakout Game: time or collisions needed to reach nth layer

Shower thoughts... A tiny ball starts inside a unit circle, surrounded by fixed concentric circles of increasing integer radius length. So it starts in is the 0-th "level". The ball moves in ...
vallev's user avatar
  • 323
0 votes
0 answers
23 views

Solving systems of linear algebraic equations in singular case

I want to solve this system: $A \in \mathbb{R}^{n \times n}, \quad Ax = b, \quad det(A) = 0$ Hence, there are either no solutions or there are infinitely many of them, then I want to find a pseudo-...
Mr Robot's user avatar
1 vote
0 answers
37 views

Rotation invariant representation of strings

I came across the following simple programming question: You need to create a boolean function that will return True if you get String A by shifting the alphabets in String B. Example: ...
moe asal's user avatar
  • 121
12 votes
6 answers
1k views

Book recommendations for Combinatorics for Computer Science Students

I am a computer science student with an interest in competitive programming. I am currently looking to deepen my understanding of combinatorics, as it is a crucial part of algorithm design and ...
Sersawy's user avatar
  • 345
7 votes
4 answers
2k views

Is it possible to find sum of x^x from a to b without using summation but rather a less computationally heavy method?

I don't know if I have an odd question, or if this has been asked before (research has not provided me with an answer or question about this). But I have a large amount of summation I need to do, ...
DaisyLlife's user avatar
0 votes
0 answers
28 views

Determine if point can be projected on any segment in polyline

I am trying to implement a script that determines if a series of points can be projected on any segment of a polyline. The projection must be exactly on the segment, not in the rest of the line ...
NeuroTheGreat's user avatar
0 votes
0 answers
18 views

Why adding functional derivative of entropy doesn't get an uniform distribution?

From https://mbernste.github.io/posts/functionals/, the functional derivative of entropy is $−1−logP_x(x)$. From my understanding, adding this derivative to a distribution, it will get an uniform ...
Mark's user avatar
  • 53

15 30 50 per page
1
2 3 4 5
49