Search found 4 matches

by Eobyn
Fri Dec 12, 2003 4:51 pm
Forum: Volume 100 (10000-10099)
Topic: 10001 - Garden of Eden
Replies: 39
Views: 20359

You cannot solve this problem by making an exaustive search. For 32 bit states that would mean searching all (2^32 - 1) different states :o! That uses to much time.
The idea is to look at the automaton, look at the state and somehow compute if there is any possible predecessor state. If there isn ...
by Eobyn
Sun Oct 19, 2003 5:40 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317983

Thanks. Already found out my error. And found out a bug to. Its posted on another topic though.


Jo
by Eobyn
Sat Oct 18, 2003 7:09 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317983

100 - ITS BUGGED! :P

While trying to understand why my code didn't work (I kept getting WA) i discovered something intersting.

Here is the cyle for number 704511 :

704511
2113534
1056767
3170302
1585151
4755454
2377727
7133182
3566591
10699774
5349887
16049662
8024831
24074494
12037247
36111742 ...
by Eobyn
Fri Oct 17, 2003 9:53 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317983

I don't understand why my code doesn't work. :cry:
I keep getting WA. Can you see anything wrong? :o

[c]
#include <stdio.h>
#include <string.h>

#define TABLE_SIZE 2500000

unsigned short s_length[TABLE_SIZE];

unsigned short cycleLength(unsigned long n) {
unsigned short length = (n > TABLE_SIZE ...

Go to advanced search