0% found this document useful (0 votes)
4 views13 pages

ceiling_function

The document outlines a project by Advanced Ceiling Manufacturers (ACM) to analyze the properties of Incredibly Collapse-Proof Ceilings (ICPCs) using binary search trees (BSTs) to determine the correlation between tree shapes and construction quality. It details the input requirements, the approach for creating and comparing BSTs, and the challenges faced during implementation. The team also highlights their learnings from using Visual Studio Code, GitLab, and LaTeX.

Uploaded by

hemamythreya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views13 pages

ceiling_function

The document outlines a project by Advanced Ceiling Manufacturers (ACM) to analyze the properties of Incredibly Collapse-Proof Ceilings (ICPCs) using binary search trees (BSTs) to determine the correlation between tree shapes and construction quality. It details the input requirements, the approach for creating and comparing BSTs, and the challenges faced during implementation. The team also highlights their learnings from using Visual Studio Code, GitLab, and LaTeX.

Uploaded by

hemamythreya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

CEILING FUNCTION

BATCH 28

January 28,2023
Team Members:

21B01A0511-B.GLORY-CSE
21B01A0409-B.MADHAVI-ECE
22B01A0443-K.SWETHA KUMARI-ECE
21B01A01O5-B.POOJITHA-CIVIL
21B01A0111-M.PRASANNA-CIVIL
22B05A0101-B.SUJITHA-CIVIL
Problem Statement
▶ Advanced Ceiling Manufacturers (ACM) is analyzing the
properties of its new series of Incredibly Collapse-Proof
Ceilings (ICPCs),An ICPC consists of n layers of material, each
with a different value of collapse resistance.The analysis, ACM
wants to run will take the collapse-resistance values of the
layers, store them in a binary searchtree, and check whether
the shape of this tree in any way correlates with the quality of
the wholeconstruction.
▶ The rules for inserting a value v are:If the tree is empty, make
v the root of the tree.If the tree is not empty, compare v with
the root of the tree, If v is smaller, insert v into the leftsubtree
of the root, otherwise insert v into the right subtree.
▶ if two prototypes induce the same tree shape,ACM will analyze
them together,our task is to determine how many different tree
shapes they induce,Display the number of different tree shapes.
Input

The first line of the input contains two integers n (1 n 50), which
is the number of ceiling prototypes to analyze, and k (1 k 20),
which is the number of layers in each of the prototypes which are
the collapse-resistance values of the layers in a ceiling prototype,
ordered from top to bottom.
Output

Display the number of different tree shapes


Figure 1: Binary search tree
Approach

code creates a binary search tree (BST) data structure, which


is a type of tree where the left child node of a parent node has
a value that is less than the parent’s value, and the right child
node has a value that is greater than the parent’s value. code
also defines a method to check if two BSTs are similar, which
means that they have the same structure and the values in the
same positions. code takes input from the user for the number
of BSTs to be created and the values for each BST, then
creates the BSTs and checks if they are similar to any
previously created BSTs. a BST is unique (i.e. it is not similar
to any previously created BSTs), it is added to a list of unique
BSTs. Finally, the code outputs the number of unique BSTs.
Learnings

▶ Working on Visual Studio Code


▶ We learnt how to use GitLab to make projects.
▶ We learnt how to use Latex from scratch and make
presentation of it.
Challenges Faced

▶ Ensuring that the isSimilar method correctly determines if two


BSTs are similar, as it currently only compares the left and
right subtrees, but does not take into account the value of the
root node.
▶ Handling cases where the input is not valid or in the expected
format.
▶ The implementation doesn’t handle duplicate values in the
BSTs.
STATISTICS

▶ The Python code has overall 52 lines.


▶ The code has 4 methods.
They are:
▶ insert
▶ isSimilar
▶ insertNode
▶ isSimilarBST
Code
Code

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy