Coder Social home page Coder Social logo

wonszrzeczny's Projects

problem640 icon problem640

incorrect solution to problem 640. Used a heuristic approach, the card with the lowest probability out of the rolled options is turned face down, if there is no such card the card with the highest probability is turned face up. The expected value can be then calculated from the transition matrix of the markov chain. Very surprising this doesn't work! I guess it has to do with the fact some of the options are not independent, and this is where my intuition failed me. Works for n up to n=4

project-euler-114-counting-block-combinations-35 icon project-euler-114-counting-block-combinations-35

Problem had difficulty of 35%, solved using dynamic programming. Let t(n) be number of combinations of blocks such that last block ends in cell n. Then t(n) is the sum of t(k) for k<=n-l-1 for each possible length of the ending block l. Obviously t(3)=1. Obviously number of combinations is the sum of t(x) for x<=n +1 since we can also have no red blocks.

project-euler-258-lagged-fibonacci-sequence-70 icon project-euler-258-lagged-fibonacci-sequence-70

Problem had difficulty of 70%, solved using logarithmic matrix exponentiation, before I knew about Cayley-Hamilton theorem. Run time: long, since the matrices become dense around millionth power, could be done much faster by calculating x^(10^18) modulo the characteristic equation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.