Optimal Tree Access by Elementary and Composite templates in Parallel Memory Systems