[Cs5500] Changes in BFS Playground definition

Madhuvanthi Balasubramanian balasubramanian.m at husky.neu.edu
Fri Oct 7 22:35:33 EDT 2011


Hello all,

                 Here are the changes that Professor has suggested, in our
playground definition of BFS.

*Valid function :*
*
*
*Earlier : *
        If the number of nodes >= 4
               If the (number of nodes % 2) == 0
                                If v is a part of the graph
                                                If s and t are part of the
graph
                                                                If distance
between s and t is > (n/2)

    If v disconnects s and t

Return 1
                Else
                                Return 0
*Updated :*
                Construct a Graph G' without v. If no path exists between s
and t , return 1, else return 0. ( The other if conditions have all been
moved to different functions).

*belongsTo function :*
*
*
*Earlier :*
               If s and t in G have a distance > (n/2)
                                Return “G is valid”
                Else
                                Return “G is invalid”

*Updated :*
             If number of nodes >= 4
                If number of nodes is even
                     If distance between s and t > n/2
                             return "G is valid"
             Else
                               return "G is invalid"
(these checks essentially make sure the graph is valid and part of the
instance set. So it makes sense to have them in the belongsTo function
rather than in the valid function).

quality function : No change

*Config parameters (BFSConfig)*
*
*
*Earlier :*
              DEFAULT_BFS_CONFIG = BFSConfig.parse(
               "BFS_config[\n" +
                "MinimumNumberOfNodes :  4\n" +
                 "numberofNodes:  even\n" +
                   "]"
                    );

*Updated :*
                DEFAULT_BFS_CONFIG = BFSConfig.parse(
               "BFS_config[\n" +
                "MinimumNumberOfNodes :  4\n" +
                 MaximumNumberOfNodes : 1000\n" +
                 "numberofNodes:  even\n" +
                   "]"
                    );
 ( I have just used 1000 as an arbitrary number here, but the idea is that
these config parameters set the upper bound and lower bound to the
instances, so we have both mentioned here. This way users would read them
before developing their avatars, as opposed to knowing after being kicked
out, that they had provided invalid instances. )

*Valid function for Instance set :*
*
*
            Check that the instance is within the range of upper and lower
bounds specified in the configuration parameters.


              Please mail back to this mailing list if there are any
questions.

-- 
 Thanks
- Madhu
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the Cs5500 mailing list