Data Structure Teaching Practice: Discussion on Non-recursive Algorithms for the Depth-First Traversal of a Binary Tree

Author(s):  
Zhong-wei Xu
2015 ◽  
Vol 71 (7) ◽  
pp. 2668-2693 ◽  
Author(s):  
Saurabh Kotiyal ◽  
Himanshu Thapliyal ◽  
Nagarajan Ranganathan

Mathematics ◽  
2019 ◽  
Vol 7 (9) ◽  
pp. 791
Author(s):  
Mingchang Chih

Batching is a well-known method used to estimate the variance of the sample mean in steady-state simulation. Dynamic batching is a novel technique employed to implement traditional batch means estimators without the knowledge of the simulation run length a priori. In this study, we reinvestigated the dynamic batch means (DBM) algorithm with binary tree hierarchy and further proposed a binary coding idea to construct the corresponding data structure. We also present a closed-form expression for the DBM estimator with binary tree coding idea. This closed-form expression implies a mathematical expression that clearly defines itself in an algebraic binary relation. Given that the sample size and storage space are known in advance, we can show that the computation complexity in the closed-form expression for obtaining the indexes c j ( k ) , i.e., the batch mean shifts s , is less than the effort in recursive expression.


2022 ◽  
Vol 16 (2) ◽  
pp. 1-21
Author(s):  
Michael Nelson ◽  
Sridhar Radhakrishnan ◽  
Chandra Sekharan ◽  
Amlan Chatterjee ◽  
Sudhindra Gopal Krishna

Time-evolving web and social network graphs are modeled as a set of pages/individuals (nodes) and their arcs (links/relationships) that change over time. Due to their popularity, they have become increasingly massive in terms of their number of nodes, arcs, and lifetimes. However, these graphs are extremely sparse throughout their lifetimes. For example, it is estimated that Facebook has over a billion vertices, yet at any point in time, it has far less than 0.001% of all possible relationships. The space required to store these large sparse graphs may not fit in most main memories using underlying representations such as a series of adjacency matrices or adjacency lists. We propose building a compressed data structure that has a compressed binary tree corresponding to each row of each adjacency matrix of the time-evolving graph. We do not explicitly construct the adjacency matrix, and our algorithms take the time-evolving arc list representation as input for its construction. Our compressed structure allows for directed and undirected graphs, faster arc and neighborhood queries, as well as the ability for arcs and frames to be added and removed directly from the compressed structure (streaming operations). We use publicly available network data sets such as Flickr, Yahoo!, and Wikipedia in our experiments and show that our new technique performs as well or better than our benchmarks on all datasets in terms of compression size and other vital metrics.


2014 ◽  
Vol 631-632 ◽  
pp. 99-102
Author(s):  
Yu Cheng Song ◽  
Shao Li Jin

Traversing binary tree is an important algorithm in data structure. This paper analyses and discusses the recursive algorithm implementation of preorder-traversing binary tree through instance. It would contribute beginners to understand more deeply the process of preorder-traversing and enhance their programming.


2014 ◽  
Vol 2014 ◽  
pp. 1-4
Author(s):  
Indhumathi Raman ◽  
Lakshmanan Kuppusamy

The Fibonacci tree is a rooted binary tree whose number of vertices admit a recursive definition similar to the Fibonacci numbers. In this paper, we prove that a hypercube of dimensionhadmits two edge-disjoint Fibonacci trees of heighth, two edge-disjoint Fibonacci trees of heighth-2, two edge-disjoint Fibonacci trees of heighth-4and so on, as subgraphs. The result shows that an algorithm with Fibonacci trees as underlying data structure can be implemented concurrently on a hypercube network with no communication latency.


Sign in / Sign up

Export Citation Format

Share Document