Project Euler Problem #103

Problem #103 concerns sets of integers with ordered sums of all possible subsets. The question reads: Project Euler Problem 103: Special subset sums: optimum Let S(A) represent the sum of elements in set A of size n. We shall call it a special sum set if for any two non-empty disjoint subsets, B and C, the …

Project Euler Problem #102

Problem #102 concerns determining whether a point is within the triangle formed by a triple of coordinates. The question reads: Project Euler Problem 102: Triangle containment Three distinct points are plotted at random on a Cartesian plane, for which -1000 ≤ x, y ≤ 1000, such that a triangle is formed. Consider the following two triangles: A(-340,495), B(-153,-910), …

Project Euler Problem #101

Problem #101 concerns polynomials that approximate higher degree polynomials based on consecutive outputs. The question reads: Project Euler Problem 101: Optimum polynomial If we are presented with the first k terms of a sequence it is impossible to say with certainty the value of the next term, as there are infinitely many polynomial functions that can model …

Project Euler Problem #100

Before I begin, I’d like to state that I will probably take a break from Project Euler for a little while. While writing these first 100 blog posts, I finally accomplished my goal of solving the first 100 problems on Project Euler. When I started, I never expected to make it this far. Writing a …

Project Euler Problem #99

Problem #99 concerns comparing large exponential numbers. The question reads: Project Euler Problem 99: Largest exponential Comparing two numbers written in index form like 211 and 37 is not difficult, as any calculator would confirm that 211 = 2048 < 37 = 2187. However, confirming that 632382518061 > 519432525806 would be much more difficult, as both numbers contain over three million …

Project Euler Problem #98

Problem #98 concerns searching for anagrams in a list of words. The question reads: Project Euler Problem 98: Anagramic squares By replacing each of the letters in the word CARE with 1, 2, 9, and 6 respectively, we form a square number: 1296 = 362. What is remarkable is that, by using the same digital …

Project Euler Problem #97

Problem #97 concerns finding the last ten digits of a large Mersenne Prime. The question reads: Project Euler Problem 97: Large non-Mersenne prime The first known prime found to exceed one million digits was discovered in 1999, and is a Mersenne prime of the form 26972593−1; it contains exactly 2,098,960 digits. Subsequently other Mersenne primes, …

Project Euler Problem #96

Problem #96 concerns solving Sudoku grids. The question reads: I must confess, this is one of the problems where I’m not really sure why my solution is as efficient as it is. It took me a lot of troubleshooting to find a solution which could solve all of the grids in a reasonable amount of …

Project Euler Problem #95

Problem #95 concerns chains formed by repeatedly replacing a number with the sum of its proper factors. The question reads: Project Euler Problem 95: Amicable chains The proper divisors of a number are all the divisors excluding the number itself. For example, the proper divisors of 28 are 1, 2, 4, 7, and 14. As …

Project Euler Problem #94

Problem #94 concerns triangles that are nearly equilateral and have integer area. The question reads: Project Euler Problem 94: Almost equilateral triangles It is easily proved that no equilateral triangle exists with integral length sides and integral area. However, the almost equilateral triangle 5-5-6 has an area of 12 square units. We shall define an almost equilateral triangle to …

Design a site like this with WordPress.com
Get started