Search found 25 matches

by ggoyo
Tue Feb 17, 2015 1:08 pm
Forum: Number
Topic: A Real Number Puzzle
Replies: 9
Views: 11006

Re: A Real Number Puzzle

What's wrong is that you mistake lower bound for minimum. A bounded subset of $\mathbb{R}$ can have no minimum. Look, I'm going to apply your reasoning to my example $A$ : Let x be the smallest element of $A$. Then, exists $n$ such that $x=1/n$. But wait, 1/(n+1) is lower than $x$. That contradicts ...
by ggoyo
Mon Feb 16, 2015 11:06 am
Forum: Number
Topic: A Real Number Puzzle
Replies: 9
Views: 11006

Re: A Real Number Puzzle

So the lower bound of $A = \{1/n$ $|$ $n \in \mathbb{N}\}$ is not 0 because 0 is not in it ?
by ggoyo
Fri Feb 13, 2015 6:35 pm
Forum: Number
Topic: A Real Number Puzzle
Replies: 9
Views: 11006

Re: A Real Number Puzzle

Let the x with the lowest absolute value satisfying the condition that f(x) - x = y =! 0. Then: What if the lower bound of $\{ |x| : f(x)-x \neq 0\}$ is 0 ? Here is an inductive proof for $f_{|\mathbb{Q}}$ : let $x \in \mathbb{Q}$. Because of (I) and (II), we can suppose $0<x<1$. - If $x \in \mathb...
by ggoyo
Tue Sep 30, 2014 4:32 pm
Forum: Recreational
Topic: One-liners
Replies: 9
Views: 4260

Re: One-liners

It's just a poor algorithm. (fibo !! 100000) gets evaluated in less than a second with that method (which is just memoization really)... If you want to be arogant at least back it up because you are completely wrong. Not to mention that any high school kid can make up a formula for fibonacci-like s...
by ggoyo
Fri Aug 01, 2014 2:33 pm
Forum: Game Theory
Topic: Gounki
Replies: 0
Views: 6671

Gounki

Gounki is a game that is played on a chessboard by 2 players. Each player has 8 rounds and 8 squares that starts at the very first 2 lines of the board (alternate 1 round, 1 square etc... on each line). The goal is to go beyond the opposite last line. No piece can go backward or jump an ennemy. A sq...
by ggoyo
Fri Aug 01, 2014 2:02 pm
Forum: Recreational
Topic: L-system
Replies: 0
Views: 1956

L-system

Check out my l-system editor :

To learn about l-system http://en.wikipedia.org/wiki/L-system.

You can download my 3D l-system GUI here : http://garzol.free.fr.
by ggoyo
Fri Aug 01, 2014 10:20 am
Forum: Number Theory
Topic: Analytical simple proof of Fermat's last theorem ????
Replies: 20
Views: 13531

Re: Analytical simple proof of Fermat's last theorem ????

You state in the beginning of your paper that this theorem ($a$ and $b$ can't be both odd) will be proven, pretend that it leads to Fermat's theorem and then start something completely different in your paper.
by ggoyo
Thu Jul 31, 2014 6:01 pm
Forum: Programming languages
Topic: Weird issue with C
Replies: 11
Views: 7836

Re: Weird issue with C

I think the problem is scope. You are probably calling a different variable inside the function but think it's the same because it has the same name. But I might be totally wrong since we can't see the code. If it gives weird results in main after you called the function then it could be what thundr...
by ggoyo
Thu Jul 31, 2014 5:17 pm
Forum: Programming languages
Topic: Help initialising array in C++
Replies: 11
Views: 5751

Re: Help initialising array in C++

You declared pointer_a to be an (int*)... So when you do a[1] it does *(a+1), which dereferences the (int*) : at this point a[1] is an int (which is not a pointer type) so then when you do a[1][1] you are trying to dereference an int. That has nothing to do with what I said, this is just you being d...
by ggoyo
Thu Jul 31, 2014 3:02 pm
Forum: Programming languages
Topic: Help initialising array in C++
Replies: 11
Views: 5751

Re: Help initialising array in C++

arrays aren't pointers, and thinking they are is a common cause of errors. Please give me an example of error it can cause (not syntaxic of course), because I never had any. yet how would an int** (whose value is purely an address) know where to find its element (1,1) in memory? If x is the adress ...
by ggoyo
Thu Jul 10, 2014 3:05 pm
Forum: Programming languages
Topic: Help initialising array in C++
Replies: 11
Views: 5751

Re: Help initialising array in C++

Say we have a 'Pointer' object in an object oriented language. We could define arrays as a subclass of Pointer and add a length field. In that sense, arrays are pointers.
by ggoyo
Sat Jun 28, 2014 10:49 am
Forum: Programming languages
Topic: determining if a variable is an integer C++
Replies: 8
Views: 5057

Re: determining if a variable is an integer C++

karenhunt6116 wrote:
I have tried in C++

boolean variable = float test_variable == (int)test_variable and
boolean variable = fmod(float test_variable ,1)==0
Neither of these seem to work for me.
If test_variable is already declared why add float before its name ?
by ggoyo
Fri Jun 27, 2014 8:26 pm
Forum: Recreational
Topic: One-liners
Replies: 9
Views: 4260

Re: One-liners

You all have got my post twisted, and I think this is because I chose a terrible exemple. And it's not exactly new, it's 19th century maths (Dirichlet's hyperbola method). Note that this is not what I used here, but thanks for sharing anyway. 1 line = 1 instruction . . . not really. "1 line" could m...
by ggoyo
Thu Jun 26, 2014 12:24 am
Forum: Number
Topic: Square root of -1 in Fp
Replies: 1
Views: 2887

Square root of -1 in Fp

It is well known that -1 is a square mod p iff p is 1 mod 4.

Funny thing is that for the first 3 such primes we have :

5*5=25=-1 mod 13
13*13=169=-1 mod 17
17*17=289=-1 mod 29

Is that a coincidence ?
by ggoyo
Wed Jun 25, 2014 11:27 pm
Forum: Recreational
Topic: One-liners
Replies: 9
Views: 4260

Re: One-liners

1 line = 1 instruction... Getting an algorithm with multiple loops or recursion down to one line (as long as you want) is not that easy.

I would be amazed to see you solve the problem I presented in one line.
by ggoyo
Wed Jun 25, 2014 11:05 am
Forum: Programming languages
Topic: Help initialising array in C++
Replies: 11
Views: 5751

Re: Help initialising array in C++

In C/C++ the value of an array variable is actually a pointer to its first element. We all think that at some point, but it isn't, as demonstrated by trying to declare extern int* x to refer to int x[] and discovering that it won't work, or more typically by the error produced when trying to pass a...
by ggoyo
Tue Jun 24, 2014 7:23 pm
Forum: Recreational
Topic: Puzzle with capacitors
Replies: 1
Views: 2045

Puzzle with capacitors

You are given an infinite number of capacitor with capacity 1µF. Design a circuit whose total capacity would be $\sqrt{2}$µF if expanded to infinity.
Hint : $\sqrt{2}$ has a continued fraction expansion with period [2].
by ggoyo
Tue Jun 24, 2014 6:37 pm
Forum: Recreational
Topic: A problem for every age
Replies: 20
Views: 8769

Re: A problem for every age

Nice one ! Thanks for sharing. I don't know why my brain tried to convince me that it was impossible at first, then I decided to just give it a try and it all came together
by ggoyo
Tue Jun 24, 2014 6:01 pm
Forum: Recreational
Topic: One-liners
Replies: 9
Views: 4260

One-liners

That sweet feeling when you solve a problem in one line, when everybody else did it with thousands of line. Post your favourite dazzling one-liners used to solve a PE problem or in any other context. Here is one : define s(n) to be the sum of the divisors (in N) of n. Find (=compute) the sum $\sum_{...
by ggoyo
Tue Jun 24, 2014 9:57 am
Forum: Combinatorics
Topic: Set containing max number of subsets
Replies: 11
Views: 9369

Re: Set containing max number of subsets

The problem is that the algorithm you propose (essentially a kind of Greedy Algorithm ) will not always produce the optimal solution. At best it always gives a kind of local optimum rather than a global optimum. Yes, you are right, I was too fast answering. All of these solutions use the numbers 4 ...