Consider an ordinary binary search tree. At each pointer, we keep size(p) which
ID: 3579424 • Letter: C
Question
Consider an ordinary binary search tree. At each pointer, we keep size(p) which is the number of vertices in the tree rooted by p. We say that p is alpha-balanced if size(left(p))lessthanorequalto alpha. size(p), size(right(p))lessthanorequalto alpha. size(p). An tree is an alpha balanced tree if every vertex in the tree roots an alpha balanced tree. Given a vertex p in an arbitrary binary search tree, show how to make the tree 1/2-balanced in time O(size(p)). Show that an alpha-balanced tree has height O(log n). From now on we speak on alpha > 1/2. We apply the following strategy. If when inserting a vertex to the tree, some vertex roots a non alpha-balanced tree, we apply the procedure to get a 1/2-balanced tree. Let the potential function of p be Q(p) = |size(left(p)) - size(right(p))|. and let Q = sigma_p Q(p) be the potential function with the sum going over all vertices. Show that the amortize cost of making a tree 1/2-balanced is O(1). Show that Insert into an alpha-balanced tree have amortize cost O(log n)Explanation / Answer
A software system method model is associate abstract illustration of a software system method. during this section variety of general method models ar introduced and that they ar bestowed from associate field viewpoint. These models may be accustomed justify totally different approaches to software system development. they'll be thought of as method frameworks which will be extended and tailored to make a lot of specific software system engineering processes. during this chapter the subsequent method models are introduced:
The falls model. during this model of software system method the basic method activities of specification, development, validation and evolution ar delineate as consecutive method phases like necessities specification, software system style, implementation, testing then on.
Evolutionary development. This approach interleaves the activities of specification, development and validation. associate initial system is speedily developed from abstract specifications. Then the initial system is refined by client inputs to supply a system that satisfies the customer’s wants.
Component-based software system engineering. the method models that use this approach ar supported the existence of a major range of reusable elements. The system development method focuses on integration these elements into a system instead of developing them.
These 3 generic method models ar wide utilized in current software system engineering observe. {they ar|they're} not reciprocally exclusive and are usually used along, particularly for big systems development. Sub-systems at intervals a bigger system could also be developed victimization totally different approaches. Therefore, though it's convenient to debate these models severally, in observe, they're usually combined.