Skip to content

This is a program that burte-forces the solution to a riddle I got from a mathoverflow question.

Notifications You must be signed in to change notification settings

confusinguser/soldier-bridge-riddle-brute-force

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Soldier Bridge Riddle

This is a program that burte-forces the solution to a riddle I got from a mathoverflow question. The riddle goes like this:

There are 20 soldiers standing distance 1 apart on a bridge of length 19. 
At time t=0, the soldiers immediately begin walking left or right with speed 1. 
When two soldiers collide, they immediately turn around and begin walking in the opposite direction. 
What is longest possible time it takes all the soldiers to leave the bridge?

Annoyingly, I haven't been able to verify if my answer is correct because I've not been able to find it online. If anyone has a more popular version of the riddle or a mathematical solution I'd be VERY interested. You can share it with me by opening an issue on this repo.

Solution

My solution was bridge number 1048574 or > > > > > > > > > > > > > > > > > > > <, the longest possible time I got was 29.

About

This is a program that burte-forces the solution to a riddle I got from a mathoverflow question.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages