Group 3 – Maximum Depth of Nesting Ramakrishna Tammineedi Sudarshan Kodwani Chairoj Mekprasertvit Chris Orosco

Maximum depth of nesting is a measure of length.

Definitions:

Nested Chain-Is a singleton collection of nodes, connected by edges but does not contain any cycles. Node-An entity that is singleton or has a parent and a child Edge-Is a parent relationship to its child. Entity- Method

E-Maximum nested Chain R-Iterating up a singleton chain of nodes and counting the number of parents m-class

Unit of measurement = depth Value = maximum depth level Measurement instrument-iterating up a nested chain and counting the number of parents.

Since the edge between nodes is the unit of depth, then we can say that one node is depth zero and no edge is depth zero. We do not define a nested chain that contains no nodes.

PL1: Non-negativity

Length(s) >= 0

S = (Max nested chain, 0) = = 0 S = (Max nested chain, -1) = = PL2

If we have a node (a) that is singleton, then there is no recursion and no edges. If we subtract one edge then it becomes not defined and PL2 will hold.

PL2: Null Value

E = Phi => Length(s) == 0

S = (no nested chain, any number of iterations) = = 0 S = (null, any number of iterations) = = 0 Or

E = Phi => Length(s) == 0

S=(nested chain, negative number of iterations) == 0

From our definition that we do not define a nested chain with zero nodes or a negative number of iteration calls, we can say that PL2 Holds because it is null.

Pl3: Nonincreasing Monotonicity

If S = and Em = {a, b ,c d} and Rm = {ab, bc, cd} and m = and m is subset of S We can only add new relationship ac, ad and bd since there is a path from one to the other in the nondirected graph (same connected component) S’ = and R’ = R U {, , } and , , are not member of R and a, b, c, d are member of Em. Adding new relationship will not increase Length of S (Length(S) >= Length(S’) Max Depth of Nesting holds .

Pl4: Nondecreasing Monotonicity

Module 1 Module 2

The length of module1 is 3 and the length of module2 is 2. Adding an edge between the elements of the two modules can only increase the length and cant be decresed. After adding the edge the length is 4. This applies to edges between other elements as well. Hence adding an R between modules does not decrease its length. Hence property 4 is satisfied. Pl5: Disjoint Modules.

If we are looking for the maximum depth of nesting then if we have two singleton nested chains of different values and only want the maximum depth of either on of them, then we count the lengths of both chains and take the largest value. As shown in example: The length of Module 1 is 3 and the length of module 2 is 2 and when we want to calculate the maximum length by counting Union those models, the maximum length will be the Max{Module 1, Module 2} = 3

Module 1: Module 2:

A E

B F G

C H

D