#1 Create two AVL trees with 7 keys: A, B, C, D, E, F, and G. (There are 5,040 different key sequences that produce 429 unique trees. Of those trees, 17 are AVL trees.)
a. Draw the shortest AVL tree containing these 7 keys.
b. Draw one of the tallest possible AVL trees containing these 7 keys.
If we consider the ascii values of the nodes then the tree are:
File Edit Format View Help Graphs and trees 4. [6 marks] Using the following graph representation (G(V,E,w)): v a,b,c,d,e,f E fa,b), (a,f),fa,d), (b,e), (b,d), (c,f),(c,d),(d,e),d,f)) W(a,b) 4,W(a,f) 9,W(a,d) 10 W(b,e) 12,W(b,d) 7,W(c,d) 3 a) Draw the graph including weights. b) Given the following algorithm for Inding a minimum spanning tree for a graph: Given a graph (G(V,E)) create a new graph (F) with nodes (V) and no edges Add all the edges (E) to a set S and order them...
A long string consists of the six characters A, B, C, D, E, F, G; they appear with frequency 21%, 11%, 8%, 17%, 5%, 23%, and 15%, respectively. (a) Draw the Huffman encoding tree of these six characters. (b) What is the Huffman encoding of these six characters? (c) If this encoding is applied to a string consisting of one million characters with the given frequencies, what is the length of the encoded string in bits?
C. A 2 1. Figure A Figure B When three operational units (OTUS) A, B and Care concerned, one can make one bifurcating unrooted tree with one node, 1, as shown in figure A. If one more OTU, D, is added to the tree in figure A, one can attach D to any of the three edges (A1, B1, C1), thus one can make three topologically unique unrooted trees with one new node, node 2, as shown In figure B....
Explain ur working 4. [6 marks] Using the following graph representation (G(VE,w)): V a, b,c, d,e, fh E -la, b, [a, fl,la,d, (b,ej, [b,d, c,fl,fc,d],Id,el, sd, f) W(a, b) 4, W(a, f)-9, W(a, d)-10 W(b, e) 12, W (b, d)7, W(c,d) 3 a) [3 marks] Draw the graph including weights. b) [2 + 1-3 marks] Given the following algorithm for finding a minimum spanning tree for a graph: Given a graph (G(V,E)) create a new graph (F) vith nodes (V)...
C. 7. True/False Questions. (2 points each) a. Applying Horner's Rule, an n-degree polynomial can be evaluated at a given point using only n multiplications and n additions. b. Quick Sort and Merge Sort are comparison-based sorting algorithms. Heap Sort and Distribution Counting Sort are not comparison-based sorting algorithms. An AVL tree applies four types of rotations: RIGHT, LEFT, RIGHT-LEFT, and LEFT-RIGHT. d. When an AVL tree's left sub-tree is left-heavy, a LEFT rotation is needed. e. When an AVL...
Relation = {A, B, C, D, E, F G} a) Find the minimal cover for: A --> C, B --> AEFG, F --> G b) What are the primary keys c) What is the normal form? Please explain with steps :)
5 B A 7 F 2 D 4 E 6 G (10 pts.) Remember that shortestpath () finds shortest paths from a single source to all des- tinations. Use shortestpath() remaining vertices. Generate the paths in an ascending order of length and complete the following table. Again, to obtain the length of the shortest paths from vertex A to all assume that ties are broken by alphabetical order in choose(). Iteration S Vertex Distance selected A B F G E...
Design the optimal (Huffman) code for the alphabet {a, b, c, d, e, f, g, h, i, j, k, l}, where frequencies are given in the table below: Draw the appropriate decoding tree. a 0.25 g 0.02 b 0.01 h 0.12 c 0.09 i 0.15 d 0.02 j 0.04 e 0.24 k 0.01 f 0.04 l 0.01
Score: 0 of 1 pt 19 of 26 (23 complete) W Score: 83.33%, 2 3.5.35 EQuestion Help Use the "equal temper" scale with the 12 semitones A, A#, B. C. C#. D. D#, E, F, F#, G, and G# and the frequency of A is 440 Hz. On a piano keyboard, the distance between two white keys that are side by side is a whole note if there is a black key between them and is a semitone if there...
Suppose you have a categorical variable X with nine categories: A, B, C, D, E, F, G, H and I. The frequencies corresponding to these categories are 25, 12, 7, 4, 6, 2, 1, 0, and 2 Consider now X is a vector of these frequencies and give R expressions that return the categories and its corresponding frequencies as below: X A B D E F G I 25 12 7 4 2 1 0 Now you wish to remove...