## Search found 110 matches

- Thu Aug 15, 2019 7:35 pm
- Forum: Recreational
- Topic: Mystery of Problem 480.
- Replies:
**2** - Views:
**203**

### Re: Mystery of Problem 480.

Statistics: There are ~5*10^17 possible words in it. And a lot of them are readable. Now calculate all of their Numbers. Build sums of three of them: You should find a sum which appears multiple times. (see Goldbach's conjecture) It is guaranteed if there are at least 1.5*10^6 readable words. And th...

- Sun Jun 30, 2019 8:28 pm
- Forum: Number Theory
- Topic: Generate tuples of pairwise coprimes with limit on largest element
- Replies:
**2** - Views:
**213**

### Re: Generate tuples of pairwise coprimes with limit on largest element

You may work with a check-list for the primes:

1. Generate a list of all primes up to the limit

2. generate the first number by selecting primes (and powers) and cancel them out

3. go on for the 2nd, 3rd, ... number.

1. Generate a list of all primes up to the limit

2. generate the first number by selecting primes (and powers) and cancel them out

3. go on for the 2nd, 3rd, ... number.

- Mon May 20, 2019 9:34 pm
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 662
- Replies:
**6** - Views:
**3221**

### Re: Problem 662

For a smaller example 2x2: You can go: 0,0 - 0,1 - 0,2 - 1,2 - 2,2 0,0 - 0,1 - 1,1 - 2,1 - 2,2 0,0 - 0,1 - 1,1 - 1,2 - 2,2 0,0 - 1,0 - 1,1 - 2,1 - 2,2 0,0 - 1,0 - 1,1 - 1,2 - 2,2 0,0 - 1,0 - 2,0 - 2,1 - 2,2 --> 6 solutions only with step = 1 AND: (Two 1-steps and one 2-step) 0,0 - 0,1 - 0,2 - 2,2 0,...

- Sat Jan 12, 2019 12:06 am
- Forum: Recreational
- Topic: Some problem and user statistics
- Replies:
**4** - Views:
**4804**

### Re: Some problem and user statistics

What about the number of the best placements per person (ordered like in the olympic games)? 1. xyz (50 times 1st) 2. abc (26 times 1st) ... 19. dfg (40 times 2nd) ... Many of these statistics are interesting - but they are only as half as interesting, if you can not find your self in it. :wink: And...

- Wed Jan 02, 2019 11:28 pm
- Forum: News, Suggestions, and FAQ
- Topic: Code optimization techniques
- Replies:
**20** - Views:
**4329**

### Re: Code optimization techniques

I just changed your output so for each return, the current n is reported: -> the return is called twice as it's called by different function calls. For example fib(2) (the 4th call of fib) is startet, but it is still in progress until the result of fib(0) is returned. lookup[] = [-1, -1, -1, -1, -1,...

- Wed Jan 02, 2019 12:48 am
- Forum: News, Suggestions, and FAQ
- Topic: Code optimization techniques
- Replies:
**20** - Views:
**4329**

### Re: Code optimization techniques

It's only the return section of the previously called functions: The first calls of fib(5), fib(4), fib(3) and fib(2) did not immediately return - they need to call fib(n-1) and fib(n-2) first. So read it as follows: Stack: fib(5) (A.1) Call fib(5) -> nothing known; call fib(4) and fib(3) Stack: A T...

- Fri Dec 14, 2018 11:14 pm
- Forum: Discrete Mathematics
- Topic: Sorting...
- Replies:
**4** - Views:
**5262**

### Re: Sorting...

There is the problem of the handling of entries with equal values. So your "ArraySort" is not an algorithm for sorting, but for the mathematical union-sort operation. The algorithm of Array.sort() is not specified by the language it self: It can differ by the implementation - for primitive types, th...

- Wed Sep 12, 2018 5:10 am
- Forum: News, Suggestions, and FAQ
- Topic: New Language
- Replies:
**2** - Views:
**2626**

### Re: New Language

viewtopic.php?f=49&t=2903&p=31055&hilit ... ipt#p31055

It is already there.

It is already there.

- Thu Aug 23, 2018 8:03 pm
- Forum: Programming languages
- Topic: which compiler to use for c++ programs
- Replies:
**2** - Views:
**4454**

### Re: which compiler to use for c++ programs

You should clarify it: Do you mean websites?

Most of us use an installed compiler:

gcc, visual studio c++, intel or llvm

Most of us use an installed compiler:

gcc, visual studio c++, intel or llvm

- Tue Aug 21, 2018 9:20 pm
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 113
- Replies:
**1** - Views:
**664**

### Re: Problem 113

Yes - bouncing is stated clearly as neither increasing nor decreasing.

- Sun Aug 19, 2018 9:32 pm
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 039
- Replies:
**11** - Views:
**2936**

### Re: Problem 039

Right angle triangle should be clear enough. Only 1 angle of a degenerated triangle can be determined exactly: 0° between the two identical sides. The other two angles are undetermined. In any problem description, corner cases are named extra. (Integer 0, degenerated polygons,...) But this does not ...

- Thu Aug 09, 2018 11:25 pm
- Forum: Number Theory
- Topic: An Infinite Prime Number Generator
- Replies:
**5** - Views:
**5447**

### Re: An Infinite Prime Number Generator

For sure, mod 6 will have a better performance than mod 2 -> the speedup is around 1.4 ... 1.5 and for mod 30, we will have a speedup of 1.8 in comparison to mod 2. It is possible to optimize the performance of the higher versions as mod 6. But the max performance (n/2)/EulerPhi(n), which is only hi...

- Thu Aug 09, 2018 8:00 am
- Forum: Number Theory
- Topic: An Infinite Prime Number Generator
- Replies:
**5** - Views:
**5447**

### Re: An Infinite Prime Number Generator

I don't know how the checks will be compiled, but I think, there is a hidden complexity in the loop checking: e.g. res = k + step while res in D or res % 30 not in (1, 7, 11, 13, 17, 19, 23, 29): You iterate through all (uneven) multiples - even if you don't store them, but in the case mod 6, you on...

- Sun Aug 05, 2018 12:47 pm
- Forum: News, Suggestions, and FAQ
- Topic: Problem with progress badge?
- Replies:
**2** - Views:
**2212**

### Re: Problem with progress badge?

The graphic is not updated immediately after a problem is solved and sometimes, the browser cache stores an old version.

So: try to view the picture in 1 hour and reload it without cache (Ctrl + F5 in most browsers).

So: try to view the picture in 1 hour and reload it without cache (Ctrl + F5 in most browsers).

- Mon Jul 09, 2018 10:21 am
- Forum: Number
- Topic: an old maths olympiad question
- Replies:
**28** - Views:
**14933**

### Re: an old maths olympiad question

If n>3, there is no integer solution:

a = (n-2)/n * pi

1/1 = 1/(2-2cos(a)) + 1/(3-2cos(2a-pi))

-> n = 13.757

a = (n-2)/n * pi

1/1 = 1/(2-2cos(a)) + 1/(3-2cos(2a-pi))

-> n = 13.757

- Mon Jul 09, 2018 8:30 am
- Forum: Number
- Topic: an old maths olympiad question
- Replies:
**28** - Views:
**14933**

### Re: an old maths olympiad question

3-sided:

A1A2 = A1A3 = A2A3 = 1 = S

And if A4 didn't exist, A1A4 = infinity

-> 1/1 = 1/1 + 1/infinity ...

-> 1 = 1 + 0

The usage of capital letters is typical for Points, small letters are used for lengths.

A1A2 = A1A3 = A2A3 = 1 = S

And if A4 didn't exist, A1A4 = infinity

-> 1/1 = 1/1 + 1/infinity ...

-> 1 = 1 + 0

The usage of capital letters is typical for Points, small letters are used for lengths.

- Tue May 29, 2018 5:56 am
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 396
- Replies:
**5** - Views:
**1809**

### Re: Problem 396

Read carefully:

The second one is just a less not a less-equalIt can also be verified that SumG(n) = 2517 for 1 <= n < 8.

- Wed May 16, 2018 11:16 pm
- Forum: Number
- Topic: Decimal expansion = Continued fraction
- Replies:
**1** - Views:
**6340**

### Re: Decimal expansion = Continued fraction

Just my thoughts:

If you use the strict definition of continued fractions, there is no more number with more than a(=any integer) and b=3.

But if you allow any of the digits of the continued fraction to be 0, then the search is much more complicated...

If you use the strict definition of continued fractions, there is no more number with more than a(=any integer) and b=3.

But if you allow any of the digits of the continued fraction to be 0, then the search is much more complicated...

- Wed May 02, 2018 9:25 pm
- Forum: Combinatorics
- Topic: Container Packing Problem
- Replies:
**5** - Views:
**5280**

### Re: Container Packing Problem

If you have a layer with e.g. the left two elements going to the next layer, then the next layer has to be of a special kind: Option 1: there is 1 element in the layer on the right side. Option 2: there are 2 elements on the right side going to the next-next layer. The 2 places at the left side are ...

- Tue May 01, 2018 9:30 pm
- Forum: Combinatorics
- Topic: Container Packing Problem
- Replies:
**5** - Views:
**5280**

### Re: Container Packing Problem

4541161 Try to solve it layer by layer. I checked the options for a 2x2 layer (At which of the 4 positions the cuboid connects the current and the next layer) Only 6 types of the 16 layer types are relevant. And after this: Matrix multiplication n(12) times. If mirror and rotation should not count, ...