Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. acm problem: firenet

acm problem: firenet

Scheduled Pinned Locked Moved Algorithms
phpalgorithmshelpquestion
4 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    followait
    wrote on last edited by
    #1

    http://acm.zju.edu.cn/show_problem.php?pid=1002[^] A description of the algorithm is enough, even better with an implementation. Thanks.

    C 1 Reply Last reply
    0
    • F followait

      http://acm.zju.edu.cn/show_problem.php?pid=1002[^] A description of the algorithm is enough, even better with an implementation. Thanks.

      C Offline
      C Offline
      cjengler
      wrote on last edited by
      #2

      This appears to me to be a simple modification of the n-queens problem. Placing n queens on a board such that no queen can capture any other queen. I would persue this line of thought with a google search on the n-queens problem.

      L 1 Reply Last reply
      0
      • C cjengler

        This appears to me to be a simple modification of the n-queens problem. Placing n queens on a board such that no queen can capture any other queen. I would persue this line of thought with a google search on the n-queens problem.

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Hi, I beg to differ. On an n*n board (with n>2) you can place n queens, the only problem is finding one of the many solutions. In the problem at hand, you dont know beforehand how many "queens" you can put; you loose some squares to the walls, and in return the walls typically offer the possibility to put more than n. BTW the maximum seems to be n*n/2 (putting a wall on all the squares of one color). :)

        Luc Pattyn [My Articles] [Forum Guidelines]

        C 1 Reply Last reply
        0
        • L Luc Pattyn

          Hi, I beg to differ. On an n*n board (with n>2) you can place n queens, the only problem is finding one of the many solutions. In the problem at hand, you dont know beforehand how many "queens" you can put; you loose some squares to the walls, and in return the walls typically offer the possibility to put more than n. BTW the maximum seems to be n*n/2 (putting a wall on all the squares of one color). :)

          Luc Pattyn [My Articles] [Forum Guidelines]

          C Offline
          C Offline
          cjengler
          wrote on last edited by
          #4

          I agree with you totally on the number of queens that could be placed on this board due to wall constraints, this is why I suggested a modified version of n queens. The wall constraints could easily be taken into account and still allow for the same "Basic" n queens algorithm to function correctly.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups