Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
2. What is a binary tree?
• Property 1: each node can have up to two
successor nodes.
3. • Property 2: a unique path exists from the
root to every other node
What is a binary tree? (cont.)
Not a valid binary tree!
4. Some terminology
• The successor nodes of a node are called its children
• The predecessor node of a node is called its parent
• The "beginning" node is called the root (has no parent)
• A node without children is called a leaf
5. Some terminology (cont’d)
• Nodes are organize in levels (indexed from 0).
• Level (or depth) of a node: number of edges in the path
from the root to that node.
• Height of a tree h: #levels = L
(Warning: some books define h
as #levels-1).
• Full tree: every node has exactly
two children and all the
leaves are on the same level.
not full!
6. What is the max #nodes
at some level l?
The max #nodes at level is
l 2l
0
2
1
2
2
2
3
2
where l=0,1,2, ...,L-1
7. What is the total #nodes N
of a full tree with height h?
0 1 1
1
0 1 1 1
1
0
2 2 ... 2 2 1
...
n
h h
n
n i x
x
i
N
x x x x
using the geometric series:
l=0 l=1 l=h-1
8. What is the height h
of a full tree with N nodes?
2 1
2 1
log( 1) (log )
h
h
N
N
h N O N
9. Why is h important?
• Tree operations (e.g., insert, delete, retrieve
etc.) are typically expressed in terms of h.
• So, h determines running time!
10. •What is the max height of a tree with
N nodes?
•What is the min height of a tree with
N nodes?
N (same as a linked list)
log(N+1)
11. How to search a binary tree?
(1) Start at the root
(2) Search the tree level
by level, until you find
the element you are
searching for or you reach
a leaf.
Is this better than searching a linked list?
No O(N)
12. Binary Search Trees (BSTs)
• Binary Search Tree Property:
The value stored at
a node is greater than
the value stored at its
left child and less than
the value stored at its
right child
13. In a BST, the value
stored at the root of
a subtree is greater
than any value in its
left subtree and less
than any value in its
right subtree!
Binary Search Trees (BSTs)
14. Where is the
smallest element?
Ans: leftmost element
Where is the largest
element?
Ans: rightmost element
Binary Search Trees (BSTs)
15. How to search a binary search tree?
(1) Start at the root
(2) Compare the value of
the item you are
searching for with
the value stored at
the root
(3) If the values are
equal, then item
found; otherwise, if it
is a leaf node, then
not found
16. How to search a binary search tree?
(4) If it is less than the value
stored at the root, then
search the left subtree
(5) If it is greater than the
value stored at the root,
then search the right
subtree
(6) Repeat steps 2-6 for the
root of the subtree chosen
in the previous step 4 or 5
17. How to search a binary search tree?
Is this better than searching
a linked list?
Yes !! ---> O(logN)
21. Function NumberOfNodes
• Recursive implementation
#nodes in a tree =
#nodes in left subtree + #nodes in right subtree + 1
• What is the size factor?
Number of nodes in the tree we are examining
• What is the base case?
The tree is empty
• What is the general case?
CountNodes(Left(tree)) + CountNodes(Right(tree)) + 1
22. template<class ItemType>
int TreeType<ItemType>::NumberOfNodes() const
{
return CountNodes(root);
}
template<class ItemType>
int CountNodes(TreeNode<ItemType>* tree)
{
if (tree == NULL)
return 0;
else
return CountNodes(tree->left) + CountNodes(tree->right) + 1;
}
Function NumberOfNodes (cont.)
O(N)
Running Time?
24. Function RetrieveItem
• What is the size of the problem?
Number of nodes in the tree we are examining
• What is the base case(s)?
1) When the key is found
2) The tree is empty (key was not found)
• What is the general case?
Search in the left or right subtrees
25. template <class ItemType>
void TreeType<ItemType>:: RetrieveItem(ItemType& item, bool& found)
{
Retrieve(root, item, found);
}
template<class ItemType>
void Retrieve(TreeNode<ItemType>* tree, ItemType& item, bool& found)
{
if (tree == NULL) // base case 2
found = false;
else if(item < tree->info)
Retrieve(tree->left, item, found);
else if(item > tree->info)
Retrieve(tree->right, item, found);
else { // base case 1
item = tree->info;
found = true;
}
}
Function RetrieveItem (cont.)
O(h)
Running Time?
28. • What is the size of the problem?
Number of nodes in the tree we are examining
• What is the base case(s)?
The tree is empty
• What is the general case?
Choose the left or right subtree
Function InsertItem (cont.)
33. • Unbalanced trees are not desirable because
search time increases!
• Advanced tree structures, such as red-black
trees, guarantee balanced trees.
Does the order of inserting elements
into a tree matter? (cont’d)
34. Function DeleteItem
• First, find the item; then, delete it
• Binary search tree property must be
preserved!!
• We need to consider three different cases:
(1) Deleting a leaf
(2) Deleting a node with only one child
(3) Deleting a node with two children
38. • Find predecessor (i.e., rightmost node in the
left subtree)
• Replace the data of the node to be deleted
with predecessor's data
• Delete predecessor node
(3) Deleting a node with two
children (cont.)
39. • What is the size of the problem?
Number of nodes in the tree we are examining
• What is the base case(s)?
Key to be deleted was found
• What is the general case?
Choose the left or right subtree
Function DeleteItem (cont.)
45. Tree Traversals
There are mainly three ways to traverse a tree:
1) Inorder Traversal
2) Postorder Traversal
3) Preorder Traversal
46. 46
Inorder Traversal: A E H J M T Y
‘J’
‘E’
‘A’ ‘H’
‘T’
‘M’ ‘Y’
tree
Visit left subtree first Visit right subtree last
Visit second
47. Inorder Traversal
• Visit the nodes in the left subtree, then visit
the root of the tree, then visit the nodes in
the right subtree
Inorder(tree)
If tree is not NULL
Inorder(Left(tree))
Visit Info(tree)
Inorder(Right(tree))
Warning: "visit" implies do something with the value at
the node (e.g., print, save, update etc.).
48. 48
Preorder Traversal: J E A H T M Y
‘J’
‘E’
‘A’ ‘H’
‘T’
‘M’ ‘Y’
tree
Visit left subtree second Visit right subtree last
Visit first
49. Preorder Traversal
• Visit the root of the tree first, then visit the
nodes in the left subtree, then visit the nodes
in the right subtree
Preorder(tree)
If tree is not NULL
Visit Info(tree)
Preorder(Left(tree))
Preorder(Right(tree))
51. Postorder Traversal
• Visit the nodes in the left subtree first, then
visit the nodes in the right subtree, then visit
the root of the tree
Postorder(tree)
If tree is not NULL
Postorder(Left(tree))
Postorder(Right(tree))
Visit Info(tree)
53. Function PrintTree
• We use "inorder" to print out the node values.
• Keys will be printed out in sorted order.
• Hint: binary search could be used for sorting!
A D J M Q R T
60. ResetTree and GetNextItem
• User needs to specify the tree
traversal order.
• For efficiency, ResetTree stores in
a queue the results of the
specified tree traversal.
• Then, GetNextItem, dequeues the
node values from the queue.
void ResetTree(OrderType);
void GetNextItem(ItemType&,
OrderType, bool&);
61. Revise Tree Class Specification
enum OrderType {PRE_ORDER, IN_ORDER, POST_ORDER};
template<class ItemType>
class TreeType {
public:
// previous member functions
void PreOrder(TreeNode<ItemType>, QueType<ItemType>&)
void InOrder(TreeNode<ItemType>, QueType<ItemType>&)
void PostOrder(TreeNode<ItemType>, QueType<ItemType>&)
private:
TreeNode<ItemType>* root;
QueType<ItemType> preQue;
QueType<ItemType> inQue;
QueType<ItemType> postQue;
};
new private data
new member
functions