Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Mathmatical Number Game Problem

 
Post new topic   Reply to topic Printable version
 View previous topic  Help with calculating crc32 Post :: Post Fibonacci Series into a Really Large N...  View next topic  
Author Message
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Fri Oct 17, 2008 5:49 pm    Post subject: Mathmatical Number Game Problem Reply to topic Reply with quote

Goal: To try and fill in all the squares without going over one that is already filled by counting to 100.

Directions: Using a 10x10 graph (100 squares), write a 1 in the top left. Now you can either move horizontally 3 squares (4,1) and write in the next number, verically 3 squares (1, 4) or diagonally 2 squares (3,3). Continue doing so until you have filled all squares once. There is 15 million different incorrect solutions and 2 correct solutions.

I'm going to try and make a program to find the solution.

This whole problem came from my math teacher, who said they'd give us a car if we can find the solution. Evidently a past student's dad was a software developer and made a program to find this solution. He had the program running a couple days and the kid actually got the car, a convertible. I think they're even telling the truth.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Fri Oct 17, 2008 9:32 pm    Post subject: Reply to topic Reply with quote

So you can go vertically 3 squares in any direction, and diagonally 2 squares in any direction?

Well, just so you know, I found a solution, by hand, in about five minutes.
Back to top
View users profile Send private message Add User to Ignore List
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Fri Oct 17, 2008 10:17 pm    Post subject: Reply to topic Reply with quote

and what would that be?! i think we have a communication problem.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Fri Oct 17, 2008 10:40 pm    Post subject: Reply to topic Reply with quote

Just follow the path Aaaa...Bbbb...Cccc...

Code: Show/Hide
ahdahdahda
icficficfi
gebGebgebg
aHdahdahda
icfIcficfi
gebgebgebg
ahDahdahda
icFicfiCfi
geBgebgEbg
Ahdahdahda
Back to top
View users profile Send private message Add User to Ignore List
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Fri Oct 17, 2008 10:49 pm    Post subject: Reply to topic Reply with quote

You know there are more than 2 solutions, because there's 2 ways to get from A to B and then you can reflect both solutions around the diagonal, giving 4 solutions.

Maybe the rules are tighter than I read them to be.
Back to top
View users profile Send private message Add User to Ignore List
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sat Oct 18, 2008 1:10 pm    Post subject: Reply to topic Reply with quote

Yeh i didn't explain it well enough you got the wrong interpetation.

I'll try again

You've got a 10x10 grid (100 squares).

The goal is to fill all of the grid up with the numbers 1-100.

You start by marking a "1" at 1,1 in top left corner.

From there you can either go horizontal 3 (4,1), vertical 3 (1,4) or diagonal 2 (3,3).

Now you would make a 2 where you chose to go. lets say 4,1.

Now you continue that faschion (either go horizontal 3 (4,1), vertical 3 (1,4) or diagonal 2 (3,3)) and mark a 3, 4, 5.... up to 100.

If at anytime you end up on a gridpoint that is already filled in with a number, you have to choose a different path. You can't overwrite. (This is the "catch").

That should be a little harder.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Sat Oct 18, 2008 10:48 pm    Post subject: Reply to topic Reply with quote

Um, what did you say that's different than what you said before?

Are you able to go vertically and horizontally in any direction? Are you able to go diagonally in any direction? Or just down and to the right?

These questions you haven't answered. And if the answer is yes to the first two, then my solution is correct.
Back to top
View users profile Send private message Add User to Ignore List
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sun Oct 19, 2008 11:36 am    Post subject: Reply to topic Reply with quote

Maybe you do have the answer, lets make sure.



That image is a good example of the rules. (That is only an 8x7 grid though, it should be 10x10). Like i said, you just keep doing that until you fill it all up.

Also look at 6, and note that from 6 i could NOT go up because then i would be at 3.

Does that clarify?




numbergame.bmp - 177.83 KB
File downloaded or viewed 145 time(s)
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Mon Oct 20, 2008 9:13 pm    Post subject: Reply to topic Reply with quote

So to be clear, from square 6 there are 6 possible squares one could visit next?
Back to top
View users profile Send private message Add User to Ignore List
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Tue Oct 21, 2008 3:37 pm    Post subject: Reply to topic Reply with quote

yes
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
YonatanNaamad
Newbie


Joined: Mar 22 2009
Posts: 5
Location: Troy
Offline

PostPosted: Sun Mar 22, 2009 7:26 pm    Post subject: Prolog solution Reply to topic Reply with quote

Hey. It's my first post, and I know it's a bump of an old post, but whatever.

Anyway, here's some Prolog code that could theoretically come up with a solution to the problem.

Code: Show/Hide
in(H,[H|_]).
in(H,[_|T]) :- in(H,T).
append([],A,A).
append([A|B],C,[A|W]) :- append(B,C,W).
vs([A,Y],[X,Y],L) :- A > 3, X is A-3, not(in([X,Y],L)).
vs([A,Y],[X,Y],L) :- A < 8, X is A+3, not(in([X,Y],L)).
vs([A,B],[A,Y],L) :- B < 8, Y is B+3, not(in([A,Y],L)).
vs([A,B],[A,Y],L) :- B > 3, Y is B-3, not(in([A,Y],L)).
vs([A,B],[X,Y],L) :- A > 2, B > 2, X is A-2, Y is B-2, not(in([X,Y],L)).
vs([A,B],[X,Y],L) :- A > 2, B < 9, X is A-2, Y is B+2, not(in([X,Y],L)).
vs([A,B],[X,Y],L) :- A < 9, B > 2, X is A+2, Y is B-2, not(in([X,Y],L)).
vs([A,B],[X,Y],L) :- A < 9, B < 9, X is A+2, Y is B+2, not(in([X,Y],L)).

gvs(_,0,_,[]).
gvs(S,N,L,[A|B]) :- N > 0, M is N-1, append(L,[S],NL), !, vs(S,A,NL),gvs(A,M,NL,B).

solve(N,B) :- gvs([1,1],N,[],B).


To run it, you just call solve(100,B). I'm running it on my server now to see what the results are. It can find solutions for the first 90 moves pretty quickly.

(PS. Soccerman's post count is pretty beast)
Back to top
View users profile Send private message Add User to Ignore List
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sun Mar 22, 2009 9:13 pm    Post subject: Reply to topic Reply with quote

lol, i just ruined it.

anyways, that's too complex for me to know if what that code does is correct, but the fact that it's so complex makes me think that it is the right code. good work.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Chambahs
Power attack
Power attack


Joined: Jun 19 2005
Posts: 820
Offline

PostPosted: Wed Mar 25, 2009 1:33 am    Post subject: Reply to topic Reply with quote

Sama has a passion for brain teasers that involve math or numbers. I remember his other "turn a name into numbers and ill figure out the equation game" he had us all doing.
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Non-Subspace Related Coding All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 298 page(s) served in previous 5 minutes.

phpBB Created this page in 0.434500 seconds : 40 queries executed (86.5%): GZIP compression disabled