Backtrack[s, partialQ, solutionQ] performs a backtrack search of the state space s, expanding a partial solution so long as partialQ is True and returning the first complete ...
BellmanFord[g, v] gives a shortest-path spanning tree and associated distances from vertex v of graph g. The shortest-path spanning tree is given by a list in which element i ...
BinarySearch[l, k] searches sorted list l for key k and gives the position of l containing k, if k is present in l. Otherwise, if k is absent in l, the function returns (p + ...
BinarySubsets[l] gives all subsets of l ordered according to the binary string defining each subset. For any positive integer n, BinarySubsets[n] gives all subsets of {1, 2, ...
BooleanAlgebra[n] gives a Hasse diagram for the Boolean algebra on n elements. The function takes two options: Type and VertexLabel, with default values Undirected and False, ...
BreadthFirstTraversal[g, v] performs a breadth-first traversal of graph g starting from vertex v, and gives the breadth-first numbers of the vertices. ...
Bridges
(Combinatorica Package Symbol) Bridges[g] gives a list of the bridges of graph g, where each bridge is an edge whose removal disconnects the graph.
CageGraph[k, r] gives a smallest k-regular graph of girth r for certain small values of k and r. CageGraph[r] gives CageGraph[3, r]. For k = 3, r can be 3, 4, 5, 6, 7, 8, or ...
ChangeEdges[g, e] replaces the edges of graph g with the edges in e. e can have the form {{s_1, t_1}, {s_2, t_2}, ...} or the form {{{s_1, t_1}, gr_1}, {{s_2, t_2}, gr_2}, ...
ChangeVertices[g, v] replaces the vertices of graph g with the vertices in the given list v. v can have the form {{x_1, y_1}, {x_2, y_2}, ...} or the form {{{x_1, y_1}, ...