Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Can anyone solve this riddle using programming softwares?

  1. Sep 3, 2014 #1
    Hello computer science people,

    riddle me this... you have three black boxes and three red boxes. You wanna connect each black box with the three red boxes without making the lines interact with each other. can you do it ? or is it unsolvable ?

    Like this :

  2. jcsd
  3. Sep 3, 2014 #2


    User Avatar
    Science Advisor

    I've seen this many times in the past. To the best of my recollection, it is unsolvable (in two dimensions).
  4. Sep 3, 2014 #3
    Is this possible ? there is no cut.

    Attached Files:

  5. Sep 3, 2014 #4
    Like this?

    Attached Files:

  6. Sep 3, 2014 #5


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

  7. Sep 3, 2014 #6


    Staff: Mentor

    I don't think this meets the requirements of a direct link between each red box with each black box, and vice versa. This might not have been stated in the OP but I believe that is what is implied.
  8. Sep 3, 2014 #7


    Staff: Mentor

    Why would you want to use software to solve this puzzle?
  9. Sep 3, 2014 #8


    User Avatar
    Science Advisor
    Homework Helper

    Try designing a complex multi-layer printed circuit board without using a computer track routing algorithm. :smile:
  10. Sep 3, 2014 #9
  11. Sep 3, 2014 #10
    because i think its unsolvable
  12. Sep 3, 2014 #11
    solving this riddle is like guessing a 6-charechters password..you have to have an algorithm that will test all the possible paths the 9 arrows are going to take from the black boxes to the red boxes without interacting
  13. Sep 3, 2014 #12
    you cant make the lines go "through" the red boxes.

    3 arrows from the first black box to all red boxes
    3 arrows from the second black box to all red boxes
    3 arrows from the third black box to all red boxes

    without no interaction between the lines
  14. Sep 3, 2014 #13
    Unless you use three dimensions - or the surface of a donut - it's easy to show that there is no solution.
    Here is a link: http://mathforum.org/dr.math/faq/faq.3utilities.html
    Since it's not possible, there is no point is having a computer search for one.
  15. Sep 4, 2014 #14
    I know this stupid of me and a waste of your time guys but I cant be satisfied without an algorithm that would test all the possibilities
  16. Sep 4, 2014 #15


    User Avatar

    Staff: Mentor

    Code (Text):
    while there_exist_more_possibilities(); do test_next_possibility();
    I don't have much time to waste, so I am not going much deeper. That's your algorithm, just fill in details.
  17. Sep 7, 2014 #16
    I understand. You trust computers more than people.
    Here's a more detailed algorithm. In fact, it's actual C code:
    Code (Text):

    //  For an explanation of why this algorithm works, see:
    //    http://mathforum.org/dr.math/faq/faq.3utilities.html
    #include <stdio.h>
    void main(void) {
    printf(“Results from analysis of Red/Black box riddle: No solutions exist!\n");
    Try it out and let me know if it finds anything.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook