Programming Assignment 5: WordNet /* ***************************************************************************** * Describe concisely the data structure(s) you used to store the * information in synsets.txt. Why did you make this choice? **************************************************************************** */ /* ***************************************************************************** * Describe concisely the data structure(s) you used to store the * information in hypernyms.txt. Why did you make this choice? **************************************************************************** */ /* ***************************************************************************** * Describe concisely the algorithm you use in the constructor of * ShortestCommonAncestor to check if the digraph is a rooted DAG. * What is the order of growth of the worst-case running times of * your algorithm? Express your answer as a function of the * number of vertices V and the number of edges E in the digraph. * (Do not use other parameters.) Use Big Theta notation to simplify * your answer. **************************************************************************** */ Description: Order of growth of running time: /* ***************************************************************************** * Describe concisely your algorithm to compute the shortest common ancestor * in ShortestCommonAncestor. For each method, give the order of growth of * the best- and worst-case running times. Express your answers as functions * of the number of vertices V and the number of edges E in the digraph. * (Do not use other parameters.) Use Big Theta notation to simplify your * answers. * * If you use hashing, assume the uniform hashing assumption so that put() * and get() take constant time per operation. * * Be careful! If you use a BreadthFirstDirectedPaths object, don't forget * to count the time needed to initialize the marked[], edgeTo[], and * distTo[] arrays. **************************************************************************** */ Description: running time method best case worst case -------------------------------------------------------- length() ancestor() /* ***************************************************************************** * The Digraph class you used in your implementation uses an adjacency lists * representation to store a graph. Imagine that you changed this class to * use an adjacency matrix instead. How would this affect the worst case * running time of length() or ancestor()? * * Like before, express your answers as functions of the number of vertices * V and the number of edges E in the digraph. Use Big Theta notation * to simplify your answers. * * Note that even though you might not use any Digraph methods in either * length() or ancestor(), any method that performs a Breadth First Search * would have to be modified to work with this new representation. **************************************************************************** */ /* ***************************************************************************** * Known bugs / limitations. **************************************************************************** */ /* ***************************************************************************** * Describe any serious problems you encountered. **************************************************************************** */ /* ***************************************************************************** * List any other comments here. Feel free to provide any feedback * on how much you learned from doing the assignment, and whether * you enjoyed doing it. **************************************************************************** */