Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2013-04-26 17:13:03

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,884
Website

Slider Puzzle

How do I devise an algorithm to solve a sliding puzzle?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#2 2013-04-26 17:21:58

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,655

Re: Slider Puzzle

Hi;

Do you mean the 15 puzzle?


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Online

#3 2013-04-26 18:04:55

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,884
Website

Re: Slider Puzzle

The 15 puzzle is unsolvable.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#4 2013-04-26 18:08:50

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,655

Re: Slider Puzzle

Some positions are not possible but others are.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Online

#5 2013-04-26 18:25:44

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,884
Website

Re: Slider Puzzle

Ok, so how to do it?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#6 2013-04-26 18:27:25

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,655

Re: Slider Puzzle

There is some math that tells you whether it is solveable or not but I have forgotten it.

Programming it, looks tough.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Online

#7 2013-04-26 18:50:13

mathaholic
Member
From: Juliania
Registered: 2012-11-29
Posts: 2,895
Website

Re: Slider Puzzle

Mathematica?


"What is the square root of 2? 1.4141592653589793238" Seriously, I thought it was that. Too round?
3.141592653589793238...

Offline

#8 2013-04-26 19:16:08

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,884
Website

Re: Slider Puzzle

But programming it is what I am thinking.
After all, programs are threre which solve them


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#9 2013-04-26 21:10:17

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,655

Re: Slider Puzzle

I will try one and see what comes up.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Online

#10 2013-04-26 23:48:51

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,884
Website

Re: Slider Puzzle

Did you?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#11 2013-04-26 23:51:40

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,655

Re: Slider Puzzle

I have not even scratched the surface because I am still wrestling with a representation of the puzzle itself. It is unlikely that I will get far even when I solve that small problem because I do not understand how the program should pick from its many choices.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Online

#12 2013-04-26 23:57:23

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,884
Website

Re: Slider Puzzle

Are you on Win 7?

The algorithm isn't simple, it involves a lot of graph theory...

Last edited by Agnishom (2013-04-26 23:58:55)


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#13 2013-04-27 00:11:42

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,655

Re: Slider Puzzle

Heck no!


That is the problem right there. I am not very good with graph theory. As a matter of fact, I stink.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Online

#14 2013-04-27 00:22:16

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,884
Website

Re: Slider Puzzle

http://www.brian-borowski.com/Software/Puzzle/

Are they calling each state a node?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#15 2013-04-27 00:34:56

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,655

Re: Slider Puzzle

Probably, that would make sense.

Here is the math behind every solution.

http://mathworld.wolfram.com/15Puzzle.html

Also, there are tons of these programs to download. I need some sleep, see you.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Online

#16 2013-04-27 00:43:30

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,884
Website

Re: Slider Puzzle

Okay Sweet Dreams!


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#17 2013-04-27 00:47:24

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,655

Re: Slider Puzzle

Thanks and same to you.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Online

Board footer

Powered by FluxBB