• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 09:50
CET 15:50
KST 23:50
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
RSL Season 3: RO16 results & RO8 bracket13Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge1[TLMC] Fall/Winter 2025 Ladder Map Rotation14Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA14
StarCraft 2
General
SC: Evo Complete - Ranked Ladder OPEN ALPHA RSL Season 3: RO16 results & RO8 bracket RSL Season 3 - Playoffs Preview Mech is the composition that needs teleportation t GM / Master map hacker and general hacking and cheating thread
Tourneys
RSL Revival: Season 3 $5,000+ WardiTV 2025 Championship StarCraft Evolution League (SC Evo Biweekly) Constellation Cup - Main Event - Stellar Fest 2025 RSL Offline Finals Dates + Ticket Sales!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened
Brood War
General
2v2 maps which are SC2 style with teams together? Data analysis on 70 million replays soO on: FanTaSy's Potential Return to StarCraft BGH Auto Balance -> http://bghmmr.eu/ A cwal.gg Extension - Easily keep track of anyone
Tourneys
[BSL21] RO16 Tie Breaker - Group B - Sun 21:00 CET [BSL21] RO16 Tie Breaker - Group A - Sat 21:00 CET [Megathread] Daily Proleagues Small VOD Thread 2.0
Strategy
Current Meta Game Theory for Starcraft How to stay on top of macro? PvZ map balance
Other Games
General Games
Path of Exile Nintendo Switch Thread Should offensive tower rushing be viable in RTS games? Clair Obscur - Expedition 33 Stormgate/Frost Giant Megathread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread The Games Industry And ATVI Things Aren’t Peaceful in Palestine About SC2SEA.COM
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread Korean Music Discussion
Sports
Formula 1 Discussion 2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
The Health Impact of Joining…
TrAiDoS
Dyadica Evangelium — Chapt…
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1994 users

[Math Puzzle] Day13 - Page 2

Blogs > evanthebouncy!
Post a Reply
Prev 1 2 3 4 Next All
illu
Profile Blog Joined December 2008
Canada2531 Posts
Last Edited: 2009-06-08 04:42:51
June 08 2009 04:37 GMT
#21
On June 08 2009 13:32 evanthebouncy! wrote:
Show nested quote +
On June 08 2009 13:27 illu wrote:
Pretty easy.

+ Show Spoiler +

Since at any point there is one way out, we can create a non-deterministic Turing Machine as follows:

1. At each position, move to any of the other possible positions that are not walls.

Then this Turing Machine will always accept, by construction of the maze. We know that non-determinism gives no extra computation powers so we can come up with an algorithm by a Turing Machine to create this path, which executes on finite time.

The actual algorithm is extremely simple so I won't get too detailed in this. (wiki if you like). Just go with a breadth-first search and you will get a path that allows you to exit. As shown before this algorithm will complete on finite time which is what we want.


Too technical, i have no clue what you just said.
just reading your (1) though: you cannot garentee that you "moved" in a sense that the robot does not know if its attempted move is not blocked by the wall.


You said it's more or less computer science. This is really standard stuffs. In fact I am not even a computer scientist and I know it.

EDIT:
just reading your (1) though: you cannot garentee that you "moved" in a sense that the robot does not know if its attempted move is not blocked by the wall.

That is irrevalent. So long as there is one possible path for an exit in finite time non-deterministic turing machine will give a pass. Try wiki on turing machines first.
:]
Zozma
Profile Blog Joined November 2008
United States1626 Posts
June 08 2009 04:38 GMT
#22
Alright... I don't have anything yet, but a few observations are:

The sequence has to include up, right, left, and down, otherwise you can be trapped.

There has to be net motion in one direction in the case of a 1000x1000 maze with no walls or something.

Up, right, left, down does not work. In other words, you need multiple moves to up, right, left, down in some sequence?

If this is something I had no chance of getting in the first place, I would be pretty sad. It's midnight, so I'm going to try again tomorrow.



evanthebouncy!
Profile Blog Joined June 2006
United States12796 Posts
June 08 2009 04:41 GMT
#23
On June 08 2009 13:37 illu wrote:
Show nested quote +
On June 08 2009 13:32 evanthebouncy! wrote:
On June 08 2009 13:27 illu wrote:
Pretty easy.

+ Show Spoiler +

Since at any point there is one way out, we can create a non-deterministic Turing Machine as follows:

1. At each position, move to any of the other possible positions that are not walls.

Then this Turing Machine will always accept, by construction of the maze. We know that non-determinism gives no extra computation powers so we can come up with an algorithm by a Turing Machine to create this path, which executes on finite time.

