Suppose T is a minimal spanning tree found by Prim’s algorithm
in a connected graph
G.
(i) Show that either T contains the n-1 smallest edges, or the
n-1 smallest edges form a subgraph which contains a cycle.
(ii) Show that if an edge (a, b) is not in T and if P is the
unique path in T from a to
b, then for each edge e in P the weight of e is less than the
weight of...
IN JAVA
Given a binary search tree, extract min operation finds the node
with minimum key and then takes it out of the tree. The program can
be C++/Java or C-style pseudocode. Do not use function call to
either Min or delete done in the class. Write this from scratch.
(No need to ensure AVL properties, just show it for a generic
BST)
Node * extract min(Node * x) {
}
In the Forward Chaining algorithm, after the algorithm stops,
prove that for those atoms that are not assigned to true during the
inference process, there exists a model in the KB in which the atom
is true and there exists a model in the KB in which the atom is
false.
Write an algorithm that finds both the smallest and
largest numbers in a list of n numbers. Try to find a method that
does at most 1.5n comparisons of array items.(but please code in
java).