Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Some throwaway explorations, mostly mathematical
Python C++ C Java
branch: master
Failed to load latest commit information.
knowledge Split into parser and solver.
.gitignore Powers of 2 starting with '2011'. Inhomogeneous diophantine approxima…
README update README
adjacent-multiples.py find sets S of n integers st for some k the multiples kS are consecut…
bad_calculator.py temporary hack in bad_calculator: not fixed
balls-bins.c fmt, fix
best_approximation.py Find all best rational approximations of x by brute force
card-sum-mod.py log n solution
cardguesswrong-old.py Trying to guess every card 'incorrectly' in a deck. Probability of su…
cardguesswrong.py Trying to guess every card 'incorrectly' in a deck. Probability of su…
continued_fraction.c Find all best rational approximations of x using continued fractions
dice-allnos.py Find expected number of times to throw a pair dice until all numbers …
dice-allnossim.py Find expected number of times to throw a pair dice until all numbers …
diophantine.java Fixes to someone else's answer. 20x1 + 5x2 + 10x3 = 100, etc.
fillones.sage MSE 47520: Expected time of a certain Markov chain
inhodioapprox-bf.cpp Powers of 2 starting with '2011'. Inhomogeneous diophantine approxima…
inhodioapprox-bf.py Powers of 2 starting with '2011'. Inhomogeneous diophantine approxima…
inhodioapprox.sage Powers of 2 starting with '2011'. Inhomogeneous diophantine approxima…
inhodioapprox.txt Powers of 2 starting with '2011'. Inhomogeneous diophantine approxima…
kth-combination.py Find the kth combination of r letters
log-convergence.py other output
looksay.cpp fmt, fix
monsters.sage add monsters.sage for MSE 711647
mse-38671-triples.py Find triples that have the same sum and product
mse-659036.hs let's ask some haskell users to review this
permut-.....CCCCCC.cpp fmt, fix
powers-mse42420.py When is the first digit of 2^n and of 5^n the same? And is it always 3?
pypermutations.py timeit results
so-21105154-partition.cc alternative version
so-21105154.cc Generating set partitions into equal-sized parts: second version, use…
sums.cc cleanup:
wordlist-rev.py order a wordlist in alphabetical order of the reverse of the words
wordlist-rev.txt order a wordlist in alphabetical order of the reverse of the words

README

adjacent-multiples.py                   [MSE 46964] Sets S of n integers s.t. kS is consecutive modulo m.
bad_calculator.py                       Multiply keeping k bits of precision 
best_approximation.py                   Brute-force solution to print all "best rational approximations"
cardguesswrong-old.py                   Older version of below.
cardguesswrong.py                       Dundee: guessing every card 'incorrectly' in a deck. Probability of succeeding.
continued_fraction-dw.py                From http://www.daniweb.com/code/snippet223956.html ; prints only convergents
continued_fraction.c                    "Best rational approximations" of a real number (plus a few extra ones TOFIX)
dice-allnos.py                          Expected no. of times to throw dice until all numbers 2 to 12 appear -- exact
dice-allnossim.py                       Expected no. of times to throw dice until all numbers 2 to 12 appear -- simul
diophantine.java                        Straightforward recursive solution to linear Diophantine equations
fillones.sage                           [MSE 47520] Expected time of a certain Markov chain
inhodioapprox-bf.cpp                    [MSE 46100] Powers of 2 starting with '2011'. Faster brute force.
inhodioapprox-bf.py                     [MSE 46100] Powers of 2 starting with '2011'. Brute force.
inhodioapprox.sage                      [MSE 46100] Inhomogeneous diophantine approximation in general.
inhodioapprox.txt                       [MSE 46100] List of those powers up to 1,000,000 (there are 216 of them).
kth-combination.py                      [MSE 36876] [SO 5878768] Print the kth combination of r letters.
looksay.cpp                             Testing a (wrong) heuristic about going backwards in the look-and-say sequence
mse-38671-triples.py                    [MSE 38671] Find triples that have the same sum and product.
permut-.....CCCCCC.cpp                  [MSE 36851] All permutations of ".....CCCCCC".
powers-mse42420.py                      [MSE 42420] When is first digit of 2^n and 5^n the same? And is it always 3?
pypermutations.py                       [SO 6534430] Compare three methods of generating all distinct permutations
tribonacci-period                       Period of Tribonacci sequence modulo m
Something went wrong with that request. Please try again.