The actual algorithm is extremely simple so I won't get too detailed in this. (wiki if you like). Just go with a breadth-first search and you will get a path that allows you to exit. As shown before this algorithm will complete on finite time which is what we want.


Too technical, i have no clue what you just said.
just reading your (1) though: you cannot garentee that you "moved" in a sense that the robot does not know if its attempted move is not blocked by the wall.


You said it's more or less computer science. This is really standard stuffs. In fact I am not even a computer scientist and I know it.

I c, lemme do some search on it.
Life is run, it is dance, it is fast, passionate and BAM!, you dance and sing and booze while you can for now is the time and time is mine. Smile and laugh when still can for now is the time and soon you die!
ven
Profile Blog Joined December 2008
Germany332 Posts
Last Edited: 2009-06-08 04:48:31
June 08 2009 04:46 GMT
#24
On June 08 2009 13:37 Macavenger wrote:
Show nested quote +
On June 08 2009 13:32 evanthebouncy! wrote:
On June 08 2009 13:27 illu wrote:
Pretty easy.

+ Show Spoiler +

Since at any point there is one way out, we can create a non-deterministic Turing Machine as follows:

1. At each position, move to any of the other possible positions that are not walls.

Then this Turing Machine will always accept, by construction of the maze. We know that non-determinism gives no extra computation powers so we can come up with an algorithm by a Turing Machine to create this path, which executes on finite time.

The actual algorithm is extremely simple so I won't get too detailed in this. (wiki if you like). Just go with a breadth-first search and you will get a path that allows you to exit. As shown before this algorithm will complete on finite time which is what we want.


Too technical, i have no clue what you just said.
just reading your (1) though: you cannot garentee that you "moved" in a sense that the robot does not know if its attempted move is not blocked by the wall.

+ Show Spoiler +
It's been a couple years since I worked with Turning machines and non-determinism, so I'm a bit rusty, but reading his solution, I'm quite certain it correctly proves the existence of an algorithm. Non-deterministic Turing Machines can do some pretty interesting things, and can easily have paths that lead nowhere, which would be the equivalent of attempting to move into a wall.

His approach doesn't work. He can't move into a direction that isn't a wall because he doesn't know where they are. Even if he knew where the walls were it wouldn't be much different from a NDTM that moved into any direction at all and it would accept. This is nothing else than using a random direction every step.
You can reach the rainbow. I'll be there to help.
illu
Profile Blog Joined December 2008
Canada2531 Posts
June 08 2009 04:51 GMT
#25
On June 08 2009 13:46 ven_ wrote:
Show nested quote +
On June 08 2009 13:37 Macavenger wrote:
On June 08 2009 13:32 evanthebouncy! wrote:
On June 08 2009 13:27 illu wrote:
Pretty easy.

+ Show Spoiler +

Since at any point there is one way out, we can create a non-deterministic Turing Machine as follows:

1. At each position, move to any of the other possible positions that are not walls.

Then this Turing Machine will always accept, by construction of the maze. We know that non-determinism gives no extra computation powers so we can come up with an algorithm by a Turing Machine to create this path, which executes on finite time.

The actual algorithm is extremely simple so I won't get too detailed in this. (wiki if you like). Just go with a breadth-first search and you will get a path that allows you to exit. As shown before this algorithm will complete on finite time which is what we want.


Too technical, i have no clue what you just said.
just reading your (1) though: you cannot garentee that you "moved" in a sense that the robot does not know if its attempted move is not blocked by the wall.

+ Show Spoiler +
It's been a couple years since I worked with Turning machines and non-determinism, so I'm a bit rusty, but reading his solution, I'm quite certain it correctly proves the existence of an algorithm. Non-deterministic Turing Machines can do some pretty interesting things, and can easily have paths that lead nowhere, which would be the equivalent of attempting to move into a wall.

His approach doesn't work. He can't move into a direction that isn't a wall because he doesn't know where they are. Even if he knew where the walls were it wouldn't be much different from a NDTM that moves into any direction at all and it would accept. This is nothing else than using a random direction every step.


But there is always one way to exit, so when we expand our tree diagram we will have one accepting state somewhere. So I think my NDTM will accept any solvable mazes.
:]
Macavenger
Profile Blog Joined January 2008
United States1132 Posts
June 08 2009 04:55 GMT
#26
ven brings up a good point that it might be equivalent to a random solution, though.

