All Questions
Tagged with mathematics python
10
questions with no upvoted or accepted answers
4
votes
0
answers
661
views
A Very Simple Support Vector Machine with SMO Algorithm Implementation
Context. I was looking for some simple implementation of SVM with the SMO algorithm that can be used as an in-class problem together with a simple mathematical explanation of how it works.
The problem ...
2
votes
0
answers
82
views
Python script that generates images using Thue-Morse sequence
In mathematics, the Thue–Morse sequence, or Prouhet–Thue–Morse sequence, is the binary sequence (an infinite sequence of 0s and 1s) obtained by starting with 0 and successively appending the Boolean ...
2
votes
0
answers
217
views
Maximizing Efficiency of Collatz Conjecture Program Python
My question is very simple.
I wrote this program for pure entertainment. It takes a numerical input and finds the length of every Collatz Sequence up to and including that number.
I want to make it ...
2
votes
0
answers
203
views
Gradient descent algorithm for solving localization problem in 3-dimensional space
Task
This code accomplishes the Time Difference of Arrival (TDoA) multilateration problem (see) using gradient descent (known otherwise as steepest descent).
Goal
I'm looking to:
a) Improve speed:
In ...
2
votes
0
answers
97
views
Shutting down all lamps with minimum number of switch presses
I found an optimization problem written in Finnish but I will translate it into English. The following is an example case.
I have \$n=120\$ lamps in a circle, and enumerated by \$L_1,…,L_{120}\$. ...
2
votes
0
answers
737
views
Python RSA/DSA File Cryptography, Key Generation, Key Protection
I have forked a previous version of my script, critiqued here: Generate public/private keys, encrypt, decrypt, sign, verify
This program allows you to encrypt and decrypt raw files using RSA keys ...
2
votes
0
answers
581
views
Factoring a polynomial with integer coefficients
I haven't programmed in a while and need to improve my code in any way possible: efficiency, readability, etc. This program is for getting integer coefficients of any polynomial and factoring: ex.
$$ ...
1
vote
0
answers
174
views
Applied Solution Based On Polya Enumeration Theorem
Problem
A function solution(w, h, s) that takes 3 integers and returns the number of unique, non-equivalent configurations that can be found on a grid w blocks wide, h blocks tall and s possible ...
1
vote
0
answers
563
views
Python palindrome function; is it possible to write it without using string conversion?
I hope this question is okay to ask on Code Review; this is a little function I wrote in Python 2.7.12 that checks if a number is a palindrome. It works fine but I'd like to know if there is a purely ...
1
vote
0
answers
1k
views
Snell's law using Zoeppritz equation by matrices
I have created the following code to calculate Snell's law angles, based on Zoeppritz equations on complex plane. The code works, seems it is returning valid values, but after all the code just looks ...