+ 1

Bridge Crossing

I need some help on the brigde crossing problem implementation (Java)... can someone assist me? If you're interested, I will send you the original problem... thank you.

27th Aug 2019, 6:50 AM
Lleko X
Lleko X - avatar
7 Respuestas
+ 2
this? https://en.m.wikipedia.org/wiki/Bridge_and_torch_problem what should be the output? 😅 do you have some/an attempt(s) implementing or thoughts for solving or atleast a pattern?
27th Aug 2019, 7:07 AM
Anton Böhler
Anton Böhler - avatar
+ 2
The code needs to handle any possibility
27th Aug 2019, 7:53 AM
Lleko X
Lleko X - avatar
+ 1
uefficient approach I'd say ... so the program should output who crosses at each step, right? (from the group thats fastest)
27th Aug 2019, 7:51 AM
Anton Böhler
Anton Böhler - avatar
+ 1
https://code.sololearn.com/cVMXVev0wk40 -> recursive thats the best I can do, it outputs the best path/order and time. (generating all possibilities is way too complicated, sry)
27th Aug 2019, 9:38 AM
Anton Böhler
Anton Böhler - avatar
+ 1
it's probably an assignment from school (or sth. like that), so they probably would accept something like that too Xd
27th Aug 2019, 9:42 AM
Anton Böhler
Anton Böhler - avatar
+ 1
Thanks, I'll use it to what I've done already
27th Aug 2019, 9:54 AM
Lleko X
Lleko X - avatar
0
I know how to solve the bridge problem. My problem is implementing a code that will generate all possibilities and apply search algorithms to reach the goal state using the given maximum time and the times for each person. This should be true for 3,4,5 people.
27th Aug 2019, 7:14 AM
Lleko X
Lleko X - avatar