Need to be less rusty, argh D:
ven
Profile Blog Joined December 2008
Germany332 Posts
Last Edited: 2009-06-08 05:01:50
June 08 2009 04:58 GMT
#27
That's not the issue. Your turing machine would work with information that it doesn't have (where the walls are). Also as far as I understand the question we have to provide a deterministic algorithm to solve the maze which your non-deterministic TM doesn't do. :o
You can reach the rainbow. I'll be there to help.
Zozma
Profile Blog Joined November 2008
United States1626 Posts
Last Edited: 2009-06-08 05:13:39
June 08 2009 05:10 GMT
#28
Alright. This came to me while I was lying awake. I haven't thought too deeply about it, and I haven't even bothered to check it, but something like this:

+ Show Spoiler +
Okay. This is a bit hard to put in words. First: move along the "x-axis" the maximum number of times that you can + 1. Second, move along the "y-axis" the maximum number of times that you can in the maze + 1. Then use the same process reversing the directions along both axes.
(For instance, in a 100x100 maze, you would move right 101 times first, and then move down 101 times, or move left 101 times and then down 101 times, or whatever. Thus, you can exit the maze if it's "blank")

Now, this should allow you to end up going directly to the furthest possible space "To the left" or "upwards". Now the problem that I saw was that you can end up in a shape where the robot can move 50 times left, 0 times upward, 50 times right, 0 times downward- if he gets stuck in two shapes like [ and ].

To counter that, inject a random single move in any direction between every two long moves.


Even if this isn't it, hopefully I'm at least on to something.
ven
Profile Blog Joined December 2008
Germany332 Posts
June 08 2009 05:13 GMT
#29
On June 08 2009 14:10 Zozma wrote:
Alright. This came to me while I was lying awake. I haven't thought too deeply about it, and I haven't even bothered to check it, but something like this:

+ Show Spoiler +
Okay. This is a bit hard to put in words. First: move along the "x-axis" the maximum number of times that you can + 1. Second, move along the "y-axis" the maximum number of times that you can in the maze + 1. Then use the same process reversing the directions along both axes. Now, this should allow you to end up going directly to the furthest possible space "To the left" or "upwards". Now the problem that I saw was that you can end up in a shape like

[ r ]

R is the robot. He moves left 50 times or something, moves up forty times, and then moves right 50 times: an infinite loop.

To counter that, inject a random single move in any direction between every two long moves.


Even if this isn't it, hopefully I'm at least on to something.

You don't know the maximum number. I had a similar idea but without knowing how many times you can move you wouldn't know when to stop.
You can reach the rainbow. I'll be there to help.
Zozma
Profile Blog Joined November 2008
United States1626 Posts
Last Edited: 2009-06-08 05:15:14
June 08 2009 05:14 GMT
#30
+ Show Spoiler +
Yeah you do... Because the grid is only MxN, you can just use those numbers, right? If he runs into a wall, it's all good, he'll just stop there and continue going eventually in the next direction.
ven
Profile Blog Joined December 2008
Germany332 Posts
June 08 2009 05:17 GMT
#31
On June 08 2009 12:05 evanthebouncy! wrote:
The fine print:
By ANY valid maze it means that regardless of size of m, n, and regardless of maze design, the robot will be able to move outside the maze eventually. That is to say, while you are coding, you cannot assume a certain m, n, or design.

You can reach the rainbow. I'll be there to help.
Macavenger
Profile Blog Joined January 2008
United States1132 Posts
June 08 2009 05:18 GMT
#32
Yeah, not knowing m and n for the given maze really makes this more challenging. The only direction I can think to go with it at this point is some kind of spiraling thing, where you loop from 1 to k steps in each direction, then from k to 1, then increment k and repeat. Then you have to come up with some kind of crazy reordering of directions you're trying to avoid the collection points trap we were discussing early, I would think.
ven
Profile Blog Joined December 2008
Germany332 Posts
June 08 2009 05:19 GMT
#33
Yeah, I had the same idea of spiraling movement in my mind. Those pesky walls totally disrupting it of course :p
You can reach the rainbow. I'll be there to help.
Muirhead
Profile Blog Joined October 2007
United States556 Posts
Last Edited: 2009-06-08 05:55:46
June 08 2009 05:44 GMT
#34
+ Show Spoiler +
Suppose we are given the maze but not the starting position. Then we can solve the puzzle by looking at each possible starting position in turn. In short, we pick some box and assume the robot started there, giving it commands to solve the puzzle. Then, we pick a second box to assume the robot started in, see where the robot would be after our commands based on the first assumption, and give it commands to exit the maze. Etc.

Since the set of possible mazes is countable, we can adjoin the solutions for every given maze end to end and be done.
starleague.mit.edu
moriya
Profile Joined March 2009
United States54 Posts
Last Edited: 2009-06-08 07:01:28
June 08 2009 06:06 GMT
#35
Now I doubt that within finite steps the solution can be achieved...

The spiral path may be promising solution, if there exsits a solution.
evandi
Profile Joined June 2008
United States266 Posts
June 08 2009 06:25 GMT
#36
On June 08 2009 14:13 ven_ wrote:
Show nested quote +
On June 08 2009 14:10 Zozma wrote:
Alright. This came to me while I was lying awake. I haven't thought too deeply about it, and I haven't even bothered to check it, but something like this:

+ Show Spoiler +
Okay. This is a bit hard to put in words. First: move along the "x-axis" the maximum number of times that you can + 1. Second, move along the "y-axis" the maximum number of times that you can in the maze + 1. Then use the same process reversing the directions along both axes. Now, this should allow you to end up going directly to the furthest possible space "To the left" or "upwards". Now the problem that I saw was that you can end up in a shape like

[ r ]

R is the robot. He moves left 50 times or something, moves up forty times, and then moves right 50 times: an infinite loop.

To counter that, inject a random single move in any direction between every two long moves.


Even if this isn't it, hopefully I'm at least on to something.

You don't know the maximum number. I had a similar idea but without knowing how many times you can move you wouldn't know when to stop.


You don't have to know the maximum number. If you could guarantee that you had an algorithm capable of solving it for a given width/height you could run some loops varying the width height, increasing the maximum number the width and height can take each run through and then running the algorithm for those values. You would have to cover all of the possible width height combinations until you actually get to the real width/height.
evandi
Profile Joined June 2008
United States266 Posts
June 08 2009 07:09 GMT
#37
On June 08 2009 15:06 moriya wrote:
Now I doubt that within finite steps the solution can be achieved...

The spiral path may be promising solution, if there exsits a solution.


Muirhead solved it.
omG.[RaYnE]
Profile Joined October 2007
Philippines100 Posts
June 08 2009 07:18 GMT
#38
sure hope the op has an answer not just a trick question that has no answer to it
omG.[RaYnE] ---> rayne_ph :D
Monoxide
Profile Blog Joined January 2007
Canada1190 Posts
June 08 2009 09:33 GMT
#39
On June 08 2009 16:18 omG.[RaYnE] wrote:
sure hope the op has an answer not just a trick question that has no answer to it


evan's questions are always legit. Most of them are difficult(to me at least), but all of them have "real" answers.
DeathSpank
Profile Blog Joined February 2009
United States1029 Posts
June 08 2009 09:52 GMT
#40
+ Show Spoiler +
easy. bruteforce this shit. put your instructions in a dynamic array. Go through all the possibilities of instructions for the current size of the the array. ++the size of the array and you'll have it... eventually.
yes.
Prev 1 2 3 4 Next All
Please log in or register to reply.
Live Events Refresh
Wardi Open
14:00
Bonus Weekend Qualifier
WardiTV538
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
trigger 50
StarCraft: Brood War
Hyuk 25711
Calm 7508
Sea 5043
Rain 4668
GuemChi 1365
Mini 381
firebathero 306
Larva 284
BeSt 218
Leta 168
[ Show more ]
PianO 106
Last 93
Barracks 56
Killer 46
ToSsGirL 36
Backho 35
JulyZerg 30
soO 28
Terrorterran 19
Noble 15
SilentControl 14
Sacsri 13
scan(afreeca) 13
HiyA 10
Shine 7
yabsab 6
Bale 6
zelot 4
Dota 2
Gorgc7421
singsing2196
qojqva1975
Dendi913
XcaliburYe165
League of Legends
Reynor88
Counter-Strike
ScreaM1974
allub229
oskar156
Heroes of the Storm
Khaldor328
Other Games
B2W.Neo2359
crisheroes488
Hui .329
Fuzer 317
Pyrionflax227
XaKoH 82
KnowMe74
Dewaltoss24
Organizations
Dota 2
PGL Dota 2 - Main Stream28832
StarCraft 2
ComeBackTV 1213
StarCraft: Brood War
lovetv 10
Kim Chul Min (afreeca) 8
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH177
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 2430
• WagamamaTV422
League of Legends
• Nemesis2954
Upcoming Events
IPSL
5h 10m
StRyKeR vs OldBoy
Sziky vs Tarson
BSL 21
5h 10m
StRyKeR vs Artosis
OyAji vs KameZerg
OSC
8h 10m
OSC
18h 10m
Wardi Open
21h 10m
Monday Night Weeklies
1d 2h
OSC
1d 8h
Wardi Open
1d 21h
Replay Cast
2 days
Wardi Open
2 days
[ Show More ]
Tenacious Turtle Tussle
3 days
The PondCast
3 days
Replay Cast
4 days
LAN Event
5 days
Replay Cast
5 days
Replay Cast
5 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

Proleague 2025-11-21
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.